[openib-general] Same IP address on multiple net devices and routing
Hal Rosenstock
halr at voltaire.com
Thu Sep 29 09:49:09 PDT 2005
On Thu, 2005-09-29 at 11:48, Roland Dreier wrote:
> Hal> Hi, Does anyone know what the Linux routing code does in
> Hal> terms of selecting an outgoing interface when multiple net
> Hal> devices have been configured with the same IP address ?
>
> It follows the routing table. If you assign the same local IP address
> to multiple interfaces then you have to be careful to set up routing
> so that your traffic goes to the right place.
>
> In fact you can think of Linux networking as attaching IP addresses to
> the system as a whole instead of a particular interface, because for
> example by default Linux will respond to ARP queries on any
> interface. Assigning addresses to a particular interface is just a
> hint for how the kernel sets up routes by default.
So the routing lookup (ip_route_output_key) is just fine then for
selecting the outgoing interface. Just sometimes if the default is all
that is available, some outgoing interfaces may be less used than
others.
-- Hal
More information about the general
mailing list