Resolution of the NIC name em1 issue when installing Centos6.6 on the Dell server

Source: Internet
Author: User
Tags custom name

The company bought several new Dell servers, After installing Centos6.6, it is found that the server's network card name is EM1, this is caused by the biosdevname, by default Centos6.6 Biosdevname is off, but if it is Dell's server will automatically enable the kernel parameter. Biosdevname is a tool developed by Dell that aims to clarify the concept of the naming of network devices (and maintain consistency!). )。 Biosdevname is a udev helper that renames a network interface based on information provided by the system BIOS.

The new naming rules are as follows:

    • em[1-n]  means motherboard NIC (Internal network card)

    • pci<slot>#<port>  represents a card in a PCI slot, Port 1 to N (PCI class NIC)

    • npar & SR-Iov devices add suffix  _<vf>, from 0 to  n, depending on the number of partitions or virtual features available on each port.

    • other Linux naming conventions such as  .<vlan>  and  :<alias >  suffix, remain unchanged and still apply.  

The Red Hat Enterprise Linux 6 Service, which is now available in Red Hat, enforces new naming conventions for network interfaces. Dell has also developed and released the ' Biosdevname ' udev Helper utility in compliance with the GPL protocol. It suggests a new device name based on the physical location of the network interface in the system.

When installing RHEL6 into a supported Dell PowerEdge server process, the new network interface name will change to:

EmN (EM1, EM2,..)

To replace the ethn name used by the motherboard's integrated network port in the past.

For PCI Extended Network interfaces, the name will be:

Pxpy (P<slot number>p<port number>-P1P1, P1P2, ...).

Based on the new naming scheme, EM1 maps ' GB1 ' (em2 mapping ' Gb2 ') to the same label on the server base, making it easier to manage the network interfaces effectively. The name P1P2 makes it easy to identify the network port on the expansion network card.

The new naming scheme is supported Dell PowerEdge the flat table is turned on by default. The ' biosdevname=0 ' kernel command-line parameters are passed during the installation process, and the new naming scheme can be disabled and retained at run time.

So how to modify the NIC to our familiar ethx way, there are 2 ways

The first type:

(1) Modifying Udev policies

[Email protected] ~]# cd/etc/udev/rules.d/
[Email protected] rules.d]# vim 70-persistent-net.rules

# This file is automatically generated by the/lib/udev/write_net_rules
# program, run by the Persistent-net-generator.rules rules file.
#
# can modify it, as long as you keep each rule to a single
# line, and change is only the value of the Name= key.

# PCI Device 0x14e4:0x165f (TG3) (custom name provided by external tool)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "B0:83:fe:e6:d8:a4", attr{type}== "1", kernel== "eth*" , name= "em1"

# PCI Device 0x14e4:0x165f (TG3) (custom name provided by external tool)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "B0:83:fe:e6:d8:a5", attr{type}== "1", kernel== "eth*" , name= "em2"

Switch

# This file is automatically generated by the/lib/udev/write_net_rules
# program, run by the Persistent-net-generator.rules rules file.
#
# can modify it, as long as you keep each rule to a single
# line, and change is only the value of the Name= key.

# PCI Device 0x14e4:0x165f (TG3) (custom name provided by external tool)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "B0:83:fe:e6:d8:a4", attr{type}== "1", kernel== "eth*" , name= "eth0"

# PCI Device 0x14e4:0x165f (TG3) (custom name provided by external tool)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "B0:83:fe:e6:d8:a5", attr{type}== "1", kernel== "eth*" , name= "eth1"

(2) Modify the network card file name

[Email protected] ~]# cd/etc/sysconfig/network-scripts/
[Email protected] network-scripts]# MV Ifcfg-em1 Ifcfg-eth0

[Email protected] network-scripts]# vim Ifcfg-eth0

device=em1

Switch

device=eth0

(3) Reboot the system

The second method:

(1) Modify grub.conf

[Email protected] ~]# vim/etc/grub.conf

# grub.conf generated by Anaconda
#
# Note that you don't have the to rerun grub after making changes to the This file
# notice:you has a/boot partition. This means
# all kernel and INITRD paths is relative to/boot/, eg.
# root (hd0,1)
# kernel/vmlinuz-version RO root=/dev/mapper/volgroup-lv_root
# initrd/initrd-[generic-]version.img
#boot =/dev/sda1
Device (hd0) HD (1,800,64000,dd2e2742-0973-4678-9989-276e29b7e967)
Default=0
Timeout=5
Splashimage= (hd0,1)/grub/splash.xpm.gz
Hiddenmenu
Title CentOS (2.6.32-504.3.3.el6.x86_64)
Root (hd0,1)
kernel/vmlinuz-2.6.32-504.3.3.el6.x86_64 ro root=/dev/mapper/volgroup-lv_root rd_no_luks LANG=en_US.  UTF-8 rd_no_md rd_lvm_lv=volgroup/lv_swap Sysfont=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root keyboardtype=pc keytable=us rd_no_dm RHGB quietbiosdevname=0
Initrd/initramfs-2.6.32-504.3.3.el6.x86_64.img

(2) Delete Udev policy

[Email protected] ~]# cd/etc/udev/rules.d/
[Email protected] rules.d]# RM-RF 70-persistent-net.rules

(3) Modify the name of the NIC device file

[Email protected] ~]# cd/etc/sysconfig/network-scripts/
[Email protected] network-scripts]# MV Ifcfg-em1 Ifcfg-eth0

[Email protected] network-scripts]# MV ifcfg-em2 ifcfg-eth1

(4) Modify the network card device file name

[Email protected] network-scripts]# vim Ifcfg-eth0

Will

device=em1

Switch

device=eth0

[Email protected] network-scripts]# vim ifcfg-eth1

Will

device=em2

Switch

device=eth1

(5) Restart the server

[email protected] ~]# reboot


This article is from the "Cloud Life" blog, make sure to keep this source http://ovcer.blog.51cto.com/1145188/1605777

Resolution of the NIC name em1 issue when installing Centos6.6 on the Dell server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.