Basic
This scenario shows how to configure the ARP monitor to carry out port monitoring in bonding. This is useful to check for connectivity rather than relying on the physical status of the link.
Test ARP-Monitor
Description
A bonding interface is created in DUT0 by combining two Ethernet interfaces. Additionally, ARP monitor is configured to target the ip address of the gateway. As shown below, when the interface associated to the primary gateway goes down, the bond automatically redirects traffic to the backup gateway (as soon as it becomes active).
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 arp-monitor interval 100 set interfaces bonding bond0 arp-monitor target 192.168.100.20 set interfaces bonding bond0 mode active-backup set interfaces bonding bond0 primary eth1 set interfaces ethernet eth0p0 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 bridge br0 address 192.168.100.20/24 set interfaces bridge br0 stp version rstp set interfaces ethernet eth0 bridge-group bridge br0 set interfaces ethernet eth2 bridge-group bridge br0 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 3: Run command interfaces bonding bond0 show ports at DUT0 and check if output matches the following regular expressions:
.*ARP IP target\/s \(n.n.n.n form\): 192.168.100.20.*Show output
Ethernet Channel Bonding Driver: v6.1.55 Bonding Mode: fault-tolerance (active-backup) Primary Slave: eth1 (primary_reselect always) Currently Active Slave: None MII Status: down MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 ARP Polling Interval (ms): 100 ARP Missed Max: 2 ARP IP target/s (n.n.n.n form): 192.168.100.20 NS IPv6 target/s (xx::xx form): Slave Interface: eth0p0 MII Status: down Speed: Unknown Duplex: Unknown Link Failure Count: 1 Permanent HW addr: 00:a0:26:16:00:15 Slave queue ID: 0 Slave Interface: eth1 MII Status: down Speed: Unknown Duplex: Unknown Link Failure Count: 1 Permanent HW addr: 00:a0:26:16:00:16 Slave queue ID: 0
Step 4: Run command interfaces bonding bond0 show ports at DUT0 and check if output matches the following regular expressions:
.*Slave Interface: eth1.* .*MII Status: up.*Show output
Ethernet Channel Bonding Driver: v6.1.55 Bonding Mode: fault-tolerance (active-backup) Primary Slave: eth1 (primary_reselect always) Currently Active Slave: eth1 MII Status: up MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 ARP Polling Interval (ms): 100 ARP Missed Max: 2 ARP IP target/s (n.n.n.n form): 192.168.100.20 NS IPv6 target/s (xx::xx form): Slave Interface: eth0p0 MII Status: going down Speed: 1000 Mbps Duplex: full Link Failure Count: 2 Permanent HW addr: 00:a0:26:16:00:15 Slave queue ID: 0 Slave Interface: eth1 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 2 Permanent HW addr: 00:a0:26:16:00:16 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 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.687 ms --- 192.168.100.20 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.687/0.687/0.687/0.000 ms
Step 6: Modify the following configuration lines in DUT1 :
set interfaces ethernet eth0 disable
Step 7: Run command interfaces bonding bond0 show ports at DUT0 and check if output matches the following regular expressions:
.*Slave Interface: eth0p0.* .*MII Status: up.*Show output
Ethernet Channel Bonding Driver: v6.1.55 Bonding Mode: fault-tolerance (active-backup) Primary Slave: eth1 (primary_reselect always) Currently Active Slave: eth1 MII Status: up MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 ARP Polling Interval (ms): 100 ARP Missed Max: 2 ARP IP target/s (n.n.n.n form): 192.168.100.20 NS IPv6 target/s (xx::xx form): Slave Interface: eth0p0 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 2 Permanent HW addr: 00:a0:26:16:00:15 Slave queue ID: 0 Slave Interface: eth1 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 3 Permanent HW addr: 00:a0:26:16:00:16 Slave queue ID: 0
Step 8: Ping IP address 192.168.100.20 from DUT0:
admin@DUT0$ ping 192.168.100.20 count 1 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.341 ms --- 192.168.100.20 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.341/0.341/0.341/0.000 ms
Example 2
Step 1: Set the following configuration in DUT0 :
set interfaces bonding bond0 address 192.168.100.10/24 set interfaces bonding bond0 arp-monitor interval 100 set interfaces bonding bond0 arp-monitor target 192.168.100.20 set interfaces bonding bond0 mode active-backup set interfaces bonding bond0 primary eth0p0 set interfaces ethernet eth0p0 bond-group bond0 set interfaces ethernet eth0p1 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 bridge br0 address 192.168.100.20/24 set interfaces bridge br0 stp version rstp set interfaces ethernet eth0 bridge-group bridge br0 set interfaces ethernet eth0 disable 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 bond0 show ports at DUT0 and check if output matches the following regular expressions:
.*ARP IP target\/s \(n.n.n.n form\): 192.168.100.20.*Show output
Ethernet Channel Bonding Driver: v6.1.55 Bonding Mode: fault-tolerance (active-backup) Primary Slave: eth0p0 (primary_reselect always) Currently Active Slave: eth0p0 MII Status: up MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 ARP Polling Interval (ms): 100 ARP Missed Max: 2 ARP IP target/s (n.n.n.n form): 192.168.100.20 NS IPv6 target/s (xx::xx form): Slave Interface: eth0p0 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 2 Permanent HW addr: 00:a0:26:16:00:15 Slave queue ID: 0 Slave Interface: eth1 MII Status: down Speed: 1000 Mbps Duplex: full Link Failure Count: 4 Permanent HW addr: 00:a0:26:16:00:16 Slave queue ID: 0 Slave Interface: eth0p1 MII Status: down Speed: Unknown Duplex: Unknown Link Failure Count: 0 Permanent HW addr: 02:a0:26:16:00:15 Slave queue ID: 0
Step 4: Run command interfaces bonding bond0 show ports at DUT0 and check if output matches the following regular expressions:
.*Slave Interface: eth0p0.* .*MII Status: up.*Show output
Ethernet Channel Bonding Driver: v6.1.55 Bonding Mode: fault-tolerance (active-backup) Primary Slave: eth0p0 (primary_reselect always) Currently Active Slave: eth0p0 MII Status: up MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 ARP Polling Interval (ms): 100 ARP Missed Max: 2 ARP IP target/s (n.n.n.n form): 192.168.100.20 NS IPv6 target/s (xx::xx form): Slave Interface: eth0p0 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 2 Permanent HW addr: 00:a0:26:16:00:15 Slave queue ID: 0 Slave Interface: eth1 MII Status: down Speed: 1000 Mbps Duplex: full Link Failure Count: 4 Permanent HW addr: 00:a0:26:16:00:16 Slave queue ID: 0 Slave Interface: eth0p1 MII Status: down Speed: Unknown Duplex: Unknown 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 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.371 ms --- 192.168.100.20 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.371/0.371/0.371/0.000 ms
Step 6: Modify the following configuration lines in DUT1 :
set interfaces ethernet eth2 disable
Step 7: Run command interfaces bonding bond0 show ports at DUT0 and check if output matches the following regular expressions:
.*Slave Interface: eth0p1.* .*MII Status: up.*Show output
Ethernet Channel Bonding Driver: v6.1.55 Bonding Mode: fault-tolerance (active-backup) Primary Slave: eth0p0 (primary_reselect always) Currently Active Slave: eth0p0 MII Status: up MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0 ARP Polling Interval (ms): 100 ARP Missed Max: 2 ARP IP target/s (n.n.n.n form): 192.168.100.20 NS IPv6 target/s (xx::xx form): Slave Interface: eth0p0 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 2 Permanent HW addr: 00:a0:26:16:00:15 Slave queue ID: 0 Slave Interface: eth1 MII Status: down Speed: 1000 Mbps Duplex: full Link Failure Count: 4 Permanent HW addr: 00:a0:26:16:00:16 Slave queue ID: 0 Slave Interface: eth0p1 MII Status: down Speed: Unknown Duplex: Unknown Link Failure Count: 0 Permanent HW addr: 02:a0:26:16:00:15 Slave queue ID: 0
Step 8: Ping IP address 192.168.100.20 from DUT0:
admin@DUT0$ ping 192.168.100.20 count 1 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=479 ms --- 192.168.100.20 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 478.687/478.687/478.687/0.000 ms