On Thu, Feb 19, 2015 at 03:46:48PM +1100, Dan062 wrote:
> I have a debian 7 box with 2 network cards eth0 and eth1.
>
> eth1 is set to static ip: a.b.c.149 (in /etc/network/interfaces)
>
> eth0 is dhcp
>
> The box boots it connects to the network and both nics (eth0 and eth1)
> gets same ip a.b.c.149.

are eth0 and eth1 plugged in to the same physical network? are they
supposed to be on the same IP subnet (a.b.c.?)

how is the dhcp server configured - to assign static IPs baased on MAC
addresses, or dynamic IPs from a pool? if the former, are you sure
you've got the correct MAC addresses for eth0 and eth1? what does
/etc/udev/rules.d/70-persistent-net.rules say?


> and traffic goes through eth0. instead of eth1. (from node ip:
> a.b.c.1).  The arp table on a.b.c.1 sees eth0 with ip ...149. where as
> its actually eth1 thats set to ip ...149.
>
> If eth1 is connected - no traffic goes through.

is there any traffic at all visible on eth1 - have you tried running
something like 'tcpdump -l -i eth1' to monitor activity?

> Any ideas??  how do I make sure the right nic always has the right ip 
> everywhere??  

IF this is due to a NIC naming problem (i.e. eth0 and eth1 reversed): on
debian boxes, you can edit /etc/udev/rules.d/70-persistent-net.rules to
make sure that the right interface name (eth0 or eth1) is assigned to
specific NICs, e.g. by MAC address, just edit the NAME="...."

without this persistent naming ability, whichever NIC the kernel found
first would be eth0 - which may or may not be the same NIC on every
reboot. i've encountered issues related to this several times on
motherboards with multiple NICs built in, especially if they require
different drivers (a change in the module load order could see them
renamed if 70-persistent-net.rules wasn't configured to assign the name
based on MAC address).

> Why does eth0 get the same ip as eth1?

at a guess, i'd say the dhcp server allocated it once and now
it requests it every time and gets it.  have you tried deleting
the dhclient.*.leases files in /var/lib/dhcp?

craig

-- 
craig sanders <[email protected]>
_______________________________________________
luv-main mailing list
[email protected]
http://lists.luv.asn.au/listinfo/luv-main

Reply via email to