备份ifcfg-ens33
cp /etc/sysconfig/network-scripts/ifcfg-ens33 /etc/sysconfig/network-scripts/ifcfg-ens33.bak
修改ifcfg-ens33
vi /etc/sysconfig/network-scripts/ifcfg-ens33
修改为
TYPE=Ethernet
BOOTPROTO=static
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NETMASK=255.255.255.0
IPADDR=192.168.180.100
GATEWAY=192.168.180.2
NAME=ens33
UUID=325c91bf-b02a-47a1-a940-8e42e52d4618
DEVICE=ens33
ONBOOT=yes
PROXY_METHOD=none
BROWSER_ONLY=no
PREFIX=24
DNS1=114.114.114.114
DEFROUTE=yes
修改resolv.conf
vi /etc/resolv.conf
修改为
修改虚拟机设置
修改虚拟机的网卡IPV4的