traceroute原理

ICMP

ICMP全称为Internet Control Message Protocol,即,网络控制报文协议。

当一个IP数据报发送失败时,最后一个路由器会向发送发传递一条ICMP报文以报告错误。

traceroute利用此特性来探测路由。

原理如下,构造一份非法的数据,通过IP协议发送。第一份报文设置TTL为1,这样,第一个路由收到之后,就会给发送主机报告一个错误,这样,发送主机就知道此路由的第一跳。接着,设置TTL为2再次发送,第二个路由器也会报告错误。以此类推。

traceroute在windows上的名称为tracert。

C:\Users\Administrator>tracert www.baidu.com

通过最多 30 个跃点跟踪
到 www.a.shifen.com [180.97.33.108] 的路由: 1 1 ms 1 ms 1 ms 192.168.1.1
2 14 ms 22 ms 13 ms 100.64.0.1
3 5 ms 6 ms 8 ms 218.2.131.217
4 5 ms 7 ms 6 ms 202.102.69.26
5 * * * 请求超时。
6 10 ms 6 ms 5 ms 180.97.32.86
7 5 ms 5 ms 3 ms 10.203.195.2
8 6 ms 3 ms 3 ms 180.97.33.108

*:first-child {
margin-top: 0 !important;
}

body>*:last-child {
margin-bottom: 0 !important;
}

/* BLOCKS
=============================================================================*/

p, blockquote, ul, ol, dl, table, pre {
margin: 15px 0;
}

/* HEADERS
=============================================================================*/

h1, h2, h3, h4, h5, h6 {
margin: 20px 0 10px;
padding: 0;
font-weight: bold;
-webkit-font-smoothing: antialiased;
}

h1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, h5 tt, h5 code, h6 tt, h6 code {
font-size: inherit;
}

h1 {
font-size: 28px;
color: #000;
}

h2 {
font-size: 24px;
border-bottom: 1px solid #ccc;
color: #000;
}

h3 {
font-size: 18px;
}

h4 {
font-size: 16px;
}

h5 {
font-size: 14px;
}

h6 {
color: #777;
font-size: 14px;
}

body>h2:first-child, body>h1:first-child, body>h1:first-child+h2, body>h3:first-child, body>h4:first-child, body>h5:first-child, body>h6:first-child {
margin-top: 0;
padding-top: 0;
}

a:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {
margin-top: 0;
padding-top: 0;
}

h1+p, h2+p, h3+p, h4+p, h5+p, h6+p {
margin-top: 10px;
}

/* LINKS
=============================================================================*/

a {
color: #4183C4;
text-decoration: none;
}

a:hover {
text-decoration: underline;
}

/* LISTS
=============================================================================*/

ul, ol {
padding-left: 30px;
}

ul li > :first-child,
ol li > :first-child,
ul li ul:first-of-type,
ol li ol:first-of-type,
ul li ol:first-of-type,
ol li ul:first-of-type {
margin-top: 0px;
}

ul ul, ul ol, ol ol, ol ul {
margin-bottom: 0;
}

dl {
padding: 0;
}

dl dt {
font-size: 14px;
font-weight: bold;
font-style: italic;
padding: 0;
margin: 15px 0 5px;
}

dl dt:first-child {
padding: 0;
}

dl dt>:first-child {
margin-top: 0px;
}

dl dt>:last-child {
margin-bottom: 0px;
}

dl dd {
margin: 0 0 15px;
padding: 0 15px;
}

dl dd>:first-child {
margin-top: 0px;
}

dl dd>:last-child {
margin-bottom: 0px;
}

/* CODE
=============================================================================*/

pre, code, tt {
font-size: 12px;
font-family: Consolas, "Liberation Mono", Courier, monospace;
}

code, tt {
margin: 0 0px;
padding: 0px 0px;
white-space: nowrap;
border: 1px solid #eaeaea;
background-color: #f8f8f8;
border-radius: 3px;
}

pre>code {
margin: 0;
padding: 0;
white-space: pre;
border: none;
background: transparent;
}

pre {
background-color: #f8f8f8;
border: 1px solid #ccc;
font-size: 13px;
line-height: 19px;
overflow: auto;
padding: 6px 10px;
border-radius: 3px;
}

pre code, pre tt {
background-color: transparent;
border: none;
}

