If you run raspi-config
, select "Advanced Options", then "Network Interface Names", you will be prompted to enable predictable device names. This works by manipulating files in /etc/systemd/network
to mask the corresponding units in /usr/lib/systemd/network
. With predictable device names disabled, we see:
root@raspberrypi:~# ls -l /etc/systemd/network
total 0
lrwxrwxrwx 1 root root 9 Feb 5 15:12 73-usb-net-by-mac.link -> /dev/null
lrwxrwxrwx 1 root root 9 Feb 5 15:12 99-default.link -> /dev/null
Those symlinks to /dev/null
mask the files with the same name in /usr/lib/systemd/network
. When we enable predictable device names, those masking files are removed.
If you're familiar with predictable device names on other systems, you may be disappointed; on my Pi, with two wireless interfaces (the built-in interface and a USB interface), I get:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enxb827ebb3d5ba: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
link/ether b8:27:eb:b3:d5:ba brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DORMANT group default qlen 1000
link/ether b8:27:eb:e6:80:ef brd ff:ff:ff:ff:ff:ff
4: wlx00e1b0679867: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
link/ether 00:e1:b0:67:98:67 brd ff:ff:ff:ff:ff:ff
What that tells us is that the Pi simply doesn't provide the information that systemd generally uses to create predictable device names on other systems (bus, device id, etc). It might be sufficient for what you're doing: in the above output, the devices that were previously eth0
and wlan1
have been replaced with device names using the MAC address.