3

What's the difference between en0 and eth0?

In my CentOS 6 VM, there is list of network-scripts:

[root@localhost /]# ls /etc/sysconfig/network-scripts/
ifcfg-en0    ifdown-ipv6    ifup          ifup-plip    ifup-wireless
ifcfg-eth0   ifdown-isdn    ifup-aliases  ifup-plusb   init.ipv6-global
ifcfg-lo     ifdown-post    ifup-bnep     ifup-post    net.hotplug
ifdown       ifdown-ppp     ifup-eth      ifup-ppp     network-functions
ifdown-bnep  ifdown-routes  ifup-ippp     ifup-routes  network-functions-ipv6
ifdown-eth   ifdown-sit     ifup-ipv6     ifup-sit
ifdown-ippp  ifdown-tunnel  ifup-isdn     ifup-tunnel

you see there are ifcfg-en0 and ifcfg-eth0, does it have any difference between them? the ifcfg-eth0 I have used(configured data in it), now I want to add a more IP address, which file I can configured?


EDIT-01

The enoX and the ethX is not related to my post, mine is enX.

3
  • 1
    Similar on Super User: What is the difference between eth1 and eno1? – user56041 Sep 26 '18 at 4:43
  • Check the output of ifconfig -a or ip link show to see which interface name you have and use it. – muru Sep 26 '18 at 5:26
  • ethtool -i en0 and ethtool -i eth0 might provide useful information too (the PCI device ID and the name of the driver responsible for the NIC). – telcoM Sep 26 '18 at 8:06
1

I see your edit, but the comment is correct... It is the same mechanism referenced.

It's the concept of biosdevnames / consistent device naming.

In RHEL6/CentOS 6 there was an attempt to work around this via a special udev rule:

/etc/udev/rules.d/70-persistent-net.rules

Within that file you will see a mapping (by mac address) attempting to provide consistent names, but not in the way mentioned in the consistent device naming article linked above.

The most common case I experienced this was when users would clone a VM. This would change the mac address of the VM and then that UDEV rule would present the new mac address as a new device, effectively locking the old device in as eth0.

To determine the file you should use, check the name mapped in /etc/udev/rules.d/70-persistent-net.rules by the mac address of the VMs network adapter. Using that file, you can map it to anything you like. Once you know the name, use the corresponding file in /etc/sysconfig/network-scripts.

After UDEV rule changes, reload them with:

sudo udevadm control -R

After that you can manually trigger processing of the rules with:

sudo udevadm trigger

In the long run you should clear any unwanted rules from /etc/udev/rules.d/70-persistent-net.rules.

0

en0 and eth0 is the name of interfaces name in your server, if you execute ifconfig you can see the number of interfaces available in your server.

you can rename interfaces from /etc/udev/rules.d/70-persistent.rules file

2

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