1

When I add a interface to a RHEL6 servers it is getting assigned as eth0, eth1, eth2 and so on. But in RHEL 7, it looks like the first assigned interface is named ens192, then en256, then ens224, etc.

Is there any rule in place to assign such orders in RHEL 7?

2

1 Answer 1

2

From the RHEL7 docs, as reported in the comments by user @val0x00ff:

In Red Hat Enterprise Linux 7, udev supports a number of different naming schemes. The default is to assign fixed names based on firmware, topology, and location information.

This has the advantage that the names are fully automatic, fully predictable, that they stay fixed even if hardware is added or removed (no re-enumeration takes place), and that broken hardware can be replaced seamlessly.

The disadvantage is that they are sometimes harder to read than the eth0 or wlan0 names traditionally used. For example: enp5s0.

(...)

By default, systemd will name interfaces using the following policy to apply the supported naming schemes:

  • Scheme 1: Names incorporating Firmware or BIOS provided index numbers for on-board devices (example: eno1), are applied if that information from the firmware or BIOS is applicable and available, else falling back to scheme 2.
  • Scheme 2: Names incorporating Firmware or BIOS provided PCI Express hotplug slot index numbers (example: ens1) are applied if that information from the firmware or BIOS is applicable and available, else falling back to scheme 3.
  • Scheme 3: Names incorporating physical location of the connector of the hardware (example: enp2s0), are applied if applicable, else falling directly back to scheme 5 in all other cases.
  • Scheme 4: Names incorporating interface's MAC address (example: enx78e7d1ea46da), is not used by default, but is available if the user chooses.
  • Scheme 5: The traditional unpredictable kernel naming scheme, is used if all other methods fail (example: eth0).

(emphasis mine)

4
  • So the names of interface assigned based on the interface card model that we have installed on the system. Is that my understand correct?
    – Athiri
    Aug 29, 2017 at 15:53
  • Well, not only. It's all explained above.
    – dr_
    Aug 30, 2017 at 7:02
  • I see the following link gives more information and I find it very useful. major.io/2015/08/21/…
    – Athiri
    Aug 30, 2017 at 20:07
  • The below detail gives some idea I see it. Names incorporating Firmware/BIOS provided index numbers for on-board devices (ID_NET_NAME_ONBOARD, example: eno1) Names incorporating Firmware/BIOS provided PCI Express hotplug slot index numbers (ID_NET_NAME_SLOT, example: ens1) Names incorporating physical/geographical location of the connector of the hardware (ID_NET_NAME_PATH, example: enp2s0) Names incorporating the interfaces's MAC address (ID_NET_NAME_MAC, example: enx78e7d1ea46da) Classic, unpredictable kernel-native ethX naming (example: eth0)
    – Athiri
    Sep 8, 2017 at 12:13

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.