Re: BUG: 2 NICs on same network

From: J.A. Magallon (jamagallon@able.es)
Date: Tue Apr 23 2002 - 08:45:49 EST


On 2002.04.23 Frank Louwers wrote:
>Hi,
>
>We recently stummed across a rather annoying bug when 2 nics are on
>the same network.
>
>Our situation is this: we have a server with 2 nics, each with a
>different IP on the same network, connected to the same switch. Let's
>assume eth0 has ip 1.2.3.1 and eth1 has 1.2.3.2, with a both with a
>netmask of 255.255.255.0.
>
>Now the strange thing is that traffic for 1.2.3.2 arrives at eth0 no
>matter what!
>

>From wht I understand for net, interface selection for a connection is
done based on network address. So if you first configure eth0 with
mask 255.255.255.0, and a subnet of 1.2.3.0,
and eth1 is configured just the same (ip adresses only
differ in last number), the kernel just uses the first interface it
founds for a subnet. To prove this, you could try to load the interfaces
in reverse order, and all traffic should go to eth1.

Do you really need the two interfaces to be in the same subnet ? I use
tw parallel nets for a cluster, but configured both as independent
subnets, 10.0.0.0 and 10.0.1.0. So you can drive all nfs through one
interface mounting the server as 10.0.0.1, and all the bproc traffic
through the other (or all the ssh through the other connecting
always to 10.0.1.1).

Hope this helps.

-- 
J.A. Magallon                           #  Let the source be with you...        
mailto:jamagallon@able.es
Mandrake Linux release 8.3 (Cooker) for i586
Linux werewolf 2.4.19-pre7-jam5 #1 SMP mar abr 23 01:29:38 CEST 2002 i686
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 23 2002 - 22:00:35 EST