Names to Consistent Device Names for Ethernet Devices in Red Hat® Enterprise Linux® v6
This document is for informational purposes only and may contain typographical errors and
technical inaccuracies. The content is provided as is, without express or implied warranties of any
kind.
Names to Consistent Device Names for Ethernet Devices in Red Hat® Enterprise Linux® v6
Hardware/Firmware
Consistent device naming is dependent on the system’s firmware providing
the physical NIC port’s location details to the operating system. DellTM
PowerEdgeTM 11th Generation servers and later ship with a system BIOS that
provides the information used by the operating system to rename the
interfaces. Make sure that the Dell PowerEdge server on which you perform
the migration/upgrade actions contains support for this feature.
Software
Red Hat Enterprise Linux version 6.1 is the minimum version that contains
support for the new naming scheme. More specifically, the primary package
requirement is biosdevname-0.3.6-11.el6 or later.
Introduction
Network device names in Red Hat Enterprise Linux for Ethernet devices have traditionally followed the
ethN naming scheme. In large deployments, the number of devices with eth names and their mapping
to physical ports can be overwhelming and inconsistent with hardware peripheral’s locations and
changes.
Dell, in collaboration with the Linux community and major distribution vendors introduced a more
consistent (predictable) and meaningful naming scheme for Ethernet devices. The new name indicates
the physical location of the Ethernet port in the system. For details on how this works, see the white
paper, Consistent Network Device Naming in Linux.
This white paper assists you with migrating network device names of existing systems from the
traditional ethN naming to the new consistent emX naming scheme. The document covers both the
migration and the upgrade cases.
Distributions
While most of the procedures described here can be applied to any FedoraTM-like distribution, the focus
is on the Red Hat Enterprise Linux v6 distribution. The document guides existing RHEL 6.X installations
that use the ethN names to upgrade/migrate to the new naming scheme making sure network
configurations and policies are not lost.
Pre-requisites
In this document, we describe migrating/upgrading from a Source version of the distribution, which can
be any Red Hat Enterprise Linux version 6.X using the traditional eth naming scheme to a destination
using the emX naming scheme. The destination version of the distribution that is being migrated to
must be Red Hat Enterprise Linux 6.1 or later.
Note: When upgrading from any update of Red Hat Enterprise Linux 6 to a newer one, the Ethernet
device names are not affected and are the same device names as the ones before the upgrade. When
performing a fresh install of Red Hat Enterprise Linux 6.1 or later, the new naming scheme is used by
default provided the hardware/firmware pre-requisites are met.
4
Page 5
Names to Consistent Device Names for Ethernet Devices in Red Hat® Enterprise Linux® v6
Preparation
On the source operating system: The source has network devices with the ethN names.
Backing up data and operating system configuration from your system:
Refer to Red Hat documentation on how to back up your data and system configuration.
Backup existing network device configuration along with udev rules.
Names to Consistent Device Names for Ethernet Devices in Red Hat® Enterprise Linux® v6
Here is a sample output from above, where the first column is the current kernel assigned
device name for the interface, column two is the firmware suggested name, and the third
column is the assigned MAC address of the device. Save this output for use after you upgrade
the system.
eth0 em1 84:2B:2B:4C:63:91
eth1 em2 84:2B:2B:4C:63:92
This mapping helps with the subsequent sections where you apply the new mapping to the
network configuration.
Migrating the configuration from an old naming to the new naming scheme
A system installed with Red Hat Enterprise Linux version 6.1 or later by default uses the new naming
scheme on supported Dell systems. With the help of the map created above, make sure that
configuration settings are as required.
1. Install the destination operating system making sure consistent device naming is enabled (it is
enabled by default on all supported Dell systems).
2. Using the map created from above:
a. Make sure that all the ifcfg-emX and ifcfg-pXpY files in /etc/sysconfig/network-scripts
contain the configuration as required by your deployment.
b. If your firewall rules contained device specific rules, edit the firewall configuration to
reflect the same, but using the newer names instead of the ethN names.
c. Update other files that contain references to the older ethN names.
3. Reboot and make sure that network devices, services and firewall rules start up as expected.
Upgrade
In this section, we demonstrate how the configuration on a system upgraded to Red Hat Enterprise
Linux version 6.1 (or later) is configured to use the new naming scheme. The operating system’s
upgrade program preserves older ethN names and requires that we change all references to the older
names with the newer names.
1. Upgrade to the destination operating system using the Red Hat documentation. If your previous
install used the traditional naming scheme, post upgrade, the system continues to use the
traditional naming (or same) scheme.
2. Find all configuration files that might use the (traditional ethN) naming scheme. For example:
3. With the help of the map created above, rename each occurrence of the ethN name with the
There is a sample script that you can use, see the Sample Scripts section.
corresponding emX or pXpY name in all configuration files and/or file names. For network
device configuration, do this:
Manually, or
with the system-config-network-cmd utility.
6
Page 7
Names to Consistent Device Names for Ethernet Devices in Red Hat® Enterprise Linux® v6
Manual network device reconfiguration
For this example, the current system has /etc/sysconfig/network-scripts/ifcfg-eth3. Consult the map
generated earlier to find the corresponding new name for the device. Assume that this is em4. The
configuration file should now be ifcfg-em4.
To rename the network configuration for eth3:
1. Rename the ifcfg-eth3 to ifcfg-em4.
# cd /etc/sysconfig/network-scripts/
# mv ifcfg-eth3 ifcfg-em4
Edit ifcfg-em4 and change DEVICE= from eth3 to em4 as reported by the map.
Make sure that the HWADDR field has the correct hardware address by looking at the map created
earlier.
After the changes, the ifcfg-em4 looks like this:
DEVICE="em4"
BOOTPROTO="dhcp"
...
Using the system-config-network utility to perform network device reconfiguration
In this method, we use the system-config-network-cmd utility to export the network configuration to a
file. Change each occurrence of the older name with the corresponding newer name, and import the
configuration.
1. You can export the current network configuration as a text file with the system-config-
network-cmd tool like this. /tmp/network.config contains the system’s network configuration
information:
4. Verify in /etc/sysconfig/network-scripts/ifcfg-e* that the new names are used for the file
names and also for the DEVICE variable in each of the configuration files.
5. Update firewall rules if you have device specific rules. Make sure that the firewall is running
with the required rules.
a. Make sure the firewall is running:
# iptables -L
b. Save the current firewall rules:
# iptables-save > /tmp/iptables-old-names
7
Page 8
Names to Consistent Device Names for Ethernet Devices in Red Hat® Enterprise Linux® v6
eth2em-map.sh
This script creates a map of the old name, the corresponding new name, and
the MAC address for each of the Ethernet interfaces on the system as reported
by biosdevname. Use the output to assist with changing the network
configuration, firewall rules, and so on. Run this script on a system that is
currently using the ethN names and save/print the output for use later.
eth2em-rename.sh
This script uses the map created by eth2em-map.sh and replaces every
occurrence of an ethN name with its corresponding emX or pXpY name, saving
the output file as em_<file>.
c. If the firewall is not active and you have the firewall rules defined, use the
d. Edit /tmp/iptables-old-names and replace each occurrence of ethN with the
corresponding emX/pXpY name based on the map.
e. Replace /etc/sysconfig/iptables with /tmp/iptables to load the rules during
subsequent reboots.
# cp /tmp/iptables /etc/sysconfig/iptables
6. Update other miscellaneous files. For each of the other files that use the traditional ethN
names, search and replace each occurrence of ethN names with emX or pXpY names. There is a
sample script that you can use, see the Sample Scripts section.
7. Delete the file /etc/due/rules.d/70-persistent-net.rules.
f. rm /etc/due/rules.d/70-persistent-net.rules
8. Reboot and make sure that the network devices, services, and firewall rules start up as
expected—there should be no references to the older ethN names.
# ls /sys/class/net/
em1 em2 em3 em4 lo
# ip link show
...
# iptables-save | less
...
Sample Scripts
We have provided two sample scripts for migrating network information. Download the scripts at
linux.Dell.com.
Reference
1. Consistent Network Device Naming in Linux
8
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.