[ovs-dev] OVN multiple MAC addresses on a single port

Russell Bryant rbryant at redhat.com
Tue May 26 14:13:37 UTC 2015


On 05/25/2015 03:24 AM, Liran Schour wrote:
> Hi all,
> 
> Right now all MAC addresses are written in advance in the OVN DBs. I 
> wonder what will happen if a port with a known MAC address will be bridged 
> with several 'silent' MAC addresses that are not written in advance on the 
> DBs but are waiting to be discovered.
> Does ARP request will reach those 'silent' interfaces? Does OVN will learn 
> those new addresses?

If you take a look at the docs for the "macs" column here:

http://benpfaff.org/~blp/dist-docs/ovn-nb.5.html

> macs: set of strings
>        The logical port’s own Ethernet address or  addresses,  each  in
>        the  form  xx:xx:xx:xx:xx:xx.   Like  a physical Ethernet NIC, a
>        logical port ordinarily has a  single  fixed  Ethernet  address.
>        The  string unknown is also allowed to indicate that the logical
>        port has an unknown set of (additional) source addresses.

Here's what it does right now.  I did a setup in ovs-sandbox with 1
logical switch that has 3 logical ports.  The first 2 logical ports have
a MAC address set, and the third port has "unknown".  The part of the
logical Pipeline that specifies the destination is this:

The columns in the output are "action, match, priority, table_id"

> "outport = \"sw0-port1\"; next; outport = \"sw0-port2\"; next; outport = \"sw0-port3\"; next;" "eth.dst[40]"                     100      1       
> "outport = \"sw0-port1\"; next;"                                                               "eth.dst == 00:00:00:00:00:01"    50       1       
> "outport = \"sw0-port2\"; next;"                                                               "eth.dst == 00:00:00:00:00:02"    50       1       
> "outport = \"sw0-port3\"; next;"                                                               "1"                               0        1      

A broadcast (including ARP) will get sent to all logical ports.  If the
destination MAC address matches something that has been configured, it
will get sent there (port1 and port2 in this case).  Otherwise, it will
get sent to port 3.

In my test, all of the logical ports exist locally.  The corresponding
OpenFlow entries are:

>  cookie=0x0, duration=362.693s, table=17, n_packets=0, n_bytes=0, priority=100,metadata=0x1,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=set_field:0x1->reg7,resubmit(,18),set_field:0x2->reg7,resubmit(,18),set_field:0x3->reg7,resubmit(,18)
>  cookie=0x0, duration=362.689s, table=17, n_packets=0, n_bytes=0, priority=50,metadata=0x1,dl_dst=00:00:00:00:00:01 actions=set_field:0x1->reg7,resubmit(,18)
>  cookie=0x0, duration=362.686s, table=17, n_packets=0, n_bytes=0, priority=50,metadata=0x1,dl_dst=00:00:00:00:00:02 actions=set_field:0x2->reg7,resubmit(,18)
>  cookie=0x0, duration=343.574s, table=17, n_packets=0, n_bytes=0, priority=0,metadata=0x1 actions=set_field:0x3->reg7,resubmit(,18)

If you add more ports with "unknown", the logical Pipeline entry and
corresponding flow just output to all ports with "unknown" set.

-- 
Russell Bryant



More information about the dev mailing list