On Fri, Jul 01, 2016 at 03:54:36PM -0700, Guru Shetty wrote: > On 1 July 2016 at 14:36, Ben Pfaff <b...@ovn.org> wrote: > > > On Fri, Jul 01, 2016 at 03:23:39AM -0700, Gurucharan Shetty wrote: > > > OVN currently supports multiple gateway routers (residing on > > > different chassis) connected to the same logical topology. > > > > > > When external traffic enters the logical topology, they can enter > > > from any gateway routers and reach its eventual destination. This > > > is achieved with proper static routes configured on the gateway > > > routers. > > > > > > But when traffic is initiated in the logical space by a logical > > > port, we do not have a good way to distribute that traffic across > > > multiple gateway routers. > > > > > > This commit introduces one particular way to do it. Based on the > > > source IP address or source IP network of the packet, we can now > > > jump to a specific gateway router. > > > > > > This is very useful for a specific use case of Kubernetes. > > > When traffic is initiated inside a container heading to outside world, > > > we want to be able to send such traffic outside the gateway router > > > residing in the same host as that of the container. Since each > > > host gets a specific subnet, we can use source IP address based > > > policy routing to decide on the gateway router. > > > > > > Signed-off-by: Gurucharan Shetty <g...@ovn.org> > > > > I would have expected the new argument to the ovn-nbctl command to be > > optional. > > > I wanted to do that. But lr-route-add command already had one optional > argument. I couldn't quite think of a nice way of adding another optional > argument which is just a string. "src-ip" and "dst-ip" can (for whatever > reason) be names of a router or the names of a router port. So, I was not > sure how to decide which optional argument was given. Do you have a idea?
I can think of two ways. One is to require that the policy argument be present if the output port argument is present, so that one may specify one of the following, which is slightly awkward but not really too bad. lr-route-add ROUTER PREFIX NEXTHOP lr-route-add ROUTER PREFIX NEXTHOP POLICY lr-route-add ROUTER PREFIX NEXTHOP POLICY PORT The other would be to make these real options, so that one ends up with: [--policy=POLICY] [--out-port=PORT] lr-route-add ROUTER PREFIX NEXTHOP _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev