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.

../../../../_images/topology1.svg

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 address 192.168.100.10/24
set interfaces bonding bond0 miimon 100
set interfaces bonding bond0 mode round-robin
set interfaces ethernet eth0 bond-group bond0
set interfaces ethernet eth1 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 ethernet eth0 address 192.168.100.20/24
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::dcad:beff:feef:6c01/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: v6.1.119

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:01
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:00
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 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.308 ms
64 bytes from 192.168.100.20: icmp_seq=2 ttl=64 time=0.187 ms

--- 192.168.100.20 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1009ms
rtt min/avg/max/mdev = 0.187/0.247/0.308/0.060 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 5001 parallel 1
Expect this output in DUT0:
Connecting to host 192.168.100.20, port 5001
[  5] local 192.168.100.10 port 47108 connected to 192.168.100.20 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   108 MBytes   902 Mbits/sec  598   1.42 MBytes
[  5]   1.00-2.00   sec   306 MBytes  2.57 Gbits/sec  686    840 KBytes
[  5]   2.00-3.00   sec   372 MBytes  3.12 Gbits/sec  225   1.02 MBytes
[  5]   3.00-4.00   sec   374 MBytes  3.14 Gbits/sec   77   1.15 MBytes
[  5]   4.00-5.00   sec   361 MBytes  3.03 Gbits/sec   32   1.22 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  1.49 GBytes  2.55 Gbits/sec  1618             sender
[  5]   0.00-5.00   sec  1.48 GBytes  2.55 Gbits/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        142107  11803717          0      550786  833867173          0
eth1  up        148760  12392783          0      550869  833994147          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 address 192.168.100.10/24
set interfaces bonding bond0 miimon 100
set interfaces bonding bond0 mode active-backup
set interfaces ethernet eth0 bond-group bond0
set interfaces ethernet eth1 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 ethernet eth0 address 192.168.100.20/24
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::dcad:beff:feef:6c01/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: v6.1.119

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:01
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:00
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 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.303 ms
64 bytes from 192.168.100.20: icmp_seq=2 ttl=64 time=0.242 ms

--- 192.168.100.20 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1023ms
rtt min/avg/max/mdev = 0.242/0.272/0.303/0.030 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 5001 parallel 1
Expect this output in DUT0:
Connecting to host 192.168.100.20, port 5001
[  5] local 192.168.100.10 port 52932 connected to 192.168.100.20 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   237 MBytes  1.99 Gbits/sec    0   1.58 MBytes
[  5]   1.00-2.00   sec   302 MBytes  2.54 Gbits/sec    0   1.58 MBytes
[  5]   2.00-3.00   sec   331 MBytes  2.78 Gbits/sec    0   1.66 MBytes
[  5]   3.00-4.00   sec   359 MBytes  3.01 Gbits/sec    0   1.66 MBytes
[  5]   4.00-5.00   sec   358 MBytes  3.00 Gbits/sec    0   1.66 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  1.55 GBytes  2.66 Gbits/sec    0             sender
[  5]   0.00-5.00   sec  1.55 GBytes  2.66 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: eth0
Show output
Ethernet Channel Bonding Driver: v6.1.119

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:01
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:00
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 5001 parallel 1
Expect this output in DUT0:
Connecting to host 192.168.100.20, port 5001
[  5] local 192.168.100.10 port 39852 connected to 192.168.100.20 port 5001
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   153 MBytes  1.28 Gbits/sec    1   1.70 MBytes
[  5]   1.00-2.00   sec   252 MBytes  2.12 Gbits/sec  236    840 KBytes
[  5]   2.00-3.00   sec   392 MBytes  3.29 Gbits/sec    0   1.08 MBytes
[  5]   3.00-4.00   sec   404 MBytes  3.39 Gbits/sec    0   1.19 MBytes
[  5]   4.00-5.00   sec   386 MBytes  3.24 Gbits/sec    0   1.30 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-5.00   sec  1.55 GBytes  2.66 Gbits/sec  237             sender
[  5]   0.00-5.00   sec  1.55 GBytes  2.66 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: eth1
Show output
Ethernet Channel Bonding Driver: v6.1.119

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:01
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:00
Slave queue ID: 0