Modify IP
Vi/etc/sysconfig/network-scripts/ifcfg-eth0
Onboot=yes
Bootproto=dhcp
Service Network restart
Virtual opportunity automatically acquires an IP address after reboot
-----------------
Example: the IP address after ifconfig is 192.168.31.132
Inner-layer Routing 192.168.31.2
Outer Route 192.168.1.1
Ping www.baidu.com cannot ping if the internal and external routing can ping
Need to set up DNS
-----------------
Modify DNS vi/etc/resolv.conf
Modify NameServer
; Generated By/sbin/dhclient-script
Search Node1
NameServer 192.168.31.2
The first two lines can not only configure NameServer
Modify Host Name
Vi/etc/sysconfig/network
Modify the host name that hostname defines for itself
Reboot INIT 6 hostname configuration Complete
Set MAC Address
Delete HWADDR
Remove UUID
Rm-rf/etc/udev/rules.d/70-persistent-net.rules
Restarting Init 6
CentOS Virtual Machine Network configuration