Problems with two interfaces on the same subnet?

Scott Long scott4long at yahoo.com
Tue Feb 12 18:28:12 UTC 2013


On Feb 12, 2013, at 11:06 AM, Ivan Voras <ivoras at FreeBSD.org> wrote:

> On 12/02/2013 18:57, Ivan Voras wrote:
>> On 12/02/2013 18:52, Freddie Cash wrote:
>>> Any reason you can't just use lagg(4) in one of the non-LACP modes?  That's
>>> bascially designed to do exactly what you want.
>> 
>> No particular reason, I'm just not familiar enough with it. Will e.g.
>> the "loadbalance" mode "just work" ? Should I expect any problems?
> 
> Actually, I know next to nothing about link aggregation. How do ARP
> requests get solved? Would an attached L3-aware switch see the same IP
> address on two ports? Since "loadbalance" chooses ports based on a hash,
> it will probably start dropping 50% of the outgoing traffic if one of
> the two links dies?
> 
> 

If you use simple load balancing, either via round-robin or hashed flows, then
yes, your switch will see 2 MAC addresses and a single IP.  I believe that in this
scheme only one interface will respond to ARP requests, so peer hosts won't get
too confused, and if your switch is only capable of L2, everything will work ok for
transmit.  I'm less clear on receive; maybe some L2 switches are smart enough to
detect this situation and balance incoming traffic, otherwise I can't see how RX
traffic to a single MAC could be split to other MACs.

If your switch is L3 aware, then yes, the simple load balancing will confuse it.
However, if it's L3 aware then it's likely going to implement standardize channel
bonding, either in the form of legacy Etherchannel/FEC or more modern LACP/802.3ad.
LACP isn't perfect, and it's quite easy for links to physically be up but logically be
down, resulting in blackholed traffic, but it's better than FEC.  I have patched to made
the FreeBSD LAGG/LACP code a little more reliable in this area, and I'll be posting
those patching in the coming few days.

Scott



More information about the freebsd-net mailing list