Dell-installed Linux 6u system NIC name becomes EM solution

Source: Internet
Author: User
Tags deprecated naming convention centos custom name port number

The first method is as follows


Today, looking at a 710 server, I found the following questions:

[Root@bj-bx-128-98 ~]# ifup eth1
warning:deprecated config file/etc/modprobe.conf, all config files belong into/etc/modprobe.d/.
warning:deprecated config file/etc/modprobe.conf, all config files belong into/etc/modprobe.d/.
Device eth1 does not seem to be present, delaying initialization.

Found that eth1 does not exist,

View the Udev configuration and find the NIC name em2


[Root@bj-bx-128-98 ~]# Vim/etc/udev/rules.d/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.
#
# You can modify it, as long as your keep each of a single
# line, with the value of the Name= key.

# PCI Device 0x14e4:0x163b (BNX2)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "78:2b:cb:3b:ae:0e", attr{type}== "1", kernel== "eth*" , name= "Eth0"

# PCI Device 0x14e4:0x163b (BNX2) (custom name provided by external tool)
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "78:2b:cb:3b:ae:0f", attr{type}== "1", kernel== "eth*" , name= "EM2"

Then the NIC's configuration file device changed to EM can stop the normal restart.


[Root@bj-bx-128-98 network-scripts]# Vim Ifcfg-eth1
Device=eth1
Bootproto=static
ipaddr=111.xx.xx.xx
netmask=255.255.255.0
gateway=111.xx.xx.254
Onboot=yes
Type=ethernet
Read as follows

[Root@bj-bx-128-98 network-scripts]# Vim Ifcfg-eth1
Device=em2
Bootproto=static
ipaddr=111.xx.xx.xx
netmask=255.255.255.0
gateway=111.xx.xx.254
Onboot=yes
Type=ethernet

Why install the REDHAT6 system on Dell's R710 server and see the NIC is Em1 and EM2, unlike previous eht0 and eth1, is there a problem with other servers? This reason is caused by biosdevname.
In Redhat6, the default biosdevname is turned off, but it is turned on when the server is Dell.
Biosdevname is a Dell-developed tool designed to clarify ideas for naming network devices (and maintain consistency!). )。 Biosdevname is a udev helper that renames the network interface based on information provided by the system BIOS.
Specifically resolved into eth0 and eth1, you need to add the biosdevname=0 in grub.conf to disable the new naming scheme. Of course Ifcfg-eth0 and ifcfg-eth1 also need to change back to Eth0 and eht1.
Remember to empty or delete this file/etc/udev/rules.d/70-persistent-net.rules

That's what the Dell official said:

This article represents the Dell Enterprise Linux design Team's Narayanan D release

Red Hat Enterprise Linux 6 Service Pack 1 (RHEL 6 SP1) has been introduced with a new naming convention for network interfaces. Dell also developed the ' Biosdevname ' udev helper utility with the GPL-compliant protocol. It suggests a new device name based on the physical location of the network interface in the system.

During the installation of RHEL6 SP1 to a supported Dell PowerEdge server, the new network interface name becomes:

EmN (EM1, EM2, ...)

To replace the ETHN name previously used by the motherboard integrated network port.

For PCI Extended Network interfaces, the name will be:

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

According to the new naming scheme, EM1 maps ' GB1 ' (em2 map ' Gb2 ') to the same label on the server base, making it easier to manage the network interface effectively. Name P1P2 makes it easy to identify network ports on the extended network card.

The new naming scheme is opened by default on the supported Dell PowerEdge platform. Passing the ' biosdevname=0 ' kernel command-line argument during installation disables the new naming scheme and retains it at run time.

Existing scripts that hard-code the ETHN name may need to be changed to recognize the network device name.


The second method introduces:

First step: Modify System Grub

Vi/boot/grub/grub.conf

Adding a biosdevname=0 start parameter, I modified the result as follows:
[Root@localhost ~]# cat/boot/grub/grub.conf
# grub.conf generated by Anaconda
#
# so you don't have to rerun grub after making changes to this file
# notice:you do not have a/boot partition. This is means that
# all kernel and INITRD paths are relative to/, eg.
# root (hd0,0)
# kernel/boot/vmlinuz-version RO root=/dev/sda1
# initrd/boot/initrd-[generic-]version.img
#boot =/DEV/SDA
Default=0
Timeout=5
Splashimage= (hd0,0)/boot/grub/splash.xpm.gz
Hiddenmenu
Title CentOS (2.6.32-220.el6.x86_64)
Root (hd0,0)
kernel/boot/vmlinuz-2.6.32-220.el6.x86_64 ro root=uuid=360d089b-d466-4005-abcb-c5e517d31a96 Rd_NO_LUKS Rd_NO_LVM Lang=en_us. UTF-8 rd_no_md quiet Sysfont=latarcyrheb-sun16 rhgb crashkernel=auto keyboardtype=pc keytable=us Rd_NO_DM biosdevname=0 #---> This is a new addition.
Initrd/boot/initramfs-2.6.32-220.el6.x86_64.img

Step two: Delete the Udev configuration file rm-f/etc/udev/rules.d/70-persistent-net.rules

Note: The second step is that you do not need to operate.

Step three: Modify the name of the current NIC configuration file

MV Ifcfg-em1 "" "Ifcfg-eth0
MV ifcfg-em2 "" "Ifcfg-eth1
MV Ifcfg-em3 "" "Ifcfg-eth2
MV Ifcfg-em4 "" "Ifcfg-eth3

Fourth step: Modify the network card configuration file content, em1 all changes to eth0

[Root@xingfujie ~]# Cat/etc/sysconfig/network-scripts/ifcfg-eth0
Device= "Eth0"
Bootproto= "DHCP"
Hwaddr= "24:b6:fd:f8:d5:84"
Nm_controlled= "Yes"
onboot= "Yes"
You can use the command to replace the following:

Perl-p-i-e ' s/em1/eth0/g ' ifcfg-eth0 or sed-i ' s/em1/eth0/g ' Ifcfg-eth0
Final step: Reboot the system shutdown-r now you find the familiar Eth0-eth4 has come back, by the way CentOS 6.2 also has a problem is that if you do not write DNS in the NIC configuration file, you will find/etc/after the reboot. resolv.conf file is emptied, one way is to write DNS in the NIC configuration file, another way is to give/etc/resolv.conf I attribute, chattr +i/etc/resolv.conf

Related Article

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.