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

Re: eth0 or eth1



On Thu, 28 Jan 2010 15:37:47 -0500, T o n g wrote:
> Hi,
> 
> One of My Debian has eth1 as the Ethernet card, while all others use 
> eth0. There are only one Ethernet card in each system. Why the different?
> 
> How can I have consistent 'eth0' throughout all systems?
> 
> Thanks
>

By default, ifconfig only shows active interfaces.  Issue "ifconfig -a"
to show *all* interfaces.  (You have to be root of course.)  You may
discover that there is a "hidden" interface that Linux recognizes.
Maybe there is a device built-in to the motherboard and you're using
an ethernet adapter in a bus slot.

If there is no other interface shown, look for a file in /etc/udev/rules.d
that has "persistent-net.rules" in it.  The actual file name is
dependent on the architecture and the release of Debian.  Look in this
file.  You should see information for both interfaces in it, including
the MAC addresses.  This can happen, for example, if a motherboard
containing a built-in ethernet adapter goes bad and has to be replaced.
The new motherboard has an ethernet adapter with a different MAC
address than the old one.

If this is the case, and the machine really has only one ethernet
adapter, erase the file, shutdown and reboot.  The file will be
recreated upon reboot and eth0 will be assigned to the one and only
MAC address that can be found during boot.


Reply to: