LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 772|回复: 5

遇到lenny的网络问题

[复制链接]
发表于 2009-9-7 10:40:06 | 显示全部楼层 |阅读模式
安装完lenny后发现上网5分钟不到就解析不了域名了,dns已经设置成我们这电信的了,必须重新插拔一次网线才能继续。。。以前从没遇到过这样的问题,啥原因呢?
发表于 2009-9-7 16:34:34 | 显示全部楼层
是拨号上网?把cat /etc/network/interfaces、ifconfig和route -N 运行结果贴出看下
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-9-8 09:34:27 | 显示全部楼层
debian:~# cat /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
auto eth0
iface eth0 inet static
        address 192.168.0.124
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        # dns-* options are implemented by the resolvconf package, if installed
        #       dns-nameservers 218.2.135.1

# eth0:1
auto eth0:1
iface eth0:1 inet static
address 192.168.0.125
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
debian:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:24:21:58:13:f4
          inet addr:192.168.0.124  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::224:21ff:fe58:13f4/64 Scopeink
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:26917 errors:0 dropped:1017590213 overruns:0 frame:0
          TX packets:985 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1838728 (1.7 MiB)  TX bytes:579984 (566.3 KiB)
          Interrupt:221

eth0:1    Link encap:Ethernet  HWaddr 00:24:21:58:13:f4
          inet addr:192.168.0.125  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:221

lo        Link encapocal Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:3852 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3852 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2151687 (2.0 MiB)  TX bytes:2151687 (2.0 MiB)

debian:~# route -N
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
回复 支持 反对

使用道具 举报

发表于 2009-9-8 10:42:02 | 显示全部楼层
你如果是拨号上网把网关注释掉:
# The primary network interface
#allow-hotplug eth0
auto eth0
iface eth0 inet static
address 192.168.0.124
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
#gateway 192.168.0.1
# dns-* options are implemented by the resolvconf package, if installed
# dns-nameservers 218.2.135.

是不是定义了一个不存在的网关?
回复 支持 反对

使用道具 举报

发表于 2009-9-8 10:47:54 | 显示全部楼层
在你网络通时:
tracert www.google.com
贴出结果
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-9-10 22:03:11 | 显示全部楼层
把网关注释的话就上不了了,这个网关是路由的。

很奇怪怎么会出现这样的问题?!现在怀疑是路由的问题了,因为换了个带负载平衡的路由,然后接了3条ADSL进来,如果是路由的问题的话,那原来用的CentOS倒是一直好好的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表