add a virtual gateway for reactive routing
There is no physical gateway in SDN network.
However a host needs a gateway when it tries to communicate with a remote host.
So we designed a virtual gateway for SDN network.
The virtual gateway can have multiple IP addresses.
Each IP address is used as the default gateway address of an IP prefix.
We only configure one MAC address to the virtual gateway.
You can choose any MAC address from the BGP speakers as the virtual gateway MAC address.
We configure this MAC address staticly in the sdnip.json configuration file.
Change-Id: I2a72bef797fc55d25bb5473e8fca624ad659e1d1
diff --git a/apps/sdnip/src/main/resources/config-examples/sdnip.json b/apps/sdnip/src/main/resources/config-examples/sdnip.json
index 913687e..c51de68 100644
--- a/apps/sdnip/src/main/resources/config-examples/sdnip.json
+++ b/apps/sdnip/src/main/resources/config-examples/sdnip.json
@@ -66,17 +66,21 @@
"ip4LocalPrefixes" : [
{
"ipPrefix" : "100.0.0.0/24",
- "type" : "PUBLIC"
+ "type" : "PUBLIC",
+ "gatewayIp" : "100.0.0.1"
},
{
"ipPrefix" : "200.0.0.0/8",
- "type" : "PUBLIC"
+ "type" : "PUBLIC",
+ "gatewayIp" : "200.0.0.3"
},
{
"ipPrefix" : "192.0.0.0/24",
- "type" : "PRIVATE"
+ "type" : "PRIVATE",
+ "gatewayIp" : "192.0.0.254"
}
],
"ip6LocalPrefixes" : [
- ]
+ ],
+ "virtualGatewayMacAddress" : "00:00:00:00:00:01"
}