On Thu, Mar 09, 2017 at 11:46:37PM -0800, Gurucharan Shetty wrote: > There are cases where the default gateway of a interface is in > a different subnet than its IP address. Linux allows such > configuration. For e.g, one could set the IP address of > a Linux interface as 172.16.1.2/32 and then give it a default > gateway of 172.16.1.1. This can be done for e.g. by running the > following commands. > > ifconfig eth0 172.16.1.2 netmask 255.255.255.255 broadcast 172.16.1.2 > route add 172.16.1.1 dev eth0 > route add default gw 172.16.1.1 > > The above configuration is what google cloud uses for its VMs. > > In OVN static routes, we currently have the ability to specify the > router port via which the packet needs to be pushed out to reach a > next hop. But when support for IPv6 was added, we only allowed > nexthops to be in the same subnet as one of the router's IP addresses. > > This commit relaxes that restriction. When a outport is specified in > static routes and when a nexthop is in a different subnet than any > of the router IP addresses, we will assume that it is reachable from > the first IP address of the router. Since this is a corner case, > we just go with the first IP address. If it turns out that there > are more cases, we can let users choose the IP address via which > the destination is reachable. > > Signed-off-by: Gurucharan Shetty <[email protected]> > --- > Patch2 of the series includes a unit test that also covers this > case.
Acked-by: Ben Pfaff <[email protected]> _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
