[root@centos6 ~]# ip add1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3d:56:58 brd ff:ff:ff:ff:ff:ff
inet 192.168.27.128/24 brd 192.168.27.255 scope global eth0
inet6 fe80::20c:29ff:fe3d:5658/64 scope link
valid_lft forever preferred_lft forever
3: pan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
link/ether 52:8f:9d:89:cb:a1 brd ff:ff:ff:ff:ff:ff
4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:3d:56:62 brd ff:ff:ff:ff:ff:ff
inet 172.18.16.20/16 brd 172.18.255.255 scope global eth1
inet6 fe80::20c:29ff:fe3d:5662/64 scope link
valid_lft forever preferred_lft forever
从上面看出有一个为eth1 的网卡,就把这个名字改成GOOD 的名字
操作
首先修改/etc/udev/rules./70-persistent-net.rules
# 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:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:3d:56:58", ATTR
{type}=="1", KERNEL=="eth*", NAME="eth0"# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:3d:56:62", ATTR
{type}=="1", KERNEL=="eth*", NAME="GOOD"# 找到刚刚eth1的对应的物理地址,修改这一段的name中的字段,变成自己想要的