November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

[CentOS 7.0] Change the default “enxx” network device to old “eth0” on CentOS 7

[CentOS 7.0] Change the default “enxx” network device to old “eth0” on CentOS 7

The easiest way to restore the old way Kernel/modules/udev rename your ethernet interfaces is supplying these kernel parameters to CentOS 7:

net.ifnames=0
biosdevname=0

To do so follow this steps:

Edit /etc/default/grub
At the end of GRUB_CMDLINE_LINUX line append “net.ifnames=0 biosdevname=0”
Save the file
Type “grub2-mkconfig -o /boot/grub2/grub.cfg”
Type “reboot”

If you didn’t supply these parameters during the installation, you will probably need to adjust and/or rename interface files at /etc/sysconfig/network-scripts/ifcfg-*.

Up to Fedora 18, just biosdevname=0 was enough.

As an example, in a certain machine, in a exhaustive research, I got:

-No parameters: NIC identified as “enp5s2”.
-Parameter biosdevname=0: NIC identified as “enp5s2”.
-Parameter net.ifnames=0: NIC identified as “em1”.
-Parameter net.ifnames=0 AND biosdevname=0: NIC identified as “eth0”.

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>