分页: 1 / 2
校内网上不了,各位帮帮忙
发表于 : 2005-10-02 10:27
由 yeslijing
昨天上网还好好的,就是今天一早开机却不行了
我用xp系统上的话就没有问题
那些ip,dns的设定是和windows一样的
但是ping不通网关
为什么会这样的呢
应该怎样办才好
谢谢各位
发表于 : 2005-10-02 10:32
由 gnix_oag
viewtopic.php?t=2735&postdays=0&postorder=asc&start=30
我的也是用网关上网的,
网关是192.168.0.2
我的ip是192.168.5.20
在XP中 子网掩码用255.255.255.0 能上网
在linux 下就不能,
子网掩码要用 255.255.0.0 就能上网,
好象是 XP 没按规则办事
按理子网掩码是 255.255.255.0 是找不到 192.168.0.2
你的也应该是这个问题吧。
发表于 : 2005-10-02 10:45
由 yeslijing
谢谢你的提点
我改了子网还是不行
但听你说是xp作的怪
所以我在bois里面屏蔽掉另外一个硬盘
我是一个硬盘装linux另一个装windows
这样就可以了
发表于 : 2005-10-02 12:18
由 oneleaf
发表于 : 2005-10-02 15:32
由 firehare
这个就有点奇怪了!硬盘居然有这种功能?
能否帖出你的/etc/network/interfaces的文件内容呀?
发表于 : 2005-10-02 16:54
由 yeslijing
# 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
iface lo inet loopback
# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth0
iface eth0 inet static
address 192.168.0.140
netmask 255.255.255.0
gateway 192.168.0.1
auto eth0
这就是文件里面的东西了
还有我想问一下在命令行里面用什么命令打开呢
就是不用双击那种
谢谢各位帮忙
发表于 : 2005-10-02 18:06
由 firehare
命令行里面用的是more /etc/network/interfaces 就可以看到文件内容了!
不过看你的配置好象没有什么问题!
但是好象不是很完全,完全的应该是如下所示:
代码: 全选
# The primary network interface
iface eth0 inet static
address 192.168.0.140
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
发表于 : 2005-10-02 18:07
由 firehare
其中少了网络地址和广播地址
另:最好能问到你网关的子网掩码!
发表于 : 2005-10-02 18:19
由 yeslijing
广播地址是什么阿,在xp下的哪里呢
netmask不就是子网掩码吗
network是什么东西呢
假如可以的话告诉我在xp下的哪里,让我去找找看
应为我设网络的时候就是设ip,网关,掩码,dns
其他的不知道
谢谢
发表于 : 2005-10-02 19:21
由 firehare
我已经给你写好了呀!
你只要照抄就行了
网络地址和广播地址就可以通过你的IP地址和子网掩码算出来的,所以在XP中是没有的,但是在Linux下是要求的。如果你是用Gnome上面板中的系统/系统管理/联网图形界面来设置的话,它一般会自动生成,但如果你是写/etc/network/interfaces文件的话,就要手工将其写出了!
发表于 : 2005-10-02 21:12
由 yeslijing
原来是这样的啊,谢谢
我就是通过联网那里设定的
可以告诉我是怎样算出那两个地址的吗
谢谢
发表于 : 2005-10-02 21:53
由 eexpress
gnix_oag
说的就应该对了啊。广播地址应该不认说是算的。ipx才用。
发表于 : 2005-10-02 22:24
由 firehare
当然要算了,如果是C类的话,就是255,但如果你的子网掩码不是255.255.255.0的话,就需要算出来呀!而且要看你的IP是落在哪个网段中的,这样才能算出你的网络地址和广播地址!
不过这个东东说起来比较复杂,还是拿一个具体的例子来算比较好
发表于 : 2005-10-02 22:24
由 yeslijing
请问gnix_oag是怎样用的呢
谢谢
发表于 : 2005-10-02 22:45
由 hethe
大哥,帮我也看一下吧:
网关应设为56.19.64.1
但是我在sudo kcmshell kcm_knetworkconfmodule 中(我用的kde),每次改的值一确定。再打开就没有了,而且好像配置文件里面也没有,自己加上也没用。
# 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
iface lo inet loopback
address 127.0.0.1
netmask 255.0.0.0
# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth0
# The primary network interface
iface eth0 inet static
address 58.19.65.78
netmask 255.0.0.0
iface eth1 inet dhcp
auto eth0