Hack 36 Estimating Network Performance

figs/moderate.giffigs/hack36.gif

Just how quickly can you squeeze data through your AP?

Many people use online tools like DSL Reports' Speed test (http://speedtest.dslreports.com/) to estimate the performance of their Internet connection. When run from a machine directly connected to the Internet, this can give you a fairly good indication of your upload and download capacity.

This tool becomes less useful when trying to estimate the available bandwidth on other networks. For example, on a large wireless network, it is useful to measure the actual capacity of a network link regardless of the speed of the Internet connection. One useful utility for measuring performance is iperf. It is a simple, freely available tool that will run on Linux, BSD, OS X, and even Windows. You can download it online at http://dast.nlanr.net/Projects/Iperf/.

In order to measure performance, it needs to be used in pairs (one instance at either end of a link). On one end of the link to be measured, start up iperf in server mode:

rob@livia:~$ iperf -s

Note that it doesn't matter which end is used as the "server," as both upload and download speeds will be tested. On the other end of the link, run iperf in client mode, specifying the server to be tested:

rob@caligula:~$ iperf -c livia -r ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 32.0 KByte (default) ------------------------------------------------------------ ------------------------------------------------------------ Client connecting to livia, TCP port 5001 TCP window size: 32.5 KByte (default) ------------------------------------------------------------ [  4] local 10.15.6.33 port 50421 connected with 10.15.6.4 port 5001 [ ID] Interval       Transfer     Bandwidth [  4]  0.0-10.2 sec  2.95 MBytes  2.43 Mbits/sec [  4] local 10.15.6.33 port 5001 connected with 10.15.6.4 port 60977 [ ID] Interval       Transfer     Bandwidth [  4]  0.0-10.0 sec  3.09 MBytes  2.60 Mbits/sec rob@caligula:~$

By default, iperf uses port 5001 for its communications. If this port is in use, you can specify a different one with the -p switch on both sides:

rob@livia:~$ iperf -s -p 30000

You can specify a different port and on the client as well:

rob@caligula:~$ iperf -c livia -r -p 30000 ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 32.0 KByte (default) ...

If you don't want just anyone connecting to your iperf server, don't forget to kill the server side with a Control-C when you are finished making measurements.

In addition to simple TCP testing, it can also manipulate various TCP parameters, test UDP streams, use multicast or IPv6, and even use a custom defined data stream for testing. Running with the defaults should give you a good basic idea of how much data you can cram through your connection, particularly if it is not being used by any other clients. For more complete details on some of the magic this flexible tool can work, see the online documentation at http://dast.nlanr.net/Projects/Iperf/iperfdocs_1.7.0.html.



Wireless Hacks. 100 Industrial-Strength Tips and Techniques
Wireless Hacks. 100 Industrial-Strength Tips and Techniques
ISBN: N/A
EAN: N/A
Year: 2003
Pages: 158

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net