Chinaunix首页 | 论坛 | 博客
  • 博客访问: 174774
  • 博文数量: 46
  • 博客积分: 1445
  • 博客等级: 上尉
  • 技术积分: 448
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-27 22:20
文章分类

全部博文(46)

文章存档

2013年(4)

2012年(12)

2011年(3)

2010年(5)

2009年(16)

2008年(6)

我的朋友

分类: LINUX

2009-04-03 12:08:33

编辑/etc/network/interfaces

加入

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 192.168.0.100
    netmask 255.255.255.0
    gateway 192.168.0.1


address是IP地址
netmask是掩码
gateway是网关
都填你自己的

再指定dns
打开/etc/resolv.conf

nameserver xx.xx.xx.xx
nameserver xx.xx.xx.xx

填入你自己当地的DNS


保存后,重启网卡
执行
sudo /etc/init.d/networking restart
阅读(1189) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

lj8701282009-04-19 22:20:14

请指教一下,我是按照你这么配置的,可是一旦重启之后,网络都没法连接了,请问这是什么回事呢?谢谢!