#首先要保证udev-post 启动chkconfig --list|grep udevudev-post 0:off 1:on 2:on 3:on 4:on 5:on 6:offservice udev-post start#将原有的eth0那一行注释,然后将生成的eth1改为eth0vim /etc/udev/rules.d/70-persistent-net.rules # PCI device 0x8086:0x100f (e1000)#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0a:31:75:62:3c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"# PCI device 0x8086:0x100f (e1000)SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0a:31:75:62:3c", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"#最后修改网卡的配置文件cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0TYPE=EthernetUUID=cs802cs7-087a-af50-812b-f3d20053aa4aONBOOT=yesNM_CONTROLLED=yesBOOTPROTO=noneHWADDR=00:0a:31:75:62:3c #修改MAC地址跟上面配置文件里面一样IPADDR=192.168.1.100PREFIX=24GATEWAY=192.168.1.254DNS1=202.103.24.68DEFROUTE=yesIPV4_FAILURE_FATAL=yesIPV6INIT=noNAME="System eth0"#最后reboot系统