CORD-512 Support vSG <-> vRouter default route
- Support multiple subnets per port. getIpPort() will only return the first non-/32 and non-/0 subnet
/32 is used as vSG subnet
/0 is used as default gateway
- Support multiple L3 unicast group on a single port
Change the way to generate the group ID and group key
- Special case for 0.0.0.0 host. Push a /0 to IP table instead of /32
- Implement vRouterConfig
Put VR MAC to TMAC table of all leaves when config added
When processEthDst see PortNumber.ANY in key, match ETH_DST only
- For OFDPA, wipe existing instruction before sending to controller
So packet that misses L3 unicast table won't be sent to controller twice
- For SpringOpenTTP, pop VLAN before sending to controller
- Move several constant definitions to SegmentRoutingService
- Add minimum priority for IP rules such that /0 won't collide with zero priority default rules
- Update the config sample
Use VLAN=-1 for hosts
Add example for default route
Change-Id: Id751697ce36a7e5c13b3859350ff21b585c38525
diff --git a/tools/package/config/samples/network-cfg-fabric2x2-default-route.json b/tools/package/config/samples/network-cfg-fabric2x2-default-route.json
new file mode 100644
index 0000000..f9e49cc
--- /dev/null
+++ b/tools/package/config/samples/network-cfg-fabric2x2-default-route.json
@@ -0,0 +1,119 @@
+{
+ "ports" : {
+ "of:0000000000000001/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24" ],
+ "vlan" : "-1"
+ }
+ ]
+ },
+ "of:0000000000000001/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.1.254/24", "200.0.0.200/32" ],
+ "vlan" : "-1"
+ }
+ ]
+ },
+ "of:0000000000000002/3" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24" ],
+ "vlan" : "-1"
+ }
+ ]
+ },
+ "of:0000000000000002/4" : {
+ "interfaces" : [
+ {
+ "ips" : [ "10.0.2.254/24", "0.0.0.0/0" ],
+ "vlan" : "-1"
+ }
+ ]
+ }
+ },
+ "devices" : {
+ "of:0000000000000001" : {
+ "segmentrouting" : {
+ "name" : "Leaf-R1",
+ "nodeSid" : 101,
+ "routerIp" : "10.0.1.254",
+ "routerMac" : "00:00:00:00:01:80",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ }
+ },
+ "of:0000000000000002" : {
+ "segmentrouting" : {
+ "name" : "Leaf-R2",
+ "nodeSid" : 102,
+ "routerIp" : "10.0.2.254",
+ "routerMac" : "00:00:00:00:02:80",
+ "isEdgeRouter" : true,
+ "adjacencySids" : []
+ }
+ },
+ "of:0000000000000191" : {
+ "segmentrouting" : {
+ "name" : "Spine-R1",
+ "nodeSid" : 103,
+ "routerIp" : "192.168.0.11",
+ "routerMac" : "00:00:01:00:11:80",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ }
+ },
+ "of:0000000000000192" : {
+ "segmentrouting" : {
+ "name" : "Spine-R2",
+ "nodeSid" : 104,
+ "routerIp" : "192.168.0.22",
+ "routerMac" : "00:00:01:00:22:80",
+ "isEdgeRouter" : false,
+ "adjacencySids" : []
+ }
+ }
+ },
+ "hosts" : {
+ "00:00:00:00:00:01/-1" : {
+ "basic": {
+ "ips": ["10.0.1.1"],
+ "location": "of:0000000000000001/3"
+ }
+ },
+ "00:00:00:00:00:02/-1" : {
+ "basic": {
+ "ips": ["10.0.1.2"],
+ "location": "of:0000000000000001/4"
+ }
+ },
+ "00:00:00:00:00:03/-1" : {
+ "basic": {
+ "ips": ["10.0.2.1"],
+ "location": "of:0000000000000002/3"
+ }
+ },
+ "00:00:00:00:00:04/-1" : {
+ "basic": {
+ "ips": ["10.0.2.2"],
+ "location": "of:0000000000000002/4"
+ }
+ },
+ "00:00:00:aa:00:01/-1" : {
+ "basic": {
+ "ips": ["200.0.0.200"],
+ "location": "of:0000000000000001/4"
+ }
+ }
+ },
+ "apps" : {
+ "org.onosproject.segmentrouting" : {
+ "segmentrouting" : {
+ "vRouterMacs" : [
+ "00:00:00:aa:00:02"
+ ]
+ }
+ }
+ }
+}
diff --git a/tools/package/config/samples/network-cfg-fabric2x2-xconnect.json b/tools/package/config/samples/network-cfg-fabric2x2-xconnect.json
index ef73261..3505fb0 100644
--- a/tools/package/config/samples/network-cfg-fabric2x2-xconnect.json
+++ b/tools/package/config/samples/network-cfg-fabric2x2-xconnect.json
@@ -86,25 +86,25 @@
}
},
"hosts" : {
- "00:00:00:00:00:01/4093" : {
+ "00:00:00:00:00:01/-1" : {
"basic": {
"ips": ["10.0.1.1"],
"location": "of:0000000000000001/3"
}
},
- "00:00:00:00:00:02/4093" : {
+ "00:00:00:00:00:02/-1" : {
"basic": {
"ips": ["10.0.1.2"],
"location": "of:0000000000000001/4"
}
},
- "00:00:00:00:00:03/4093" : {
+ "00:00:00:00:00:03/-1" : {
"basic": {
"ips": ["10.0.2.1"],
"location": "of:0000000000000002/3"
}
},
- "00:00:00:00:00:04/4093" : {
+ "00:00:00:00:00:04/-1" : {
"basic": {
"ips": ["10.0.2.2"],
"location": "of:0000000000000002/4"
diff --git a/tools/package/config/samples/network-cfg-fabric4x4.json b/tools/package/config/samples/network-cfg-fabric4x4.json
index 958e124..80b349b 100644
--- a/tools/package/config/samples/network-cfg-fabric4x4.json
+++ b/tools/package/config/samples/network-cfg-fabric4x4.json
@@ -148,49 +148,49 @@
}
},
"hosts" : {
- "00:00:00:00:00:01/4093" : {
+ "00:00:00:00:00:01/-1" : {
"basic": {
"ips": ["10.0.1.1"],
"location": "of:0000000000000001/5"
}
},
- "00:00:00:00:00:02/4093" : {
+ "00:00:00:00:00:02/-1" : {
"basic": {
"ips": ["10.0.1.2"],
"location": "of:0000000000000001/6"
}
},
- "00:00:00:00:00:03/4093" : {
+ "00:00:00:00:00:03/-1" : {
"basic": {
"ips": ["10.0.2.1"],
"location": "of:0000000000000002/5"
}
},
- "00:00:00:00:00:04/4093" : {
+ "00:00:00:00:00:04/-1" : {
"basic": {
"ips": ["10.0.2.2"],
"location": "of:0000000000000002/6"
}
},
- "00:00:00:00:00:05/4093" : {
+ "00:00:00:00:00:05/-1" : {
"basic": {
"ips": ["10.0.3.1"],
"location": "of:0000000000000003/5"
}
},
- "00:00:00:00:00:06/4093" : {
+ "00:00:00:00:00:06/-1" : {
"basic": {
"ips": ["10.0.3.2"],
"location": "of:0000000000000003/6"
}
},
- "00:00:00:00:00:07/4093" : {
+ "00:00:00:00:00:07/-1" : {
"basic": {
"ips": ["10.0.4.1"],
"location": "of:0000000000000004/5"
}
},
- "00:00:00:00:00:08/4093" : {
+ "00:00:00:00:00:08/-1" : {
"basic": {
"ips": ["10.0.4.2"],
"location": "of:0000000000000004/6"