1.VM开启NAT连接模式
2.打开win7的VMnet8配置
保证与VM中的NAT配置一致
3.打开vm命令行,修改如下参数
> sudo vi /etc/sysconfig/network-scripts/ifcfg-ens33
4.重启虚拟网卡:
> systemctl restart network
5.关闭防火墙:
> systemctl stop firewalld
6.ping下百度,查看能否上网
> ping www.baidu.com
保证与VM中的NAT配置一致
> sudo vi /etc/sysconfig/network-scripts/ifcfg-ens33
> systemctl restart network
> systemctl stop firewalld
> ping www.baidu.com