dell服务器安装linux 6u系统网卡名称变为em解决

今天在看一台710服务器时,发现如下问题:

[root@BJ-BX-128-98 ~]# ifup eth1WARNING: 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.

发现eth1不存在,

查看udev配置,发现网卡名字为em2

[root@BJ-BX-128-98 ~]# vim /etc/udev/rules.d/70-persistent-net.rules# This file was 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 you keep each rule on a single# line, and change only 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"

然后把网卡的配置文件的device改为em就可以正常停启了。

[root@BJ-BX-128-98 network-scripts]# vim ifcfg-eth1DEVICE=eth1BOOTPROTO=staticIPADDR=111.xx.xx.xxNETMASK=255.255.255.0GATEWAY=111.xx.xx.254ONBOOT=yesTYPE=Ethernet

改为如下

[root@BJ-BX-128-98 network-scripts]# vim ifcfg-eth1 DEVICE=em2BOOTPROTO=staticIPADDR=111.xx.xx.xxNETMASK=255.255.255.0GATEWAY=111.xx.xx.254ONBOOT=yesTYPE=Ethernet

为什么在dell的R710服务器上安装RedHat6的系统,看到的网卡是em1和em2,和以往的eht0和eth1不一样,换成其他服务器没有问题?这个原因是由于biosdevname导致的。

在Redhat6中,默认biosdevname是关闭的,但是当服务器是dell的时候就变成开启的了。

biosdevname是由dell开发的工具,旨在为网络设备的命名理清思路(并且保持一致性!)。Biosdevname是一款udev帮助程序,可根据系统BIOS提供的信息对网络接口进行重命名。

具体解决成eth0和eth1,需要在grub.conf中添加上biosdevname=0,进行禁用新命名方案。当然ifcfg-eth0和ifcfg-eth1也需要改回eth0和eht1.

记得把这个文件清空或者删除 ?/etc/udev/rules.d/70-persistent-net.rules

dell官方是这么说的:

此文代表戴尔Enterprise Linux 设计团队的 Narayanan D 发表Red Hat 现已推出的 Red Hat Enterprise Linux 6 Service Pack 1 (RHEL 6 SP1) 对网络接口实施了新的命名规则。戴尔同时开发,并遵从GPL协议义发布了‘biosdevname’ udev helper实用程序。它会根据网络接口在系统中的物理位置来建议新的设备名称。将RHEL6 SP1 安装到支持的戴尔PowerEdge 服务器过程中,新的网络接口名称将变为:            emN (em1, em2, ..)以取代主板集成网口过去使用的 ethN 名称。对于 PCI 扩展网络接口,名称将是:          pXpY (p<slot number>p<port number> - p1p1, p1p2, ..).根据新的命名方案,em1 将映射 ‘Gb1’(em2 映射 ‘Gb2’),与服务器底座上的标签相同,从而使网络接口的有效管理更加轻松。名称 p1p2 可便于识别扩展网卡上的网络端口。新的命名方案在支持的戴尔PowerEdge 平台上默认开启。在安装过程中传送‘biosdevname=0’ 内核命令行参数,即可禁用新命名方案,并在运行时中保留。对 ethN 名称进行硬编码的现有脚本可能需要更改,使其能识别网络设备名称。
dell服务器安装linux 6u系统网卡名称变为em解决

相关文章:

你感兴趣的文章:

标签云: