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

Re: udev naming problems for eth*

Davide Natalini <tindal@katamail.com> writes:

> Hi all
> I'm trying to get static naming for my network interfaces with udev,
> without success.

As far as I can tell, network interface names are given by the kernel
and they've nothing to do with udev.

To get a stable naming you should use some package like ifrename.

> the system is debian sarge based, with udev version 0.076-6 and kernel
> 2.6.14-7-686-smp on a P4. the network interfaces are a realtek 8139
> integrated in the motherboard (eth0) and a 3com pci (eth1)
> usually the two interfaces are named the wrong way, but sometimes they
> are named fine.
> beside the fact that I find useful to name eth0 the realtek and eth1
> the other, there is a casuality in the naming process that I cannot
> remove :-(
> my /etc/udev/rules.d/000local.rules looks like this:
> SYSFS{address}=="00:50:70:e3:16:c2", NAME="eth0", RUN+="/bin/echo 1
> /root/udev.log"
> SYSFS{address}=="00:10:4b:b2:1e:6e", NAME="eth1", RUN+="/bin/echo 2 
> KERNEL=="eth*", ID=="0000:02:05.0", NAME="eth1", RUN+="/bin/echo 3 
> DRIVER=="3c59x", NAME="eth1", RUN+="/bin/echo 4 >/root/udev.log"
> SUBSYSTEM=="net", SYSFS{address}=="00:50:70:e3:16:c2", NAME="eth1",
> RUN+="/bin/echo 5 >/root/udev.log"
> KERNEL=="eth*", SYSFS{address}!="00:50:70:e3:16:c2", NAME="eth1",
> RUN+="/bin/echo 6 >/root/udev.log"
> SYSFS{device}=="0x9055", NAME="eth1", RUN+="/bin/echo 7 >/root/udev.log"
> in the hope that the creation of the ethernet interface could match at
> least one of these rules (and log wich), but this isn't happening.
> I tried to add this at the top of the file:
> ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", \
>         WAIT_FOR_SYSFS="bus"
> but it didn't help.
> can anybody tell me what I'm doing wrong?

I hope this helps,


p.d: I think this is a debian-user question, setting MFT, but I'm not
subscribed to debian-user, so CC me please.

Reply to: