Red Hat Enterprise Linux 7 (RHEL 7) and CentOS 7 have introduced a new naming scheme for network devices. This scheme aims to make network interfaces fully predictable and automatic, simplifying differentiation and facilitating seamless hardware replacement. This change affects both network adapters embedded on the motherboard (Lan-on-Motherboard) and additional adapters such as PCI network cards.
Previously, Linux network interfaces used the naming convention eth[0123…]. However, in RHEL7/CentOS7, the default network interface name is based on firmware, topology, and location information. The new naming schemes supported by udev natively include:
- Names incorporating Firmware or BIOS provided index numbers for on-board devices (example: eno1)
- Names incorporating Firmware or BIOS provided PCI Express hotplug slot index numbers (example: ens1)
- Names incorporating physical location of the connector of the hardware (example: enp2s0)
- Names incorporating the interface’s MAC address (example: enx78e7d1ea46da)
- The traditional unpredictable kernel-native ethX naming (example: eth0)
The names have two character prefixes based on the type of interface: ‘en’ for Ethernet, ‘wl’ for wireless LAN (WLAN), and ‘ww’ for wireless wide area network (WWAN).
Checking the Assigned Device Name
The ifconfig utility may not be installed by default in a minimal installation. You can use “ip link show“, “ip addr” or “ip address” to display the auto assigned devices name. For example:
[root@centos7 ~]# ip link show 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT qlen 1000 link/ether 00:0c:29:ba:3e:fe brd ff:ff:ff:ff:ff:ff
[root@centos7 ~]# ip address 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens160: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000 link/ether 00:0c:29:ba:3e:fe brd ff:ff:ff:ff:ff:ff inet 192.168.0.18/24 brd 192.168.0.255 scope global dynamic ens160 valid_lft 604707sec preferred_lft 604707sec inet6 fe80::20c:29ff:feba:3efe/64 scope link valid_lft forever preferred_lft forever
- ip link show – This command is used to display the state of all network interfaces.
- ip addr or ip address – These commands are used to display all IP addresses assigned to your network interfaces.
The new naming scheme for network interfaces in RHEL 7/CentOS 7 is a significant shift from the traditional ethX naming. It provides a more predictable and automatic way of identifying network interfaces, making it easier for system administrators to manage network configurations.
By understanding the different naming schemes and how to check the assigned device name, you can effectively navigate this new system. The shift to this new naming scheme is designed to improve your experience as a system administrator, making it easier to differentiate between devices and seamlessly replace broken hardware.
Remember, understanding the tools and systems you’re working with is the first step to mastering them.
Frequently Asked Questions
What is the purpose of the new naming scheme in RHEL 7/CentOS 7?
The new naming scheme in RHEL 7/CentOS 7 aims to make network interfaces fully predictable and automatic. It simplifies differentiation and facilitates seamless hardware replacement.
What are the different types of naming schemes supported by udev?
udev supports naming schemes that incorporate Firmware or BIOS provided index numbers, PCI Express hotplug slot index numbers, physical location of the connector of the hardware, the interface’s MAC address, and the traditional unpredictable kernel-native ethX naming.
What do the two character prefixes in the names represent?
The two character prefixes represent the type of interface. ‘en’ stands for Ethernet, ‘wl’ for wireless LAN (WLAN), and ‘ww’ for wireless wide area network (WWAN).
How can I check the auto assigned device name?
You can use the commands “ip link show“, “ip addr” or “ip address” to display the auto assigned device name.
What is the ifconfig utility?
The ifconfig utility is a system administration tool used for network interface configuration. It is used to configure, manage and query network interface parameters. It is not installed by default in a minimal installation of RHEL 7/CentOS 7.