Bonding
These scenarios cover some aspects related to link-aggregation, which is the technique of combining multiple network connections in parallel in order to increase throughput, to provide redundancy or both. On OSDx, this can be achieved by using bonding interfaces.
Test Round-Robin Mode
Description
A bonding interface is configured in DUT0 using the round-robin mode. This mode can be used to achieve load-balancing.
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces bonding bond0 miimon 100 set interfaces bonding bond0 address 192.168.100.10/24 set interfaces ethernet eth0 bond-group bond0 set interfaces ethernet eth1 bond-group bond0 set interfaces bonding bond0 mode round-robin
Step 2: Set the following configuration in DUT1
:
set interfaces ethernet eth0 address 192.168.100.20/24
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+upShow output
------------------------------------------------------------------ Name IP Address Admin Oper Vrf Description ------------------------------------------------------------------ bond0 192.168.100.10/24 up up fe80::dcad:beff:feef:6c11/64
Step 4: Run command interfaces bonding bond0 show ports
at DUT0
and check if output contains the following tokens:
Bonding Mode: load balancing (round-robin)Show output
Ethernet Channel Bonding Driver: v5.10.127 Bonding Mode: load balancing (round-robin) MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 Slave Interface: eth1 MII Status: up Speed: Unknown Duplex: Unknown Link Failure Count: 0 Permanent HW addr: de:ad:be:ef:6c:11 Slave queue ID: 0 Slave Interface: eth0 MII Status: up Speed: Unknown Duplex: Unknown Link Failure Count: 0 Permanent HW addr: de:ad:be:ef:6c:10 Slave queue ID: 0
Step 5: Ping IP address 192.168.100.20
from DUT0
:
admin@DUT0$ ping 192.168.100.20 count 2 size 56 timeout 1Show 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.497 ms 64 bytes from 192.168.100.20: icmp_seq=2 ttl=64 time=0.433 ms --- 192.168.100.20 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 12ms rtt min/avg/max/mdev = 0.433/0.465/0.497/0.032 ms
Step 6: Run command interfaces ethernet clear
at DUT0
.
Step 7: 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 5001Expect this output in
DUT0
:Connecting to host 192.168.100.20, port 5001 [ 5] local 192.168.100.10 port 54414 connected to 192.168.100.20 port 5001 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 37.6 MBytes 315 Mbits/sec 36 216 KBytes [ 5] 1.00-2.01 sec 36.5 MBytes 304 Mbits/sec 3 286 KBytes [ 5] 2.01-3.00 sec 45.9 MBytes 386 Mbits/sec 60 255 KBytes [ 5] 3.00-4.00 sec 41.1 MBytes 347 Mbits/sec 53 331 KBytes [ 5] 4.00-5.00 sec 51.8 MBytes 434 Mbits/sec 13 397 KBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-5.00 sec 213 MBytes 357 Mbits/sec 165 sender [ 5] 0.00-5.01 sec 211 MBytes 353 Mbits/sec receiver iperf Done.
Step 8: Run command interfaces ethernet show counters
at DUT0
and check if output matches the following regular expressions:
eth0\s+up\s+\d+\s+\d+\s+0\s+\d{2,} eth1\s+up\s+\d+\s+\d+\s+0\s+\d{2,}Show output
----------------------------------------------------------------------------- Name Oper Rx Packets Rx Bytes Rx Errors Tx Packets Tx Bytes Tx Errors ----------------------------------------------------------------------------- eth0 up 7806 569038 0 75786 114721006 0 eth1 up 10165 746889 0 77492 117296047 0
Test Active-Backup Mode
Description
A bonding interface is configured in DUT0 using the active-backup mode. This mode can be used to achieve a higher degree of fault-tolerance.
Scenario
Step 1: Set the following configuration in DUT0
:
set interfaces bonding bond0 miimon 100 set interfaces bonding bond0 address 192.168.100.10/24 set interfaces ethernet eth0 bond-group bond0 set interfaces ethernet eth1 bond-group bond0 set interfaces bonding bond0 mode active-backup
Step 2: Set the following configuration in DUT1
:
set interfaces ethernet eth0 address 192.168.100.20/24
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+upShow output
------------------------------------------------------------------ Name IP Address Admin Oper Vrf Description ------------------------------------------------------------------ bond0 192.168.100.10/24 up up fe80::dcad:beff:feef:6c11/64
Step 4: Run command interfaces bonding bond0 show ports
at DUT0
and check if output contains the following tokens:
Bonding Mode: fault-tolerance (active-backup)Show output
Ethernet Channel Bonding Driver: v5.10.127 Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: eth1 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 Slave Interface: eth1 MII Status: up Speed: Unknown Duplex: Unknown Link Failure Count: 0 Permanent HW addr: de:ad:be:ef:6c:11 Slave queue ID: 0 Slave Interface: eth0 MII Status: up Speed: Unknown Duplex: Unknown Link Failure Count: 0 Permanent HW addr: de:ad:be:ef:6c:10 Slave queue ID: 0
Step 5: Ping IP address 192.168.100.20
from DUT0
:
admin@DUT0$ ping 192.168.100.20 count 2 size 56 timeout 1Show 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.586 ms 64 bytes from 192.168.100.20: icmp_seq=2 ttl=64 time=0.469 ms --- 192.168.100.20 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 30ms rtt min/avg/max/mdev = 0.469/0.527/0.586/0.062 ms
Step 6: 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 5001Expect this output in
DUT0
:Connecting to host 192.168.100.20, port 5001 [ 5] local 192.168.100.10 port 33818 connected to 192.168.100.20 port 5001 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 47.5 MBytes 398 Mbits/sec 0 930 KBytes [ 5] 1.00-2.00 sec 98.8 MBytes 828 Mbits/sec 245 1.63 MBytes [ 5] 2.00-3.00 sec 159 MBytes 1.33 Gbits/sec 17 1.40 MBytes [ 5] 3.00-4.00 sec 178 MBytes 1.49 Gbits/sec 0 1.47 MBytes [ 5] 4.00-5.00 sec 186 MBytes 1.56 Gbits/sec 0 1.54 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-5.00 sec 669 MBytes 1.12 Gbits/sec 262 sender [ 5] 0.00-5.00 sec 667 MBytes 1.12 Gbits/sec receiver iperf Done.
Step 7: Run command interfaces bonding bond0 show ports
at DUT0
and check if output contains the following tokens:
Currently Active Slave: eth0Show output
Ethernet Channel Bonding Driver: v5.10.127 Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: eth0 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 Slave Interface: eth1 MII Status: down Speed: Unknown Duplex: Unknown Link Failure Count: 1 Permanent HW addr: de:ad:be:ef:6c:11 Slave queue ID: 0 Slave Interface: eth0 MII Status: up Speed: Unknown Duplex: Unknown Link Failure Count: 0 Permanent HW addr: de:ad:be:ef:6c:10 Slave queue ID: 0
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 5001Expect this output in
DUT0
:Connecting to host 192.168.100.20, port 5001 [ 5] local 192.168.100.10 port 38124 connected to 192.168.100.20 port 5001 [ ID] Interval Transfer Bitrate Retr Cwnd [ 5] 0.00-1.00 sec 188 MBytes 1.57 Gbits/sec 0 3.11 MBytes [ 5] 1.00-2.00 sec 216 MBytes 1.81 Gbits/sec 0 3.11 MBytes [ 5] 2.00-3.00 sec 184 MBytes 1.54 Gbits/sec 0 3.11 MBytes [ 5] 3.00-4.00 sec 188 MBytes 1.57 Gbits/sec 0 3.11 MBytes [ 5] 4.00-5.00 sec 171 MBytes 1.44 Gbits/sec 0 3.11 MBytes - - - - - - - - - - - - - - - - - - - - - - - - - [ ID] Interval Transfer Bitrate Retr [ 5] 0.00-5.00 sec 947 MBytes 1.59 Gbits/sec 0 sender [ 5] 0.00-5.00 sec 944 MBytes 1.58 Gbits/sec receiver iperf Done.
Step 9: Run command interfaces bonding bond0 show ports
at DUT0
and check if output contains the following tokens:
Currently Active Slave: eth1Show output
Ethernet Channel Bonding Driver: v5.10.127 Bonding Mode: fault-tolerance (active-backup) Primary Slave: None Currently Active Slave: eth1 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 Slave Interface: eth1 MII Status: up Speed: Unknown Duplex: Unknown Link Failure Count: 1 Permanent HW addr: de:ad:be:ef:6c:11 Slave queue ID: 0 Slave Interface: eth0 MII Status: down Speed: Unknown Duplex: Unknown Link Failure Count: 1 Permanent HW addr: de:ad:be:ef:6c:10 Slave queue ID: 0