test: update bridge vlan separation test

- Verify that broadcast packets are also properly moved accross the
  bridge, i.e. the broadcast packets sent from vlan interface VLAN10
  do not reach VLAN20

Fixes #773
This commit is contained in:
Ahmed Karic
2024-11-25 08:46:20 +01:00
parent 3d189d8ec6
commit 798194b64a
3 changed files with 22 additions and 5 deletions
@@ -14,9 +14,9 @@ Test that two VLANs are correctly separated in the bridge
,------------------------------------------------------------------------------,
| host:mgmt0 host:data10 host:data11 host:data20 host:data21 host:mgmt1 |
| [10.0.0.1] [10.0.0.2] [10.0.0.3] [10.0.0.4] |
| (ns10) (ns11) (s20) (ns21) |
| (ns10) (ns11) (ns20) (ns21) |
| |
| [ HOST ] |
| [ HOST ] |
'------------------------------------------------------------------------------'
....
@@ -39,6 +39,7 @@ endif::topdoc[]
. Verify ping 10.0.0.3 from host:data10
. Verify ping 10.0.0.4 from host:data11
. Verify ping not possible host:data10->10.0.0.4, host:data11->10.0.0.3, host:data10->10.0.0.2, host:data11->10.0.0.1
. Verify MAC broadcast isolation within VLANs
<<<
@@ -16,9 +16,9 @@ Test that two VLANs are correctly separated in the bridge
,------------------------------------------------------------------------------,
| host:mgmt0 host:data10 host:data11 host:data20 host:data21 host:mgmt1 |
| [10.0.0.1] [10.0.0.2] [10.0.0.3] [10.0.0.4] |
| (ns10) (ns11) (s20) (ns21) |
| (ns10) (ns11) (ns20) (ns21) |
| |
| [ HOST ] |
| [ HOST ] |
'------------------------------------------------------------------------------'
....
@@ -168,5 +168,21 @@ with infamy.Test() as test:
lambda: ns11.must_not_reach("10.0.0.3"),
lambda: ns10.must_not_reach("10.0.0.2"),
lambda: ns11.must_not_reach("10.0.0.1"))
with test.step("Verify MAC broadcast isolation within VLANs"):
# Clear ARP entries/queued packets
ns10.runsh("ip neigh flush all")
ns11.runsh("ip neigh flush all")
ns20.runsh("ip neigh flush all")
ns21.runsh("ip neigh flush all")
lambda: ns10.runsh("ping -b -c 5 -i 0.5 10.0.0.255"),
lambda: ns20.must_receive("broadcast or arp"),
infamy.parallel(
lambda: ns11.must_not_receive("broadcast or arp"),
lambda: ns21.must_not_receive("broadcast or arp")
)
test.succeed()
+1 -1
View File
@@ -1,7 +1,7 @@
:topdoc:
= Test specification
Infix v24.10.1-23-g8fc0ab9b-dirty
v24.10.2-2-g032a51b9-dirty
:title-page:
:toc:
:toclevels: 2