Menu ▾ ▴

#112 support for --incr-srcip

1.0
closed
None
2021-07-14
2021-06-09
No

Some use cases with -P > 1 require an unique source ip address.

Discussion

  • Robert McMahon

    Robert McMahon - 2021-06-11

    This is done in the 2-1-1-dev branch per this commit.

    Two options are are added:

    --incr-srcip (client side)
    --sum-dstip (server side)

    *** The client option requires the -B value to be set as well as the --incr-srcip. *** The server side normally sums based upon the client (or the src ip) but with these tests it's assumed the server side summing will want to be based upon the server's ip address (client's dst ip) That's the reason for the new server side option of --sum-dstip

    Here's an example

    [root@ryzen3950 iperf2-code]# ip addr show
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host 
           valid_lft forever preferred_lft forever
    2: enp7s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
        link/ether 18:c0:4d:82:5c:f4 brd ff:ff:ff:ff:ff:ff
    3: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
        link/ether 6c:b3:11:07:1a:36 brd ff:ff:ff:ff:ff:ff
        inet 192.168.1.86/24 brd 192.168.1.255 scope global dynamic noprefixroute enp4s0
           valid_lft 62810sec preferred_lft 62810sec
        inet 192.168.1.87/24 scope global secondary enp4s0
           valid_lft forever preferred_lft forever
    
    [root@ryzen3950 iperf2-code]# src/iperf -c 192.168.1.76 -i 1 -e -B 192.168.1.86 -P 2  --incr-srcip
    ------------------------------------------------------------
    Client connecting to 192.168.1.76, TCP port 5001 with pid 1106094 (2 flows)
    Write buffer size: 131072 Byte
    TCP window size: 85.0 KByte (default)
    ------------------------------------------------------------
    [  1] local 192.168.1.86%enp4s0 port 37605 connected with 192.168.1.76 port 5001 (MSS=1448) (sock=4) (ct=0.27 ms) on 2021-06-10 21:40:17 (PDT)
    [  2] local 192.168.1.87%enp4s0 port 60131 connected with 192.168.1.76 port 5001 (MSS=1448) (sock=3) (ct=0.29 ms) on 2021-06-10 21:40:17 (PDT)
    [ ID] Interval        Transfer    Bandwidth       Write/Err  Rtry     Cwnd/RTT        NetPwr
    [  1] 0.00-1.00 sec   565 MBytes  4.74 Gbits/sec  4519/0          0     1097K/1646 us  359771
    [  2] 0.00-1.00 sec   562 MBytes  4.71 Gbits/sec  4496/0          0     1165K/1675 us  351743
    [SUM] 0.00-1.00 sec  1.10 GBytes  9.45 Gbits/sec  9015/0         0
    [  1] 1.00-2.00 sec   561 MBytes  4.70 Gbits/sec  4485/0          0     1097K/1585 us  370888
    [  2] 1.00-2.00 sec   562 MBytes  4.71 Gbits/sec  4495/0          0     1165K/1721 us  342341
    [SUM] 1.00-2.00 sec  1.10 GBytes  9.42 Gbits/sec  8980/0         0
    [  1] 2.00-3.00 sec   562 MBytes  4.71 Gbits/sec  4493/0          0     1097K/1700 us  346416
    [  2] 2.00-3.00 sec   560 MBytes  4.70 Gbits/sec  4484/0          0     1165K/1721 us  341503
    [SUM] 2.00-3.00 sec  1.10 GBytes  9.41 Gbits/sec  8977/0         0
    [  1] 3.00-4.00 sec   561 MBytes  4.71 Gbits/sec  4491/0          0     1097K/1686 us  349137
    [  2] 3.00-4.00 sec   562 MBytes  4.71 Gbits/sec  4495/0          0     1165K/1722 us  342142
    [SUM] 3.00-4.00 sec  1.10 GBytes  9.42 Gbits/sec  8986/0         0
    [  1] 4.00-5.00 sec   561 MBytes  4.71 Gbits/sec  4491/0          0     1097K/1599 us  368133
    [  2] 4.00-5.00 sec   560 MBytes  4.70 Gbits/sec  4483/0          0     1165K/1732 us  339259
    [SUM] 4.00-5.00 sec  1.10 GBytes  9.41 Gbits/sec  8974/0         0
    [  1] 5.00-6.00 sec   560 MBytes  4.70 Gbits/sec  4483/0          0     1097K/1616 us  363611
    [  2] 5.00-6.00 sec   562 MBytes  4.71 Gbits/sec  4494/0          0     1165K/1694 us  347720
    [SUM] 5.00-6.00 sec  1.10 GBytes  9.41 Gbits/sec  8977/0         0
    [  1] 6.00-7.00 sec   562 MBytes  4.71 Gbits/sec  4494/0          0     1097K/1637 us  359827
    [  2] 6.00-7.00 sec   560 MBytes  4.70 Gbits/sec  4483/0          0     1165K/1687 us  348308
    [SUM] 6.00-7.00 sec  1.10 GBytes  9.41 Gbits/sec  8977/0         0
    [  1] 7.00-8.00 sec   560 MBytes  4.70 Gbits/sec  4483/0          0     1152K/1739 us  337893
    [  2] 7.00-8.00 sec   562 MBytes  4.71 Gbits/sec  4495/0          0     1165K/1692 us  348208
    [SUM] 7.00-8.00 sec  1.10 GBytes  9.41 Gbits/sec  8978/0         0
    [  1] 8.00-9.00 sec   562 MBytes  4.71 Gbits/sec  4492/0          0     1152K/1713 us  343710
    [  2] 8.00-9.00 sec   560 MBytes  4.70 Gbits/sec  4484/0          0     1165K/1658 us  354479
    [SUM] 8.00-9.00 sec  1.10 GBytes  9.41 Gbits/sec  8976/0         0
    [  1] 9.00-10.00 sec   562 MBytes  4.71 Gbits/sec  4495/0          0     1152K/1711 us  344342
    [  2] 9.00-10.00 sec   562 MBytes  4.71 Gbits/sec  4494/0          0     1165K/1727 us  341076
    [SUM] 9.00-10.00 sec  1.10 GBytes  9.43 Gbits/sec  8989/0         0
    [  1] 0.00-10.02 sec  5.48 GBytes  4.70 Gbits/sec  44928/0          0     1152K/1619 us  362920
    [  2] 0.00-10.02 sec  5.48 GBytes  4.70 Gbits/sec  44905/0          0     1165K/1653 us  355274
    [SUM] 0.00-10.00 sec  11.0 GBytes  9.42 Gbits/sec  89833/0         0
    [ CT] final connect times (min/avg/max/stdev) = 0.270/0.282/0.294/0.294 ms (tot/err) = 2/0
    
    
    [rjmcmahon@rjm-nas iperf2-code]$ src/iperf -s -i 1 -e --sum-dstip
    ------------------------------------------------------------
    Server listening on TCP port 5001 with pid 20777
    Read buffer size:  128 KByte (Dist bin width=16.0 KByte)
    TCP window size:  128 KByte (default)
    ------------------------------------------------------------
    [  1] local 192.168.1.76%enp2s0 port 5001 connected with 192.168.1.86 port 37605 (MSS=1448) (sock=4) (peer 2.1.1-dev) on 2021-06-10 21:40:17 (PDT)
    [  2] local 192.168.1.76%enp2s0 port 5001 connected with 192.168.1.87 port 60131 (MSS=1448) (sock=5) (peer 2.1.1-dev) on 2021-06-10 21:40:17 (PDT)
    [ ID] Interval            Transfer    Bandwidth       Reads=Dist
    [  2] 0.0000-1.0000 sec   559 MBytes  4.69 Gbits/sec  8869=6:1:6:3701:5130:5:3:17
    [  1] 0.0000-1.0000 sec   561 MBytes  4.71 Gbits/sec  8889=3:3:2:3754:5091:5:0:31
    [SUM] 0.0000-1.0000 sec  1.09 GBytes  9.40 Gbits/sec  17758=9:4:8:7455:10221:10:3:48
    [  2] 1.0000-2.0000 sec   561 MBytes  4.71 Gbits/sec  8910=0:0:1:3791:5117:1:0:0
    [  1] 1.0000-2.0000 sec   561 MBytes  4.71 Gbits/sec  8910=0:0:1:3757:5151:1:0:0
    [SUM] 1.0000-2.0000 sec  1.10 GBytes  9.41 Gbits/sec  17820=0:0:2:7548:10268:2:0:0
    [  2] 2.0000-3.0000 sec   561 MBytes  4.71 Gbits/sec  8909=1:0:0:3835:5071:0:0:2
    [  1] 2.0000-3.0000 sec   561 MBytes  4.71 Gbits/sec  8913=1:3:2:4294:4612:1:0:0
    [SUM] 2.0000-3.0000 sec  1.10 GBytes  9.41 Gbits/sec  17822=2:3:2:8129:9683:1:0:2
    [  2] 3.0000-4.0000 sec   561 MBytes  4.71 Gbits/sec  8909=1:0:0:3773:5134:0:0:1
    [  1] 3.0000-4.0000 sec   561 MBytes  4.71 Gbits/sec  8909=0:0:0:3902:5006:0:0:1
    [SUM] 3.0000-4.0000 sec  1.10 GBytes  9.41 Gbits/sec  17818=1:0:0:7675:10140:0:0:2
    [  2] 4.0000-5.0000 sec   561 MBytes  4.71 Gbits/sec  8909=0:0:0:3843:5065:0:0:1
    [  1] 4.0000-5.0000 sec   561 MBytes  4.71 Gbits/sec  8911=1:1:1:3669:5238:0:0:1
    [SUM] 4.0000-5.0000 sec  1.10 GBytes  9.41 Gbits/sec  17820=1:1:1:7512:10303:0:0:2
    [  1] 5.0000-6.0000 sec   561 MBytes  4.71 Gbits/sec  8910=1:0:1:3997:4909:1:0:1
    [  2] 5.0000-6.0000 sec   561 MBytes  4.71 Gbits/sec  8910=3:0:0:3881:5022:0:0:4
    [SUM] 5.0000-6.0000 sec  1.10 GBytes  9.42 Gbits/sec  17820=4:0:1:7878:9931:1:0:5
    [  2] 6.0000-7.0000 sec   561 MBytes  4.71 Gbits/sec  8909=1:0:0:3769:5137:0:0:2
    [  1] 6.0000-7.0000 sec   561 MBytes  4.71 Gbits/sec  8910=0:0:1:4140:4768:1:0:0
    [SUM] 6.0000-7.0000 sec  1.10 GBytes  9.41 Gbits/sec  17819=1:0:1:7909:9905:1:0:2
    [  2] 7.0000-8.0000 sec   561 MBytes  4.71 Gbits/sec  8909=0:0:0:3791:5118:0:0:0
    [  1] 7.0000-8.0000 sec   561 MBytes  4.71 Gbits/sec  8909=0:0:0:3760:5147:1:0:1
    [SUM] 7.0000-8.0000 sec  1.10 GBytes  9.41 Gbits/sec  17818=0:0:0:7551:10265:1:0:1
    [  2] 8.0000-9.0000 sec   561 MBytes  4.71 Gbits/sec  8910=0:0:1:3824:5084:1:0:0
    [  1] 8.0000-9.0000 sec   561 MBytes  4.71 Gbits/sec  8910=0:0:0:3797:5113:0:0:0
    [SUM] 8.0000-9.0000 sec  1.10 GBytes  9.41 Gbits/sec  17820=0:0:1:7621:10197:1:0:0
    [  2] 9.0000-10.0000 sec   561 MBytes  4.71 Gbits/sec  8910=0:0:0:3740:5170:0:0:0
    [  1] 9.0000-10.0000 sec   561 MBytes  4.71 Gbits/sec  8910=0:0:0:4205:4705:0:0:0
    [SUM] 9.0000-10.0000 sec  1.10 GBytes  9.41 Gbits/sec  17820=0:0:0:7945:9875:0:0:0
    [  2] 0.0000-10.0056 sec  5.48 GBytes  4.71 Gbits/sec  89106=12:2:8:37970:51077:7:3:27
    [  1] 0.0000-10.0066 sec  5.48 GBytes  4.71 Gbits/sec  89141=6:7:8:39300:49773:11:1:35
    [SUM] 0.0000-10.0066 sec  11.0 GBytes  9.41 Gbits/sec  178247=18:9:16:77270:100850:18:4:62
    
     
    👍
    1
  • Robert McMahon

    Robert McMahon - 2021-06-11
    • status: accepted --> pending
     
  • Lars Ekman

    Lars Ekman - 2021-06-11

    Works perfectly. Thanks!

    9. Iperf VIP (-c 10.0.0.0 -B 10.200.200.1 --incr-srcip -P8)
    [  4] local 10.200.200.3 port 53467 connected with 10.0.0.0 port 5001
    [  3] local 10.200.200.2 port 41475 connected with 10.0.0.0 port 5001
    [  5] local 10.200.200.7 port 51095 connected with 10.0.0.0 port 5001
    [  2] local 10.200.200.4 port 58169 connected with 10.0.0.0 port 5001
    [  6] local 10.200.200.5 port 37437 connected with 10.0.0.0 port 5001
    ------------------------------------------------------------
    Client connecting to 10.0.0.0, TCP port 5001
    TCP window size: 85.0 KByte (default)
    ------------------------------------------------------------
    [  1] local 10.200.200.1 port 41601 connected with 10.0.0.0 port 5001
    [  7] local 10.200.200.6 port 34063 connected with 10.0.0.0 port 5001
    [  8] local 10.200.200.8 port 39843 connected with 10.0.0.0 port 5001
    

    And in my test the queues in NFQEUE target gets about an equal share (the Seq counter);

    11. Nfnetlink_queue stats
      Q       port inq cp   rng  Qdrop  Udrop      Seq
      0         94   0  2  1280      0      0   273945
      1 2552071139   0  2  1280      0      0   342347
      2 3291768239   0  2  1280      0      0   330010
      3 2294121812   0  2  1280      0      0   461899
    

    Further, there are no drop's!

     
  • Robert McMahon

    Robert McMahon - 2021-07-14
    • status: pending --> closed
     

Log in to post a comment.