您的位置:首页 > 其它

ubuntu network is unreachable解决办法

2013-12-09 20:38 316 查看
版本:ubuntu10.04 之前使用的是动态分配IP,网络突然就不行了,改为静态分配IP。

配置静态IP地址
sudo vi /etc/network/interfaces

内容如下:
auto lo
iface lo inet loopback

auto eth1
#iface eth1 inet dhcp 动态分配
iface eth1 inet static
address 192.168.1.8
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

配置DNS
vi /etc/resolv.conf
增加内容:
nameserver 192.168.1.1
naserver 202.106.0.20

配置网关
route add default gw 192.168.1.1

重新启动网络配置
/etc/init.d/networking restart 重启配置
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: