您的位置:首页 > 其它

ubuntu设置固定IP不出错的方法[转]

2012-06-28 18:16 363 查看
打开/etc/network/interface,

修改内容为:

auto eth0

iface eth0 inet static

address IP

netmask 子网掩码

gateway 网关

保存,打开 /etc/resolv.conf,

nameserver 主DNS

nameserver 后备DNS

在终端输入

/etc/init.d/networking restart

重启网卡

一般这样就可以了,奇怪的是我这样设置只可以访问百度等几个网站,其它一概不行。

而且重启进入gnome后,速度变的486运行win98一样。

解决方法打开/etc/rc.local

在里面添加一句

/sbin/ifconfig eth0 mtu 1300

重启就行了。

单网卡双IP打开 /etc/network/interface

auto eth0:0

iface eth0:0 inet static

address IP

netmask 子网掩码

gateway 网关

auto eth0:1

iface eth0:1 inet static

address IP

netmask 子网掩码

gateway 网关

双网卡双IP(应用情况较多,一般为一个内网一个为外网)

auto eth0

iface eth0 inet static

address IP

netmask 子网掩码

gateway 网关

auto eth1

iface eth1 inet static

address IP

netmask 子网掩码

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