码迷,mamicode.com
首页 > 其他好文 > 详细

数据包延迟探测方法

时间:2015-04-27 23:30:44      阅读:363      评论:0      收藏:0      [点我收藏+]

标签:

1.udp

The traditional, ancient method of tracerouting. Used by default.

Probe packets are udp datagrams with so-called "unlikely" destination ports. The "unlikely" port of the first probe is 33434, then for each next probe it is incremented by one. Since the ports are expected to be unused, the destination host normally returns "icmp unreach port" as a final response. (Nobody knows what happens when some application listens for such ports, though).

发送udp至很大的udp-port 期望得到"icmp unreach port"报文回复

$ traceroute -M udp -p 2000 www.baidu.com -n -w 1 -q 1 -m 20 | ix

$ traceroute -M udp -p 2000 www.baidu.com -f 12 -m 12 -n -w 1 -q 10 | ix

技术分享

2.icmp

Most usual method for now, which uses icmp echo packets for probes.
If you can ping(8) the destination host, icmp tracerouting is applicable as well.

icmp探测

$ traceroute -M icmp 8.8.8.8 -n -w 1 -q 1 -m 20 | ix

$ traceroute -M icmp 8.8.8.8 -f 8 -m 8 -n -w 1 -q 10 | ix

技术分享

3.tcp

tcp half open to bypass firewall,如果对方tcp服务已开启,这种方式能有效地穿透防火墙

$ traceroute -M tcp -p 443 www.baidu.com -n -w 1 -q 1 -m 20 | ix

$ traceroute -M tcp -p 443 www.baidu.com -f 14 -m 14 -n -w 1 -q 10 | ix

技术分享

4.remotest ping

以上三种方法均失效 将使用udp方式选择出最远的一跳 对其进行测试延迟

$ traceroute -M udp -p 2000 www.baidu.com -n -w 1 -q 1 -m 20 | ix

技术分享

$ traceroute -M udp -p 2000 www.baidu.com -f 12 -m 12 -n -w 1 -q 10 | ix

技术分享

 

数据包延迟探测方法

标签:

原文地址:http://www.cnblogs.com/SwordTao/p/4461555.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!