LinuxSir.cn,穿越时空的Linuxsir!

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

还是上不了网

[复制链接]
发表于 2007-9-13 13:42:00 | 显示全部楼层 |阅读模式
情况是这样的:
我以前用的是suse,我也安装了一个suse,网卡驱动没有问题,就是配
置问题。

我按windows下的配置
ip      10.28.26.78
netmask 255.255.255.0
gateway 10.28.0.1

上不了网,可windows下可以上网啊。我把netmask改成255.255.0.0等试过,都不行。(不要说网线插好没,同一台机子,windows下可以上网)


今天安装了一个ubuntu,一样的问题,也上不了网。

如果netmask是255.255.0.0
ping 网关情况为:
lxy@lxy-fudan:~$ ping 10.28.0.1
PING 10.28.0.1 (10.28.0.1) 56(84) bytes of data.
From 10.28.26.78 icmp_seq=3 Destination Host Unreachable
From 10.28.26.78 icmp_seq=4 Destination Host Unreachable


如果 netmask为其它的(255.0.0.0或255.255.255.0)
ping 网关情况为:
lxy@lxy-fudan:~$ ping 10.28.0.1
connect: Network is unreachable



还有一个情况是,我在vmware里都安装了suse和ubuntu,也是这样配置(分配独立ip,ne
tmask为255.255.0.0),却可以上网。


每次更改了设置,我都重启了网络的。


lxy@lxy-fudan:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1A:4D:9C:89:46
          inet addr:10.28.26.78  Bcast:10.28.255.255  Mask:255.255.0.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:17 Base address:0x6000

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:565 errors:0 dropped:0 overruns:0 frame:0
          TX packets:565 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:55421 (54.1 KiB)  TX bytes:55421 (54.1 KiB)


lxy@lxy-fudan:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
10.28.0.0       0.0.0.0         255.255.0.0     U     0      0        0 eth0
0.0.0.0         10.28.0.1       0.0.0.0         UG    0      0        0 eth0
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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