My Ubuntu desktop 16.04 machine has udev rules:
user@desktop:~$ sudo tree /etc/udev/
/etc/udev/
├── hwdb.d
├── rules.d
│ ├── 48-adwits.rules
│ ├── 49-stlinkv1.rules
│ ├── 49-stlinkv2-1.rules
│ ├── 49-stlinkv2.rules
│ ├── 49-stlinkv3.rules
│ ├── 51-android.rules
│ ├── 60-uv4l.rules
│ ├── 65-uv4l_uvc.rules
│ ├── 70-persistent-net.rules
│ └── 85-lpcxpresso.rules
└── udev.conf
2 directories, 11 files
user@desktop:~$ cat /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="f8:b1:56:e8:1b:f4", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="eth0"
but I have two Ubuntu 16.04 server machines which have no rules:
user@server1:~$ sudo tree /etc/udev/
/etc/udev/
├── hwdb.d
├── rules.d
└── udev.conf
2 directories, 1 file
These servers have four ethernet interfaces each, which are not enumerated in the same order:
Server 1:
user@server1:~$ cat /proc/net/bonding/bond* | egrep '(Interface|HW addr)'
Slave Interface: eth0
Permanent HW addr: 34:17:eb:eb:d7:32
Slave Interface: eth1
Permanent HW addr: 6c:b3:11:1b:b5:76
Slave Interface: eth2
Permanent HW addr: 34:17:eb:eb:d7:33
Slave Interface: eth3
Permanent HW addr: 6c:b3:11:1b:b5:77
Server 2:
user@server2:/etc/udev$ cat /proc/net/bonding/bond* | egrep '(Interface|HW addr)'
Slave Interface: eth0
Permanent HW addr: 34:17:eb:ea:f3:3e
Slave Interface: eth1
Permanent HW addr: 34:17:eb:ea:f3:3f
Slave Interface: eth2
Permanent HW addr: 6c:b3:11:1c:ac:68
Slave Interface: eth3
Permanent HW addr: 6c:b3:11:1c:ac:69
The two servers have enumerated their eth interfaces differently. On server one eth0/eth2 and eth1/eth3 are the names of the dual-nic cards, whereas on server2 its eth0/eth1 and eth2/eth3.
How can I make these servers generate 70-persistent-net.rules files, so that I can edit those to make the two servers have the same interface names for the same rj45 socket positions?
Is there a particular udev package in the desktop release which is missing on the server release, and responsible for the nearly-empty /etc/udev tree?
P.S. The fourth and fifth bytes of all mac addresses have been changed for security, but the leading (manufacturer) bytes, and the last byte have been left alone.