设为首页收藏本站language 语言切换
查看: 2704|回复: 7
收起左侧

[求助] 关于trace命令

[复制链接]
发表于 2016-1-12 21:37:31 | 显示全部楼层 |阅读模式
3鸿鹄币
大家好:      关于trace命令,我想问下,如果trace 一个目的地址能通,那么是不是一定能ping通(目的地址不禁ping),关于trace的原理一直很模糊,谢谢!

最佳答案

查看完整内容

trace 就是发好多ping包 第一个包TTL=1 第二个=2以此类推,通过他返回的信息知道都经过了哪几个地址,所以 一般能trace通就一定能ping通
发表于 2016-1-12 21:37:32 | 显示全部楼层
trace 就是发好多ping包 第一个包TTL=1 第二个=2以此类推,通过他返回的信息知道都经过了哪几个地址,所以 一般能trace通就一定能ping通
沙发 2016-1-12 21:37:32 回复 收起回复
回复

使用道具 举报

发表于 2016-1-13 09:01:34 | 显示全部楼层
学习了。
板凳 2016-1-13 09:01:34 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2016-1-13 09:36:03 | 显示全部楼层
asd379762019 发表于 2016-1-12 21:42
trace 就是发好多ping包 第一个包TTL=1 第二个=2以此类推,通过他返回的信息知道都经过了哪几个地址,所以  ...

请问,如果ttl=1 但是目的地址需要ttl=5才能到达,那么第一个ping包 根本没到达目的地址,怎么会有回包呢?
地板 2016-1-13 09:36:03 回复 收起回复
回复

使用道具 举报

发表于 2016-1-13 17:33:21 | 显示全部楼层
hereican 发表于 2016-1-13 09:36
请问,如果ttl=1 但是目的地址需要ttl=5才能到达,那么第一个ping包 根本没到达目的地址,怎么会有回包呢 ...

Cisco's trace command, make use of the TTL field. If the router is told to trace the route to a host
address such as 10.11.12.13, the router will send three packets with the TTL set to one; the first
router will decrement it to zero, drop the packets, and send back error messages to the source. By
reading the source address of the error messages, the first router on the path is now known. The
next three packets will be sent with a TTL of two. The first router decrements to one, the second to zero, and  an error message is received from the second router. The third set has a TTL of three, and so forth, until the destination is found. All routers along the internetwork path will have identified
themselves.
5# 2016-1-13 17:33:21 回复 收起回复
回复

使用道具 举报

发表于 2016-1-13 22:11:20 | 显示全部楼层
hereican 发表于 2016-1-13 09:36
请问,如果ttl=1 但是目的地址需要ttl=5才能到达,那么第一个ping包 根本没到达目的地址,怎么会有回包呢 ...

ping 不管成不成功都会有回包的,不成功的回包里会有不成功的原因。
6# 2016-1-13 22:11:20 回复 收起回复
回复

使用道具 举报

发表于 2016-1-14 17:27:17 | 显示全部楼层
hereican 发表于 2016-1-13 09:36
请问,如果ttl=1 但是目的地址需要ttl=5才能到达,那么第一个ping包 根本没到达目的地址,怎么会有回包呢 ...

回的是TTL超时。
7# 2016-1-14 17:27:17 回复 收起回复
回复

使用道具 举报

发表于 2016-1-16 20:14:29 | 显示全部楼层
逐条发送多次直到到达目标地址
第一个包TTL=1,首条接收到后TTL=0仍掉,给源返回一个消息告诉他,接着源发送TTL=2,第2跳路由器接收到后TTL=0仍掉给源返回消息,接着发出TTL=3,直接到达目标地址
其实跟IPV6 最小MTU发现类似,只不过一个是MTU,一个是TTL
8# 2016-1-16 20:14:29 回复 收起回复
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-5-11 14:20 , Processed in 0.066378 second(s), 23 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表