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

 

 

 

Reference: http://www.cyberciti.biz/faq/howto-linux-rename-ethernet-devices-named-using-udev/

dreamtails 發表在 痞客邦 PIXNET 留言(0) 人氣()