Many companies are upgrading their wireless networks to 802.11n to achieve higher throughput, wider coverage, and higher reliability, while ensuring Wireless LAN (WLAN) to ensure sufficient network capacity and coverage. Next, we will discuss how to use iPerf to measure network performance. This is a simple and easy-to-use tool for measuring the throughput, loss, and latency of TCP/UDP.
Preparations before application
IPerf is a tool dedicated to simplifying TCP Performance Optimization. It can be used to easily measure the maximum throughput and bandwidth. When used together with UDP, iPerf can also measure data loss and latency (jitter ). IPerf can run on any IP network, including local Ethernet, Internet access and Wi-Fi network.
Before using iPerf, you must install two components: the iPerf server (used to listen for incoming test requests) and the iPerf client (used to initiate a test session ). IPerf can be obtained through open source code or executable binary. It supports many operating system platforms, including Win32, Linux, FreeBSD, MacOS X, OpenBSD, and Solaris. You can download iPerf Win32 installer on NLANR, while Java GUI version (JPerf) can be downloaded from SourceForge.
To measure the Wi-Fi performance, you may need to install iPerf on the upstream location of the Ethernet host of the AP you are testing-this is your testing server. Next, install iPerf on one or more Wi-Fi laptops-These will be your test client. This is the application network between a typical Wi-Fi client and a wired server. If you want to measure AP performance, you can place the iPerf server and AP on the same LAN and connect them through high-speed or ultra-high-speed Ethernet. If you want to clear the bottleneck, you can place the iPerf server in the same location as the actual application server, so that there will be a comparable network channel.
In addition, the iPerf server and client can be installed on a Wi-Fi laptop at the same time. When you want to support video or voice communication on a wireless client, it is helpful to measure the performance of the client to the client. Similarly, make sure that the iPerf traffic passes through the entire network channel you want to test. For example, if you want to measure the best performance on a Wi-Fi client in an adjacent location, you must connect your iPerf client and server to the same AP. If you want to observe how the network performance is affected by the routing through the upstream switch or WAN, you can connect your iPerf server to a central AP, and connect the iPerf client to the AP in different locations.
Run iPerf
By default, the iPerf client establishes a TCP session with the specified iPerf server listening to port 5001. For example, run the command iperf-s at the command prompt to open the iPerf server, and then open another window to start your iPerf client:
The preceding command is used to measure the throughput of a computer loop address (127.0.0.1. If the installation fails, iPerf is not correctly installed. By default, iPerf runs a 10-second test to measure the total number of transmitted bytes (such as 270 MB) and the estimated bandwidth usage (such as 226 MB per second ). The test length can be controlled by the specified time parameter (-t seconds) or buffer parameter (-n buffers. You can also view the test results in the specified time interval (-I seconds.
If you want to run multiple tests for a long time, you should be more willing to run the iPerf server as the background program and write the server output into a log file. On the Win32 platform, iPerf can be installed as a service (iPerf -- s -- D -- o logfile.txt. If the traffic you test is going to pass the network firewall, make sure that port 5001 is enabled or that the specified iPerf uses an opened port (for example, iPerf -- c -- p 80 ). If your iPerf server is behind the NAT firewall, you may need to configure a port forwarding rule for connection (this is also applicable in the two-way test of server-to-client traffic ). Finally, disable your iPerf client and any personal firewall on the server. When the client can reach the server, you can start to measure network performance.
Measure TCP throughput
To determine the maximum TCP throughput, iPerf tries to send data to the server as quickly as possible from the client. By default, data is sent in a buffer of 8 KB, which is also the default TCP window size value of the operating system. To simulate a specific TCP application, you can specify your iPerf client to send data from a specific file (-F file name) or interactive input (-I. For example:
If you do not specify the sending method, the iPerf client will only use a single thread. You can modify it to use multiple parallel threads (-P number) to send data. When testing Wi-Fi, multithreading on the same laptop may slightly increase the overall throughput.
N a single laptop are still sharing time on one Wi-Fi adapter.
However, sometimes you will need to use multiple laptops with their own Wi-Fi adapters to simulate the performance of user experience in several different locations. This is because the multithreading running on the same notebook still shares the time used on the same Wi-Fi adapter.
On the other hand, if your laptop has multiple active adapters, you can use the IP address (-B IPAddress) to bind the iPerf client to an adapter. This is important for a Multi-connection notebook that connects both Ethernet and Wi-Fi (3G, Wi-Fi.
IPerf was originally developed to assist in TCP Parameter Optimization, but here we do not want to study the TCP Window Scale and maximum segment length, because this is not the focus of our current discussion. However, when testing a high-throughput AP, you may find it necessary to tune TCP parameters so that you can get a larger throughput on each iPerf client-For details, see DrTCP.
Monitor wireless network performance using test tools iPerf: Measure UDP packet loss and latency
IPerf can also be used to measure UDP packet throughput, packet loss, and latency metrics. Unlike TCP, UDP does not send traffic as quickly as possible. In contrast, iPerf tries to send 1 Mbps of traffic, which is packaged in a 1470-byte UDP packet (a frame of Ethernet ). We can increase the data volume by specifying a target bandwidth parameter, in Kbps or Mbps (-B # K or -- B # M ). Example:
However, the above example only shows how fast the iPerf client can transmit data. To get more data about UDP sending, we must view the results on the server:
In this way, we can see the throughput (measured every one second) and the number of packet loss (the comparison of the data received by the lost data) and latency (such as jitter-The Average smoothing Value Difference in continuous transmission ). Latency and loss can be compatible with application changes. For example, video streaming media can tolerate more latencies by buffering input, while voice communication degrades significantly as latency increases.
The UDP test can be optimized by changing the packet buffer length, measured in Kbytes or Mbytes (-l # K or # M ). Unlike the 1500-bit MTU (maximum conversion unit) of an Ethernet frame, 802.11 data frames can reach 2304 bits (before encryption ).
However, if the path you are testing includes Ethernet and 802.11, you need to control the length of your test data packet so that it is within an Ethernet frame to avoid sharding.
Another interesting iPerf UDP test option is the Type of Service (ToS), which ranges from 0x10 (minimum latency) to 0x2 (minimum cost ). In a WLAN that uses 802.11e to control service quality, ToS is mapped to the Wi-Fi multimedia (WMM) access scope.
Comparison
In the 802.11a/B/G network, the radio transmission performance changes are very similar in both directions. For example, when the distance causes a decrease in data transmission rate or interference causes loss of important data packets, the throughput of the sent and received applications is affected.
In 802.11n networks, MIMO antennas and multi-dimensional spatial streams make the problem different. The data frame sent from the notebook to the AP may (intentionally) Use a space path completely different from the one sent from the AP to the notebook. The result is that tests in both directions are very important. Fortunately, iPerf itself already has this function, which is controlled by two options:
The -- d option is used to tell the iPerf server to connect back to the port specified by -- L of the iPerf client immediately to support both directions of transmission at the same time.
The -- r option is similar, but it tells the iPerf server to repeat the previous test in the opposite direction after the client test is complete.
Finally, if you need to support the multi-point transfer application, you can use the-B Option to specify the multi-point Transfer Group IP address to start multiple iPerf servers. Then open your iPerf client and connect to the previously started multicast group iPerf server.
Use the test tool iPerf to monitor wireless network performance: Graphical Test Result
As described in this article, the iPerf program can be run in the command line, or in a Java implementation front-end tool named JPerf. JPerf not only simplifies the construction of complex command line parameters, but also saves test results-and displays results in real time in a graphical manner.
Figure 1 run iPerf with JPerf
In fact, iPerf testing tools are embedded into some other network traffic analysis tools-including underlying LAN analysis tools such as AirMagnet. For example, the following screen shows the interaction between AirMagnet running on a Wi-Fi notebook as an iPerf client and a regular iPerf server installed on a wired network.
Figure 2 run iPerf using AirMagnet
Summary
As we can see, iPerf simplifies the performance measurement of end-to-end applications based on TCP data streams and UDP data packets. However, iPerf still cannot simulate all types of applications-for example, it is not very good to simulate interactive Internet access. At the same time, WLAN adapters used for iPerf Wi-Fi testing will also affect your testing-to get better test results, we can configure a representative adapter similar to "actual" users.
Even so, iPerf is still a very convenient tool that helps you generate and detect WLAN application traffic. At the same time, because iPerf can be easily obtained using open-source software, it is a good way to use it to repeatedly create a test environment in other locations-such as branch offices, supplier technical support, and so on. For more information about iPerf, read older files on NLANR or browse the new project page on SourceForge.
Author Profile
Lisa A. Phifer is vice president of Core Competence Inc. She has been working for more than 20 years in the design, implementation and evaluation of data communication, Internet, security and network management products, she also provides consulting services on security requirements, product evaluation, and emerging technical practices for large and small companies.