校内网上不了,各位帮帮忙

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
yeslijing
帖子: 115
注册时间: 2005-08-19 13:46

校内网上不了,各位帮帮忙

#1

帖子 yeslijing » 2005-10-02 10:27

昨天上网还好好的,就是今天一早开机却不行了
我用xp系统上的话就没有问题
那些ip,dns的设定是和windows一样的
但是ping不通网关
为什么会这样的呢
应该怎样办才好
谢谢各位
头像
gnix_oag
帖子: 1994
注册时间: 2005-05-19 18:38
来自: 湖南永州
联系:

#2

帖子 gnix_oag » 2005-10-02 10:32

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

你的也应该是这个问题吧。
yeslijing
帖子: 115
注册时间: 2005-08-19 13:46

#3

帖子 yeslijing » 2005-10-02 10:45

谢谢你的提点
我改了子网还是不行
但听你说是xp作的怪
所以我在bois里面屏蔽掉另外一个硬盘
我是一个硬盘装linux另一个装windows
这样就可以了
头像
oneleaf
论坛管理员
帖子: 10441
注册时间: 2005-03-27 0:06
系统: Ubuntu 12.04

#4

帖子 oneleaf » 2005-10-02 12:18

:shock:
头像
firehare
帖子: 2625
注册时间: 2005-04-10 16:54
来自: 温州大学
联系:

#5

帖子 firehare » 2005-10-02 15:32

这个就有点奇怪了!硬盘居然有这种功能?

能否帖出你的/etc/network/interfaces的文件内容呀?
我心无畏,源自于我心无知。
图片
yeslijing
帖子: 115
注册时间: 2005-08-19 13:46

#6

帖子 yeslijing » 2005-10-02 16:54

# 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

这就是文件里面的东西了
还有我想问一下在命令行里面用什么命令打开呢
就是不用双击那种
谢谢各位帮忙
头像
firehare
帖子: 2625
注册时间: 2005-04-10 16:54
来自: 温州大学
联系:

#7

帖子 firehare » 2005-10-02 18:06

命令行里面用的是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
我心无畏,源自于我心无知。
图片
头像
firehare
帖子: 2625
注册时间: 2005-04-10 16:54
来自: 温州大学
联系:

#8

帖子 firehare » 2005-10-02 18:07

其中少了网络地址和广播地址
另:最好能问到你网关的子网掩码!
我心无畏,源自于我心无知。
图片
yeslijing
帖子: 115
注册时间: 2005-08-19 13:46

#9

帖子 yeslijing » 2005-10-02 18:19

广播地址是什么阿,在xp下的哪里呢
netmask不就是子网掩码吗
network是什么东西呢
假如可以的话告诉我在xp下的哪里,让我去找找看
应为我设网络的时候就是设ip,网关,掩码,dns
其他的不知道
谢谢
头像
firehare
帖子: 2625
注册时间: 2005-04-10 16:54
来自: 温州大学
联系:

#10

帖子 firehare » 2005-10-02 19:21

我已经给你写好了呀!
你只要照抄就行了
网络地址和广播地址就可以通过你的IP地址和子网掩码算出来的,所以在XP中是没有的,但是在Linux下是要求的。如果你是用Gnome上面板中的系统/系统管理/联网图形界面来设置的话,它一般会自动生成,但如果你是写/etc/network/interfaces文件的话,就要手工将其写出了!
我心无畏,源自于我心无知。
图片
yeslijing
帖子: 115
注册时间: 2005-08-19 13:46

#11

帖子 yeslijing » 2005-10-02 21:12

原来是这样的啊,谢谢
我就是通过联网那里设定的
可以告诉我是怎样算出那两个地址的吗
谢谢
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

#12

帖子 eexpress » 2005-10-02 21:53

gnix_oag
说的就应该对了啊。广播地址应该不认说是算的。ipx才用。
● 鸣学
头像
firehare
帖子: 2625
注册时间: 2005-04-10 16:54
来自: 温州大学
联系:

#13

帖子 firehare » 2005-10-02 22:24

当然要算了,如果是C类的话,就是255,但如果你的子网掩码不是255.255.255.0的话,就需要算出来呀!而且要看你的IP是落在哪个网段中的,这样才能算出你的网络地址和广播地址!

不过这个东东说起来比较复杂,还是拿一个具体的例子来算比较好
我心无畏,源自于我心无知。
图片
yeslijing
帖子: 115
注册时间: 2005-08-19 13:46

#14

帖子 yeslijing » 2005-10-02 22:24

请问gnix_oag是怎样用的呢
谢谢
头像
hethe
帖子: 3666
注册时间: 2005-08-01 9:14

#15

帖子 hethe » 2005-10-02 22:45

大哥,帮我也看一下吧:
网关应设为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
上次由 hethe 在 2005-10-02 22:51,总共编辑 1 次。
Gedanken ohne Inhalt sind leer .Anschauungen ohne Begriffe sind blind.
回复