test: update test cases (refactor)
- change topology colors - add ascii charts - apply new naming conventions (indexing)
@@ -2,6 +2,14 @@
|
||||
==== Description
|
||||
Test basic connectivity to a bridge
|
||||
|
||||
....
|
||||
|
||||
PING --> br0 (10.0.0.2)
|
||||
/
|
||||
PC -------- target:data
|
||||
|
||||
....
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/bridge_basic/topology.png[Bridge basic topology]
|
||||
@@ -15,7 +23,7 @@ image::topology.png[Bridge basic topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Initialize
|
||||
. Set up topology and attach to target DUT
|
||||
. Configure single bridge with a single physical port, bridge @ IP 10.0.0.2
|
||||
. Verify ping 10.0.0.2 is possible from host:data
|
||||
|
||||
|
||||
@@ -1,18 +1,22 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# PING --> br0 10.0.0.2
|
||||
# /
|
||||
# PC ---- e0
|
||||
#
|
||||
"""
|
||||
r"""
|
||||
Bridge basic
|
||||
|
||||
Test basic connectivity to a bridge
|
||||
|
||||
....
|
||||
|
||||
PING --> br0 (10.0.0.2)
|
||||
/
|
||||
PC -------- target:data
|
||||
|
||||
....
|
||||
|
||||
"""
|
||||
import infamy
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Initialize"):
|
||||
with test.step("Set up topology and attach to target DUT"):
|
||||
env = infamy.Env()
|
||||
target = env.attach("target", "mgmt")
|
||||
|
||||
|
||||
@@ -7,18 +7,18 @@ graph "1x2" {
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
|
||||
host [
|
||||
label="host | { <tgt> tgt | <data> data }",
|
||||
label="host | { <mgmt> mgmt | <data> data }",
|
||||
pos="0,12!",
|
||||
kind="controller",
|
||||
];
|
||||
|
||||
target [
|
||||
label="{ <mgmt> mgmt | <data> data } | target\n10.0.0.2/24 (br0)",
|
||||
label="{ <mgmt> mgmt | <data> data } | target",
|
||||
pos="10,12!",
|
||||
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
host:tgt -- target:mgmt [kind=mgmt]
|
||||
host:mgmt -- target:mgmt [kind=mgmt, color=lightgrey]
|
||||
host:data -- target:data [color=black, fontcolor=black, taillabel="10.0.0.1/24"]
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 6.7 KiB |
@@ -2,6 +2,26 @@
|
||||
==== Description
|
||||
Ping through two bridges on two different DUTs.
|
||||
|
||||
....
|
||||
|
||||
,-------------------------------------, ,-------------------------------------,
|
||||
| dut1:link | | dut2:link |
|
||||
| br0 ----------|-------|--------- br0 |
|
||||
| / | | / \ |
|
||||
|dut1:mgmt dut1:data1 | | dut2:data1 dut2:data2 dut2:mgmt |
|
||||
'-------------------------------------' '-------------------------------------'
|
||||
| | | | |
|
||||
| | | | |
|
||||
,-----------------------------------------------------------------------------------------,
|
||||
| host:mgmt1 host:data11 host:data21 host:data22 host:mgmt2 |
|
||||
| [10.0.0.2] [10.0.0.3] [10.0.0.4] |
|
||||
| (ns11) (ns20) (ns21) |
|
||||
| |
|
||||
| [ HOST ] |
|
||||
'-----------------------------------------------------------------------------------------'
|
||||
|
||||
....
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/bridge_fwd_dual_dut/topology.png[Bridge forwarding dual DUTs topology]
|
||||
@@ -15,7 +35,7 @@ image::topology.png[Bridge forwarding dual DUTs topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Initialize
|
||||
. Set up topology and attach to target DUT
|
||||
. Configure a bridge with triple physical port
|
||||
. Verify ping 10.0.0.3 and 10.0.0.4 from host:data11
|
||||
|
||||
|
||||
@@ -1,38 +1,45 @@
|
||||
#!/usr/bin/env python3
|
||||
# ,-------------------------------------, ,-------------------------------------,
|
||||
# | dut1:data2 | | dut2:data2 |
|
||||
# | br0 ----------|-------|--------- br0 |
|
||||
# | / \ | | / \ |
|
||||
# |dut1:mgmt dut1:data0 dut1:data1 | | dut2:data0 dut2:data1 dut2:mgmt |
|
||||
# '-------------------------------------' '-------------------------------------'
|
||||
# | | | | | |
|
||||
# | | | | | |
|
||||
# ,-----------------------------------------------------------------------------------------,
|
||||
# | host:mgmt0 host:data10 host:data11 host:data20 host:data21 host:mgmt1 |
|
||||
# | [10.0.0.2] [10.0.0.3] [10.0.0.4] |
|
||||
# | (ns11) (ns20) (ns21) |
|
||||
# | |
|
||||
# | [ HOST ] |
|
||||
# '-----------------------------------------------------------------------------------------'
|
||||
"""
|
||||
r"""
|
||||
Bridge forwarding dual DUTs
|
||||
|
||||
Ping through two bridges on two different DUTs.
|
||||
|
||||
....
|
||||
|
||||
,-------------------------------------, ,-------------------------------------,
|
||||
| dut1:link | | dut2:link |
|
||||
| br0 ----------|-------|--------- br0 |
|
||||
| / | | / \ |
|
||||
|dut1:mgmt dut1:data1 | | dut2:data1 dut2:data2 dut2:mgmt |
|
||||
'-------------------------------------' '-------------------------------------'
|
||||
| | | | |
|
||||
| | | | |
|
||||
,-----------------------------------------------------------------------------------------,
|
||||
| host:mgmt1 host:data11 host:data21 host:data22 host:mgmt2 |
|
||||
| [10.0.0.2] [10.0.0.3] [10.0.0.4] |
|
||||
| (ns11) (ns20) (ns21) |
|
||||
| |
|
||||
| [ HOST ] |
|
||||
'-----------------------------------------------------------------------------------------'
|
||||
|
||||
....
|
||||
|
||||
"""
|
||||
|
||||
import infamy
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Initialize"):
|
||||
with test.step("Set up topology and attach to target DUT"):
|
||||
env = infamy.Env()
|
||||
dut1 = env.attach("dut1", "mgmt")
|
||||
dut2 = env.attach("dut2", "mgmt")
|
||||
|
||||
with test.step("Configure a bridge with triple physical port"):
|
||||
_, tport11 = env.ltop.xlate("dut1", "data1")
|
||||
_, tport12 = env.ltop.xlate("dut1", "data2")
|
||||
_, tport20 = env.ltop.xlate("dut2", "data0")
|
||||
_, tport1_link = env.ltop.xlate("dut1", "link")
|
||||
_, tport21 = env.ltop.xlate("dut2", "data1")
|
||||
_, tport22 = env.ltop.xlate("dut2", "data2")
|
||||
_, tport2_link = env.ltop.xlate("dut2", "link")
|
||||
|
||||
dut1.put_config_dict("ietf-interfaces", {
|
||||
"interfaces": {
|
||||
@@ -47,7 +54,7 @@ with infamy.Test() as test:
|
||||
{
|
||||
"vid": 10,
|
||||
"untagged": [ tport11 ],
|
||||
"tagged": [ "br0", tport12 ]
|
||||
"tagged": [ "br0", tport1_link ]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -62,7 +69,7 @@ with infamy.Test() as test:
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": tport12,
|
||||
"name": tport1_link,
|
||||
"enabled": True,
|
||||
"infix-interfaces:bridge-port": {
|
||||
"bridge": "br0",
|
||||
@@ -84,21 +91,13 @@ with infamy.Test() as test:
|
||||
"vlan": [
|
||||
{
|
||||
"vid": 10,
|
||||
"untagged": [ tport20, tport21 ],
|
||||
"tagged": [ "br0", tport22 ]
|
||||
"untagged": [ tport21, tport22 ],
|
||||
"tagged": [ "br0", tport2_link ]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": tport20,
|
||||
"enabled": True,
|
||||
"infix-interfaces:bridge-port": {
|
||||
"pvid": 10,
|
||||
"bridge": "br0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": tport21,
|
||||
"enabled": True,
|
||||
@@ -110,6 +109,14 @@ with infamy.Test() as test:
|
||||
{
|
||||
"name": tport22,
|
||||
"enabled": True,
|
||||
"infix-interfaces:bridge-port": {
|
||||
"pvid": 10,
|
||||
"bridge": "br0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": tport2_link,
|
||||
"enabled": True,
|
||||
"infix-interfaces:bridge-port": {
|
||||
"bridge": "br0",
|
||||
}
|
||||
@@ -121,16 +128,16 @@ with infamy.Test() as test:
|
||||
with test.step("Verify ping 10.0.0.3 and 10.0.0.4 from host:data11"):
|
||||
|
||||
_, hport11 = env.ltop.xlate("host", "data11")
|
||||
_, hport20 = env.ltop.xlate("host", "data20")
|
||||
_, hport21 = env.ltop.xlate("host", "data21")
|
||||
_, hport22 = env.ltop.xlate("host", "data22")
|
||||
|
||||
with infamy.IsolatedMacVlan(hport11) as ns11, \
|
||||
infamy.IsolatedMacVlan(hport20) as ns20, \
|
||||
infamy.IsolatedMacVlan(hport21) as ns21:
|
||||
infamy.IsolatedMacVlan(hport21) as ns21, \
|
||||
infamy.IsolatedMacVlan(hport22) as ns22:
|
||||
|
||||
ns11.addip("10.0.0.2")
|
||||
ns20.addip("10.0.0.3")
|
||||
ns21.addip("10.0.0.4")
|
||||
ns21.addip("10.0.0.3")
|
||||
ns22.addip("10.0.0.4")
|
||||
|
||||
ns11.must_reach("10.0.0.3")
|
||||
ns11.must_reach("10.0.0.4")
|
||||
|
||||
@@ -7,32 +7,32 @@ graph "2x4" {
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
|
||||
host [
|
||||
label="host | { <mgmt1> mgmt1 | <data11> data11 | <> \n\n\n| <mgmt2> mgmt2 | <data20> data20 | <data21> data21 }",
|
||||
pos="0,15!",
|
||||
height=3,
|
||||
label="host | { <mgmt1> mgmt1 | <data11> data11 | <> \n\n\n| <mgmt2> mgmt2 | <data21> data21 | <data22> data22 }",
|
||||
pos="0,15!",
|
||||
height=3,
|
||||
|
||||
kind="controller",
|
||||
kind="controller",
|
||||
];
|
||||
|
||||
dut1 [
|
||||
label="{ <mgmt> mgmt | <data1> data1 } | { dut1 \n\n| <data2> data2 }",
|
||||
pos="4,15.68!",
|
||||
kind="infix",
|
||||
label="{ <mgmt> mgmt | <data1> data1 } | { dut1 \n\n| <link> link }",
|
||||
pos="4,15.68!",
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
dut2 [
|
||||
label="{ <mgmt> mgmt | <data0> data0 | <data1> data1 } | { <data2> data2 | \n dut2 }",
|
||||
pos="4,14.43!",
|
||||
height=1.2,
|
||||
kind="infix",
|
||||
label="{ <mgmt> mgmt | <data1> data1 | <data2> data2 } | { <link> link | \n dut2 }",
|
||||
pos="4,14.43!",
|
||||
height=1.2,
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
host:mgmt1 -- dut1:mgmt [kind=mgmt]
|
||||
host:mgmt1 -- dut1:mgmt [kind=mgmt, color=lightgrey]
|
||||
host:data11 -- dut1:data1 [color=black, fontcolor=black, taillabel="10.0.0.2"]
|
||||
|
||||
host:mgmt2 -- dut2:mgmt [kind=mgmt]
|
||||
host:data20 -- dut2:data0 [color=black, fontcolor=black, taillabel="10.0.0.3"]
|
||||
host:data21 -- dut2:data1 [color=black, fontcolor=black, taillabel="10.0.0.4"]
|
||||
host:mgmt2 -- dut2:mgmt [kind=mgmt, color=lightgrey]
|
||||
host:data21 -- dut2:data1 [color=black, fontcolor=black, taillabel="10.0.0.3"]
|
||||
host:data22 -- dut2:data2 [color=black, fontcolor=black, taillabel="10.0.0.4"]
|
||||
|
||||
dut1:data2 -- dut2:data2
|
||||
}
|
||||
dut1:link -- dut2:link [color=black]
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
@@ -2,6 +2,26 @@
|
||||
==== Description
|
||||
Tests forwarding through a DUT with two bridged interfaces on one DUT.
|
||||
|
||||
....
|
||||
|
||||
,------------------------------------------,
|
||||
| |
|
||||
| br0 |
|
||||
| / \ |
|
||||
| target:mgmt target:data1 target:data2 |
|
||||
'------------------------------------------'
|
||||
| | |
|
||||
| | |
|
||||
,------------------------------------------,
|
||||
| host:mgmt host:data1 host:data2 |
|
||||
| [10.0.0.1] [10.0.0.2] |
|
||||
| (ns0) (ns1) |
|
||||
| |
|
||||
| [ HOST ] |
|
||||
'------------------------------------------'
|
||||
|
||||
....
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/bridge_fwd_sgl_dut/topology.png[Bridge forwarding single DUTs topology]
|
||||
@@ -15,7 +35,7 @@ image::topology.png[Bridge forwarding single DUTs topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Initialize
|
||||
. Set up topology and attach to target DUT
|
||||
. Configure a bridge with dual physical port
|
||||
. Verify ping from host:data0 to 10.0.0.1
|
||||
|
||||
|
||||
@@ -1,34 +1,40 @@
|
||||
#!/usr/bin/env python3
|
||||
# ,-----------------------------------------,
|
||||
# | |
|
||||
# | br0 |
|
||||
# | / \ |
|
||||
# | target:mgmt tgt:data0 tgt:data1 |
|
||||
# '-----------------------------------------'
|
||||
# | | |
|
||||
# | | |
|
||||
# ,------------------------------------------,
|
||||
# | host:mgmt host:data0 host:data1 |
|
||||
# | [10.0.0.1] [10.0.0.2] |
|
||||
# | (ns0) (ns1) |
|
||||
# | |
|
||||
# | [ HOST ] |
|
||||
# '------------------------------------------'
|
||||
"""
|
||||
r"""
|
||||
Bridge forwarding single DUTs
|
||||
|
||||
Tests forwarding through a DUT with two bridged interfaces on one DUT.
|
||||
|
||||
....
|
||||
|
||||
,------------------------------------------,
|
||||
| |
|
||||
| br0 |
|
||||
| / \ |
|
||||
| target:mgmt target:data1 target:data2 |
|
||||
'------------------------------------------'
|
||||
| | |
|
||||
| | |
|
||||
,------------------------------------------,
|
||||
| host:mgmt host:data1 host:data2 |
|
||||
| [10.0.0.1] [10.0.0.2] |
|
||||
| (ns0) (ns1) |
|
||||
| |
|
||||
| [ HOST ] |
|
||||
'------------------------------------------'
|
||||
|
||||
....
|
||||
|
||||
"""
|
||||
import infamy
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Initialize"):
|
||||
with test.step("Set up topology and attach to target DUT"):
|
||||
env = infamy.Env()
|
||||
target = env.attach("target", "mgmt")
|
||||
|
||||
with test.step("Configure a bridge with dual physical port"):
|
||||
_, tport0 = env.ltop.xlate("target", "data0")
|
||||
_, tport1 = env.ltop.xlate("target", "data1")
|
||||
_, tport2 = env.ltop.xlate("target", "data2")
|
||||
|
||||
target.put_config_dict("ietf-interfaces", {
|
||||
"interfaces": {
|
||||
@@ -39,14 +45,14 @@ with infamy.Test() as test:
|
||||
"enabled": True,
|
||||
},
|
||||
{
|
||||
"name": tport0,
|
||||
"name": tport1,
|
||||
"enabled": True,
|
||||
"infix-interfaces:bridge-port": {
|
||||
"bridge": "br0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": tport1,
|
||||
"name": tport2,
|
||||
"enabled": True,
|
||||
"infix-interfaces:bridge-port": {
|
||||
"bridge": "br0"
|
||||
@@ -57,15 +63,15 @@ with infamy.Test() as test:
|
||||
})
|
||||
|
||||
with test.step("Verify ping from host:data0 to 10.0.0.1"):
|
||||
_, hport0 = env.ltop.xlate("host", "data0")
|
||||
_, hport1 = env.ltop.xlate("host", "data1")
|
||||
_, hport2 = env.ltop.xlate("host", "data2")
|
||||
|
||||
with infamy.IsolatedMacVlan(hport0) as ns0, \
|
||||
infamy.IsolatedMacVlan(hport1) as ns1 :
|
||||
with infamy.IsolatedMacVlan(hport1) as ns1, \
|
||||
infamy.IsolatedMacVlan(hport2) as ns2 :
|
||||
|
||||
ns1.addip("10.0.0.2")
|
||||
ns0.addip("10.0.0.1")
|
||||
ns2.addip("10.0.0.2")
|
||||
ns1.addip("10.0.0.1")
|
||||
|
||||
ns0.must_reach("10.0.0.2")
|
||||
ns1.must_reach("10.0.0.2")
|
||||
|
||||
test.succeed()
|
||||
|
||||
@@ -7,19 +7,19 @@ graph "1x3" {
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
|
||||
host [
|
||||
label="host | { <tgt> tgt | <data0> data0 | <data1> data1 }",
|
||||
label="host | { <mgmt> mgmt | <data1> data1 | <data2> data2 }",
|
||||
pos="0,12!",
|
||||
kind="controller",
|
||||
];
|
||||
|
||||
target [
|
||||
label="{ <mgmt> mgmt | <data0> data0 | <data1> data1 } | target",
|
||||
label="{ <mgmt> mgmt | <data1> data1 | <data2> data2 } | target",
|
||||
pos="10,12!",
|
||||
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
host:tgt -- target:mgmt [kind=mgmt]
|
||||
host:data0 -- target:data0 [color=black, fontcolor=black, taillabel="10.0.0.1"]
|
||||
host:data1 -- target:data1 [color=black, fontcolor=black, taillabel="10.0.0.2"]
|
||||
}
|
||||
host:mgmt -- target:mgmt [kind=mgmt, color=lightgrey]
|
||||
host:data1 -- target:data1 [color=black, fontcolor=black, taillabel="10.0.0.1"]
|
||||
host:data2 -- target:data2 [color=black, fontcolor=black, taillabel="10.0.0.2"]
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 6.7 KiB |
@@ -1,6 +1,8 @@
|
||||
=== Custom MAC address on interface
|
||||
==== Description
|
||||
Test possibility to set and remove custom mac address on interfaces
|
||||
Verify support for setting and removing a custom MAC address on interfaces.
|
||||
Both static MAC address and derived from the chassis MAC with, or without,
|
||||
an offset applied.
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
@@ -15,11 +17,16 @@ image::topology.png[Custom MAC address on interface topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Verify target:data MAC address is reset to default
|
||||
. Initialize
|
||||
. Set custom MAC address to '02:01:00:c0:ff:ee' on target:mgmt
|
||||
. Set target:data static MAC address '02:01:00:c0:ff:ee'
|
||||
. Verify target:mgmt has MAC address '02:01:00:c0:ff:ee'
|
||||
. Remove custom MAC address '02:01:00:c0:ff:ee'
|
||||
. Verify that target:mgmt has the original MAC address again
|
||||
. Reset target:mgmt MAC address to default
|
||||
. Set target:data to chassis MAC
|
||||
. Verify target:data has chassis MAC
|
||||
. Set target:data to chassis MAC + offset
|
||||
. Verify target:data has chassis MAC + offset
|
||||
. Reset target:mgmt MAC address to default
|
||||
|
||||
|
||||
<<<
|
||||
|
||||
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.5 KiB |
@@ -2,6 +2,29 @@
|
||||
==== Description
|
||||
Test tagged IGMP control traffic and that VLAN separation is respected for multicast
|
||||
|
||||
....
|
||||
|
||||
VLAN55 VLAN77 VLAN55 VLAN77
|
||||
10.0.1.1 10.0.2.1 10.0.1.2 10.0.2.2
|
||||
\ / \ /
|
||||
\ / \ /
|
||||
\ / \ /
|
||||
\--------------/ VLAN 1,2 T \---------------/
|
||||
| DUT1 +---------------------------------+ DUT2 |
|
||||
| |dut1:link dut2:link| |
|
||||
+--------------+ +-----+---------+
|
||||
| | | |
|
||||
dut1:data1| |dut1:data2 dut2:data1| |dut2:data2
|
||||
VLAN55 U | | VLAN77 U VLAN55 U | | VLAN77 U
|
||||
| | | |
|
||||
| | | |
|
||||
+-------+ | +----------+ +------------+ +--------+
|
||||
| msend +--+ | mreceive | | mreceive | | msend |
|
||||
+-------+ +----------+ +------------+ +--------+
|
||||
10.0.1.11 10.0.2.11 10.0.1.22 10.0.2.22
|
||||
|
||||
....
|
||||
|
||||
==== Topology
|
||||
ifdef::topdoc[]
|
||||
image::../../test/case/ietf_interfaces/igmp_vlan/topology.png[IGMP VLAN topology]
|
||||
@@ -15,17 +38,17 @@ image::topology.png[IGMP VLAN topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Initialize
|
||||
. Set up topology and attach to target DUT
|
||||
. Configure device
|
||||
. Start multicast sender on host:data10, group 224.2.2.2
|
||||
. Start multicast sender on host:data21, group 224.1.1.1
|
||||
. Verify group 224.2.2.2 is flooded to host:data20
|
||||
. Verify group 224.1.1.1 is flooded to host:data11
|
||||
. Verify group 224.2.2.2 on host:data10, 224.1.1.1 on host:data20, 224.2.2.2 on host:data11 and 224.1.1.1 on host:data21 is not received
|
||||
. Join multicast group 224.2.2.2 on host:data20
|
||||
. Verify group 224.2.2.2 on host:data10, 224.1.1.1 on host:data20, 224.2.2.2 on host:data11 and 224.1.1.1 on host:data21 is not received
|
||||
. Verify group 224.2.2.2 is forwarded to host:data20
|
||||
. Verify group 224.1.1.1 is forwarded to host:data11
|
||||
. Start multicast sender on host:data11, group 224.2.2.2
|
||||
. Start multicast sender on host:data22, group 224.1.1.1
|
||||
. Verify group 224.2.2.2 is flooded to host:data21
|
||||
. Verify group 224.1.1.1 is flooded to host:data12
|
||||
. Verify group 224.2.2.2 on host:data11, 224.1.1.1 on host:data21, 224.2.2.2 on host:data12 and 224.1.1.1 on host:data22 is not received
|
||||
. Join multicast group 224.2.2.2 on host:data21
|
||||
. Verify group 224.2.2.2 on host:data11, 224.1.1.1 on host:data21, 224.2.2.2 on host:data12 and 224.1.1.1 on host:data22 is not received
|
||||
. Verify group 224.2.2.2 is forwarded to host:data21
|
||||
. Verify group 224.1.1.1 is forwarded to host:data12
|
||||
|
||||
|
||||
<<<
|
||||
|
||||
@@ -1,53 +1,54 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
#
|
||||
# VLAN55 VLAN77 VLAN55 VLAN77
|
||||
# 10.0.1.1 10.0.2.1 10.0.1.2 10.0.2.2
|
||||
# \ / \ /
|
||||
# \ / \ /
|
||||
# \ / \ /
|
||||
# \--------------/ VLAN 1,2 T \---------------/
|
||||
# | DUT1 +---------------------------------+ DUT2 |
|
||||
# | | | |
|
||||
# +--------------+ +-----+---------+
|
||||
# VLAN55 U| VLAN77 U| VLAN55 U | | VLAN77 U
|
||||
# | | | |
|
||||
# | | | |
|
||||
# | | | |
|
||||
# | | | |
|
||||
# +-------+ | +----------+ +------------+ +--------+
|
||||
# | msend +--+ | mreceive | | mreceive | | msend |
|
||||
# +-------+ +----------+ +------------+ +--------+
|
||||
# 10.0.1.11 10.0.2.11 10.0.1.22 10.0.2.22
|
||||
#
|
||||
|
||||
"""
|
||||
r"""
|
||||
IGMP VLAN
|
||||
|
||||
Test tagged IGMP control traffic and that VLAN separation is respected for multicast
|
||||
|
||||
....
|
||||
|
||||
VLAN55 VLAN77 VLAN55 VLAN77
|
||||
10.0.1.1 10.0.2.1 10.0.1.2 10.0.2.2
|
||||
\ / \ /
|
||||
\ / \ /
|
||||
\ / \ /
|
||||
\--------------/ VLAN 1,2 T \---------------/
|
||||
| DUT1 +---------------------------------+ DUT2 |
|
||||
| |dut1:link dut2:link| |
|
||||
+--------------+ +-----+---------+
|
||||
| | | |
|
||||
dut1:data1| |dut1:data2 dut2:data1| |dut2:data2
|
||||
VLAN55 U | | VLAN77 U VLAN55 U | | VLAN77 U
|
||||
| | | |
|
||||
| | | |
|
||||
+-------+ | +----------+ +------------+ +--------+
|
||||
| msend +--+ | mreceive | | mreceive | | msend |
|
||||
+-------+ +----------+ +------------+ +--------+
|
||||
10.0.1.11 10.0.2.11 10.0.1.22 10.0.2.22
|
||||
|
||||
....
|
||||
|
||||
"""
|
||||
|
||||
import infamy
|
||||
import time
|
||||
import infamy.multicast as mcast
|
||||
from infamy.util import parallel
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Initialize"):
|
||||
with test.step("Set up topology and attach to target DUT"):
|
||||
env = infamy.Env()
|
||||
dut1 = env.attach("dut1", "mgmt")
|
||||
_, d1send = env.ltop.xlate("dut1", "data0")
|
||||
_, d1receiver = env.ltop.xlate("dut1", "data1")
|
||||
_, d1trunk = env.ltop.xlate("dut1", "data2")
|
||||
_, d1send = env.ltop.xlate("dut1", "data1")
|
||||
_, d1receiver = env.ltop.xlate("dut1", "data2")
|
||||
_, d1trunk = env.ltop.xlate("dut1", "link")
|
||||
dut2 = env.attach("dut2", "mgmt")
|
||||
_, d2receive = env.ltop.xlate("dut2", "data0")
|
||||
_, d2sender = env.ltop.xlate("dut2", "data1")
|
||||
_, d2trunk = env.ltop.xlate("dut2", "data2")
|
||||
_, d2receive = env.ltop.xlate("dut2", "data1")
|
||||
_, d2sender = env.ltop.xlate("dut2", "data2")
|
||||
_, d2trunk = env.ltop.xlate("dut2", "link")
|
||||
|
||||
_, hsendd1 = env.ltop.xlate("host", "data10")
|
||||
_, hreceived1 = env.ltop.xlate("host", "data11")
|
||||
_, hreceived2 = env.ltop.xlate("host", "data20")
|
||||
_, hsendd2 = env.ltop.xlate("host", "data21")
|
||||
_, hsendd1 = env.ltop.xlate("host", "data11")
|
||||
_, hreceived1 = env.ltop.xlate("host", "data12")
|
||||
_, hreceived2 = env.ltop.xlate("host", "data21")
|
||||
_, hsendd2 = env.ltop.xlate("host", "data22")
|
||||
|
||||
|
||||
with test.step("Configure device"):
|
||||
@@ -264,33 +265,33 @@ with infamy.Test() as test:
|
||||
d2send_ns.addip("10.0.2.22")
|
||||
d1send_ns.must_reach("10.0.1.2")
|
||||
d1receive_ns.must_reach("10.0.2.2")
|
||||
with test.step("Start multicast sender on host:data10, group 224.2.2.2"):
|
||||
with test.step("Start multicast sender on host:data11, group 224.2.2.2"):
|
||||
vlan55_sender = mcast.MCastSender(d2send_ns, "224.2.2.2")
|
||||
with test.step("Start multicast sender on host:data21, group 224.1.1.1"):
|
||||
with test.step("Start multicast sender on host:data22, group 224.1.1.1"):
|
||||
vlan77_sender= mcast.MCastSender(d1send_ns, "224.1.1.1")
|
||||
|
||||
|
||||
with vlan55_sender, vlan77_sender:
|
||||
with test.step("Verify group 224.2.2.2 is flooded to host:data20"):
|
||||
with test.step("Verify group 224.2.2.2 is flooded to host:data21"):
|
||||
d1receive_ns.must_receive("ip dst 224.2.2.2")
|
||||
with test.step("Verify group 224.1.1.1 is flooded to host:data11"):
|
||||
with test.step("Verify group 224.1.1.1 is flooded to host:data12"):
|
||||
d2receive_ns.must_receive("ip dst 224.1.1.1")
|
||||
with test.step("Verify group 224.2.2.2 on host:data10, 224.1.1.1 on host:data20, 224.2.2.2 on host:data11 and 224.1.1.1 on host:data21 is not received"):
|
||||
with test.step("Verify group 224.2.2.2 on host:data11, 224.1.1.1 on host:data21, 224.2.2.2 on host:data12 and 224.1.1.1 on host:data22 is not received"):
|
||||
parallel(d1send_ns.must_not_receive("host 224.2.2.2"),
|
||||
d1receive_ns.must_not_receive("host 224.1.1.1"),
|
||||
d2receive_ns.must_not_receive("host 224.2.2.2"),
|
||||
d2send_ns.must_not_receive("host 224.1.1.1"))
|
||||
with test.step("Join multicast group 224.2.2.2 on host:data20"):
|
||||
with test.step("Join multicast group 224.2.2.2 on host:data21"):
|
||||
vlan55_receiver = mcast.MCastReceiver(d1receive_ns, "224.2.2.2")
|
||||
with vlan55_receiver:
|
||||
with test.step("Verify group 224.2.2.2 on host:data10, 224.1.1.1 on host:data20, 224.2.2.2 on host:data11 and 224.1.1.1 on host:data21 is not received"):
|
||||
with test.step("Verify group 224.2.2.2 on host:data11, 224.1.1.1 on host:data21, 224.2.2.2 on host:data12 and 224.1.1.1 on host:data22 is not received"):
|
||||
parallel(d1send_ns.must_not_receive("host 224.2.2.2"),
|
||||
d1receive_ns.must_not_receive("host 224.1.1.1"),
|
||||
d1send_ns.must_not_receive("host 224.2.2.2"),
|
||||
d2send_ns.must_not_receive("host 224.1.1.1"))
|
||||
with test.step("Verify group 224.2.2.2 is forwarded to host:data20"):
|
||||
with test.step("Verify group 224.2.2.2 is forwarded to host:data21"):
|
||||
d1receive_ns.must_receive("host 224.2.2.2")
|
||||
with test.step("Verify group 224.1.1.1 is forwarded to host:data11"):
|
||||
with test.step("Verify group 224.1.1.1 is forwarded to host:data12"):
|
||||
d2receive_ns.must_receive("ip dst 224.1.1.1")
|
||||
|
||||
test.succeed()
|
||||
|
||||
@@ -7,32 +7,32 @@ graph "2x4" {
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
|
||||
host [
|
||||
label="host | { <mgmt1> mgmt1 | <data10> data10 | <data11> data11 | <> \n\n\n | <mgmt2> mgmt2 | <data20> data20 | <data21> data21 }",
|
||||
pos="0,15!",
|
||||
kind="controller",
|
||||
label="host | { <mgmt1> mgmt1 | <data11> data11 | <data12> data12 | <> \n\n\n | <mgmt2> mgmt2 | <data21> data21 | <data22> data22 }",
|
||||
pos="0,15!",
|
||||
kind="controller",
|
||||
];
|
||||
|
||||
dut1 [
|
||||
label="{ <mgmt> mgmt | <data0> data0 | <data1> data1 } | { dut1 \nVLAN55: 10.0.1.1 \nVLAN77: 10.0.2.1 | <data2> data2 }",
|
||||
pos="3,15.4!",
|
||||
fontsize=12,
|
||||
kind="infix",
|
||||
label="{ <mgmt> mgmt | <data1> data1 | <data2> data2 } | { dut1 \nVLAN55: 10.0.1.1 \nVLAN77: 10.0.2.1 | <link> link }",
|
||||
pos="3,15.4!",
|
||||
fontsize=12,
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
dut2 [
|
||||
label="{ <mgmt> mgmt | <data0> data0 | <data1> data1 } | { <data2> data2 | dut2 \nVLAN55: 10.0.1.2 \nVLAN77: 10.0.2.2\n }",
|
||||
pos="3,14.6!",
|
||||
fontsize=12,
|
||||
kind="infix",
|
||||
label="{ <mgmt> mgmt | <data1> data1 | <data2> data2 } | { <link> link | dut2 \nVLAN55: 10.0.1.2 \nVLAN77: 10.0.2.2\n }",
|
||||
pos="3,14.6!",
|
||||
fontsize=12,
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
host:mgmt1 -- dut1:mgmt [kind=mgmt]
|
||||
host:data10 -- dut1:data0 [color=purple, fontcolor=purple, taillabel="10.0.1.11", headlabel="VLAN55 U"]
|
||||
host:data11 -- dut1:data1 [color=darkgreen, fontcolor=darkgreen, taillabel="10.0.2.11", headlabel="VLAN77 U"]
|
||||
host:mgmt1 -- dut1:mgmt [kind=mgmt, color=lightgrey]
|
||||
host:data11 -- dut1:data1 [color=purple, fontcolor=purple, taillabel="10.0.1.11", headlabel="VLAN55 U"]
|
||||
host:data12 -- dut1:data2 [color=darkgreen, fontcolor=darkgreen, taillabel="10.0.2.11", headlabel="VLAN77 U"]
|
||||
|
||||
host:mgmt2 -- dut2:mgmt [kind=mgmt]
|
||||
host:data20 -- dut2:data0 [color=purple, fontcolor=purple, taillabel="10.0.1.22", headlabel="VLAN55 U"]
|
||||
host:data21 -- dut2:data1 [color=darkgreen, fontcolor=darkgreen, taillabel="10.0.2.22", headlabel="VLAN77 U"]
|
||||
host:mgmt2 -- dut2:mgmt [kind=mgmt, color=lightgrey]
|
||||
host:data21 -- dut2:data1 [color=purple, fontcolor=purple, taillabel="10.0.1.22", headlabel="VLAN55 U"]
|
||||
host:data22 -- dut2:data2 [color=darkgreen, fontcolor=darkgreen, taillabel="10.0.2.22", headlabel="VLAN77 U"]
|
||||
|
||||
dut1:data2 -- dut2:data2 [color=black, fontcolor=black, label="VLAN 1,2 T"]
|
||||
dut1:link -- dut2:link [color=black, fontcolor=black, label="VLAN 1,2 T"]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
@@ -4,7 +4,7 @@ Interface with IPv4
|
||||
|
||||
Test that it is possible to set and remove the IPv4 address on an interface
|
||||
"""
|
||||
import copy
|
||||
|
||||
import infamy
|
||||
import infamy.iface as iface
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# PC ---- e0: 10.0.0.2
|
||||
#
|
||||
"""
|
||||
IPv4 link-local
|
||||
|
||||
@@ -9,6 +6,7 @@ Verifies that link-local (IPv4LL/ZeroConf) address assignment work as
|
||||
expected. Checks random address, the request-address setting, and
|
||||
address removal on autoconf disable.
|
||||
"""
|
||||
|
||||
import ipaddress
|
||||
import infamy
|
||||
import infamy.iface
|
||||
|
||||
@@ -1 +1 @@
|
||||
../bridge_basic/topology.dot
|
||||
../../../infamy/topologies/1x2.dot
|
||||
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 5.5 KiB |
@@ -16,7 +16,7 @@ image::topology.png[Interface IPv6 autoconf for bridges topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Connect to target
|
||||
. Set up topology and attach to target DUT
|
||||
. Setting up bridge with IPv6 SLAAC for global prefix on target:data
|
||||
. Verify using sysctl that 'net.ipv6.conf.br0.autoconf' is 1 on target
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ See issue #473 for details.
|
||||
import infamy
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Connect to target"):
|
||||
with test.step("Set up topology and attach to target DUT"):
|
||||
env = infamy.Env()
|
||||
target = env.attach("target", "mgmt")
|
||||
tgtssh = env.attach("target", "mgmt", "ssh")
|
||||
|
||||
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.5 KiB |
@@ -27,7 +27,7 @@ image::topology.png[Verify that all interface types can be created topology]
|
||||
endif::testgroup[]
|
||||
endif::topdoc[]
|
||||
==== Test sequence
|
||||
. Initialize
|
||||
. Set up topology and attach to target DUT
|
||||
. Configure an empty bridge br-0
|
||||
. Configure bridge br-X and associated interfaces
|
||||
. Configure VETH pair
|
||||
|
||||
@@ -34,7 +34,7 @@ def verify_interface(target, interface, expected_type):
|
||||
|
||||
|
||||
with infamy.Test() as test:
|
||||
with test.step("Initialize"):
|
||||
with test.step("Set up topology and attach to target DUT"):
|
||||
env = infamy.Env()
|
||||
target = env.attach("target", "mgmt")
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ graph "1x3" {
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
|
||||
host [
|
||||
label="host | { <tgt> tgt | <dummy0> dummy0 | <dummy1> dummy1 }",
|
||||
label="host | { <mgmt> mgmt | <data1> data1 | <data2> data2 }",
|
||||
pos="0,12!",
|
||||
kind="controller",
|
||||
];
|
||||
@@ -19,7 +19,7 @@ graph "1x3" {
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
host:tgt -- target:mgmt [kind=mgmt]
|
||||
host:dummy0 -- target:ethX [color=black]
|
||||
host:dummy1 -- target:ethQ [color=black]
|
||||
host:mgmt -- target:mgmt [kind=mgmt, color=lightgrey]
|
||||
host:data1 -- target:ethX [color=black]
|
||||
host:data2 -- target:ethQ [color=black]
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 7.7 KiB |
@@ -7,7 +7,7 @@ graph "1x2" {
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
|
||||
host [
|
||||
label="host | { <tgt> tgt | <data> data }",
|
||||
label="host | { <mgmt> mgmt | <data> data }",
|
||||
pos="0,12!",
|
||||
kind="controller",
|
||||
];
|
||||
@@ -19,7 +19,7 @@ graph "1x2" {
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
host:tgt -- target:mgmt [kind=mgmt]
|
||||
host:mgmt -- target:mgmt [kind=mgmt, color=lightgrey]
|
||||
host:data -- target:data [color=black, fontcolor=black, fontsize=12, taillabel="10.0.0.1/24", headlabel="10.0.0.10/24"]
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 7.4 KiB |
@@ -7,7 +7,7 @@ graph "1x2" {
|
||||
edge [color="cornflowerblue", penwidth="2"];
|
||||
|
||||
host [
|
||||
label="host | { <tgt> tgt | <data> data }",
|
||||
label="host | { <mgmt> mgmt | <data> data }",
|
||||
pos="0,12!",
|
||||
kind="controller",
|
||||
];
|
||||
@@ -19,6 +19,6 @@ graph "1x2" {
|
||||
kind="infix",
|
||||
];
|
||||
|
||||
host:tgt -- target:mgmt [kind=mgmt]
|
||||
host:mgmt -- target:mgmt [kind=mgmt, color=lightgrey]
|
||||
host:data -- target:data [color=black]
|
||||
}
|
||||
|
||||