Professional Documents
Culture Documents
(https://www.samkear.com/wp-
content/uploads/2011/05/iperf-client-test1.jpg)
UDP Mode
Testing with UDP packets requires the -u ag on both the client and server. The cool thing
about UDP mode is that you dont have to use a server. Instead you can use the interface
counters on your switches. You can also specify the destination address to be a multicast
group, the default TTL for multicast is 1 (be careful). To set a dierent TTL use the -T option on
the client.
If you want to test for jitter and packet loss then you should use UDP mode.
[Server] iperf -s -i 1
[Client] iperf -c 192.168.1.1 -t 30 -u
In UDP mode iperf defaults to 1Mb/s, you can tell it to use more bandwidth by using the -b ag
followed by the number of bits/sec to send. For example, iperf -c 192.168.1.1 -u -b 100000000
would send at a rate of 100Mb/s.
Bidirectional testing
If you want to test throughput both to
and from the server at the same time you
can use the -d option to run a
bidirectional test. This will send data to
the server, and receive data from the
server simultaneously.
[Server] iperf -s -i 1
[Client] iperf -c 192.168.1.1 -t 30 -d
Bandwidth limiting
If you need to test for packet loss or
other problems at a specic rate of bandwidth you can use the -b ag to specify the maximum
throughput in bits/second.
[Server] iperf -s -i 1
[Client] iperf -c 192.168.1.1 -t 30 -b 100000
Transfer 1GB of data then stop
Instead of running the test for a specic period of you can instruct Iperf to stop running after
trasfering a certain amound of data. The example below will send 1GB (1024) of data to the
server and then stop
[Server] iperf -s -i 1
[Client] iperf -c 192.168.1.1 -n 1073741824
Stop the iPerf server
To kill the iperf server just press CTRL+C in your terminal and it will interrupt the process.
If you are running iPerf in daemon mode youll need to nd the process ID rst
ps -ef | grep iperf
root
16186
1 0 22:00 ?
00:00:00 iperf -s -D
Then kill it
kill 16186
Useful References
Energy Sciences Network Host Tuning Guide (http://fasterdata.es.net/fasterdata/host-tuning/)
Using Iperf Guide by Jon Dugan
(http://www.nanog.org/meetings/nanog43/presentations/Dugan_Iperf_N43.pdf)
Share this:
Facebook (https://www.samkear.com/networking/iperf-commands-network-troubleshooting?
share=facebook&nb=1&nb=1)
Twitter (https://www.samkear.com/networking/iperf-commands-network-troubleshooting?
share=twitter&nb=1&nb=1)
Reddit (https://www.samkear.com/networking/iperf-commands-network-troubleshooting?
share=reddit&nb=1&nb=1)
Thanks for the eort of the 2 iperf blogs. I will spend some time reading and
testing them out.
REPLY (HTTPS://WWW.SAMKEAR.COM/NETWORKING/IPERF-COMMANDS-NETWORK-TROUBLESHOOTING?REPLYTOCOM=375#RESPOND)
SAM (HTTP://WWW.SAMKEAR.COM)
July 4, 2011 at 10:38 pm (https://www.samkear.com/networking/iperf-commands-networktroubleshooting#comment-377)
Thanks for your comment! I hope that you nd iperf to be as useful of a tool as I
have.
REPLY (HTTPS://WWW.SAMKEAR.COM/NETWORKING/IPERF-COMMANDS-NETWORK-TROUBLESHOOTING?REPLYTOCOM=377#RESPOND)
RA J
June 22, 2015 at 10:22 pm (https://www.samkear.com/networking/iperf-commands-networktroubleshooting#comment-40633)
hi my name raj i having a problem with iperf.actualy i using 10gb copper cable
to testing that bandwidth but i cannot getif i type 100m i get 100mb
bandwidth but when i type 10000 i get 562mb bandwidth it wont go more than
that so can u help me..i trying this two days but still like that.tq
(HTTPS://WWW.SAMKEAR.COM/NETWORKING/IPERF-COMMANDS-NETWORK-TROUBLESHOOTING?REPLYTOCOM=40633#RESPOND)
DEEPAK
April 2, 2014 at 10:16 am (https://www.samkear.com/networking/iperf-commands-networktroubleshooting#comment-19066)
I have ran parallel TCP streams to saturate my switch. How can I nd if the switch is
saturated or not?
REPLY (HTTPS://WWW.SAMKEAR.COM/NETWORKING/IPERF-COMMANDS-NETWORK-TROUBLESHOOTING?REPLYTOCOM=19066#RESPOND)
If you have a managed switch you can check the interface counters to view the
port utilization and also check for queue drops.
For example on Cisco switches you can run show interface X, replacing x with the
port in question (Gi1/1, etc). You can also run show interface counters errors to
get a summary of errors and output discards across the switch. Turning on
Netow (if supported) can provide some great real time data on switch utilization.
If youre not running Cisco equipment but you still have a managed switch then
check the documentation for your specic model to see what commands are
available.
REPLY (HTTPS://WWW.SAMKEAR.COM/NETWORKING/IPERF-COMMANDS-NETWORK-TROUBLESHOOTING?REPLYTOCOM=19093#RESPOND)
NETHRA
October 15, 2015 at 5:17 am (https://www.samkear.com/networking/iperf-commands-networktroubleshooting#comment-40707)
LEAVE A REPLY
Your email address will not be published. Required elds are marked *
Name *
Email *
Website
Comment
POST COMMENT
Search
Follow
3 Nov
23 Oct
20 Oct
Federal agent gets six years in prison for extorting #bitcoin from Silk Road creator
theverge.com/2015/10/20/957 via @verge
Show Summary
Tweet to @SamKear
RECENT POSTS
Fixing Palo Alto Firewall Support in RANCID Version 3.2
(https://www.samkear.com/software/linux/xing-palo-alto-rewall-support-in-rancid-version3-2)
Building a Raspberry Pi ADS-B Ground Station (https://www.samkear.com/raspberrypi/building-a-raspberry-pi-ads-b-ground-station)
Time Warners New Enhanced DVR the Arris DCX3600-M
(https://www.samkear.com/hardware/time-warners-new-enhanced-dvr-the-arris-dcx3600-m)
How to Enable SPDY on Nginx Using Ubuntu 14.04
(https://www.samkear.com/software/linux/how-to-enable-spdy-on-nginx-using-ubuntu-1404)
LIKE US ON FACEBOOK
RECENT COMMENTS
Will on How to Control Power Outlets Wirelessly Using the Raspberry Pi
(https://www.samkear.com/hardware/control-power-outlets-wirelessly-raspberry-pi#comment-40722)
Brad on How to Control Power Outlets Wirelessly Using the Raspberry Pi
(https://www.samkear.com/hardware/control-power-outlets-wirelessly-raspberry-pi#comment-40721)
Dan McGee (https://www.tooshes.net/) on How to Control Power Outlets Wirelessly Using the
Raspberry Pi (https://www.samkear.com/hardware/control-power-outlets-wirelessly-raspberrypi#comment-40720)
Brad on How to Control Power Outlets Wirelessly Using the Raspberry Pi
(https://www.samkear.com/hardware/control-power-outlets-wirelessly-raspberry-pi#comment-40719)
Dan McGee (https://www.tooshes.net/) on How to Control Power Outlets Wirelessly Using the
Raspberry Pi (https://www.samkear.com/hardware/control-power-outlets-wirelessly-raspberrypi#comment-40718)
CATEGORIES
Hardware (https://www.samkear.com/category/hardware)
FreeNAS (https://www.samkear.com/category/freenas)
Networking (https://www.samkear.com/category/networking)
Sam Kear Dot Com (http://samkear.com/) All rights reserved. Theme by Colorlib (http://colorlib.com/) Powered by
WordPress (http://wordpress.org/)