Chinaunix首页 | 论坛 | 博客
  • 博客访问: 57527
  • 博文数量: 20
  • 博客积分: 101
  • 博客等级: 民兵
  • 技术积分: 125
  • 用 户 组: 普通用户
  • 注册时间: 2011-12-09 00:54
文章分类
文章存档

2012年(3)

2011年(17)

分类:

2011-12-14 02:10:56

原文地址:traceroute出现*的分析 作者:xiaolilinux

[root@acer ~]# traceroute  -w  20    xiyou.edu.cn
traceroute to xiyou.edu.cn (202.117.128.8), 30 hops max, 60 byte packets
 1  192.168.1.100 (192.168.1.100)  0.220 ms  0.200 ms  0.187 ms
 2  222.24.12.1 (222.24.12.1)  0.700 ms  0.935 ms  0.928 ms
 3  222.24.63.65 (222.24.63.65)  0.908 ms  1.371 ms  1.895 ms
 4  222.24.63.1 (222.24.63.1)  5.830 ms  6.817 ms  7.798 ms
 5  * * *
 6  * * *
 7  * * *
 8  * * *
 9  * * *
10  * * *
11  * * *
12  * * *
13  * * *
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *
[root@acer ~]# traceroute  -w  20    222.24.21.240
traceroute to 222.24.21.240 (222.24.21.240), 30 hops max, 60 byte packets
 1  192.168.1.100 (192.168.1.100)  0.240 ms  0.214 ms  0.201 ms
 2  222.24.12.1 (222.24.12.1)  0.817 ms  1.038 ms  1.346 ms

 3  222.24.21.240 (222.24.21.240)  1.266 ms !X  1.262 ms !X  1.250 ms !X
[root@acer ~]#
[root@acer ~]# traceroute  -w  5    222.24.21.240
traceroute to 222.24.21.240 (222.24.21.240), 30 hops max, 60 byte packets
 1  192.168.1.100 (192.168.1.100)  0.245 ms  0.231 ms  0.217 ms
 2  222.24.12.1 (222.24.12.1)  0.814 ms  0.959 ms  0.945 ms
 3  222.24.21.240 (222.24.21.240)  0.734 ms !X  0.734 ms !X  0.722 ms !X


你要好好理解一下 ICMP traceroute的原理就知道了

使用ICMP Echo Request, Echo Reply and TTL-expired.

源发出 ICMP Equest,第一个request的TTL为1,第二个request的TTL为2,以后依此递增直至第30个;
中间的router送回ICMP TTL-expired ( ICMP type 11) 通知source,(packet同时因TTL超时而被drop),
由此source知晓一路上经过的每一个router;最后的destination 送回ICMP Echo Reply(最后一跳不会再
回ICMP TTL-expired)。

所以中间任何一个router上如果封了ICMP Echo Request, traceroute就不能工作;如果封了type 11
 (TTL-expired), 中间的router全看不到,但能看到packet 到达了最后的destination;
如果封了ICMP Echo Reply,中间的全能看到,最后的destination看不到。
阅读(1017) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~