OVN should support static route

Bug #1539347 reported by Na Zhu
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
networking-ovn
Fix Released
Medium
Steve Ruan

Bug Description

Neutron static route is necessary for VPN, i think should add it to OVN.

Tags: ovn-upstream
Revision history for this message
Russell Bryant (russellb) wrote :

Can you add some more detail on exactly what you expect? What Neutron API calls, and what resulting behavior in OVN? I just want to make sure we have the request clear...

Changed in networking-ovn:
status: New → Incomplete
Revision history for this message
Steve Ruan (ruansx) wrote :

@Russell, there are 2 related use cases for this requirement:
1. VPN support.
     VPN is deployed in a VM which has 2 ports. One connects to private network, the other is connected to provider network.
     VPN connection is created on provider network. For example, subnets in private networks are 192.168.1.0/24, and 192.168.2.0/24, and VPN will connect to 192.168.3.0/24.
     It needs logical routers on all computer nodes forward traffic to 192.168.3.0/24 to this VM(suppose it IP is 192.168.1.100). So the static routes looks like:
            prefix 192.168.3.0/24 nexthop 192.168.1.100
     In fact, it's same feature as neutron router now.

2. l3 vtep gateway
      Current there is l2 gateway, it can be extended to l3 gateway. Similar to VPN case, l3 vtep gateway connect to 192.168.3.0/24.
      Logical router should forward traffic to 192.168.3.0/24 to this l3 VTEP gateway.

Revision history for this message
Ramu Ramamurthy (ramu-ramamurthy) wrote :

I am taking this to investigate further - reproduce etc

Changed in networking-ovn:
assignee: nobody → Ramu Ramamurthy (ramu-ramamurthy)
Changed in networking-ovn:
status: Incomplete → Confirmed
Revision history for this message
Ramu Ramamurthy (ramu-ramamurthy) wrote :

Current, neutron allows the configuration of "static-routes" on a router as shown below.

neutron router-update --route destination=192.168.1.0/24,nexthop=10.0.1.3 r1

The static routes gets implemented by the l3-agent by adding a static route in the router-namespace as follows:

ip route add to destination via nexthop.

A few usecases addressed by static routes are discussed above. In the VPN case, the static route allows VMs on the
private network to reach the VPN-network via the VPN router which has interfaces on both the private and public networks.
In this bug, the next-hop is a port known to neutron (and hence neutron has the IP->mac mapping).

Neutron allows multiple nexthops to the same destination cidr, and also multiple destinations with the same nexthop. The only constraint is that the nexthops are on the subnets connected to the router.

A brief approach to implement static routes in OVN follows:

1) A new column called static route is added to the Logical Router table
    * the static route column may in turn refer to a new Logical_Router_Static_Route table whose columns include
     destination, nexthop, and router-id
    OR for simplicity,
   * the static route column may contain the static routes as a string with formatting to denote separation

2) Based on the presence of the "static route" field in the logical router, OVN northd programs a flow corresponding to the each static route as follow:

actions : "ip.ttl--; reg0 = nexthop; next;"
external_ids : {stage-name=lr_in_ip_routing}
match : "ip4.dst == destination cidr"
pipeline : ingress

The lr_in_arp table would have already have an entry for the nexthop if the nexthop is a neutron port which is the usecase in this bug.

Revision history for this message
Russell Bryant (russellb) wrote :

Thanks for that info. Can you raise this on the ovs-dev mailing list?

tags: added: ovn-upstream
Changed in networking-ovn:
importance: Undecided → Medium
Changed in networking-ovn:
assignee: Ramu Ramamurthy (ramu-ramamurthy) → nobody
assignee: nobody → Ramu Ramamurthy (ramu-ramamurthy)
Revision history for this message
Ramu Ramamurthy (ramu-ramamurthy) wrote :

Reassign to Steve (ruansx) who is fixing this.

Changed in networking-ovn:
assignee: Ramu Ramamurthy (ramu-ramamurthy) → nobody
Steve Ruan (ruansx)
Changed in networking-ovn:
assignee: nobody → steve (ruansx)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to networking-ovn (master)

Reviewed: https://review.openstack.org/315398
Committed: https://git.openstack.org/cgit/openstack/networking-ovn/commit/?id=d381afabb16ed9ef19ecffc51c7f4bc8352096ad
Submitter: Jenkins
Branch: master

commit d381afabb16ed9ef19ecffc51c7f4bc8352096ad
Author: Na <email address hidden>
Date: Thu May 12 04:01:39 2016 -0400

    Add support for static routes

    This patch add support for static routes, since OVN supports
    static routes, this patch is used to add/remove the static
    routes to/from OVN northbound DB.

    The OVN static routes implementation is here:
    https://github.com/openvswitch/ovs/commit/28dc3fe9763fb18122590fec559a2215a66dc078

    Closes-Bug: #1539347
    Change-Id: I2fe71559a5410e5f0f0e60aedb907cd75f2597d6

Changed in networking-ovn:
status: Confirmed → Fix Released
Revision history for this message
Richard Theis (rtheis) wrote :

FYI: While working on the OVN NB sync support in ML2 (see https://review.openstack.org/#/c/321059/), I encountered https://bugs.launchpad.net/networking-ovn/+bug/1586127.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.