Exercise for L2 multicast (#288)
This commit is contained in:
66
exercises/multicast/sig-topo/s1-runtime.json
Normal file
66
exercises/multicast/sig-topo/s1-runtime.json
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"target": "bmv2",
|
||||
"p4info": "build/multicast.p4.p4info.txt",
|
||||
"bmv2_json": "build/multicast.json",
|
||||
"table_entries": [
|
||||
{
|
||||
"table": "MyIngress.mac_lookup",
|
||||
"match": {
|
||||
"hdr.ethernet.dstAddr": "08:00:00:00:01:11"
|
||||
},
|
||||
"action_name": "MyIngress.mac_forward",
|
||||
"action_params": {
|
||||
"port": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"table": "MyIngress.mac_lookup",
|
||||
"match": {
|
||||
"hdr.ethernet.dstAddr": "08:00:00:00:02:22"
|
||||
},
|
||||
"action_name": "MyIngress.mac_forward",
|
||||
"action_params": {
|
||||
"port": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
"table": "MyIngress.mac_lookup",
|
||||
"match": {
|
||||
"hdr.ethernet.dstAddr": "08:00:00:00:03:33"
|
||||
},
|
||||
"action_name": "MyIngress.mac_forward",
|
||||
"action_params": {
|
||||
"port": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"table": "MyIngress.mac_lookup",
|
||||
"match": {
|
||||
"hdr.ethernet.dstAddr": "08:00:00:00:04:44"
|
||||
},
|
||||
"action_name": "MyIngress.mac_forward",
|
||||
"action_params": {
|
||||
"port": 4
|
||||
}
|
||||
}
|
||||
],
|
||||
"multicast_group_entries" : [
|
||||
{
|
||||
"multicast_group_id" : 1,
|
||||
"replicas" : [
|
||||
{
|
||||
"egress_port" : 1,
|
||||
"instance" : 1
|
||||
},
|
||||
{
|
||||
"egress_port" : 2,
|
||||
"instance" : 1
|
||||
},
|
||||
{
|
||||
"egress_port" : 3,
|
||||
"instance" : 1
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
18
exercises/multicast/sig-topo/topology.json
Normal file
18
exercises/multicast/sig-topo/topology.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"hosts": {
|
||||
"h1": {"ip": "10.0.0.1/24", "mac": "08:00:00:00:01:11",
|
||||
"commands":["ip route add 10.0.0.0/24 dev eth0"]},
|
||||
"h2": {"ip": "10.0.0.2/24", "mac": "08:00:00:00:02:22",
|
||||
"commands":["ip route add 10.0.0.0/24 dev eth0"]},
|
||||
"h3": {"ip": "10.0.0.3/24", "mac": "08:00:00:00:03:33",
|
||||
"commands":["ip route add 10.0.0.0/24 dev eth0"]},
|
||||
"h4": {"ip": "10.0.0.4/24", "mac": "08:00:00:00:04:44",
|
||||
"commands":["ip route add 10.0.0.0/24 dev eth0"]}
|
||||
},
|
||||
"switches": {
|
||||
"s1": { "runtime_json" : "sig-topo/s1-runtime.json" }
|
||||
},
|
||||
"links": [
|
||||
["h1", "s1-p1"], ["h2", "s1-p2"], ["h3", "s1-p3"], ["h4", "s1-p4"]
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user