[ovs-discuss] MAC learning table does not always update

Ben Pfaff blp at nicira.com
Wed Mar 4 22:02:06 UTC 2015


On Wed, Mar 04, 2015 at 11:10:49AM -0600, Cheng Jin wrote:
> On Tue, Mar 3, 2015 at 3:03 PM, Ben Pfaff <blp at nicira.com> wrote:
> 
> > On Tue, Mar 03, 2015 at 12:25:20PM -0600, Cheng Jin wrote:
> > > I have a problem with updating OVS' MAC learning table, when it is in the
> > > 'standalone' mode running like a legacy Ethernet bridge.
> > >
> > > The switch has an entry to a destination, including the destination MAC
> > > (say, 00:00:00:00:00:01), an output port (say, 1), VLAN, and Age.
> > However,
> > > the switch sometimes does not update the entry, when it receives a packet
> > > from the same destination (still 00:00:00:00:00:01) but from a new
> > incoming
> > > port (say, 2). Does someone know what may cause this issue?
> > >
> > > The MAC learning table is supposed to be updated once receiving a packet.
> > > Does OVS do some optimization to process the packets so that the learning
> > > table may not get updated when the packet rate is high?
> >
> > The optimization that OVS does should only affect cases where a MAC
> > would otherwise quickly bounce back and forth between a number of
> > learned ports.
> >
> > Is there anything unusual in your setup?  Can you reproduce this with
> > a simple setup?
> >
> 
> We tried a simple setup which has only three switches forming a triangle
> (VLAN set up to avoid loop), and two hosts connect with two "standalone"
> switches.
> 
> The MAC learning table is allowed to stabilize (we send no traffic) and
> then we send a packet from a source MAC that already exists in the MAC
> table but which comes on another port than the one registered in the table.
> We are checking how soon does the switch adapt. We don't do back and forth
> changes often so the optimization should not happen.

I ran a test just now and could not reproduce the problem.

I connected two VMs, A and B, through OVS running in a third VM C.  In
C, I ran "watch -n.1 ovs-appctl fdb/show br0" to observe changes in
the MAC learning table.  I ran a "ping" for a few seconds and saw that
the MAC learning table was initialized as expected.  Then I killed the
ping and ran "ifconfig eth0 hw ether <address>" in each of the VMs, in
each case using the other VM's MAC address, effectively swapping MAC
addresses.  Then I reran the ping.  The displayed ports for those
MACs immediately flipped.  I ran the experiment a few times.

Then I tried turning up the log level for ofproto_dpif_xlate and
observed the kinds of messages I expected, e.g.:

2015-03-04T22:00:43Z|00002|ofproto_dpif_xlate(handler5)|DBG|bridge br0: learned that 50:54:00:00:00:05 is on port eth0 in VLAN 0
2015-03-04T22:00:43Z|00004|ofproto_dpif_xlate(handler5)|DBG|bridge br0: learned that 50:54:00:01:00:05 is on port eth1 in VLAN 0
2015-03-04T22:00:55Z|00005|ofproto_dpif_xlate(handler5)|DBG|bridge br0: learned that 50:54:00:01:00:05 is on port eth0 in VLAN 0
2015-03-04T22:00:55Z|00006|ofproto_dpif_xlate(handler5)|DBG|bridge br0: learned that 50:54:00:00:00:05 is on port eth1 in VLAN 0



More information about the discuss mailing list