summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-27 21:42:22 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-28 15:03:36 +0200
commitb0aeb2a9c196ea7048545e38e6f3c5759ff4a5ac (patch)
tree3bfc4a149cabf926adb9aea94ec6c0e890ba020d /smoketest
parent92b834fdc0129b24de6683afe18a81a24f7bc495 (diff)
downloadvyos-1x-b0aeb2a9c196ea7048545e38e6f3c5759ff4a5ac.tar.gz
vyos-1x-b0aeb2a9c196ea7048545e38e6f3c5759ff4a5ac.zip
arp: T4397: change CLI syntax to support interface and VRF bound ARP entries
* set protocols static arp interface eth0 address 192.0.2.1 mac 01:23:45:67:89:01
Diffstat (limited to 'smoketest')
-rw-r--r--smoketest/configs/basic-vyos32
-rwxr-xr-xsmoketest/scripts/cli/test_protocols_static_arp.py16
2 files changed, 38 insertions, 10 deletions
diff --git a/smoketest/configs/basic-vyos b/smoketest/configs/basic-vyos
index 3d62d269c..e6f89954f 100644
--- a/smoketest/configs/basic-vyos
+++ b/smoketest/configs/basic-vyos
@@ -6,16 +6,26 @@ interfaces {
speed auto
}
ethernet eth1 {
- address 100.64.0.0/31
duplex auto
smp-affinity auto
speed auto
}
ethernet eth2 {
- address 100.100.0.1/24
duplex auto
smp-affinity auto
speed auto
+ vif 100 {
+ address 100.100.0.1/24
+ }
+ vif-s 200 {
+ address 100.64.200.254/24
+ vif-c 201 {
+ address 100.64.201.254/24
+ }
+ vif-c 202 {
+ address 100.64.202.254/24
+ }
+ }
}
loopback lo {
}
@@ -40,6 +50,24 @@ protocols {
arp 100.100.0.4 {
hwaddr 00:50:00:00:02:04
}
+ arp 100.64.200.1 {
+ hwaddr 00:50:00:00:00:01
+ }
+ arp 100.64.200.2 {
+ hwaddr 00:50:00:00:00:02
+ }
+ arp 100.64.201.10 {
+ hwaddr 00:50:00:00:00:10
+ }
+ arp 100.64.201.20 {
+ hwaddr 00:50:00:00:00:20
+ }
+ arp 100.64.202.30 {
+ hwaddr 00:50:00:00:00:30
+ }
+ arp 100.64.202.40 {
+ hwaddr 00:50:00:00:00:40
+ }
route 0.0.0.0/0 {
next-hop 100.64.0.1 {
}
diff --git a/smoketest/scripts/cli/test_protocols_static_arp.py b/smoketest/scripts/cli/test_protocols_static_arp.py
index 6663ade96..b61d8f854 100755
--- a/smoketest/scripts/cli/test_protocols_static_arp.py
+++ b/smoketest/scripts/cli/test_protocols_static_arp.py
@@ -52,16 +52,16 @@ class TestARP(VyOSUnitTestSHIM.TestCase):
def test_static_arp(self):
test_data = {
- '192.0.2.10' : { 'lladdr' : '00:01:02:03:04:0a' },
- '192.0.2.11' : { 'lladdr' : '00:01:02:03:04:0b' },
- '192.0.2.12' : { 'lladdr' : '00:01:02:03:04:0c' },
- '192.0.2.13' : { 'lladdr' : '00:01:02:03:04:0d' },
- '192.0.2.14' : { 'lladdr' : '00:01:02:03:04:0e' },
- '192.0.2.15' : { 'lladdr' : '00:01:02:03:04:0f' },
+ '192.0.2.10' : { 'mac' : '00:01:02:03:04:0a' },
+ '192.0.2.11' : { 'mac' : '00:01:02:03:04:0b' },
+ '192.0.2.12' : { 'mac' : '00:01:02:03:04:0c' },
+ '192.0.2.13' : { 'mac' : '00:01:02:03:04:0d' },
+ '192.0.2.14' : { 'mac' : '00:01:02:03:04:0e' },
+ '192.0.2.15' : { 'mac' : '00:01:02:03:04:0f' },
}
for host, host_config in test_data.items():
- self.cli_set(base_path + [host, 'hwaddr', host_config['lladdr']])
+ self.cli_set(base_path + ['interface', interface, 'address', host, 'mac', host_config['mac']])
self.cli_commit()
@@ -76,7 +76,7 @@ class TestARP(VyOSUnitTestSHIM.TestCase):
continue
if entry['dst'] == host:
- self.assertEqual(entry['lladdr'], host_config['lladdr'])
+ self.assertEqual(entry['lladdr'], host_config['mac'])
self.assertEqual(entry['dev'], interface)
found = True