8.9. Disabling Consistent Network Device Naming
- Disable the assignment of fixed names by "masking" udev's rule file for the default policy. This can be done by creating a symbolic link to
/dev/null. As a result, unpredictable kernel names will be used. As
root, enter the following command:
ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
- Create your own manual naming scheme, for example by naming your interfaces
lan0. To do that, create your own udev rules file and set the NAME property for the devices. Make sure to order the new file above the default policy file, for example by naming it
- Alter the default policy file to pick a different naming scheme, for example to name all interfaces after their MAC address by default. As
root, copy the default policy file as follows:
~]#Edit the file in the
cp /usr/lib/udev/rules.d/80-net-name-slot.rules /etc/udev/rules.d/80-net-name-slot.rules
/etc/udev/rules.d/directory and change the lines as necessary.
- Open the
/etc/default/grub/file and find the
GRUB_CMDLINE_LINUXis a variable that includes entries which are added to the kernel command line. It might already contain additional configuration depending on your system settings.
net.ifnames=0as kernel parameter to the
To update all the GRUB 2 kernel menu entries in the
/boot/grub2/grub.cfgfile, enter the following command as
grubby --update-kernel=ALL --args=net.ifnames=0
grubbyutility is used for updating and displaying information about the configuration files for the
grubboot loader. See the
grubby(8)man page for more details. For more information about working with GRUB 2, see the Red Hat Enterprise Linux 7 System Administrator's Guide.