I read that the nameif
is deprecated, although I still see it on my Ubuntu 14.04 system. If this command is deprecated, is the command cited for removal or will it still be available?
This command is extremely useful when trying to make consistent interface names particularly when your NIC's are constantly changing. Modifying udev (/etc/udev/rules.d/70-persistent-net.rules
) is only useful when your NIC configuration is static.
In my case, the NIC's on my system are changing as it is a test bed and I have a startup script which reads the system mac addresses and NIC mac addresses, generates /etc/mactab
file and runs nameif
to make my interface names consistent.
It seems that ip link
command is the replacement for nameif
although it only seems to change interface names based on another interface name:
ip link set { dev DEVICE } [ name NEWNAME ]
This is not as friendly because first you have to find the mapping between mac address and interface name, and then perform your changes (see ip link help
).
Is there a replacement command like nameif
where the interface name can be set on the fly by the mac address? If not, is it ok to continue to use nameif
?
/etc/mactab
; why can't you dynamically generate udev rules instead? Or, alternatively, write some udev rules that use a helper script to get the name? Or, finally, if you only have one interface, and always want it to be eth0... just turn off persistent names.70-persistent-net.rules
is nothing special. It's just an ordinary udev rules file, written by/lib/udev/rules.d/75-persistent-net-generator.rules