JACKY SUN

Good Good Study, Day Day Up.

Ubuntu的网络参数配置

来源:转载 发表时间:2008-06-23 07:48:38 查看:262 评论:0

Ubuntu的网络参数保存在文档 /etc/network/interfaces中,默认配置使用dhcp,内容如下:
# The primary network interface
auto eth0
iface eth0 inet dhcp
配置静态ip的方法如下:
1) 编辑 /etc/network/interfaces
1.1)将dhcp 一行屏蔽
# The primary network interface
auto eth0
#iface eth0 inet dhcp
1.2)添加和静态ip有关的参数
# The primary network interface
iface eth0 inet static
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1
2)编辑 /etc/resolv.conf,配置dns
nameserver 202.96.134.133
nameserver 202.106.0.20
3)执行下面两个命令,启用新配置
$sudo ifdown eth0
$sudo ifup eth0


转载名称:ysgyggs
转载地址:http://www.linuxdiyf.com


姓名:  
邮件: 不在页面显示,作者回复后将通过邮件通知您
网站:
验证码:  
内容: