Centos virtual machine clone network card configuration

Retrieve the network card eth0, every time the virtual machine is cloned, the network card mac address is updated, and centos automatically adds an eth network card

rm -f /etc/udev/rules.d/70-persistent-net.rules

reboot

Close the service NetworkManager

chkconfig NetworkManager off
service NetworkManager stop

vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 #network card device name
ONBOOT=yes #whether to activate at startup yes|no
BOOTPROTO=static #protocol type dhcp bootp none
IPADDR=192.168.134.136 #network IP address
NETMASK =255.255.255.0 #Network subnet address
GATEWAY= #Gateway address
BROADCAST=192.168.134.255 #Broadcast address
TYPE=Ethernet #Network card type is Ethernet

Start the network service
chkconfig network on
service network start

 

https://jingyan.baidu.com/article/335530da93ac2c19cb41c3b3.html

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326207579&siteId=291194637