Bonding
Test suite to validate DHCP client operation on bonding interfaces.
This suite tests DHCP on bonding (link aggregation) interfaces, which are commonly used in production for high availability and load balancing.
Bonding combines multiple physical interfaces into a single logical interface. The bonding interface should be able to obtain an IP address via DHCP just like any physical interface.
Key scenarios verified: - Bonding interface in active-backup mode obtains IP via DHCP - DHCP lease is maintained when active member changes (failover) - Bonding interface appears correctly in DHCP lease list
This is critical for: - High Availability (HA) deployments - Network redundancy scenarios - Data center server connections
Test Bonding Interface Obtains DHCP Lease
Description
This scenario verifies that a bonding interface configured in active-backup mode can successfully obtain an IP address via DHCP.
The bonding interface combines two physical interfaces (eth0 + eth1) into a single logical interface (bond0). A VLAN (VIF) is configured over the bonding interface to obtain DHCP in the test environment.
Configuration: - Server: vif 100 with 192.168.50.1/24, DHCP pool 192.168.50.10-20 - Client: bond0 (active-backup) with eth0 + eth1, vif 100 with dhcp
Expected: - bond0.100 obtains IP in range 192.168.50.10-20 - bond0.100 appears in DHCP lease list - Connectivity to server works
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 vif 100 address 192.168.50.1/24 set service dhcp-server shared-network main subnet 192.168.50.0/24 options default-router 192.168.50.1 set service dhcp-server shared-network main subnet 192.168.50.0/24 start 192.168.50.10 stop 192.168.50.20 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces bonding bond0 miimon 100 set interfaces bonding bond0 mode active-backup set interfaces bonding bond0 vif 100 address dhcp 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 3: Run command interfaces bonding bond0 vif 100 show at DUT1 and check if output contains the following tokens:
192.168.50.Show output
---------------------------------------------------------------------- Name IP Address Admin Oper Vrf Description ---------------------------------------------------------------------- bond0.100 192.168.50.10/24 up up fe80::dcad:beff:feef:6c10/64
Step 4: Run command service dhcp-client show leases at DUT1 and expect this output:
Show output
Interface: eth2 IP address: Subnet mask: Routers: Name-servers: Domain-name: NTP servers: DHCP server: Lease time: Expiry date: Reason: RELEASE Interface: eth0 IP address: Subnet mask: Routers: Name-servers: Domain-name: NTP servers: DHCP server: Lease time: Expiry date: Reason: RELEASE Interface: eth0.100 IP address: Subnet mask: Routers: Name-servers: Domain-name: NTP servers: DHCP server: Lease time: Expiry date: Reason: RELEASE Interface: eth0.102 IP address: Subnet mask: Routers: Name-servers: Domain-name: NTP servers: DHCP server: Lease time: Expiry date: Reason: RELEASE Interface: eth0.101 IP address: Subnet mask: Routers: Name-servers: Domain-name: NTP servers: DHCP server: Lease time: Expiry date: Reason: RELEASE Interface: br0 IP address: Subnet mask: Routers: Name-servers: Domain-name: NTP servers: DHCP server: Lease time: Expiry date: Reason: RELEASE Interface: bond0.100 IP address: 192.168.50.10 Subnet mask: 255.255.255.0 Routers: 192.168.50.1 Name-servers: Domain-name: NTP servers: DHCP server: 192.168.50.1 Lease time: 43200 Expiry date: Fri Mar 06 09:16:05 2026 Reason: BOUND
Step 5: Ping IP address 192.168.50.1 from DUT1:
admin@DUT1$ ping 192.168.50.1 count 1 size 56 timeout 1Show output
PING 192.168.50.1 (192.168.50.1) 56(84) bytes of data. 64 bytes from 192.168.50.1: icmp_seq=1 ttl=64 time=0.431 ms --- 192.168.50.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.431/0.431/0.431/0.000 ms
Test Bonding DHCP Lease Appears in Server
Description
This scenario verifies that the DHCP server correctly records the lease for a bonding interface client.
The server should show the lease with: - The MAC address of the bonding interface - The assigned IP from the pool
This confirms end-to-end DHCP functionality for bonding interfaces.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 vif 100 address 192.168.50.1/24 set service dhcp-server shared-network main subnet 192.168.50.0/24 options default-router 192.168.50.1 set service dhcp-server shared-network main subnet 192.168.50.0/24 start 192.168.50.10 stop 192.168.50.20 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces bonding bond0 miimon 100 set interfaces bonding bond0 mode active-backup set interfaces bonding bond0 vif 100 address dhcp 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 3: Run command interfaces bonding bond0 vif 100 show at DUT1 and check if output contains the following tokens:
192.168.50.Show output
---------------------------------------------------------------------- Name IP Address Admin Oper Vrf Description ---------------------------------------------------------------------- bond0.100 192.168.50.10/24 up up fe80::dcad:beff:feef:6c10/64
Step 4: Run command interfaces show detailed at DUT1 and expect this output:
Show output
--------------------------------------------------------------------------------------------------------------------- Name Idx IP Address Admin Oper Link MTU Vrf Upper Lower Type Phys addr --------------------------------------------------------------------------------------------------------------------- bond0 720 fe80::dcad:beff:feef:6c10/64 up up up 1500 bonding de:ad:be:ef:6c:10 bond0.100 721 192.168.50.10/24 up up up 1500 bond0 bonding de:ad:be:ef:6c:10 fe80::dcad:beff:feef:6c10/64 eth0 2 up up up 1500 bond0 ethernet de:ad:be:ef:6c:10 eth1 3 up up up 1500 bond0 ethernet de:ad:be:ef:6c:10 eth2 4 down down down 1500 ethernet de:ad:be:ef:6c:12 eth3 5 down down down 1500 ethernet de:ad:be:ef:6c:13
Step 5: Run command service dhcp-server show leases main at DUT0 and expect this output:
Show output
Instance main: ----------------------------------------------------------------------------------------------- IP Address MAC Address Start Time Expiration Time Last Transaction ----------------------------------------------------------------------------------------------- 192.168.50.10 de:ad:be:ef:6c:10 2026/03/05 21:16:15 2026/03/06 09:16:15 2026/03/05 21:16:15
Test Bonding DHCP with Default Router
Description
This scenario verifies that a bonding interface receives and applies the default router option from DHCP.
The client should: - Obtain IP via DHCP on bond0.100 (VIF over bonding) - Install default route via the server gateway - Have connectivity through the bonding interface
This is important for production scenarios where the bonding interface is the primary network connection.
Scenario
Step 1: Set the following configuration in DUT0 :
set interfaces ethernet eth0 vif 100 address 192.168.50.1/24 set service dhcp-server shared-network main subnet 192.168.50.0/24 options default-router 192.168.50.1 set service dhcp-server shared-network main subnet 192.168.50.0/24 start 192.168.50.10 stop 192.168.50.20 set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'
Step 2: Set the following configuration in DUT1 :
set interfaces bonding bond0 miimon 100 set interfaces bonding bond0 mode active-backup set interfaces bonding bond0 vif 100 address dhcp 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 3: Run command interfaces bonding bond0 vif 100 show at DUT1 and check if output contains the following tokens:
192.168.50.Show output
---------------------------------------------------------------------- Name IP Address Admin Oper Vrf Description ---------------------------------------------------------------------- bond0.100 192.168.50.10/24 up up fe80::dcad:beff:feef:6c10/64
Step 4: Run command protocols ip show route at DUT1 and expect this output:
Show output
Codes: K - kernel route, C - connected, L - local, S - static, R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP, T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR, f - OpenFabric, t - Table-Direct, > - selected route, * - FIB route, q - queued, r - rejected, b - backup t - trapped, o - offload failure IPv4 unicast VRF default: S>* 0.0.0.0/0 [1/0] via 192.168.50.1, bond0.100, weight 1, 00:00:01 L 10.215.168.21/32 is directly connected, eth0 inactive, weight 1, 01:42:39 C>* 192.168.50.0/24 is directly connected, bond0.100, weight 1, 00:00:01 K * 192.168.50.0/24 [0/0] is directly connected, bond0.100, weight 1, 00:00:01 L>* 192.168.50.10/32 is directly connected, bond0.100, weight 1, 00:00:01