Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1426208
  • 博文数量: 823
  • 博客积分: 10000
  • 博客等级: 上将
  • 技术积分: 5002
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-28 17:39
文章分类

全部博文(823)

文章存档

2011年(1)

2008年(822)

我的朋友

分类: LINUX

2008-08-28 17:51:24

 
Ubuntu的网络参数保存在文件/etc/network/interfaces中,默认设置使用dhcp,内容如下:

#Theprimarynetworkinterface
autoeth0
ifaceeth0inetdhcp

设置静态ip的方法如下:
1)编辑/etc/network/interfaces
1.1)将dhcp一行屏蔽
#Theprimarynetworkinterface
autoeth0
#ifaceeth0inetdhcp

1.2)添加和静态ip有关的参数
#Theprimarynetworkinterface
ifaceeth0inetstatic
address192.168.0.10
netmask255.255.255.0
gateway192.168.0.1

2)编辑/etc/resolv.conf,设置dns
nameserver202.96.134.133
nameserver202.106.0.20

3)执行下面两个命令,启用新设置
$sudoifdowneth0
$sudoifupeth0

Ubuntu 网络参数设置Ubuntu 网络参数设置Ubuntu 网络参数设置Ubuntu 网络参数设置Ubuntu 网络参数设置Ubuntu 网络参数设置Ubuntu 网络参数设置Ubuntu 网络参数设置Ubuntu 网络参数设置Ubuntu 网络参数设置
阅读(400) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~