eth0 和 en0 有什么关系?

eth0 和 en0 有什么关系?

在我的/etc/sysconfig/network-scripts/下面有ifcfg-en0ifcfg-eth0:

[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

想问下en0eth0有什么关系?

阅读 7.8k
1 个回答

That's a change in how now udevd assigns names to ethernet devices. Now your devices use the "Predictable Interface Names", which are based on (and quoting the sources):

  1. Names incorporating Firmware/BIOS provided index numbers for on-board devices (example: eno1)
  2. Names incorporating Firmware/BIOS provided PCI Express hotplug slot index numbers (example: ens1)
  3. Names incorporating physical/geographical location of the connector of the hardware (example: enp2s0)
  4. Names incorporating the interfaces's MAC address (example: enx78e7d1ea46da)
  5. Classic, unpredictable kernel-native ethX naming (example: eth0)

The why's this changed is documented in the systemd freedesktop.org page, along with the method to disable this:

ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules

or if you use older versions:

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

原始出处

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题