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). Any tips on how to proceed? |
Here is an update on this…
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? |
Hi we need more information on how you are setting the udev rules.
Can you paste the Code:
/etc/udev/rules.d/70-persistent-net.rules We also need an Code:
ifconfig -a Udev can rename all the interfaces as needed with the right custom attributes. You also need to state your questions clear, you are still after only eth2 and eth7 to be renamed right? Also what do you wish to name them? |
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…
Code:
# PCI device 0x1011:/sys/devices/pci0000:00/0000:00:0a.0 (tulip) Code:
eth0: flags=4098<BROADCAST,MULTICAST> mtu 1500 |
Hi after reviewing your udev entries things look correct:
Code:
# PCI device 0x1011:/sys/devices/pci0000:00/0000:00:0a.0 (tulip) Code:
udevadm info -a -p /sys/class/net/eth0 |
Hi,
I have tried setting the rules based on ifindex, however it still does not seem to work. I have set rules for all devices similar to this . . . Code:
# net device () Code:
# ignore VMWare virtual interfaces |
This might give you some more ideas to try:
http://www.linuxquestions.org/questi...-rules-907381/ http://www.linuxquestions.org/questi...es-4175459287/ |
All times are GMT -5. The time now is 03:43 PM. |