LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Interface name for wlan changes randomly causing network manager to not be able to reconnect (https://www.linuxquestions.org/questions/linux-networking-3/interface-name-for-wlan-changes-randomly-causing-network-manager-to-not-be-able-to-reconnect-4175736289/)

linuxuser371038 04-21-2024 09:26 AM

Interface name for wlan changes randomly causing network manager to not be able to reconnect
 
Happens after things like closing laptop (sleep) and reopening and also when starting libvirtd, which seems to shunt other interface names to different names including wlan and mobile interface. Wlan0 become wlan1, then wlan2 etc.

How can I either stop the interfaces changing or make the network manager profile's interface name use something non mutable like how you do with hard drives in fstab using uuid and such? I looked in the nmcli man however did not see any pertinent information to do this though was not certain what searches to do to find. I searched under ifname but didn't find.

Currently I am having to go into the network manager profile and edit it to the new name and reload each time which stinks.

hazel 04-21-2024 09:42 AM

You don't say what distro you are using. Modern kernels by default use path-dependent and therefore predictable names for network interfaces. Some, like Slackware, still use the old names like wlan0. You may be using such a distro. Check your kernel command line: if it includes the option net.ifnames=0, remove this.

linuxuser371038 04-21-2024 12:13 PM

Quote:

Originally Posted by hazel (Post 6497499)
You don't say what distro you are using. Modern kernels by default use path-dependent and therefore predictable names for network interfaces. Some, like Slackware, still use the old names like wlan0. You may be using such a distro. Check your kernel command line: if it includes the option net.ifnames=0, remove this.

I am using archlinux, which is said to be 'bleeding edge' eh? However indeed I do still have the wlan rather than other naming format. Recent install too within last few weeks. So strange that it is not using the way you say.

Ok based on your reply I just found my answer I think:

https://bbs.archlinux.org/viewtopic....79767#p1879767

Disabled due to iwd not being able to handle them apparently. Time to switch to another if that is the case. I also got this issue with mobile network interface name though which uses modemmanager so I hope not the case for that too as I want persistent names for both.

Ah thinking about it I guess this will suppress predictable naming system wide. Seems dumb to muck all that up just to add iwd into the mix as, while handy, is not that great a tool above wpa_supplicant. I will dump it out and go back to wpa_supplicant then.


All times are GMT -5. The time now is 10:31 PM.