Upload
lovemytool
View
23.693
Download
3
Embed Size (px)
DESCRIPTION
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.
Citation preview
© 2008 www.thetechfirm.com
IPERF with
Windows QuickStart
Tony Fortunato, Sr Network SpecialistThe Technology Firm
© 2008 www.thetechfirm.com
Why use IPERF?
IPERF can be used for the following tasks; To determine how much bandwidth 2 stations can generate Since your hard drive does not have to be accessed, the drive latency doesn’t
get factored into the final throughput You can change the TCP or UDP port number if you want to test port based
packet/bandwidth shaping or access lists Document the effects or layer 1 issues (i.e. noise, half/duplex mismatch, etc..) Illustrating the impact of tasks that rob bandwidth like backups, batch
processing, etc Document UDP vs TCP performance
© 2008 www.thetechfirm.com
What is IPERF? IPERF is;
• Go get it at http://sourceforge.net/projects/iperf
• Portable application – no installation required
• Client and server configuration is a simple switch – no different software required
• Runs on multiple operating systems; Linux, MacOS, OpenBSD, Solaris and Windows
© 2008 www.thetechfirm.com
IPERF Syntax> iperf -hUsage: iperf [-s|-c host] [options] iperf [-h|--help] [-v|--version]
Client/Server: -f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes -i, --interval # seconds between periodic bandwidth reports -l, --len #[KM] length of buffer to read or write (default 8 KB) -m, --print_mss print TCP maximum segment size (MTU - TCP/IP
header) -o, --output <filename> output the report or error message to this specifid file -p, --port # server port to listen on/connect to -u, --udp use UDP rather than TCP -w, --window #[KM] TCP window size (socket buffer size) -B, --bind <host> bind to <host>, an interface or multicast address -C, --compatibility for use with older versions does not sent extra msgs -M, --mss # set TCP maximum segment size (MTU - 40 bytes) -N, --nodelay set TCP no delay, disabling Nagle's Algorithm -V, --IPv6Version Set the domain to IPv6
Server specific: -s, --server run in server mode -D, --daemon run the server as a daemon -R, --remove remove service in win32
Client specific: -b, --bandwidth #[KM] for UDP, bandwidth to send at in bits/sec (default 1 Mbit/sec, implies -u) -c, --client <host> run in client mode, connecting to <host> -d, --dualtest Do a bidirectional test simultaneously -n, --num #[KM] number of bytes to transmit (instead of -t) -r, --tradeoff Do a bidirectional test individually -t, --time # time in seconds to transmit for (default 10 secs) -F, --fileinput <name> input the data to be transmitted from a file -I, --stdin input the data to be transmitted from stdin -L, --listenport # port to recieve bidirectional tests back on -P, --parallel # number of parallel client threads to run -T, --ttl # time-to-live, for multicast (default 1)
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 variableTCP_WINDOW_SIZE. Most other options can be set by an environment variableIPERF_<long option name>, such as IPERF_BANDWIDTH.
Report bugs to <[email protected]>
© 2008 www.thetechfirm.com
Sample IPERF TCP Upload
Server
iperf –s
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
© 2008 www.thetechfirm.com
Sample IPERF TCP Upload/Download
Server
iperf –s
client
iperf –c server_ip -r Input
S:\TTF\software\iperf>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
© 2008 www.thetechfirm.com
IPERF Window Size
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.
I explain that this option modifies the application send block size. The default is 8KB. We’ll use an analyzer to see if this is true.
1460 x 6 = 8760
I have found it helpful to increase this value when traversing high latent links to keep the data flowing.
© 2008 www.thetechfirm.com
Sample IPERF UDP Windows Configuration
Server
iperf –s -u
client
iperf –c server_ip -u Input
C:\SOFTWARE\iperf>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
© 2008 www.thetechfirm.com
Additional Tips and Tricks
Here’s a simple batch file that will record the time and upload/download results in a text file You can simply put this in a scheduler and to measure throughput throughout the day.
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 "sec" >> %2
echo ********* >> %2
© 2008 www.thetechfirm.com
Wireshark Training - QuickStart
Tony Fortunato, Sr Network SpecialistThe Technology Firm
Thank you
© 2008 www.thetechfirm.com
For additional educational videos on Open Source Network Tools, please click on the following …
http://www.lovemytool.com/blog/ostu.html
LoveMyTool.com – Community for Network Tools