Web lists-archives.com

Re: Mystery interface reported by ip.




	Hi.

On Tue, Oct 30, 2018 at 09:39:13AM -0700, peter@xxxxxxxxxxx wrote:
> On Sun, Oct 28, 2018 at 11:18:09AM -0700, peter@xxxxxxxxxxx wrote:
> > > root@joule:/etc# ip link show | grep rename
> > > 4: rename4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
> > > 
> > > root@joule:/etc# find . -type f -exec grep "rename4" '{}' \; -print
> > > root@joule:/etc#
> > > 
> > > So ip reports an interface named rename4 but it doesn't 
> > > appear anywhere in /etc/.  Where does the name originate?
>
> > Udev failed to rename this interface to some Predictable™ name.
> > I'd search dmesg for clues.
> 
> root@joule:/etc# dmesg | grep rename
> [    1.547879] e100 0000:02:08.0 LocLCS218301788: renamed from eth0
> [   20.974490] asix 1-6:1.0 LocLCS1788: renamed from eth1
> [   20.997121] asix 1-3:1.0 rename3: renamed from eth0
> 
> So eth0 was renamed to LocLCS218301788.  

It's funnier.
Your onboard 100Mbit card (judging from e100) was renamed to LocLCS218301788.
Next USB NIC (asix) was discovered, and renamed to LocLCS1788.
And yet another USB interface (asix) was discovered, which got 'kernel'
name eth0, and it should have been renamed to the same LocLCS218301788.
Since you had an interface called LocLCS218301788 by then, third rename
failed, and you was left with intermediate 'renameN' name.


> 
> root@joule:/etc/udev# find . -type f -exec grep "eth0" '{}' \; -print
> #ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
> ./rules.d/70-persistent-net.rules
> 
> eth0 is defined in 70-persistent-net.rules.
> Why rename it?

Because it's commented out? I see '#ATTR' in the beginning of the line.


> LocLCS218301788 existed previously in 
> /etc/udev/rules.d/70-persistent-net.rules but I shortened the name to 
> LocLCS1788; as evident here.
> 
> root@joule:/etc# grep 1788 /etc/udev/rules.d/70-persistent-net.rules
> ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="LocLCS1788"

So you try to rename anything that's named 'eth*' to a single name
LocLCS1788? I suspect that this rule's broken.

> 
> The old name "LocLCS218301788" was dredged up from somewhere 
> outside /etc/.  Where?  Old NIC names are cached? 

Have you rebuilt initrd after the last udev rule changes?

Reco