3

i am using centos 7. I am typing the command

ip addr show eth0

but its reply Device "eth0" does not exist.

4

In CentOS, network interfaces are named differently. So they aren't called eth0 or eth1, but rather have names like eno1 or enp2s0. (Source.)

Run ip addr to see how these interfaces are named on your system.

These names are defined in /etc/sysconfig/network-scripts/ifcfg-<iface>. You can change their names if you really wanted to, but I don't recommend it.

| improve this answer | |
0

RHEL / CentOS 7.x uses consistent network device naming. And it might also be called predictable network interface names.

in any case the best way I have found to get eth naming back is to

  • yum remove biosdevname
  • edit /etc/default/grub
  • append net.ifnames=0 to GRUB_CMDLINE_LINUX
  • append biosdevname=0 to GRUB_CMDLINE_LINUX if you have biosdevname installed
  • grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg {replace centos with rhel}
  • reboot
  • eth0 and eth1 and so on should now be there instead of the naming syntax that was used.

You do not need to mess with anything under /etc/sysconfig/.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.