Chinaunix

标题: ping不能路由却可以ping通机器是为何? [打印本页]

作者: a_day    时间: 2006-06-29 13:04
标题: ping不能路由却可以ping通机器是为何?
在windows 2003 server下输出
tracert 202.150.101.5的结果:
Tracing route to HPL [202.150.101.5]
over a maximum of 30 hops:
  1     1 ms     1 ms     1 ms  202.150.1.2
  2  3675 ms  3820 ms  4038 ms  150.1.4.1
  3   657 ms   715 ms   701 ms  HPL [202.150.101.5]
Trace complete.

ping对方机器的结果:
Pinging 202.150.101.5 with 32 bytes of data:
Reply from 202.150.101.5: bytes=32 time=424ms TTL=126
Reply from 202.150.101.5: bytes=32 time=324ms TTL=126
Reply from 202.150.101.5: bytes=32 time=381ms TTL=126
Reply from 202.150.101.5: bytes=32 time=356ms TTL=126
Ping statistics for 202.150.101.5:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:

    Minimum = 324ms, Maximum = 424ms, Average = 371ms

ping路由的结果:
Pinging 150.1.4.1 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 150.1.4.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

请教为何出现上面情况?我以为ping不通路由就应该ping不通对方机器的。
上面输出是按先后次序进行的,ping完机器后立刻ping路由输出的结果。
说明一下并不是每次ping路由都不通的。
作者: kenduest    时间: 2006-06-29 13:07
你的封包只是通过 router,可以通过不表示你可以连到他。

这样说好了,转送封包与连入到那台机器,基本上是两个层级的。

==
作者: a_day    时间: 2006-06-29 15:01
原帖由 kenduest 于 2006-6-29 13:07 发表
你的封包只是通过 router,可以通过不表示你可以连到他。

这样说好了,转送封包与连入到那台机器,基本上是两个层级的。

==

不明白 不到那台路由它怎么转送封包?
作者: platinum    时间: 2006-06-29 15:13
记住这是正常现象就是了,可以转发但未必可以 ping 通
若要细研究,还要自己去看书了,具体原理一句两句无法解释清楚
作者: liaozhigang    时间: 2006-06-29 15:32
提示: 作者被禁止或删除 内容自动屏蔽
作者: fish007    时间: 2006-06-29 15:35
建议看<<tcp/ip详解>>第二版,把那本书弄懂了你就是大师级人物了
作者: ippen    时间: 2006-06-29 15:45
其实套用linux路由转发机制,你可以理解为----路由是通过forward链,而ping是进入主机,使经过input链,能通过路由器,即使forward链允许你的数据包通过,不能ping通就是input链禁止你的数据包通过

其实基本的路由机制都是差不多这种方式,只是在不同的硬件和软件环境实现的具体方法不同而已
作者: a_day    时间: 2006-06-29 22:53
谢谢诸位!
作者: beyondfly    时间: 2006-06-30 14:06
学习了,我对这方面也不很了解




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2