Where to rename network interfaces in debian etch

Has your desired eth0 ended up as eth1 and the other way around? Did you put in a new network card, having every config file set to use eth0, and the card shows up as eth1?

Here’s an important file which I always forget where to find:

/etc/udev/rules.d/z25_persistent-net.rules

It contains lines like:

#PCI device 0x1011:0x0009 (tulip)
SUBSYSTEM=="net", DRIVERS=="?*", ATTRS{address}=="00:11:22:33:44:55", NAME="eth0"

If you just put in a new network card, you’ll probably have two of these lines, the other with NAME=”eth1″

If you want to switch them around, just change their names. You don’t have to move the lines.

If you replaced a broken network card, or one that was too slow, or one you simply didn’t enjoy being in the same room with, delete the first line and change the second line to say NAME=”eth0″

Restart your network interfaces… or reboot, for you windows people.
Voila!

3 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *