70-persistent-net.rules renames only one interface
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
70-persistent-net.rules renames only one interface
Hi,
I’m running Slackware 14 on a test router with 8 interfaces and want to set custom names for interfaces eth2 to eth7, so I made the changes in the 70-persistent-net.rules files and rebooted. After the reboot only one of the interfaces is renamed as per the 70-persistent-net.rules file; all other interface retain their normal naming, i.e. eth2, eth3, and so on.
So I deleted the 70-persistent-net.rules file and rebooted again, it does not help. From what I see every time I delete the file any one of the interfaces is randomly renamed, but not more than one.
I checked dmesg and all I see over there is logs indicating all the interface have been bought up successfully, and after that one single entry “renamed network interface eth7 to xxx”. eth7 randomly changes every time I delete the 70-persistent-net.rules file and reboot.
In case it makes any difference, I’m running Slackware on Hyper-V with the interfaces configured as network adapters (not legacy).
I know that the later Linux kernels have the hyper-v vm drivers integrated and also I can see in dmesg the hyper-v drivers are being loaded, apart from that the network cards work properly other than the problem of not being renamed as per 70-persistent-net.rules. So obviously this is not a driver problem; however, just to make sure it was not something related to the new synthetic devices in hyper-v I performed this test.
I added 2 legacy LAN cards and tried renaming them from the 70-persistent-net.rules file. So now my vm has this configuration…
2 legacy LAN cards
6 synthetic LAN cards
There are rules defined for all of them in 70-persistent-net.rules file; however, only 2 of the 8 interface get renamed, i.e. 1 legacy interface and 1 synthetic interface.
So it seems udev is renaming only one interface of each type. Is this what is supposed to happen if there are multiple NIC cards using the same driver? If no, how do I get the other interfaces renamed?
The behavior seems to be more random than what I initially thought it to be. I am trying to rename all of the interfaces. Here is the content of the files; it will give you a better idea of what exactly is happening…
udevadm info -a -p /sys/class/net/eth0
udevadm info -a -p /sys/class/net/eth1
udevadm info -a -p /sys/class/net/eth3
udevadm info -a -p /sys/class/net/eth4
udevadm info -a -p /sys/class/net/eth5
Try another custom attribute apart from the MAC address.
I'm not sure if this is related; but, I am running Slackware on Hyper-V, and the udev rules are not generated by default (at least not on Slackware, I’m not sure about other distros) for VMs running on Hyper-V or VMware. There is a check in the 75-persistent-net-generator.rules file which prevents the udev rules from generating.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.