kbd {
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
-moz-border-right-colors: none;
-moz-border-top-colors: none;
background-color: #DDDDDD;
background-image: linear-gradient(#F1F1F1, #DDDDDD);
background-repeat: repeat-x;
border-color: #DDDDDD #CCCCCC #CCCCCC #DDDDDD;
border-image: none;
border-radius: 2px 2px 2px 2px;
border-style: solid;
border-width: 1px;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
line-height: 10px;
padding: 1px 4px;
}

/* QUOTES
=============================================================================*/

blockquote {
border-left: 4px solid #DDD;
padding: 0 15px;
color: #777;
}

blockquote>:first-child {
margin-top: 0px;
}

blockquote>:last-child {
margin-bottom: 0px;
}

/* HORIZONTAL RULES
=============================================================================*/

hr {
clear: both;
margin: 15px 0;
height: 0px;
overflow: hidden;
border: none;
background: transparent;
border-bottom: 4px solid #ddd;
padding: 0;
}

/* TABLES
=============================================================================*/

table th {
font-weight: bold;
}

table th, table td {
border: 1px solid #ccc;
padding: 6px 13px;
}

table tr {
border-top: 1px solid #ccc;
background-color: #fff;
}

table tr:nth-child(2n) {
background-color: #f8f8f8;
}

/* IMAGES
=============================================================================*/

img {
max-width: 100%
}
-->

traceroute原理的更多相关文章

  1. Traceroute原理介绍

    一.路由追踪 路由跟踪,就是获取从主机A到达目标主机B这个过程中所有需要经过的路由设备的转发接口IP. 二.ICMP协议 Internet控制报文协议(internet control message ...

  2. ping traceroute原理

    ping命令工作原理 ping命令主要是用于检测网络的连通性. Ping命令发送一个ICMP请求报文给目的IP,然后目的IP回复一个ICMP报文. 原理:网络上的机器都有唯一确定的IP地址,我们给目标 ...

  3. tracert/traceroute原理

    一.路由追踪程序traceroute/tracert Traceroute是Linux和Mac OS等系统默认提供的路由追踪小程序,Tracert是Windows系统默认提供的路由追踪小程序.二者的功 ...

  4. 同一个目标ip在windows下使用tracert正常但是在linux下使用traceroute中间节点不显示?tracert与traceroute原理与抓包分析

    针对第一个问题先说结论 windows的tracert是使用icmp来探路,linux的traceroute是使用udp探测,如果想达到和windows下一个效果,建议使用-I参数或mtr 下面是原理 ...

  5. ping、traceroute原理

    说明:忘记从哪里拉的博文了,感谢! ping 用类型码为0的ICMP发请 求,受到请求的主机则用类型码为8的ICMP回应. ping程序来计算间隔时间,并计算有多少个包被送达.用户就可以判断网络大致的 ...

  6. ping & traceroute 原理

    说明: 忘记从哪里看到的原文了. 不过我应该进行了大刀阔斧的删选. ping 用类型码为0的ICMP发请 求,受到请求的主机则用类型码为8的ICMP回应. ping程序来计算间隔时间,并计算有多少个包 ...

  7. [svc]traceroute(udp+icmp)&tracert(icmp)原理

    2018年4月11日 11:41:29更新 工具 发包 触发点 结局 traceroute 初始发udp包 ttl递增,icmp每一跳报ttl超时 udp端口不可达 tracert 初始发icmp r ...

  8. traceroute小结 come from CSDN author:houdong

    traceroute程序可以使我们看到IP数据报从一台主机传到另一台主机的所经过的路由,并且可以使用IP源站路由选项. traceroute取代IP RR的原因 1 不是所有的路由器都支持IP RR选 ...

  9. [转]Traceroute网络排障实用指南(2)

    五.优先级与限速 5.1 Traceroute延时判断影响因素 Traceroute延时包括三点: 探测包到达一个特定路由器的时间 路由器生成IPMI TTL Exceed的时间 ICMP TTL E ...

随机推荐

  1. FeatureClass对象

    概述: 在讲述FeatureClass对象之前,首先说明与FeatureClass对象相关的对象: Table对象,是不具有空间信息的二维表,是一张仅能在ArcMap的Table Of Content ...

  2. ORACLE基本SQL语句-添加更新数据函数篇

    一.添加数据 /*添加数据*/insert into STU values('stu0004','赵一',18,1,"kc0004");insert into STU(STU_ID ...

  3. Objective-C 类型判断

    可以通过 isKindOfClass 判断对象的类型 @interface A : NSObject @end @implementation A @end //// @interface AA : ...

  4. 生产环境 tomcat中启动缓慢

    具体的原因没研究,大概是一个随机数种子生成的速度拖慢了,直接copy一份解决方案,属于备忘材料 解决 有两种解决办法: 1)在Tomcat环境中解决 可以通过配置JRE使用非阻塞的Entropy So ...

  5. string的一些操作,类似数组

    1.串的切割 var a="hello world";//a.length=11 alert(a.slice(3)); alert(a.substring(3)); alert(a ...

  6. 3步学会用gulp

    1.安装gulp 安装gulp到全局:npm install -g gulp 安装gulp到某个项目:npm install --save gulp 注意:请先安装nodejs(自带npm) 2.创建 ...

  7. HTML&CSS基础学习笔记1.24-input标签的单选与多选

    单选和多选 单选框和多选框是用<input>标签来实现的. <input>标签的type属性值为"checkbox"时,表示多选框,为"radio ...

  8. GoogLeNet学习心得

    转自:http://blog.csdn.net/liumaolincycle/article/details/50471289#t0 综述: http://blog.csdn.net/sunbaigu ...

  9. C语言里面关于数组的一个容易忽视的小细节

    ginobili@VM_44_28_sles10sp1:~/code> cat test3.cpp #include <stdio.h> int main(){ char a[5] ...

  10. directive 指令

    参考文章 : http://www.zouyesheng.com/angular.html#toc20    18. 自定义指令directive http://blog.jobbole.com/62 ...