 It's working in VirtualBox, in VirtualBox you have a virtual machine called base, okay? That's, you download this virtual machine, it's just an ISO of a Linux virtual machine and you've installed some other software and that's there. And if the other software is installed correctly, you'll be able to automatically create your simple network and I'll try and do it, see if it works. Now I'm doing this, my, we talk about a host computer, my laptop, the host operating system is Ubuntu Linux in my case, but this works on Windows and OS X, but you need a terminal or in OS X in a Mac you have a terminal, fine, in Windows the terminal is provided by SigWin, so on Windows you need to install this CYGWIN, SigWin which provides a terminal and then you can run the same commands as what I'm doing here. Let's do it and then we'll run the software internally. You've installed this software called VertNet and then you create a topology, topology number two is a topology with just two nodes, A and B connected via a single link and it goes away and all it does is creates two nodes based upon the base node, it copies the virtual machines and it sets up the network connections so that they can talk to each other. So it takes a couple of minutes to boot, so it's booted now, node one and then set up the network interface and now it moves on to node two and it boots up, you cannot see it but here it's booting up into the virtual machine and setting up the network interfaces and then it finishes, so it powers both of those nodes off. Then you need to start those nodes and log into them, the Linux virtual machines, so you need to learn a little bit about the command line but not much. You can start them in virtual box, just right click or start, I've also provided a script that will start them on the command line here, it will both start and log into them. I started node one and in the other terminal I'll start node two and they boot and I'm logged into node one, so username network, the password for everything is network so that's easy to remember but it automatically logs in, now I can run my software in node one and node two should have started and also on there, let's bring up node two just to see, alright. So now you have two computers on your computer and they are connected in a very simple network with one link between them and we're going to use this link or this network to test flow control and stop and wait ARQ. So the assignment is not about setting up the network, it's just about testing the performance of remember stop and wait flow control, sliding window flow control and also stop and wait ARQ. So once you get to this stage, now start thinking about those protocols. We've studied them so you know how they work, they're quite important because they're used in the internet quite often or variants of them are. So I've provided inside these some Python code that will, very simple implementation of those protocols, let's run it and just explain what it does, where to change into some directory, again the instructions are on the website, I'll zoom in so people can see if they want to, there's a server version so it's Python code, it's going to wrap around but there's a server which implements the receiver with respect to these protocols so think of that as a server. We're going to send data from the client to the server and we can choose between the different variations, we can use stop and wait which we'll do at the start, so with stop and wait the client will send one data frame to the server, the server will send back an ARQ then move on to the next one and so on and what you want to do in the assignment is to measure how it performs, how long it takes and what the throughput is and this just provides you a way to do those measurements. There are some options when you start it, what are they? Again you read on the website about what these numbers mean, the first one is the number of packets we're going to send from client to server, 100. The next one is the size of each data frame, remember we have a data frame like we calculated today, we said 1,250 bytes, well in this case we start 10,000 bytes, the reason I start with a slightly larger number is just so that this software works efficiently, not the protocol or the software but we'll see the difference. We're going to send 100 data frames each at 10,000 bytes in length, we're going to use a window size of 1 which means stop and wait, so stop and wait is a specific instance of sliding window, so window size of 1 and then when it runs it's going to print some things on the screen. Sometimes we'd like to see the details of which packets being sent, which is being received, we can log out more details. This number 4 just means how much detail you want to show on the screen, you may try other values, we'll see the difference. The last thing is the error rate, stop and wait flow control, we ignore errors, we assume there are no errors, but with stop and wait ARQ that deals with the case if we lose data how do we retransmit. So this last parameter says, so because we don't have a real link we need to introduce packet loss, we don't have a real network we're going to have no packet loss, so this last one makes some fake packet loss and this set at 0 means 0% of packets are lost, so still no loss, if we increase it to 0.1 means 0.1% of the packets are lost, I'll set it to 0 to start. We need to do that on the server, but at the same time we need to do that in the client or similar. There's a client, 100 packets it should be the same as the server's going to receive, the window is 1 and here we've set a log level of say 4, here we don't worry about the error rate but another parameter of the client with ARQ is the timeout period. Remember the client sends a data packet, if it is lost it will timeout after some time, how long? That's the last parameter here. It doesn't matter because I'm not going to lose any packets, I'll set it to 1 second. When I press enter here once the server starts the client will start sending 100 packets to the server. Of course we should start the server first, as with any client server application the server needs to be running for the client to be able to send data to it. I start the server and on node 2 start the client and it starts printing out on the screen at different times what's happening. We'll see at the end but it's quite slow. You can see it's just a record of transmitting data number 10 at what time, when we receive the app at what time. I was recording the time of when we send everything, when we receive everything and from that we can calculate at the end the throughput. It's only up to 26, 27. It needs to get up to 100. That's at the client, at the server it's similar. It's recording when we receive data, when we receive data, how much data, then we transmit an ACK with some ACK number. Remember we received data 48, we transmit ACK 49, the next number expected and some other details about the window size. One of the parameters when we started this code was the log level. How much information is printed here? If you change that number you'll get more or less information. It'll perform the same operation but it'll just print more or less on the screen. Printing on the screen is useful for you to understand what's happening. Once you understand what's happening then you can hide all this and just get the final results at the end. This is some summary statistics of what happened this part. The duration took 108 seconds for that. We received 100 original packets. Sometimes we distinguish between receiving an original packet and a retransmitted but there were no errors. We sent 100 ACKs. Each packet was 10,000 bytes so we received 1 million bytes in total 100 times 10,000. If there were retransmissions these numbers would be different but there are no retransmissions here. Each packet contains data plus header and the header is due to the real protocols that are being used here. So this prints out the total and you see that there's 1 million bytes of real data but data plus header is 1 million 400 or 170,000 bytes. So in total there's 470,000 bytes overhead. No errors. Throughput 9,215 bits per second. I never remember. You can calculate. Total data received 1 million this is in bytes divided by 108 seconds. I think this is in bytes per second. So calculate. 1 million divided by 108, yes. It's 9,215 bytes per second. So that's the number you care about. 9 kilobytes per second, our throughput. Why was it so low? Why did it take a long time? We were using stop and wait. You saw it was very slow to transfer my data from one node and to get an act back. Giving us a throughput of about 9 kilobytes per second. Why? What affects throughput in stop and wait? This is what you need to know to do the assignment. Why would it be so slow in this case? Remember throughputs related to with stop and wait we transmit the data. We wait for the data to propagate the act to be transmitted and to propagate back. If the propagation is large relative to the data transmission, we'll get a low throughput. That is if we spend a long time waiting, maybe if you can visualize it, it's transmission to propagation. The act is usually small. If the data transmission relative to the propagation, if the transmission is very small and the propagation large, throughput very low. What was the data rate in this case? What was the data rate? How fast to send between two virtual machines? Well, it's not set. Remember we don't have a real link, we have a virtual link. Just communicate between two virtual machines on your computer. The data rate to send between them depends upon virtual box, how fast your CPU is, how much RAM you have and other factors. So we need to artificially control the data rate. So I've provided another piece of software that'll allow you to do that, to set the data rate. And I never remember the commands, so I'll copy and paste. It's this long one. This is on node two. I'll explain it once we do it. The password is network. This long command, you can have a look at it, but sets the data rate to be 100,000 kilobits per second, 100 megabits per second. And sets the delay to be zero milliseconds. You can change those two values. You don't need to change the rest, but those two you can change. And that's from node two to node one. Remember on different links, we may have different characteristics. If you've got home ADSL, up link and down link rates are different. So let's change and set for node one to different values. And on node one, I set it to be one megabit per second, sending 10 millisecond delay. And it becomes sort of like this. Two nodes. The link from node one to node two, we set the data rate to be one megabit per second and have a delay of 10 milliseconds. So think the propagation delay from one to two is 10 milliseconds. And from node two back to one, propagation delay is zero. And the link rate is 100 megabits per second. Now of course the propagation delay is not zero, but again it's going to be very close because internally, inside the virtual machines, the delay to send between one process and another process is very, very small. There are just two processes on your computer. So this is the way that we control the link characteristics. And what you should do is set node two to node one to be these values always and forget about them. And change from node one to node two. If you change the delay, you'll get different throughput. Once we've set those characteristics, we'll run again our experiment. We'll run our server and our client. And you notice it's faster. So in this case, the same amount of data took us 11 seconds, not 108 seconds. We got a throughput of 85 kilobytes per second. So your task now is to use this software, just keep repeating the commands, but with different parameters. Different link data rate, different delay and different values of, especially the data size, the window. Here we use stop and wait, window of one. You can change that to say a window of three, seven, fifteen. How to change? We'll run it one more time. That one took 11. Window changed to seven. And on the client, we should set the same window size they need to match. And that's it. All right. I don't know if there will be much difference in performance here. It's about the same. It would depend upon the link conditions and the different parameters of stop and wait, flow control. So make sure you've got this software up and running. And then you've got the task of running many experiments, collecting results and plotting them. And the last thing for today, it's been a long lecture, I've added to the assignment instructions down the bottom some, an example report and a spreadsheet that you can use. So have a look at that. The report that you need to submit, I give a simple template. You just, you can copy and paste this, read through the yellow pass, delete them because they give instructions. And you don't need to submit much. Something about your, about your computer you used. The parameter values you used. The range of values like what range of data rates did you try in your experiments. So just fill in the table values. I give examples. They're not correct examples, but just of how to format. You need to compare the measured results against your expected results. So you need to give some equations for the expected results. That is, think about from the lectures, how do you calculate the throughput of stop and wait and sliding window. And then give results to compare measured versus expected. Then give some plots. For example, you measure and you get these values. Your equation tells you it should be these values. They should be similar. They may not be identical. And importantly you care about efficiency. The experiments measure throughput, but efficiency is just throughput divided by data rate. But express it in efficiency versus the parameter. For example, as you increase the size of data, the efficiency goes up. Maybe that's the result. This is just a fake piece of data. Then you try a plot with different parameters. As you change the window, the efficiency does what? As you change the link data rate, what happens with the efficiency? And you have a short description of each plot and that's your report. You've got all day Wednesday and Thursday to finish as much as possible of your assignment.