当前位置: > CentOS > CentOS入门 >

CentOS 7 网卡命名eno*转eth0

时间:2014-12-23 22:03来源:www.it.net.cn 作者:IT网

Step1)

# vim /etc/udev/rules.d/70-persistent-net.rules
-----------------------------------------------------------------------
# PCI device 0x14e4:0x1680 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:7b:d8:06", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eno16777736", NAME="eth0"
-----------------------------------------------------------------------

or

-----------------------------------------------------------------------
# PCI device 0x14e4:0x1680 (tg3)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:7b:d8:06", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eno*", NAME="eth0"
-----------------------------------------------------------------------

Step2)

# mv /etc/sysconfig/network-scripts/ifcfg-eno16777736 /etc/sysconfig/network-scripts/ifcfg-eth0

 

Step3)

# vim /etc/sysconfig/network-scripts/ifcfg-eth0
-----------------------------------------------------------------------
HWADDR="00:0C:29:7B:D8:06"
TYPE="Ethernet"
BOOTPROTO="dhcp"
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME="eth0"
UUID="2aa76b48-487b-425e-a021-ace79c0773cd"
ONBOOT="yes"
-----------------------------------------------------------------------

 

Step4)

# reboot



(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容