OSTU - Quickstart Guide for IPERF (by Tony Fortunato)

24,429 views

Published on

Tony Fortunato is a Senior Network Specialist with experience in design, implementation, and troubleshooting of LAN/WAN/Wireless networks, desktops and servers since 1989. His background in financial networks includes design and implementation of trading floor networks. Tony has taught at local high schools, Colleges/Universities, Networld/Interop and many onsite private classroom settings to thousands of analysts.

Published in: Technology
1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total views
24,429
On SlideShare
0
From Embeds
0
Number of Embeds
770
Actions
Shares
0
Downloads
387
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide
  • OSTU - Quickstart Guide for IPERF (by Tony Fortunato)

    1. 1. IPERF with Windows QuickStart Tony Fortunato, Sr Network Specialist The Technology Firm
    2. 2. Why use IPERF? <ul><li>IPERF can be used for the following tasks; </li></ul><ul><ul><li>To determine how much bandwidth 2 stations can generate </li></ul></ul><ul><ul><li>Since your hard drive does not have to be accessed, the drive latency doesn’t get factored into the final throughput </li></ul></ul><ul><ul><li>You can change the TCP or UDP port number if you want to test port based packet/bandwidth shaping or access lists </li></ul></ul><ul><ul><li>Document the effects or layer 1 issues (i.e. noise, half/duplex mismatch, etc..) </li></ul></ul><ul><ul><li>Illustrating the impact of tasks that rob bandwidth like backups, batch processing, etc </li></ul></ul><ul><ul><li>Document UDP vs TCP performance </li></ul></ul>
    3. 3. What is IPERF? <ul><li>IPERF is; </li></ul><ul><ul><li>Go get it at http://sourceforge.net/projects/iperf </li></ul></ul><ul><ul><li>Portable application – no installation required </li></ul></ul><ul><ul><li>Client and server configuration is a simple switch – no different software required </li></ul></ul><ul><ul><li>Runs on multiple operating systems; Linux, MacOS, OpenBSD, Solaris and Windows </li></ul></ul>
    4. 4. IPERF Syntax <ul><li>> iperf -h </li></ul><ul><li>Usage: iperf [-s|-c host] [options] </li></ul><ul><li>iperf [-h|--help] [-v|--version] </li></ul><ul><li>Client/Server: </li></ul><ul><li>-f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes </li></ul><ul><li>-i, --interval # seconds between periodic bandwidth reports </li></ul><ul><li>-l, --len #[KM] length of buffer to read or write (default 8 KB) </li></ul><ul><li>-m, --print_mss print TCP maximum segment size (MTU - TCP/IP header) </li></ul><ul><li>-o, --output <filename> output the report or error message to this specifi </li></ul><ul><li>d file </li></ul><ul><li>-p, --port # server port to listen on/connect to </li></ul><ul><li>-u, --udp use UDP rather than TCP </li></ul><ul><li>-w, --window #[KM] TCP window size (socket buffer size) </li></ul><ul><li>-B, --bind <host> bind to <host>, an interface or multicast address </li></ul><ul><li>-C, --compatibility for use with older versions does not sent extra msgs </li></ul><ul><li>-M, --mss # set TCP maximum segment size (MTU - 40 bytes) </li></ul><ul><li>-N, --nodelay set TCP no delay, disabling Nagle's Algorithm </li></ul><ul><li>-V, --IPv6Version Set the domain to IPv6 </li></ul><ul><li>Server specific: </li></ul><ul><li>-s, --server run in server mode </li></ul><ul><li>-D, --daemon run the server as a daemon </li></ul><ul><li>-R, --remove remove service in win32 </li></ul><ul><li>Client specific: </li></ul><ul><li>-b, --bandwidth #[KM] for UDP, bandwidth to send at in bits/sec </li></ul><ul><li>(default 1 Mbit/sec, implies -u) </li></ul><ul><li>-c, --client <host> run in client mode, connecting to <host> </li></ul><ul><li>-d, --dualtest Do a bidirectional test simultaneously </li></ul><ul><li>-n, --num #[KM] number of bytes to transmit (instead of -t) </li></ul><ul><li>-r, --tradeoff Do a bidirectional test individually </li></ul><ul><li>-t, --time # time in seconds to transmit for (default 10 secs) </li></ul><ul><li>-F, --fileinput <name> input the data to be transmitted from a file </li></ul><ul><li>-I, --stdin input the data to be transmitted from stdin </li></ul><ul><li>-L, --listenport # port to recieve bidirectional tests back on </li></ul><ul><li>-P, --parallel # number of parallel client threads to run </li></ul><ul><li>-T, --ttl # time-to-live, for multicast (default 1) </li></ul>Miscellaneous: -h, --help print this message and quit -v, --version print version information and quit [KM] Indicates options that support a K or M suffix for kilo- or mega- The TCP window size option can be set by the environment variable TCP_WINDOW_SIZE. Most other options can be set by an environment variable IPERF_<long option name>, such as IPERF_BANDWIDTH. Report bugs to <dast@nlanr.net>
    5. 5. Sample IPERF TCP Upload <ul><li>Server </li></ul><ul><li>iperf –s </li></ul>client iperf –c server_ip Input > iperf -s ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 8.00 KByte (default) ------------------------------------------------------------ [1880] local 10.44.10.102 port 5001 connected with 10.44.10.102 port 3383 [ ID] Interval Transfer Bandwidth [1880] 0.0-10.0 sec 1.52 GBytes 1.30 Gbits/sec > iperf -c porky ------------------------------------------------------------ Client connecting to porky, TCP port 5001 TCP window size: 8.00 KByte (default) ------------------------------------------------------------ [1916] local 10.44.10.102 port 3383 connected with 10.44.10.102 port 5001 [ ID] Interval Transfer Bandwidth [1916] 0.0-10.0 sec 1.52 GBytes 1.30 Gbits/sec Output In this example the laptop will perform an upload to the Desktop You want to consider the –r option if you want to perform an upload and then download
    6. 6. Sample IPERF TCP Upload/Download <ul><li>Server </li></ul><ul><li>iperf –s </li></ul>client iperf –c server_ip -r Input S:TTFsoftwareiperf>iperf -s ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 8.00 KByte (default) ------------------------------------------------------------ [ [1876] local 10.44.10.103 port 5001 connected with 10.44.10.102 port 3514 [ ID] Interval Transfer Bandwidth [1876] 0.0-10.0 sec 13.6 MBytes 11.4 Mbits/sec ------------------------------------------------------------ Client connecting to 10.44.10.102, TCP port 5001 TCP window size: 8.00 KByte (default) ------------------------------------------------------------ [1868] local 10.44.10.103 port 1162 connected with 10.44.10.102 port 5001 [ ID] Interval Transfer Bandwidth [1868] 0.0-10.0 sec 16.1 MBytes 13.5 Mbits/sec > iperf -c r2d2 -r ------------------------------------------------------------ Server listening on TCP port 5001 TCP window size: 8.00 KByte (default) ------------------------------------------------------------ ------------------------------------------------------------ Client connecting to r2d2, TCP port 5001 TCP window size: 8.00 KByte (default) ------------------------------------------------------------ [1852] local 10.44.10.102 port 3514 connected with 10.44.10.103 port 5001 [ ID] Interval Transfer Bandwidth [1852] 0.0-10.0 sec 13.6 MBytes 11.4 Mbits/sec [1948] local 10.44.10.102 port 5001 connected with 10.44.10.103 port 1162 [ ID] Interval Transfer Bandwidth [1948] 0.0-10.0 sec 16.1 MBytes 13.5 Mbits/sec Output In this example the laptop will perform an upload to the Desktop You want to consider the –r option if you want to perform an upload and then download
    7. 7. IPERF Window Size <ul><li>The –w option states that it modifies the TCP window size (socket buffer size) which some people expect to literally change the TCP WINDOW value of the sender. </li></ul><ul><li>I explain that this option modifies the application send block size. </li></ul><ul><li>The default is 8KB. </li></ul><ul><li>We’ll use an analyzer to see if this is true. </li></ul>1460 x 6 = 8760 <ul><li>I have found it helpful to increase this value when traversing high latent links to keep the data flowing. </li></ul>
    8. 8. Sample IPERF UDP Windows Configuration <ul><li>Server </li></ul><ul><li>iperf –s -u </li></ul>client iperf –c server_ip -u Input C:SOFTWAREiperf>iperf -s -u ------------------------------------------------------------ Server listening on UDP port 5001 Receiving 1470 byte datagrams UDP buffer size: 8.00 KByte (default) ------------------------------------------------------------ [1932] local 172.17.0.2 port 5001 connected with 172.17.4.54 port 3510 [ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams [1932] 0.0-15.4 sec 713 KBytes 379 Kbits/sec 34.284 ms 396/ 893 (44%) > iperf -c 172.17.0.1 -u ------------------------------------------------------------ Client connecting to 172.17.0.1, UDP port 5001 Sending 1470 byte datagrams UDP buffer size: 8.00 KByte (default) ------------------------------------------------------------ [1916] local 10.44.10.102 port 3510 connected with 172.17.0.1 port 5001 [ ID] Interval Transfer Bandwidth [1916] 0.0-10.0 sec 1.25 MBytes 1.05 Mbits/sec [1916] WARNING: did not receive ack of last datagram after 10 tries. [1916] Sent 893 datagrams Output In this example the laptop will perform an upload to the Desktop Please note that in UDP mode the default bandwidth setting is 1.25 Mbits/sec
    9. 9. Additional Tips and Tricks <ul><li>Here’s a simple batch file that will record the time and upload/download results in a text file </li></ul><ul><li>You can simply put this in a scheduler and to measure throughput throughout the day. </li></ul>rem record ipaddress filename rem *** cls echo off Echo %date% %time% >> %2 Echo %date% %time% Echo upload and download to %1 iperf -c %1 -r|find &quot;sec&quot; >> %2 echo ********* >> %2
    10. 10. Wireshark Training - QuickStart Tony Fortunato, Sr Network Specialist The Technology Firm Thank you
    11. 11. <ul><li>For additional educational videos on Open Source Network Tools, please click on the following … </li></ul><ul><li>http://www.lovemytool.com/blog/ostu.html </li></ul>LoveMyTool.com – Community for Network Tools

    ×