Examples of using Iperf to diagnose network issues

Article:HOWTO64302  |  Created: 2011-12-29  |  Updated: 2012-01-12  |  Article URL http://www.symantec.com/docs/HOWTO64302
Article Type
How To

Product(s)

Environment

Subject


Examples of using Iperf to diagnose network issues

The following example tests a single UDP connection between two nodes on port 12345 using the default size of 1470 bytes for the datagrams. Since the network connection between nodes is believed to be ~100 Mbps, the example specifies a bandwidth value of 250 Mbps.

Note:

In UDP mode, Iperf traffic has no flow control. The Iperf client tries to send the data to the Iperf server only at a rate as specified by the -b option. Since there is no flow control, Iperf allows the network to drop the packets. As a result, the throughput reported by the Iperf client is very useful value because some packets will be dropped. The throughput reported by the Iperf server is the number of packets getting through the network without being dropped and is the actual transfer rate of the network. The bandwidth that you specify using the -b option should be close to the theoretical bandwidth of the network. If the you specifies a low bandwidth or the default bandwidth of 1 Mbit/s, the Iperf client only sends that much data and the test results are not meaningful.

Example of testing a single UDP connection between two nodes

  1. On the server node, run Iperf in server mode:

    # ./iperf -s -u -p 12345
    ------------------------------------------------------------
    Server listening on UDP port 12345
    Receiving 1470 byte datagrams
    UDP buffer size: 8.00 KByte (default)
    ------------------------------------------------------------
    [  3] local 10.12.240.32 port 12345 connected with 10.12.240.33 port 46248
  2. On the client node, run Iperf in client mode:

    # ./iperf -c 10.12.240.32 -u -p 12345 -t 30 -b 250M
    ------------------------------------------------------------
    Client connecting to 10.12.240.32, UDP port 12345
    Sending 1470 byte datagrams
    UDP buffer size: 8.00 KByte (default)
    ------------------------------------------------------------
    [  3] local 10.12.240.33 port 46248 connected with 10.12.240.32 port 12345
    [ ID] Interval       Transfer     Bandwidth
    [  3]  0.0-30.0 sec    298 MBytes  83.4 Mbits/sec

    After connecting the client to the port, the Iperf utility tests the network and provides the throughput statistics of the network.

The following example tests a single TCP connection between two nodes on port 45678.

Example of testing a single TCP connection between two nodes

  1. On the server node, run Iperf in server mode:

    # ./iperf -s -p 45678
    ------------------------------------------------------------
    Server listening on TCP port 45678
    TCP window size: 48.0 KByte (default)
    ------------------------------------------------------------
    [  4] local 10.12.240.32 port 45678 connected with 10.12.240.33 port 37795
    [ ID] Interval       Transfer     Bandwidth
    [  4]  0.0-30.0 sec    189 MBytes  52.8 Mbits/sec
  2. On the client node, run Iperf in client mode:

    # ./iperf -c 10.12.240.32 -p 45678 -t 30
    ------------------------------------------------------------
    Client connecting to 10.12.240.32, TCP port 45678
    TCP window size: 48.0 KByte (default)
    ------------------------------------------------------------
    [  3] local 10.12.240.33 port 37795 connected with 10.12.240.32 port 45678
    [ ID] Interval       Transfer     Bandwidth
    [  3]  0.0-30.0 sec    189 MBytes  52.8 Mbits/sec

    After connecting the client to the port, the Iperf utility tests the network and provides the throughput statistics of the network.

The following example tests 8 parallel TCP connections between two nodes on port 45678.

