您的位置:首页 > 其它

ubuntu突然不能上网的解决方法(昨天晚上还可以,早上来了就不可以了)

2013-06-09 11:38 288 查看
昨天晚上还可以,早上来了就不可以了,研究了一阵子,发现原因是ubuntu的网络管理工具network manager的一个bug。

解决方法:

第一步:卸载络管理工具,sudo apt-get remove network manager.

第二步:在/etc/network/interfaces中增加以下内容

iface eth0 inet static //eth0表示第一块网卡,如果是第二块网卡,就是eth1

address 192.168.1.244 //ip地址

netmask 255.255.255.0

broadcast 192.168.1.255

gateway 192.168.1.1 //.网关地址

auto eth0 www.baidu.com

第三步:在/etc/resolv.conf中增加如下内容,

nameserver 192.168.1.1

nameserver 202.117.128.2

第四步:执行 sudo /etc/init.d/networking restart

done
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: