summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2025-11-05 13:20:42 +0200
committerNataliia Solomko <natalirs1985@gmail.com>2025-11-12 13:48:44 +0200
commitccf4972f8dd9ddf370fe6376480c1244a138c4bd (patch)
treec572124fe48db464fb48c912e070c0f322f12908 /smoketest/scripts/cli
parent21d509d6c639f2a94c43c3af7f845ef0e544555f (diff)
downloadvyos-1x-ccf4972f8dd9ddf370fe6376480c1244a138c4bd.tar.gz
vyos-1x-ccf4972f8dd9ddf370fe6376480c1244a138c4bd.zip
T7731: Static ARP entries are missing after an interface status change
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_vpp.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_vpp.py b/smoketest/scripts/cli/test_vpp.py
index 6efa04713..604fa25fc 100755
--- a/smoketest/scripts/cli/test_vpp.py
+++ b/smoketest/scripts/cli/test_vpp.py
@@ -1595,6 +1595,30 @@ class TestVPP(VyOSUnitTestSHIM.TestCase):
self.assertIn(f' hugepagesz={hp_size_1g} hugepages={hp_count_1g}', tmp)
self.assertIn(f' hugepagesz={hp_size_2m} hugepages={hp_count_2m}', tmp)
+ def test_21_static_arp(self):
+ host = '192.0.2.10'
+ mac = '00:01:02:03:04:0a'
+ path_static_arp = ['protocols', 'static', 'arp']
+
+ self.cli_set(['interfaces', 'ethernet', interface, 'address', '192.0.2.1/24'])
+ self.cli_set(
+ path_static_arp + ['interface', interface, 'address', host, 'mac', mac]
+ )
+ self.cli_commit()
+
+ # Change VPP configuration
+ self.cli_set(base_path + ['settings', 'unix', 'poll-sleep-usec', '50'])
+
+ # Ensure arp entry is not disappeared
+ _, neighbors = rc_cmd('sudo ip neighbor')
+ self.assertIn(f'{host} dev {interface} lladdr {mac}', neighbors)
+
+ # Check VPP IP neighbors
+ _, vpp_neighbors = rc_cmd('sudo vppctl show ip neighbors')
+ self.assertRegex(vpp_neighbors, rf'{host}\s+S\s+{mac}\s+{interface}')
+
+ self.cli_delete(path_static_arp)
+
if __name__ == '__main__':
unittest.main(verbosity=2, failfast=VyOSUnitTestSHIM.TestCase.debug_on())