em1 or eth0 ?

最近遇到HP和DELL的网卡不统一的问题。想给他解决掉。


在 HP 机器上运行 

biosdevname -i eth0
em1

而在DELL server 

biosdevname -i em1
em1

看了一下两个机器的debug参数

在HP上显示  

biosdevname -d 
BIOS dev: em1 
kernel dev: eth0

而DELL机器上显示

biosdevname -d 
BIOS dev: em1 
kernel dev: em1

因此设备出厂的时候,网卡的name 应该是em1而非eth0.


下面就来改造em1 or eth0 为你统一的

1, eth0 变成em1 这个比较简单,只需在grub.conf的kernel 行尾加上参数 biosdevname=1 然后安装系统即可。

2. em1 变成 eth0 这个就需要多写一个参数了  需在grub.conf的kernel 行尾加上参数 biosdevname=0  net.ifnames=0  然后安装系统即可


biosdevname 可以参看https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sect-Consistent_Network_Device_Naming-Enabling_and_Disabling.html

To disable the consistent network device naming on Dell systems that would normally have it on by default, pass the following option on the boot command line, both during and after installation:
biosdevname=0
To enable this feature on other system types that meet the minimum requirements (seeSection A.2, “System Requirements”), pass the following option on the boot command line, both during and after installation:
biosdevname=1
Unless the system meets the minimum requirements, this option will be ignored and the system will boot with the traditional network interface name format.
If the biosdevname install option is specified, it must remain as a boot option for the lifetime of the system.

net.ifnames=0 这个参数不清楚的可以参看http://my.oschina.net/davisqi/blog/208551

搞定。

有什么问题,欢迎交流。

转载于:https://my.oschina.net/davisqi/blog/306541

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值