#2015-04-21 17:00
Environment:
CentOS 6.4 x86_64
First, the problem description:
In VMware, there is a CentOS 6.4 x86_64 machine, there is a network card, the existing requirements, you need to add a network card for internal network use.
Step: Add a NIC to VMware's CentOS setup, place it in VMNet2, add it successfully, and VMware has two NICs in the lower right corner and are all connected.
Restart CentOS several times, with ifconfig view, always only eth0 no eth1,
With ls/etc/sysconfig/network-scripts/ifcfg-eth* view, always only Ifcfg-eth0, no ifcfg-eth1.
Second, the solution:
Cat/etc/udev/rules.d/70-persistent-net.rules |grep ETH
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:e9:f8:ad", attr{type}==" 1 ", kernel==" eth* ",Name= "Eth0"
subsystem== "NET", action== "Add", drivers== "? *", attr{address}== "00:0c:29:e9:f8:b7", attr{type}==" 1 ", kernel==" eth* ", name=" eth1 "
From the above can be seen, CentOS network card name and MAC address, at this time we can do the following operations,
Cp-p/etc/sysconfig/network-scripts/ifcfg-eth0/etc/sysconfig/network-scripts/ifcfg-eth1
Vim/etc/sysconfig/network-scripts/ifcfg-eth1
####
device=eth1 //eth0, eth1
Hwaddr=00:0c:29:e9:f8:b7 //00:0c:29:e9:f8:ad, 00:0c:29:e9:f8:b7
Type=ethernet
uuid=f48e3f26-996d-4f6d-b0fc-7487435b160b
Onboot=yes
Nm_controlled=no
Bootproto=static
Ipaddr=10.10.10.254
netmask=255.255.255.0
dns1=223.5.5.5
dns2=208.67.222.222
####
/etc/init.d/network restart
With Ifconfig to test, then found that there is a network card eth1.
Iii. Summary
/etc/sysconfig/network-scripts/ifcfg-eth? Related to the content of/etc/udev/rules.d/70-persistent-net.rules.
VMware cannot add a new NIC eth1