1

I have a RPi 4 8GB with the latest Raspberry Pi OS. I have two Wifi-Interfaces:

  • Onboard wifi (first wlan0 -> now wlan1)
  • usb wifi (predictable name wlx00c0cXXXXX)

The Onboard wifi named wlan0 till i connect the usb-wifi-stick and boot several times. now the onboard-wifi named wlan1. in raspi-config i enable the predictable name scheme.

Is it possible to reset the names of the onboard network interface or change it back to wlan0? Why this happend? who to prevent this behaviour next time?

2

You can easily rename your network interfaces with:

ip link set wlan1 down
ip link set wlan1 name wlan0
ip link set wlan0 up

that is, assuming that you don't have any lingering wlan0 on your Pi.

In the boot messages, you can find some more information. On virtual machines with "predictable" network names, I use the following code in the provisioning script:

ETH1=$(dmesg | grep -i 'renamed from eth1' | sed -n 's/: renamed from eth1//;s/.* //p')
ifconfig $ETH1 down
ip link set $ETH1 name eth1

You may do something comparable on the Pi.

1

i enable the predictable name scheme

so I assume that you want to use that. If it doesn't work as expected, you can try to append this to the line in /boot/cmdline.txt:

net.ifnames=1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.