|
情况是这样的:
我以前用的是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 encap ocal 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 |
|