首页 > 代码库 > em1 or eth0 ?
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
搞定。
有什么问题,欢迎交流。
em1 or eth0 ?
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。