`

ICMP

 
阅读更多

ICMP

网络控制消息协定(英文:Internet Control Message Protocol,ICMP)是网路协议族的核心协议之一。它用于 TCP/IP 网络中发送控制消息,提供可能发生在通信环境中的各种问题反馈,通过这些信息,令管理者可以对所发生的问题作出诊断,然后采取适当的措施解决。

ICMP依靠IP来完成它的任务,它是IP的主要部分。它与传输协议,如TCP和UDP显著不同:它一般不用于在两点间传输数据。它通常不由网络程序直接使用,除了ping和traceroute这两个特别的例子。 IPv4中的ICMP被称作ICMPv4,IPv6中的ICMP则被称作ICMPv6。

技术细节:
ICMP是在RFC 792中定义的互联网协议族之一。通常用于返回的错误信息或是分析路由。ICMP错误消息总是包括了源数据并返回给发送者。 ICMP错误消息的例子之一是TTL值过期。每个路由器在转发数据报的时候都会把ip包头中的TTL值减一。如果TTL值为0,“TTL在传输中过期”的消息将会回报给源地址。 每个ICMP消息都是直接封装在一个IP数据包中的,因此,和UDP一样,ICMP是不可靠的。

虽然ICMP是包含在IP数据包中的,但是对ICMP消息通常会特殊处理,会和一般IP数据包的处理不同,而不是作为IP的一个子协议来处理。在很多时候,需要去查看ICMP消息的内容,然后发送适当的错误消息到那个原来产生IP数据包的程序,即那个导致ICMP讯息被传送的IP数据包。

很多常用的工具是基于ICMP消息的。traceroute是通过发送包含有特殊的TTL的包,然后接收ICMP超时消息和目标不可达消息来实现的。 ping则是用ICMP的"Echo request"(类别代码:8)和"Echo reply"(类别代码:0)消息来实现的。

 

Tracert

23 out of 45 rated this helpful - Rate this topic

 

Tracert is a route tracing utility that display a list of near-side router interfaces of the routers along the path between a source host and a destination. Tracert uses the IP TTL field in ICMP Echo Requests and ICMP Time Exceeded messages to determine the path from a source to a destination through an IP internetwork.

 

Note that some routers silently drop packets with expired TTLs. These routers do not appear in the Tracert display.

 

How Tracert Works

 

Tracert works by incrementing the TTL value by one for each ICMP Echo Request it sends, then waiting for an ICMP Time Exceeded message. The TTL values of the Tracert packets start with an initial value of one; the TTL of each trace after the first is incremented by one. A packet sent out by Tracert travels one hop further on each successive trip.

 

Figure 3.2 shows how Tracert works. Tracert is being run on Host A, and is following the path to Host B. At Router 1 and Router 2, the TTL is decremented to 0, causing each router to send an ICMP Time Exceeded message. When the ICMP Echo Request is received at Host B, it sends back an ICMP Echo Reply.

Cc940128.CNBD02(en-us,TechNet.10).gif

Figure 3.2 Step-by-Step Operation of the Tracert Tool

 

note-iconNote

 

The UNIX version of Tracert performs the same function as the Windows version except that the IP payload is a UDP packet addressed to a (presumably) unknown destination UDP port. Intermediate routers send back ICMP Time Expired messages recording the route taken and the final destination sends back an ICMP Destination Unreachable-Port Unreachable message.

 

The UDP payload from the UNIX Tracert tool can cross routers and firewalls, whereas the ICMP Echo Request messages might not due to ICMP filtering. To avoid this problem in Windows 2000, turn off packet filtering as described in "Check Packet Filtering" later in this chapter, then try using Tracert again.

 

分享到:
评论

相关推荐

    ICMP timestamp请求响应漏洞 修复 Traceroute探测漏洞 修复 linux 7

    ICMP timestamp请求响应漏洞 修复 Traceroute探测漏洞 修复 使用firewall-cmd打开关闭防火墙与端口 linux 7 ICMP timestamp请求响应漏洞 修复 Traceroute探测漏洞 修复 使用firewall-cmd打开关闭防火墙与端口 linux ...

    IP协议ICMP协议分析实验报告

    Ping命令使用的ICMP协议中的回送请求和回送响应,所以可以使用协议分析软件通过使用ping命令来抓包,分析IP协议和ICMP协议的工作过程。 4. 实验步骤 (1) 打开192.168.0.204主机的命令行,打开抓包软件wireshark开始...

    计算机网络--ICMP

    该文档是关于计算机网络中实验ICMP部分的答案。题目为英文,如下,答案为中文,部分有图文解释。 Ethereal Lab: ICMP Version: July 2005 © 2005 J.F. Kurose, K.W. Ross. All Rights Reserved Computer Networking...

    QtICMP-master.zip_Qt ICMP_Qt ICMP_QtICMP_anyway2is

    基于Qt的icmp协议,适合Linux的网络协议开发!

    ICMP 的说明与解释

    ICMP 的说明与解释ICMP 的说明与解释ICMP 的说明与解释ICMP 的说明与解释

    基于ICMP主机扫描

    基于ICMP主机扫描c#程序,简单地实现多ICMP协议的工作原理

    代码实现ICMP信息调用

    ICMP协议首部的数据结构 ----------------------------------------------------------------------------------------------------------------------- */ struct icmp_header { unsigned int icmp_type; ...

    ICMP协议简单讲解

    在整个 TCP/IP 协定家族中,对 "使用者" 来说,ICMP 恐怕是易忽略的协定了。关于前面所讨论的协定,真要能发挥工作的前提条件是:"假设一切都没问题" 。然而,在当今如此复杂的网路环境中,前述条件恐怕是没办法保证...

    ICMP报文的格式和种类

    ICMP报文的格式和种类 包括了各种的详细信息关于icmp的

    在Win2000中怎么关闭ICMP

    ICMP协议有一个特点---他是无连结的,也就是说只要发送端完成ICMP报文的封装并传递给路由器,这个报文将会象邮包相同自己去寻找目的地址,这个特点使得ICMP协议非常灵活快捷,不过同时也带来一个致命的缺陷---易伪造...

    icmp-ip 重定向.rar

    ( icmp-ip 重定向.rar ) ICMP redirect 关闭: 接口下:no ip rediect 连接路由器都开启了重定向功能,HOST A的默认网关是1.1.1.1 .当HOST A要和外部的主机HOST B进行通信的时候,会把数据报文交给默认网关RT1.然而...

    Java如何处理ICMP报文的收发

    显示如何利用Java进行ICMP网络报文的收发,启发如何利用Java进行网络底层协议的开发。

    基于ICMP的端口扫描

    基于ICMP的端口扫描, VC实现,原始套接字编程, 通过发ICMP包来实现端口扫描

    ICMP时间戳请求发送

    一个对ICMP时间戳请求报文发送的实现。网上大部分是linux的代码,CPP的很少,这里上传一个CPP的

    ICMP协议的程序语言实现

    ICMP就是所谓的Internet控制报文协议(Internet Control Message Protocol),在网络中,一般用它来传递差错报文以及其他应注意的信息。ICMP一般被认为是和IP协议同一层的协议,IMCP报文通常被IP层或者更高层的协议...

    icmp协议ping程序实现

    ICMP[version 4]的echo报文运用,模拟ping命令实现pingy命令

    ccnp/ccna习题之三 研究 ICMP 数据包

    了解 ICMP 数据包的格式 使用 Packet Tracer 捕获并研究 ICMP 报文

    icmp 源路由.rar

    ( icmp 源路由.rar ) R1 -------------------R2-------------------R3 三台都只配置ip,没有配置任何路由 r3#ping ip Target IP address: 192.168.12.1 Repeat count [5]: Datagram size [100]: Timeout in ...

    ICMP重定向介绍,ICMP重定向介绍

    ICMP重定向介绍ICMP重定向介绍ICMP重定向介绍

    ICMP协议仿真C++代码

    ICMP协议仿真C++代码,// TODO: Add your command handler code here if (IsRun) { MessageBox("网络监测时,不能网段探测!","提示"); return; } CNetIpDlg dlg; if(dlg.DoModal()==IDOK) { char ...

Global site tag (gtag.js) - Google Analytics