Changer le nom des interfaces réseau dans RHEL7

De MappingDoc
Révision datée du 6 mars 2019 à 09:11 par imported>Admin (1 révision importée)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)

Disable consistent network device naming in RHEL7

In RHEL6, I simply had to kickstart with 'biosdevname=0' to disable this and fall back to ethX interface naming. In RHEL7, I understand that I need to use net.ifnames=0 in order to do this, but it doesn't retain after installation. I'm looking for the best way to automate disabling consistent network device naming during installation (Kickstart). Any thoughts? Also, Page 117 in the RHEL7 Networking Guide incorrectly tells me I need to modify /etc/grub.conf.

You have two options (as described in the new RHEL 7 Networking Guide) to disable the new naming scheme:

   Run once: ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules

OR

   Run once: echo 'GRUB_CMDLINE_LINUX="net.ifnames=0"' >>/etc/default/grub

Note that the biosdevname package is not installed by default, so unless it gets installed, you don't need to add biosdevname=0 as a kernel argument.

Be careful with the second option. YOu may overwrite system's default parameters. The file to be edited is /etc/sysconfig/grub and the var GRUB_CMDLINE_LINUX needs to be modified to have the previous options plus "biosdevname=0 net.ifnames=0"

lien original : https://access.redhat.com/discussions/916973