Strange device names for USB NICs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Invalid
|
Wishlist
|
Unassigned |
Bug Description
Fresh install of Xenial on an intel NUC with 1 onboard GigE and one USB GigE NIC.
I was setting up networking for MAAS and discovered that the device names were ridiculous:
bladernr@
eno1 Link encap:Ethernet HWaddr ec:a8:6b:fb:9f:66
enx8cae4cff4099 Link encap:Ethernet HWaddr 8c:ae:4c:ff:40:99
In the previous Trusty install on this NUC with the same USB dongle, they were named eth0 and em1. The predictable standard device names.
Looking at udevadm:
P: /devices/
E: DEVPATH=
E: ID_BUS=pci
E: ID_MM_CANDIDATE=1
E: ID_MODEL_
E: ID_MODEL_ID=0x1502
E: ID_NET_
E: ID_NET_
E: ID_NET_
E: ID_NET_
E: ID_NET_
E: ID_NET_
E: ID_OUI_
E: ID_PATH=
E: ID_PATH_
E: ID_PCI_
E: ID_PCI_
E: ID_VENDOR_
E: ID_VENDOR_ID=0x8086
E: IFINDEX=2
E: INTERFACE=eno1
E: SUBSYSTEM=net
E: SYSTEMD_
E: TAGS=:systemd:
E: USEC_INITIALIZE
P: /devices/
E: DEVPATH=
E: ID_BUS=usb
E: ID_MM_CANDIDATE=1
E: ID_MODEL=AX88178
E: ID_MODEL_
E: ID_MODEL_
E: ID_MODEL_ID=1780
E: ID_NET_DRIVER=asix
E: ID_NET_
E: ID_NET_
E: ID_NET_
E: ID_NET_
E: ID_OUI_
E: ID_PATH=
E: ID_PATH_
E: ID_REVISION=0001
E: ID_SERIAL=
E: ID_SERIAL_
E: ID_TYPE=generic
E: ID_USB_
E: ID_USB_DRIVER=asix
E: ID_USB_
E: ID_USB_
E: ID_USB_
E: ID_VENDOR=
E: ID_VENDOR_
E: ID_VENDOR_
E: ID_VENDOR_ID=0b95
E: IFINDEX=3
E: INTERFACE=
E: SUBSYSTEM=net
E: SYSTEMD_
E: TAGS=:systemd:
E: USEC_INITIALIZE
And finally, looking in /etc/udev:
bladernr@
/etc/udev/udev.conf
/etc/udev/rules.d:
.. .
/etc/udev/hwdb.d:
.. .
There are NO rules at all in udev for persistent names. Not even some samples and defaults.
Looking at a completely different Xenial system with a single GigE NIC:
bladernr@
enp2s0 Link encap:Ethernet HWaddr 40:8d:5c:51:5b:0d
P: /devices/
E: DEVPATH=
E: ID_BUS=pci
E: ID_MM_CANDIDATE=1
E: ID_MODEL_
E: ID_MODEL_ID=0xe091
E: ID_NET_DRIVER=alx
E: ID_NET_
E: ID_NET_
E: ID_NET_
E: ID_OUI_
E: ID_PATH=
E: ID_PATH_
E: ID_PCI_
E: ID_PCI_
E: ID_VENDOR_
E: ID_VENDOR_ID=0x1969
E: IFINDEX=2
E: INTERFACE=enp2s0
E: SUBSYSTEM=net
E: SYSTEMD_
E: TAGS=:systemd:
E: USEC_INITIALIZE
and again, nothing in the udev rules:
bladernr@
/etc/udev/udev.conf
/etc/udev/hwdb.d:
. ..
/etc/udev/rules.d:
. ..
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: udev 228-6ubuntu1
ProcVersionSign
Uname: Linux 4.4.0-2-generic x86_64
ApportVersion: 2.19.4-0ubuntu2
Architecture: amd64
Date: Thu Feb 11 16:36:35 2016
InstallationDate: Installed on 2016-02-10 (1 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160210)
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
XDG_RUNTIME_
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: systemd
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 03/03/2014
dmi.bios.vendor: Intel Corp.
dmi.bios.version: RKPPT10H.
dmi.board.
dmi.board.name: D53427RKE
dmi.board.vendor: Intel Corporation
dmi.board.version: G87971-403
dmi.chassis.type: 3
dmi.modalias: dmi:bvnIntelCor
More checking... on Trusty, the file is generated by /lib/udev/ write_net_ rules:
bladernr@sulaco:~$ cat /etc/udev/ rules.d/ 70-persistent- net.rules write_net_ rules net-generator. rules rules file.
# This file was automatically generated by the /lib/udev/
# program, run by the persistent-
And checking my Xenial system (one of them) write_net_rules does not exist: galactica: /etc/udev/ rules.d$ ls /lib/udev printer check-broken- cis v4l_id socket- startup
bladernr@
ata_id hplj1000 hpljP1008 iphone-set-info scsi_id
cdrom_id hplj1005 hpljP1505 ipod-set-info udev-add-printer
collect hplj1018 hpljP1505n mtd_probe udev-configure-
console-setup-tty hplj1020 hwclock-set mtp-probe usb_modeswitch
hdparm hpljP1005 hwdb.bin pcmcia-
hid2hci hpljP1006 hwdb.d pcmcia-
hotplug.functions hpljP1007 ifupdown-hotplug rules.d
Now, comparing the packages installed in the two that include udev in the name:
Trusty: 1.0-0:amd64 1:204-5ubuntu20.15 config- printer- udev 1.4.3+20140219- 0ubuntu2. 6
bladernr@sulaco:~$ dpkg -l |grep udev|awk '{print $2 " " $3}'
gir1.2-gudev-1.0 1:204-5ubuntu20.15
libgudev-
libgudev-1.0-0:i386 1:175-0ubuntu9
libudev0:amd64 175-0ubuntu13
libudev0:i386 175-0ubuntu13
libudev1:amd64 204-5ubuntu20.15
libudev1:i386 204-5ubuntu20.15
python3-pyudev 0.16.1-2build1
system-
udev 204-5ubuntu20.15
Xenial: galactica: /etc/udev/ rules.d$ dpkg -l |grep udev |awk '{print $2 " " $3}' gudev-1. 0:amd64 1:230-2 1.0-0:amd64 1:230-2 config- printer- udev 1.5.7+20150819- 0ubuntu5
bladernr@
gir1.2-
libgudev-
libudev1:amd64 228-6ubuntu1
system-
udev 228-6ubuntu1
the manpage for udev in Xenial says:
/lib/udev/ rules.d, the volatile runtime directory /run/udev/rules.d and the local
administration directory /etc/udev/rules.d. All rules files are collectively sorted and
RULES FILES
The udev rules are read from the files located in the system rules directory
SO looking at /lib/udev/rules.d for Trusty: network- interface. rules network- interface. rules description. rules net-generator. rules net-port- types.rules
bladernr@sulaco:~$ ls /lib/udev/rules.d/ |grep net
40-bridge-
40-vlan-
75-net-
75-persistent-
77-mm-huawei-
and Xenial: galactica: /etc/udev/ rules.d$ ls /lib/udev/rules.d/ |grep net description. rules net-port- types.rules setup-link. rules
bladernr@
75-net-
77-mm-huawei-
80-net-
Xenial is missing one. If this is intentional, how does one go about setting persistent network names?