Example of testing 8 parallel TCP connections between two nodes

  1. On the server node, run Iperf in server mode:

    # ./iperf -s -p 45678
    ------------------------------------------------------------
    Server listening on TCP port 45678
    TCP window size: 48.0 KByte (default)
    ------------------------------------------------------------
    [  4] local 10.12.240.32 port 45678 connected with 10.12.240.33 port 37835
    [  5] local 10.12.240.32 port 45678 connected with 10.12.240.33 port 37836
    [  6] local 10.12.240.32 port 45678 connected with 10.12.240.33 port 37837
    [  7] local 10.12.240.32 port 45678 connected with 10.12.240.33 port 37838
    [  8] local 10.12.240.32 port 45678 connected with 10.12.240.33 port 37839
    [  9] local 10.12.240.32 port 45678 connected with 10.12.240.33 port 37840
    [ 10] local 10.12.240.32 port 45678 connected with 10.12.240.33 port 37841
    [ 11] local 10.12.240.32 port 45678 connected with 10.12.240.33 port 37842
    [ ID] Interval       Transfer     Bandwidth
    [  8]  0.0-30.0 sec  41.0 MBytes  11.4 Mbits/sec
    [ ID] Interval       Transfer     Bandwidth
    [ 11]  0.0-30.0 sec  41.4 MBytes  11.6 Mbits/sec
    [ ID] Interval       Transfer     Bandwidth
    [  9]  0.0-30.0 sec  41.5 MBytes  11.6 Mbits/sec
    [ ID] Interval       Transfer     Bandwidth
    [  5]  0.0-30.0 sec  41.0 MBytes  11.5 Mbits/sec
    [ ID] Interval       Transfer     Bandwidth
    [  7]  0.0-30.1 sec  41.5 MBytes  11.6 Mbits/sec
    [ ID] Interval       Transfer     Bandwidth
    [ 10]  0.0-30.1 sec  42.6 MBytes  11.9 Mbits/sec
    [ ID] Interval       Transfer     Bandwidth
    [  6]  0.0-30.1 sec  41.6 MBytes  11.6 Mbits/sec
    [ ID] Interval       Transfer     Bandwidth
    [  4]  0.0-30.1 sec  41.4 MBytes  11.6 Mbits/sec
    [SUM]  0.0-30.1 sec    332 MBytes  92.7 Mbits/sec
  2. On the client node, run Iperf in client mode:

    # ./iperf -c 10.12.240.32 -p 45678 -t 30 -P 8
    ------------------------------------------------------------
    Client connecting to 10.12.240.32, TCP port 45678
    TCP window size: 48.0 KByte (default)
    ------------------------------------------------------------
    [ 10] local 10.12.240.33 port 37842 connected with 10.12.240.32 port 45678
    [  3] local 10.12.240.33 port 37835 connected with 10.12.240.32 port 45678
    [  4] local 10.12.240.33 port 37836 connected with 10.12.240.32 port 45678
    [  5] local 10.12.240.33 port 37837 connected with 10.12.240.32 port 45678
    [  6] local 10.12.240.33 port 37838 connected with 10.12.240.32 port 45678
    [  7] local 10.12.240.33 port 37839 connected with 10.12.240.32 port 45678
    [  8] local 10.12.240.33 port 37840 connected with 10.12.240.32 port 45678
    [  9] local 10.12.240.33 port 37841 connected with 10.12.240.32 port 45678
    [ ID] Interval       Transfer     Bandwidth
    [  5]  0.0-30.0 sec  41.6 MBytes  11.6 Mbits/sec
    [ ID] Interval       Transfer     Bandwidth
    [  7]  0.0-30.0 sec  41.0 MBytes  11.5 Mbits/sec
    [ ID] Interval       Transfer     Bandwidth
    [  8]  0.0-30.0 sec  41.5 MBytes  11.6 Mbits/sec
    [ ID] Interval       Transfer     Bandwidth
    [ 10]  0.0-30.0 sec  41.4 MBytes  11.6 Mbits/sec
    [ ID] Interval       Transfer     Bandwidth
    [  9]  0.0-30.0 sec  42.6 MBytes  11.9 Mbits/sec
    [ ID] Interval       Transfer     Bandwidth
    [  4]  0.0-30.0 sec  41.0 MBytes  11.5 Mbits/sec
    [ ID] Interval       Transfer     Bandwidth
    [  6]  0.0-30.0 sec  41.5 MBytes  11.6 Mbits/sec
    [ ID] Interval       Transfer     Bandwidth
    [  3]  0.0-30.0 sec  41.4 MBytes  11.6 Mbits/sec
    [SUM]  0.0-30.0 sec    332 MBytes  92.7 Mbits/sec

    After connecting the client to the port, the Iperf utility tests the network and provides the throughput statistics of the network. Comparing the results of having 8 parallel TCP connections to having a single TCP connection in the previous example, you can see a significantly higher throughput with multiple connections, which is expected given the nature of the TCP protocol.

See Interpreting Iperf results

See Using Iperf to diagnose network issues


Legacy ID



v68388156_v69081455


Article URL http://www.symantec.com/docs/HOWTO64302


Terms of use for this information are found in Legal Notices