# Updating old system :: Interfaces naming / udev

## mryoung_fr

Hello there,

I'm coming here for support because I'm currently updating one of my old gentoo system.

Everything is going fine for the moment, as I do it tiny step by tiny step  :Smile: 

One huge step I had to go through is updating kernel / udev.

My current kernel is "hardened 3.0.4". I prep a 3.10.1 kernel, and in the same time, I'm going to udev-204.

The boot process with 3.10.1 kernel is going fine, except for one little thing: Interface names

With 3.0.4 kernel, I've got 3 interfaces, eth0, eth1, eth2. I want to keep it the same, as lot of scripts are based on these.

When I boot when 3.10.1, eth2 is still eth2, but eth0 is swapped with eth1.

I decided to look into udev, keep the /etc/udev/rules.d/80-net-name-slot.rules empty to go with the old fashionned way, and create my own rules (removing old persistent rules).

A 70-my-own-net.rules ended like this:

```
# eth0 / atl1

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:fc:ff:df:1

b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# eth1 / e100

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:90:27:46:86:6

8", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# eth2 / 3c59x

SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:10:4b:06:d7:9

e", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
```

It seems I made everything to make it works. 

Unfortunately, rebooting with 3.10.1 and this configuration still give the wrong configuration (eth0 <=> eth1)

As i use this box for some personnal services, I decided to go back to 3.0.4, and now everything is back to normal.

I tried lot of modifications, updated udev from 197 to 200 and then to 204, without any luck.

Can anyone out there is able to help me ?

Thanks in advance for your answer.

Cya

Baptiste aka mRyOuNg

----------

## Hu

Udev upstream removed support for using interface renaming in the manner you show.  You must either accept kernel assigned names or rename interfaces to names that do not start with a kernel prefix.  You could name them lan0, lan1, and wan0, but not ethN for any N.

----------

## ulenrich

If you just want to have old names:

cat /proc/cmdline should show:

net.ifnames=0 

Put it in grubs kernel options line!

Or put an empty file

/etc/udev/rules.d/80-net-name-slot.rules

----------

## jonathan183

I'm not using a hardened kernel but I switched to eudev ...

```
These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R    ] sys-fs/eudev-1.1  USE="gudev hwdb introspection keymap modutils openrc rule-generator -doc -kmod (-selinux) -static-libs {-test}" 0 kB
```

which may or may not help in your case ...

----------

## mryoung_fr

 *Hu wrote:*   

> Udev upstream removed support for using interface renaming in the manner you show.  You must either accept kernel assigned names or rename interfaces to names that do not start with a kernel prefix.  You could name them lan0, lan1, and wan0, but not ethN for any N.

 

Thanks for your answer, it seems pretty logical finally.

So i suppose if eth0 and 1 are swapped it's mainly due to kernel but not to udev, and as udev is not offering a way to rename device, I'm force to live with it.

----------

## Hu

Udev offers a way to rename the device, but only to certain classes of name.  The names you requested are not in the allowed class.  As I said, if you want to name them lan0, lan1, and wan0, you can do that, and it will provide stable names.

----------

