[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: kernel announcing ip address on wrong interface



Henrique de Moraes Holschuh <hmh@debian.org> wrote:
> On Fri, 03 Oct 2014, Sven Hartge wrote:

>> It is, if all eth's are conneted to the same network. Google "weak
>> host model".
>> 
>> In Linux, the IPs don't "belong" to an interface but to the host at
>> all.  The kernel will happily announce (via ARP) any IP it "owns",
>> even the ones on 'lo', on any interface. This behavior is
>> configurable, but it is always better so first correct any network
>> configuration errors or misconceptions.

> Indeed.  It is also annoying as all heck, as it is almost never what
> you want nowadays.  Oh well...

Annoying? I don't know.

In my experience this "problem" mostly happens to people trying to
cheaply load-balance connections by using two or more ethernet
interfaces with different IPs on the same network.

In my opinion this is a misconception/misconfiguration, you should use a
bonding/teaming interface, either with LACP oder ALB, depending on the
features of your switch.

Sure, you can fiddle with the sysctls concerning ARP, but this will not
solve the problem of having only one default route for LAN-external
traffic.

All in all, in my opinion (please correct me, if there are any
oversights or errors in my observations) trying to solve this problem
with Linux requires a complex usage of correct "ip rule" and "ip route"
and makes your setup more brittle and error probe.

Better design your network in a correct and clean way, so you never have
to change the way the Linux kernel interacts with it. Reduces the amount
of surprise the next admin of your setup will have.

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.


Reply to: