LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Resetting eth naming? (https://www.linuxquestions.org/questions/linux-networking-3/resetting-eth-naming-586814/)

GSMD 09-23-2007 04:31 PM

Resetting eth naming?
 
I'm running ubuntu gutsy under vmware and here is the situation I'm facing under moving the virtual machine to a different host I was unable to use eth0 on the virtual machine. It's somehow moved to eth1 now!
For now I have 2 interfaces attached to the virtual machine and here's what dmesg tells:
Code:

...
[  13.744365] eth0: registered as PCnet/PCI II 79C970A
[  13.744909] eth1: registered as PCnet/PCI II 79C970A
[  14.407523] eth2: link up
[  15.065252] eth1: link up
...

which is somewhat weird. Interfaces are basically shifted by one.

Any ideas how to resurrect eth0?

TIA.

Micro420 09-24-2007 10:39 AM

What does your /etc/network/interfaces say?

GSMD 09-24-2007 12:31 PM

Thanks for your reply.

Both interfaces are assigned ips by dhcp:

Code:

auto eth1
iface eth1 inet dhcp
auto eth2
iface eth2 inet dhcp

Replacing eth2 with eth0 would lead to an interface that won't get up.

Now, I've moved the VM under another host OS and guess what! eth1 and eth2 are not available anymore. I get eth3 and eth4 instead.

Still no clue (don't consider running "grep "eth1" /**" and looking through the numerous results an option).

GSMD 12-14-2007 09:41 AM

Ok, figured this out long ago. In case anyone faces this issue.
Just remove problematic interfaces from /etc/udev/rules.d/70-persistent-net.rules and that's it.

SiegeX 12-14-2007 03:23 PM

/etc/udev/rules.d/75-network-devices.rules is where you can map interface names to NIC's by using their MAC address. Here is the format.

KERNEL=="eth?", ATTR{address}=="<MAC ADDY FOR eth0>", NAME="eth0"
KERNEL=="eth?", ATTR{address}=="<MAC ADDY FOR eth1>", NAME="eth1"


All times are GMT -5. The time now is 10:53 PM.