將原本網卡eth0更改為eth1
1.#
vi /etc/udev/rules.d/70-persistent-net.rules 修改NAME="eth1"
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.
# PCI device 0x8086:0x100e (e1000) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:d6:29:48", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
2.#vi /etc/sysconfig/network-scripts/ifcfg-eth0 修改DEVICE=eth1
DEVICE=eth1
HWADDR=08:00:27:d6:29:48
NM_CONTROLLED=yes
ONBOOT=yes
IPADDR=192.168.2.5
BOOTPROTO=none
NETMASK=255.255.255.0
TYPE=Ethernet
GATEWAY=192.168.2.1
DNS1=168.95.1.1
IPV6INIT=no
USERCTL=no
3.Reboot