ubuntu能ping通网关,但不能ping通外网

ubuntu server 9.10
能ping通网关,但不能ping通外网。但将此机子的IP用在一个XP的机子上,却能顺利连接外网!

/etc/network/interfaces

# 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

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.30.253
netmask 255.255.255.0
network 192.168.30.0
broadcast 192.168.30.222
gateway 192.168.30.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.30.1
————————————————————————————————
Ethernet adapter 本地连接:

Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Realtek RTL8169/8110 Family Gigabit Ethernet NIC

Physical Address. . . . . . . . . : 00-11-12-45-32-8A

Dhcp Enabled. . . . . . . . . . . : No

IP Address. . . . . . . . . . . . : 192.168.30.78

Subnet Mask . . . . . . . . . . . : 255.255.255.0

Default Gateway . . . . . . . . . : 192.168.30.222

DNS Servers . . . . . . . . . . . : 202.103.44.150
上面的参数 ,大家不用关心,最新的参数请见我在 cmcc772下整理的 配置提示信息! 谢谢大家的帮助

下面我重新整理一下:

————————这是 ubuntu的配置:————————————
# 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

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.30.253
netmask 255.255.255.0
network 192.168.30.0
broadcast 192.168.30.255
gateway 192.168.30.254
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.30.254
———————这是xp的网络参数———————————————
Windows IP Configuration
Host Name . . . . . . . . . . . . : lenovo

Primary Dns Suffix . . . . . . . :

Node Type . . . . . . . . . . . . : Unknown

IP Routing Enabled. . . . . . . . : No

WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地连接:
Connection-specific DNS Suffix . :

Description . . . . . . . . . . . : Realtek RTL8169/8110 Family Gigabit Ethernet NIC

Physical Address. . . . . . . . . : 00-13-22-45-32-8A

Dhcp Enabled. . . . . . . . . . . : No

IP Address. . . . . . . . . . . . : 192.168.30.3

Subnet Mask . . . . . . . . . . . : 255.255.255.0

Default Gateway . . . . . . . . . : 192.168.30.254

DNS Servers . . . . . . . . . . . : 202.103.44.150

————————————————————————————

二楼说的可能是正确的:网关或要ping的服备器对ping命令进行了屏蔽。
无论是在ubuntu还是xp中,ping外网的IP都是失败的!

但是我在xp 下
C:\Documents and Settings\Administrator>telnet 119.147.15.13 25
却能得到服务器响应;
119.147.15.13 是tencent的一个服务器地址,
telnet 119.147.15.13 25的含义是 登录腾讯的 smtp

可我在ubuntu上执行同样的命令却得不到服务器的响应,我觉得ubuntu还是不能连接外网,请问各位高手怎么搞定啊???????
———————————————————————————————
{123.4.45.* 2010-4-29 12:55}******* 的回答是对的,公司的网管把网关的ping给关了。
———————————————————————————————

———————————————————————————————

【 blackfriday13】
(buntu的dns没有设置对,需要在另外的地方配置的)******* 我现在只想网通,对于的DNS的配置,我想在网通后再去设置;
(在XP界面能用putty控制ubuntu——由于是内网,所以不需要通过网关。) ******* 我对“网关”的理解是充当数据中转的中心结点可以称作网关,公司的192.168.30.222这个电脑既为内网间的电脑相互交换数据,又为内网电脑与外网提供链接;
(你不用把xp的ip用在ubuntu上,你只要把网关和dns弄对就可以了)******* 有时候公司的一些IP能上,一些IP能上,我想尽量减少差异才这样做的;
(你提供的win和ubuntu的ip对照是不一样的,ubuntu里是192.168.30.1的网关及dns,而win里确是192.168.30.222的网关,dns是202.103.44.150 )******* 请见本栏提供的配置信息,上面的参数有误,会误导您的帮助!再次谢谢!
———————————————————————————————
温馨提示:答案为网友推荐,仅供参考
第1个回答  2010-04-29
dns设置不正确,可能网关也不对,你一会是192.168.30.222,一会又变东成192.168.30.1,最后又变成了192.168.30.254,不知道到底是哪一个。另外,如果不能ping外网,可能是网关或要ping的服备器对ping命令进行了屏蔽,所以不会响应ping命令。
第2个回答  2010-05-02
同一个子网,也就是同网段内,是不需要网关的,所以,putty不能说明网关是好的问题。

还有就是你的验证方法可能有问题的,telnet被linux支持吗?本回答被提问者采纳
相似回答