1. Add a new network adapter in the virtual machine according to the following two pictures
Two. See if the NIC is recognized!
Vi/etc/udev/rules.d/70-persistent-net.rules #可以看到有两块网卡!
Copy eth1 Card's MC address, next we want to create ifcfg-eht1 file!! (At the beginning, I just can't find this file and depressed for a long time!!) How did not think up oneself create!! ....)
Three create the IFCFG-EHT1 network card configuration file
cd/etc/sysconfig/network-scripts/
cp ifcfg-eht0 ifcfg-eht1
then modify the network card name/MC address/IP address, etc..!! (Because we copy is eth0 network card configuration, pay attention to the above query MAC address, to be modified in ifcfg-eth1, otherwise it will be an error, the second card, can not start
Save exit
Use Ifconfig to see if the new IP has been added
/etc/init.d/network Reload
If you want to restart the network for IP entry:
Service Network restart
This will add success ...