您的位置:首页 > 大数据 > 人工智能

ping www.baidu.com和ping 8.8.8.8出现ping不通

2015-12-26 13:53 453 查看
环境:Ubuntu Server 12.04

电脑重启后出现不能上网的情况。

ping www.baidu.com和ping 8.8.8.8出现ping不通,提示形如ping:unknown host xxx.xxx时,原因可能是DNS的问题,但是修改了DNS,仍然是ping不通。

我试着重启了下网络。

ifconfig eth0 down
ifconfig eth0 up
/etc/init.d/networking restart


出现了下面的问题:

* Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces

* Reconfiguring network interfaces...

RTNETLINK answers: File exists

Failed to bring up eth0.

看了下/etc/network/interfaces里面的配置没有任何问题。根据网络上的答案也解决不了。于是乎我尝试修改子网掩码,将255.255.255.0改成255.255.255.128然后重启

/etc/init.d/networking restart


此后再次修改子网掩码,将255.25.255.128改成255.255.255.0,重启网络,一切恢复正常。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: