Centos7网络连接不上:Network is unreachable 解决方案
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos7网络连接不上:Network is unreachable 解决方案相关的知识,希望对你有一定的参考价值。
参考技术A 一、 进入要修改网络相关的配置文件目录二、 查看一下目录
这时候你会发现没有教程上说的ifcfg-eth0之类的文件,打开第一个即可。
有的教程找不到就说新建一个,这个肯定是不行的
三、编辑第一个类似于ifcfg-eth555
ONBOOT=no 修改为:ONBOOT=yes
四、保存退出
五、该命令是重启网路服务
OVER
虚拟机下 centos7 无法连接网络
[[email protected] ~]# cd /etc/sysconfig/network-scripts [[email protected] network-scripts]# ls ifcfg-ens33 ifdown-ppp ifup-ib ifup-Team ifcfg-lo ifdown-routes ifup-ippp ifup-TeamPort ifdown ifdown-sit ifup-ipv6 ifup-tunnel ifdown-bnep ifdown-Team ifup-isdn ifup-wireless ifdown-eth ifdown-TeamPort ifup-plip init.ipv6-global ifdown-ib ifdown-tunnel ifup-plusb network-functions ifdown-ippp ifup ifup-post network-functions-ipv6 ifdown-ipv6 ifup-aliases ifup-ppp ifdown-isdn ifup-bnep ifup-routes ifdown-post ifup-eth ifup-sit [[email protected] network-scripts]# vim ifcfg-ens33 [[email protected] network-scripts]# systemctl restart network [[email protected] network-scripts]# ping www.baidu.com PING www.a.shifen.com (61.135.169.125) 56(84) bytes of data. 64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=1 ttl=55 time=25.0 ms 64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=2 ttl=55 time=25.0 ms 64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=3 ttl=55 time=25.0 ms 64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=4 ttl=55 time=25.0 ms 64 bytes from 61.135.169.125 (61.135.169.125): icmp_seq=5 ttl=55 time=24.5 ms ^C --- www.a.shifen.com ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 13035ms
https://blog.csdn.net/rzrenyu/article/details/78469462
以上是关于Centos7网络连接不上:Network is unreachable 解决方案的主要内容,如果未能解决你的问题,请参考以下文章