1、查看网卡信息
1cat /etc/udev/rules.d/70-persistent-net.rules 2 3 4# This file was automatically generated by the /lib/udev/write_net_rules 5# program, run by the persistent-net-generator.rules rules file. 6# 7# You can modify it, as long as you keep each rule on a single 8# line, and change only the value of the NAME= key. 9 10# PCI device 0x15ad:0x07b0 (vmxnet3) 11SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:56:9e:1d", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" 12 13# PCI device 0x15ad:0x07b0 (vmxnet3) 14SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:56:9e:27", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
2、复制第一个网卡的信息
1cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1 2 3#修改 DEVICE:eth0 -> DEVICE:eth1 4#修改 HWADDR:00:0c:29:56:9e:1d -> HWADDR:00:0c:29:56:9e:27 5#修改IP信息
3、重启网络
service network restart
完毕