diff options
| author | Nataliia Solomko <natalirs1985@gmail.com> | 2026-07-08 16:20:29 +0300 |
|---|---|---|
| committer | Nataliia Solomko <natalirs1985@gmail.com> | 2026-07-09 12:26:19 +0300 |
| commit | adf91e3731f0a34b5a28add2da7a5912af2161b7 (patch) | |
| tree | 481aefa83253541a031467a14872c42740f8f4fe /smoketest/scripts/cli | |
| parent | 6f2b5a12e29deb46c9a724f8405d9b4f67e6420f (diff) | |
| download | vyos-1x-adf91e3731f0a34b5a28add2da7a5912af2161b7.tar.gz vyos-1x-adf91e3731f0a34b5a28add2da7a5912af2161b7.zip | |
vpp: T9062: Enable DHCP/DHCPv6 client detection on VLAN sub-interfaces
The 'ip4-dhcp-client-detect' and 'ip6-icmp-ra-punt' VPP features were only
ever enabled on the base ethernet interface, so DHCP and DHCPv6 clients
never worked on VLAN sub-interfaces (vif/vif-s) of a VPP-managed interface.
Apply the same feature toggles to each vif/vif-s using its own address
configuration. vif-c is intentionally excluded, as Q-in-Q sub-interfaces
are not currently functional under VPP.
Diffstat (limited to 'smoketest/scripts/cli')
| -rwxr-xr-x | smoketest/scripts/cli/test_vpp.py | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_vpp.py b/smoketest/scripts/cli/test_vpp.py index 7813dfdf5..35150a74a 100755 --- a/smoketest/scripts/cli/test_vpp.py +++ b/smoketest/scripts/cli/test_vpp.py @@ -210,6 +210,59 @@ class TestVPP(VyOSUnitTestSHIM.TestCase): ) self.assertTrue(icmpv6_ra_punt_feature.is_enabled) + # DHCP/DHCPv6 must also work on VLAN sub-interfaces + vlan = '10' + vif_interface = f'{interface}.{vlan}' + self.cli_set( + ['interfaces', 'ethernet', interface, 'vif', vlan, 'address', 'dhcp'] + ) + self.cli_set( + ['interfaces', 'ethernet', interface, 'vif', vlan, 'address', 'dhcpv6'] + ) + self.cli_commit() + + # check 'ip4-dhcp-client-detect' feature is enabled + vif_client_detect_feature = vpp.api.feature_is_enabled( + sw_if_index=vpp.get_sw_if_index(vif_interface), + feature_name='ip4-dhcp-client-detect', + arc_name='ip4-unicast', + ) + self.assertTrue(vif_client_detect_feature.is_enabled) + + # check 'ip6-icmp-ra-punt' feature is enabled + # for ip6-unicast and ip6-multicast arcs + for arc_name in ['ip6-unicast', 'ip6-multicast']: + vif_icmpv6_ra_punt_feature = vpp.api.feature_is_enabled( + sw_if_index=vpp.get_sw_if_index(vif_interface), + feature_name='ip6-icmp-ra-punt', + arc_name=arc_name, + ) + self.assertTrue(vif_icmpv6_ra_punt_feature.is_enabled) + + # remove DHCP/DHCPv6 from the VLAN sub-interface + self.cli_delete(['interfaces', 'ethernet', interface, 'vif', vlan, 'address']) + self.cli_commit() + + # check 'ip4-dhcp-client-detect' feature is disabled + vif_client_detect_feature = vpp.api.feature_is_enabled( + sw_if_index=vpp.get_sw_if_index(vif_interface), + feature_name='ip4-dhcp-client-detect', + arc_name='ip4-unicast', + ) + self.assertFalse(vif_client_detect_feature.is_enabled) + + # check 'ip6-icmp-ra-punt' feature is disabled + for arc_name in ['ip6-unicast', 'ip6-multicast']: + vif_icmpv6_ra_punt_feature = vpp.api.feature_is_enabled( + sw_if_index=vpp.get_sw_if_index(vif_interface), + feature_name='ip6-icmp-ra-punt', + arc_name=arc_name, + ) + self.assertFalse(vif_icmpv6_ra_punt_feature.is_enabled) + + # cleanup: delete the VLAN sub-interface + self.cli_delete(['interfaces', 'ethernet', interface, 'vif', vlan]) + def test_02_vpp_vxlan(self): vxlan_path = interfaces_path + ['vxlan'] vni = '23' |
