 I'm going to give a very simple introduction to using IPERF on the command line, a network performance measurement tool. IPERF can be used to generate packets to be sent using either TCP or UDP from one computer to another, and therefore from that it measures the throughput and other performance metrics. So here I'll use it just to demo sending packets from my laptop to another computer on the same LAN which is connected to a switch. So in fact my laptop is connected via a wireless LAN to the wireless router which is also a switch which is then connected directly to the other PC. On the left with the black background is what I'm doing on my computer and on the right in the white background I'm logged in to the other computer, Saturn, so I'll run commands on both. So IPERF can act as either a client or a server, so we need both for the test to work. So on Saturn on the other computer I'll start IPERF, there are several different options available, you can read the man page to see them all and their descriptions. Here we'll start IPERF as a server, the minus S option to start as a server, and start that. And we see that the server says it's listening on a TCP port by default of 5001, so unless you specify IPERF will use TCP as the transport protocol, and the window size used by the server is the default by the operating system there, 85 kilobytes. And now if we go to my laptop which is going to be the client we'll start the IPERF test by running in the client mode where we need to specify the IP address of the server. So you need to know the IP address, I know the IP address of the server in this case 192.168.1.14, and there are other options but let's just see with the basic test we start the test and it connects from the client to the server and it's now running the test by sending packets as fast as possible from the client to the server. And by default it runs for 10 seconds, so at the end of that 10 seconds both the client and server reported the results of the test. So we saw that on my computer on the left hand side that I connected to the server, I used on my client the port 53828, transferred over 10 seconds, 17 megabytes of data, which averages to 14.2 megabits per second. In the server we see the results which are similar but because maybe difference is in timing then you see the interval is 10.2 seconds and therefore the same amount of data transferred but a slightly slower bandwidth or throughput in this case, 14.0 megabits per second. So that's it, that's the basic use of IPERF. Note on the satin on the server on the right hand side that IPERF is still running. So we can run another test from the client, by default it tests for 10 seconds, we can change that with the minus T option and it starts another test, connects to the server and for 20 seconds sends as much data as possible, TCP, the transport protocol limits the throughput using its flow control, congestion control and error control mechanisms and at the end we see a throughput or a bandwidth of 18 megabits per second. So that's the example of using TCP, so essentially IPERF is an application that generates the data and sends it to the transport protocol as fast as possible and it's up to the transport protocol to deliver it to the destination. We can also run tests using UDP instead of TCP where we're not limited by the transport protocol mechanisms, that is UDP just sends as fast as possible without any error control, congestion control or flow control. So let's on the server, on satin on the right hand side cancel the server and we'll start the server again but in UDP mode with the minus U option. So it's now listening on a UDP port and on our client, on my laptop and the left hand side we will run a test to the same destination using it's a client, the minus C option and the minus U to tell it to use UDP and with UDP we need a specific password to specify the speed at which the application will send. With TCP we do not do that, the application simply delivers data to the transport protocol and TCP the transport protocol controls the speed. Here UDP does not control the speed, it delivers as much as it possibly can across the link or across the network. So we need to specify some sending rate of the UDP client using the minus B option for bandwidth and I'll set it at two megabytes per second, two megabits per second sorry, two M and start the test, it should run for 10 seconds by default and we see the results at both the client and the server. So focusing on the server on the right hand side over that 10 second period there were 2.39 megabytes of data transferred which averages at a bandwidth or a throughput of two megabits per second which is what we'd expect. Our UDP client sends at two megabits per second, we cannot get any higher than that and because our network capacity is sufficient we receive at two megabits per second. With the UDP test the server also reports a jitter, a variance of the delay between packets and any packet loss, in this case no packets were lost. One datagram arrived out of order. So that's it, with IPERF we can do simple tests between a client and a server of the network performance primarily the throughput but also other factors like packet loss. With TCP you simply specify the server that you want to connect to and you can specify the time as an option and it will send as much data as possible and report the throughput. With UDP you need to also specify the sending rate at the client. By default it will be one megabit per second and we can stop the server.