ninic

导航

NAT 模式下虚拟机安装的centos7 ping主机显示connect: Network is unreachable

在虚拟机下安装的centos7使用的网络是NAT模式,安装成功后ping主机地址显示 Network is unreachable

解决方案:

1)使用ifconfig命令查看网卡信息

2)进入/etc/sysconfig/network-scripts/ 查看这下面的文件

3)vi ifcfg-ens33 修改其中的ONBOOT=no 改成ONBOOT= yes

4)重启服务

systemctl restart network.service

posted on 2018-08-13 15:39  ninic  阅读(972)  评论(0编辑  收藏  举报