mac-learning: Increase MAC learning timeout to 300 seconds.
authorBen Pfaff <blp@nicira.com>
Mon, 23 Jan 2012 21:36:48 +0000 (13:36 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 23 Jan 2012 23:56:03 +0000 (15:56 -0800)
commit5bba4697868056f96aec322a35c5e60e5792cf1a
tree0a2056109dc08080f76a34969c7adfcd713b1f4f
parentd7332ccca3c0cabc9b5f8ae6dd8f8a974d12aa70
mac-learning: Increase MAC learning timeout to 300 seconds.

When Cisco (and other?) routers are configured in high-availability modes,
they use two different MAC addreses.  The router uses MAC 1 only for ARP
replies.  The router uses MAC 2 for forwarding IP packets to end hosts.
When a MAC learning switch is attached to the router, therefore, it will
only learn the location of MAC 1 from ARP replies.  If the end host's ARP
cache refresh timer is longer than the switch's MAC learning timeout, then
packets to the router will be flooded from the MAC learning timeout until
the next ARP reply.

This commit fixes the problem by increasing the MAC learning timeout from
60 seconds to 300 seconds.  According to research by Sanjay Sane, this is
always sufficient, even with operating systems that use ARP timeouts
longer than 300 seconds (such as FreeBSD and Mac OS, which have 1200
seconds ARP timeouts)  because the routers that cause this problem send
unsolicited ARP replies every 180 seconds.

NICS-11.
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/mac-learning.h