Chinaunix首页 | 论坛 | 博客
  • 博客访问: 525943
  • 博文数量: 70
  • 博客积分: 3162
  • 博客等级: 中校
  • 技术积分: 850
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-23 13:30
文章分类
文章存档

2013年(1)

2012年(4)

2011年(1)

2010年(7)

2009年(9)

2008年(20)

2007年(3)

2006年(25)

分类: LINUX

2006-03-23 13:37:21

debian默认的网络设置一般是dhcp,启动的时候感觉不爽,如果网络不通,DHCP会反复测试,浪费时间,早就想把DHCP关掉,用静态IP,一直拖着没做,现在把设置方法记录一下,以便以后参考:
1. 修改 /etc/network/interfaces
1)如果设成DHCP:
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet dhcp

2)如果设成静态IP :
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 192.168.20.55
netmask 255.255.224.0
gateway 192.168.10.254

2. 修改 /etc/resolv.conf
如果以前的是dhcp设置,这个不需修改,起码我的机器上是这样,已经自动获取了域名服务器的地址
search xx.com 
nameserver xx.xx.xx.xx
nameserver xx.xx.xx.xx




阅读(1793) | 评论(2) | 转发(0) |
0

上一篇:没有了

下一篇:.net安装时一直提示重启的问题

给主人留下些什么吧!~~

qwdu2008-10-10 14:07:01

看你的设置文件,是adsl拨号上网,这个不用设置ip的,只要dsl up就可以了

awmwdy2008-01-21 15:19:24

你好,我按照了上面的 设置后 ,还是上不了 interfaces #This file describes the network interfaces available on your system #and how to activate them .For more information ,see interfaces(5) #The loopback network interface auto lo inface lo inet loopback #The loopback network interface auto eth0 iface eth0 inet dhcp iface dsl-provider inet ppp provider dsl-provider #please do not modify the following line pre-up /sbin/ifconfig eth0 up #line maintaines by pppoeconf