Change interface name CentOS 7.3

Issues related to configuring your network
Post Reply
florius
Posts: 4
Joined: 2014/11/11 09:53:50

Change interface name CentOS 7.3

Post by florius » 2017/03/16 15:38:00

Hi guys. How can I change the network interface name on a CentOS 7.3.1611 install?
And is this possible without adding a udev rule in the /70-presistant-rules file?
It's for a SolusVM KVM template setup, which clears the udev rules.

Thanks in advance!

aks
Posts: 3073
Joined: 2014/09/20 11:22:14

Re: Change interface name CentOS 7.3

Post by aks » 2017/03/16 16:44:53

I'm not sure about arbitrary names, but you can revert to the "old" scheme with: https://access.redhat.com/documentation ... aming.html

Also I seem to remember using ksdevice keyword for kickstart, but that was ages ago.

From: https://access.redhat.com/documentation ... aming.html
One of the possible names will be applied by udev according to the rules as described in Section 8.2, “Understanding the Device Renaming Procedure”, and summarized here:

/usr/lib/udev/rules.d/60-net.rules - from initscripts,
/usr/lib/udev/rules.d/71-biosdevname.rules - from biosdevname,
/usr/lib/udev/rules.d/80-net-name-slot.rules - from systemd

From the above list of rule files it can be seen that if interface naming is done via initscripts or biosdevname it always takes precedence over udev native naming. However if initscripts renaming is not taking place and biosdevname is disabled, then to alter the interface names copy the 80-net-name-slot.rules from /usr/ to /etc/ and edit the file appropriately. In other words, comment out or arrange schemes to be used in a certain order.
BTW, biosdevname is the "new" way...

Post Reply