boltblog

Where to rename network interfaces in debian etch

Posted on June 29, 2008

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!

Filed under: Howto's, Linux Leave a comment
Comments (3) Trackbacks (0)
  1. Many thanks! You saved my life.

  2. Thanks a lot!

  3. As of version 0.124-1 of udev, it’s called /etc/udev/rules.d/70-persistent-net.rules


Leave a comment

No trackbacks yet.