Static

These scenarios cover some aspects related to link-aggregation (combining multiple network connections simultaneously to increase throughput, provide redundancy, or both). In OSDx, this can be achieved through bonding interfaces.

../../../../../_images/topology.svg

Test Static Adaptive Load Balance

Description

A bonding interface is configured in DUT0 using the adaptive load balance in static mode. This mode can be used to achieve load-balancing in transmission and reception. In this scenario, transmission load balancing is performed using a hash policy.

Scenario

Example 1

Step 1: Set the following configuration in DUT0 :

set interfaces bonding bond0 address 192.168.100.10/24
set interfaces bonding bond0 disable-dynamic-lb
set interfaces bonding bond0 hash-policy layer3+4
set interfaces bonding bond0 miimon 100
set interfaces bonding bond0 mode adaptive-load-balance
set interfaces ethernet eth0p0 bond-group bond0
set interfaces ethernet eth0p1 bond-group bond0
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Set the following configuration in DUT1 :

set interfaces bridge br0 address 192.168.100.20/24
set interfaces bridge br0 stp version rstp
set interfaces ethernet eth2 bridge-group bridge br0
set interfaces ethernet eth3 bridge-group bridge br0
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 3: Run command interfaces bonding show at DUT0 and check if output matches the following regular expressions:

bond0\s+192.168.100\.10\/24\s+up\s+up
Show output
---------------------------------------------------------------
Name          IP Address          Admin  Oper  Vrf  Description
---------------------------------------------------------------
bond0  192.168.100.10/24          up     up
       fe80::2a0:26ff:fe16:15/64

Step 4: Run command interfaces bonding bond0 show ports at DUT0 and check if output contains the following tokens:

Bonding Mode: adaptive load balancing
Show output
Ethernet Channel Bonding Driver: v6.12.20

Bonding Mode: adaptive load balancing
Transmit Hash Policy: layer3+4 (1)
Primary Slave: None
Currently Active Slave: eth0p1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0

Slave Interface: eth0p0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:a0:26:16:00:15
Slave queue ID: 0

Slave Interface: eth0p1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 02:a0:26:16:00:15
Slave queue ID: 0

Step 5: Ping IP address 192.168.100.20 from DUT0:

admin@DUT0$ ping 192.168.100.20 count 1 size 56 timeout 1
Show output
PING 192.168.100.20 (192.168.100.20) 56(84) bytes of data.
64 bytes from 192.168.100.20: icmp_seq=1 ttl=64 time=0.381 ms

--- 192.168.100.20 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.381/0.381/0.381/0.000 ms

Step 6: Run command interfaces bonding bond0 show ports at DUT0 and check if output contains the following tokens:

Transmit Hash Policy: layer3+4 (1)
Show output
Ethernet Channel Bonding Driver: v6.12.20

Bonding Mode: adaptive load balancing
Transmit Hash Policy: layer3+4 (1)
Primary Slave: None
Currently Active Slave: eth0p1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Peer Notification Delay (ms): 0

Slave Interface: eth0p0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 00:a0:26:16:00:15
Slave queue ID: 0

Slave Interface: eth0p1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 02:a0:26:16:00:15
Slave queue ID: 0

Step 7: Run command interfaces ethernet clear at DUT0.

Step 8: Initiate a bandwidth test from DUT0 to DUT1

admin@DUT1$ monitor test performance server port 5001
admin@DUT0$ monitor test performance client 192.168.100.20 duration 5 port 5001 parallel 10
Expect this output in DUT0:
Connecting to host 192.168.100.20, port 5001
[  5] local 192.168.100.10 port 44006 connected to 192.168.100.20 port 5001
[  7] local 192.168.100.10 port 44018 connected to 192.168.100.20 port 5001
[  9] local 192.168.100.10 port 44020 connected to 192.168.100.20 port 5001
[ 11] local 192.168.100.10 port 44030 connected to 192.168.100.20 port 5001
[ 13] local 192.168.100.10 port 44036 connected to 192.168.100.20 port 5001
[ 15] local 192.168.100.10 port 44048 connected to 192.168.100.20 port 5001
[ 17] local 192.168.100.10 port 44054 connected to 192.168.100.20 port 5001
[ 19] local 192.168.100.10 port 44068 connected to 192.168.100.20 port 5001
[ 21] local 192.168.100.10 port 44076 connected to 192.168.100.20 port 5001
[ 23] local 192.168.100.10 port 44086 connected to 192.168.100.20 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  17.8 MBytes   149 Mbits/sec    3    120 KBytes
[  7]   0.00-1.00   sec  11.1 MBytes  93.0 Mbits/sec   27   70.7 KBytes
[  9]   0.00-1.00   sec  8.90 MBytes  74.6 Mbits/sec   26   91.9 KBytes
[ 11]   0.00-1.00   sec  13.6 MBytes   114 Mbits/sec    6    100 KBytes
[ 13]   0.00-1.00   sec  7.22 MBytes  60.6 Mbits/sec   19   65.0 KBytes
[ 15]   0.00-1.00   sec  17.0 MBytes   143 Mbits/sec   12    134 KBytes
[ 17]   0.00-1.00   sec  8.13 MBytes  68.2 Mbits/sec   29   43.8 KBytes
[ 19]   0.00-1.00   sec  14.9 MBytes   125 Mbits/sec   11    137 KBytes
[ 21]   0.00-1.00   sec  14.9 MBytes   125 Mbits/sec   20    105 KBytes
[ 23]   0.00-1.00   sec  5.26 MBytes  44.1 Mbits/sec   25   41.0 KBytes
[SUM]   0.00-1.00   sec   119 MBytes   997 Mbits/sec  178
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   1.00-2.00   sec  19.3 MBytes   162 Mbits/sec    1    150 KBytes
[  7]   1.00-2.00   sec  10.1 MBytes  84.4 Mbits/sec    3    100 KBytes
[  9]   1.00-2.00   sec  5.59 MBytes  46.9 Mbits/sec   15   45.2 KBytes
[ 11]   1.00-2.00   sec  11.1 MBytes  93.3 Mbits/sec   11   83.4 KBytes
[ 13]   1.00-2.00   sec  9.20 MBytes  77.1 Mbits/sec    8    112 KBytes
[ 15]   1.00-2.00   sec  17.4 MBytes   146 Mbits/sec    3    123 KBytes
[ 17]   1.00-2.00   sec  5.72 MBytes  48.0 Mbits/sec   17   42.4 KBytes
[ 19]   1.00-2.00   sec  14.7 MBytes   123 Mbits/sec    4    137 KBytes
[ 21]   1.00-2.00   sec  13.5 MBytes   113 Mbits/sec    5    110 KBytes
[ 23]   1.00-2.00   sec  5.84 MBytes  49.0 Mbits/sec   27   55.1 KBytes
[SUM]   1.00-2.00   sec   112 MBytes   942 Mbits/sec   94
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   2.00-3.00   sec  12.2 MBytes   102 Mbits/sec    8   82.0 KBytes
[  7]   2.00-3.00   sec  17.3 MBytes   145 Mbits/sec    5    140 KBytes
[  9]   2.00-3.00   sec  4.78 MBytes  40.1 Mbits/sec   10   58.0 KBytes
[ 11]   2.00-3.00   sec  10.9 MBytes  91.2 Mbits/sec    8    110 KBytes
[ 13]   2.00-3.00   sec  14.0 MBytes   117 Mbits/sec   20    120 KBytes
[ 15]   2.00-3.00   sec  13.9 MBytes   117 Mbits/sec    6   90.5 KBytes
[ 17]   2.00-3.00   sec  5.72 MBytes  48.0 Mbits/sec   13   56.6 KBytes
[ 19]   2.00-3.00   sec  12.4 MBytes   104 Mbits/sec    5    110 KBytes
[ 21]   2.00-3.00   sec  12.2 MBytes   102 Mbits/sec   10   96.2 KBytes
[ 23]   2.00-3.00   sec  9.13 MBytes  76.6 Mbits/sec   32   91.9 KBytes
[SUM]   2.00-3.00   sec   112 MBytes   943 Mbits/sec  117
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   3.00-4.00   sec  11.3 MBytes  94.9 Mbits/sec   22    105 KBytes
[  7]   3.00-4.00   sec  11.2 MBytes  94.4 Mbits/sec   12   82.0 KBytes
[  9]   3.00-4.00   sec  6.90 MBytes  57.9 Mbits/sec   15   43.8 KBytes
[ 11]   3.00-4.00   sec  12.0 MBytes   101 Mbits/sec   12   86.3 KBytes
[ 13]   3.00-4.00   sec  16.0 MBytes   134 Mbits/sec   13    116 KBytes
[ 15]   3.00-4.00   sec  10.9 MBytes  91.7 Mbits/sec    3    120 KBytes
[ 17]   3.00-4.00   sec  6.21 MBytes  52.1 Mbits/sec   17   70.7 KBytes
[ 19]   3.00-4.00   sec  12.7 MBytes   107 Mbits/sec   10   87.7 KBytes
[ 21]   3.00-4.00   sec  13.9 MBytes   117 Mbits/sec    8   70.7 KBytes
[ 23]   3.00-4.00   sec  11.0 MBytes  92.3 Mbits/sec   15   83.4 KBytes
[SUM]   3.00-4.00   sec   112 MBytes   942 Mbits/sec  127
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   4.00-5.00   sec  14.5 MBytes   121 Mbits/sec    2    107 KBytes
[  7]   4.00-5.00   sec  10.5 MBytes  88.1 Mbits/sec    8    119 KBytes
[  9]   4.00-5.00   sec  7.95 MBytes  66.7 Mbits/sec    5   87.7 KBytes
[ 11]   4.00-5.00   sec  12.6 MBytes   106 Mbits/sec    9    100 KBytes
[ 13]   4.00-5.00   sec  10.9 MBytes  91.2 Mbits/sec   14   72.1 KBytes
[ 15]   4.00-5.00   sec  15.4 MBytes   129 Mbits/sec    7    122 KBytes
[ 17]   4.00-5.00   sec  9.20 MBytes  77.1 Mbits/sec   31   77.8 KBytes
[ 19]   4.00-5.00   sec  11.7 MBytes  98.0 Mbits/sec    4    110 KBytes
[ 21]   4.00-5.00   sec  10.4 MBytes  87.6 Mbits/sec   11   97.6 KBytes
[ 23]   4.00-5.00   sec  8.26 MBytes  69.3 Mbits/sec   15   72.1 KBytes
[SUM]   4.00-5.00   sec   111 MBytes   935 Mbits/sec  106
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  75.0 MBytes   126 Mbits/sec   36             sender
[  5]   0.00-5.01   sec  74.1 MBytes   124 Mbits/sec                  receiver
[  7]   0.00-5.00   sec  60.2 MBytes   101 Mbits/sec   55             sender
[  7]   0.00-5.01   sec  59.5 MBytes  99.7 Mbits/sec                  receiver
[  9]   0.00-5.00   sec  34.1 MBytes  57.3 Mbits/sec   71             sender
[  9]   0.00-5.01   sec  33.5 MBytes  56.1 Mbits/sec                  receiver
[ 11]   0.00-5.00   sec  60.2 MBytes   101 Mbits/sec   46             sender
[ 11]   0.00-5.01   sec  59.4 MBytes  99.5 Mbits/sec                  receiver
[ 13]   0.00-5.00   sec  57.3 MBytes  96.1 Mbits/sec   74             sender
[ 13]   0.00-5.01   sec  56.4 MBytes  94.5 Mbits/sec                  receiver
[ 15]   0.00-5.00   sec  74.7 MBytes   125 Mbits/sec   31             sender
[ 15]   0.00-5.01   sec  73.9 MBytes   124 Mbits/sec                  receiver
[ 17]   0.00-5.00   sec  35.0 MBytes  58.7 Mbits/sec  107             sender
[ 17]   0.00-5.01   sec  34.5 MBytes  57.7 Mbits/sec                  receiver
[ 19]   0.00-5.00   sec  66.3 MBytes   111 Mbits/sec   34             sender
[ 19]   0.00-5.01   sec  65.7 MBytes   110 Mbits/sec                  receiver
[ 21]   0.00-5.00   sec  64.9 MBytes   109 Mbits/sec   54             sender
[ 21]   0.00-5.01   sec  64.2 MBytes   108 Mbits/sec                  receiver
[ 23]   0.00-5.00   sec  39.5 MBytes  66.3 Mbits/sec  114             sender
[ 23]   0.00-5.01   sec  39.0 MBytes  65.2 Mbits/sec                  receiver
[SUM]   0.00-5.00   sec   567 MBytes   952 Mbits/sec  622             sender
[SUM]   0.00-5.01   sec   560 MBytes   938 Mbits/sec                  receiver

iperf Done.

Step 9: Run command interfaces ethernet show counters at DUT0 and check if output matches the following regular expressions:

eth0p0 \s+up\s+\d+\s+\d+\s+0\s+\d{4,}
eth0p1 \s+up\s+\d+\s+\d+\s+0\s+\d{4,}
Show output
-------------------------------------------------------------------------------
 Name   Oper  Rx Packets  Rx Bytes  Rx Errors  Tx Packets  Tx Bytes   Tx Errors
-------------------------------------------------------------------------------
eth0p0  up        118467   7841939          0      329122  498228709          0
eth0p1  up         13230    878680          0       77912  117937153          0
eth0p2  down           0         0          0           0          0          0
eth0p3  down           0         0          0           0          0          0
eth0p4  down           0         0          0           0          0          0
eth0p5  down           0         0          0           0          0          0
eth0p6  down           0         0          0           0          0          0
eth0p7  down           0         0          0           0          0          0
  eth1  down           0         0          0           0          0          0
  eth2  down           0         0          0           0          0          0