[OVSDB-160] ovsdb netvirt needs help in getting mac for a given ip in br-ex Created: 26/May/15  Updated: 11/Oct/15  Resolved: 11/Oct/15

Status: Resolved
Project: ovsdb
Component/s: openstack.net-virt
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Flavio Fernandes Assignee: Anil Vishnoi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 3378

 Description   

in ovsdb net-virt, neutron will provide an ip as the next-hop default gateway
for connections beyond br-ex.

Since ovsdb has no real arp, it needs a service in can subscribe so that the
mac address associated to the gateway ip address is available.

Today, that mac is hard coded via the config param 'ovsdb.l3gateway.mac', provided in custom.properties file.



 Comments   
Comment by Flavio Fernandes [ 27/May/15 ]

> Flavio,
> Is the issue here lack of service to get gateway ip from custom.properties?
> How do you see it implemented? Are there similar services that I can look as template?

I think it is mostly a missing functionality. In openstack, the mac of the external gateway is never provided via neutron. That
makes sense, since it assumes the sdn controller has an ip stack that could derive the mac from the ip.

My rough idea is that the net-virt code in ovsdb would subscribe to something in odl, that could to the arp and notify back should
the mac that is associated with the given ip changes. I imagine it would be something similar to the ping tutorial [1], but with focus on the
mac. Maybe by looking at /proc/net/arp file.

— flavio

[1]: https://git.opendaylight.org/gerrit/#/c/7249/
https://wiki.opendaylight.org/view/Ping_2.0_-_Discover_and_Model_Plugin

Comment by Flavio Fernandes [ 19/Jun/15 ]

just a ref on something that we can copy/leverage for this:

[09:19:54] <alagalah> flaviof: Have a look at the OfOverlay Renderer, specifically the EndpointManager class... there is an ArpTasker, essentially we use packet in packet out

[09:22:26] <alagalah> flaviof: Yeah so when you make a subnet tied to an external network with floatingIP range say 50-100 with gateway 253, which is say a Cisco router on the LAN, it arps for 253 using packet out/in and then removes the packet in flows after it gets the ARP and caches it

[09:22:37] <alagalah> flaviof: Have a look at ArpTasker in EndpointManager class

[09:23:09] <flaviof> alagalah: cool!

Comment by Anil Vishnoi [ 13/Jul/15 ]

Log snippet:
2015-07-13 02:31:32,034 | INFO | ntDispatcherImpl | NeutronL3Adapter | 268 - org.opendaylight.ovsdb.openstack.net-virt - 1.1.1.SNAPSHOT | Trigger MAC resolution for gateway ip 192.168.202.1 on Node Uri [_value=ovsdb://uuid/4575bb26-b73b-4e0a-a62a-9b3ff06e19af/bridge/br-ex]
2015-07-13 02:31:32,034 | INFO | ntDispatcherImpl | GatewayMacResolverService | 269 - org.opendaylight.ovsdb.openstack.net-virt-providers - 1.1.1.SNAPSHOT | Trigger Mac resolution for gateway 192.168.202.1, using source ip 192.168.202.133 and mac FA:16:3E:B2:27:83
2015-07-13 02:31:33,040 | INFO | pool-44-thread-2 | NeutronL3Adapter | 268 - org.opendaylight.ovsdb.openstack.net-virt - 1.1.1.SNAPSHOT | Resolved MAC address for gateway IP 192.168.202.1 is 52:54:00:5b:ba:a6

Comment by Flavio Fernandes [ 12/Aug/15 ]

gerrit stable/lithium: https://git.opendaylight.org/gerrit/#/c/24276/

gerrit master: ?!?

Comment by Anil Vishnoi [ 12/Aug/15 ]

master : https://git.opendaylight.org/gerrit/25205

Comment by Sam Hague [ 11/Oct/15 ]

https://git.opendaylight.org/gerrit/#/c/25205/
https://git.opendaylight.org/gerrit/24276

Generated at Wed Feb 07 20:35:40 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.