How can I change the default "ens33" network device to old "eth0" on Fedora 19?

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

  1. net.ifnames=0
  2. biosdevname=0

To do so follow this steps:

  1. Edit /etc/default/grub
  2. At the end of GRUB_CMDLINE_LINUX line append "net.ifnames=0 biosdevname=0"
  3. Save the file
  4. Type "grub2-mkconfig -o /boot/grub2/grub.cfg"
  5. 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".


You can do this using a udev rule, like so:

cat > /etc/udev/rules.d/99-rename-to-eth0.rules << EOF
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="$(cat /sys/class/net/ens33/address)", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
EOF

In Fedora 20, things seem to have changed a bit further.

1) grub kernel arguments
Yes, both "net.ifnames=0" and "biodevame=0" seem necessary.

2) /etc/sysconfig/network-scripts/ifcfg-ethX
Yes, these are necessary, too.

3) /etc/udev/rules.d/60-net.rules
If you have multiple interfaces and want to control naming of each device rather than letting the kernel do in its own way, /etc/udev/rules.d/60-net.rules seems necessary to override /usr/lib/udev/rules.d/60-net.rules like the following.

# PCI device 0x1011:0x0019 (tulip) {SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:c0:f0:4c:f5:78", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x10ec:0x8168 (r8169) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="60:a4:4c:b5:26:48", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

4) yum remove biosdevname seems unecessary.