icmp消息类型报告传输_ICMP消息的类型和ICMP消息格式

icmp消息类型报告传输

ICMP shares error reporting and devices status by messages. Messages created by ICMP are divided into 2 categories:

ICMP通过消息共享错误报告和设备状态。 ICMP创建的消息分为两类:

1) Error Reporting Messages

1)错误报告消息

These are messages from which the ICMP reports to errors. The list of common error reporting messages is being given below.

这些是ICMP从中报告错误的消息。 常见错误报告消息的列表如下。

  • Destination Unreachable (Code 3):

    无法到达目的地(代码3):

    If a router cannot locate the path for a packet, then in such an event the packet is discarded and the destination is sent to the destination unreachable message.

    如果路由器无法找到数据包的路径,则在这种情况下,数据包将被丢弃,并且将目标发送到目标不可达消息。

  • Source Quench (Code 4):

    源猝灭(代码4):

    As you know the IP does not have the flow control. The Sending device does not have any information about whether the speed forwarded by the data forwarded by the router forwarding and processing host is according to the host. The IP discards some packets when sending speed is high. In this situation ICMP provides flow control and sends source quench messages to source device.

    如您所知,IP没有流量控制。 发送设备没有有关路由器转发和处理主机转发的数据的转发速度是否符合主机的任何信息。 发送速度较高时,IP会丢弃某些数据包。 在这种情况下,ICMP提供流控制并将源淬灭消息发送到源设备。

  • Redirect (Code 5):

    重定向(代码5):

    Because routing is a dynamic process and only routers participate in it, so a host has information about only one router (gateway). So when this host sends a data, then the data will go through that router to the correct router. In this situation, gateway router redirection message will send so that the host's routing information can be updated and the host can send data directly to the correct router.

    因为路由是一个动态过程,并且只有路由器参与,所以主机仅具有有关一个路由器(网关)的信息。 因此,当该主机发送数据时,数据将通过该路由器到达正确的路由器。 在这种情况下,将发送网关路由器重定向消息,以便可以更新主机的路由信息​​,并且主机可以将数据直接发送到正确的路由器。

  • Time Exceeded (Code 11):

    超过时间(代码11):

    A router uses the routing table to forward any packet. If the routing table is not correct and there are errors, then in such an event, the packet roaps only in the loop. To avoid this situation, every packet contains a time to live field. The value of this field decreases on every router. As soon as the value of this field is zero, this packet is discarded by the router. In this situation, the Time Exceeded message is sent to the router source.

    路由器使用路由表转发任何数据包。 如果路由表不正确并且有错误,则在这种情况下,数据包仅在循环中漫游。 为了避免这种情况,每个数据包都包含一个生存时间字段。 该字段的值在每个路由器上都减小。 一旦该字段的值为零,路由器便会丢弃此数据包。 在这种情况下,“超时”消息将发送到路由器源。

  • Parameter Unintelligible (Code 12):

    参数无法理解(代码12):

    If a router or a destination host packet finds a field empty, then discards that packet and sends the parameter unintelligible message to the source.

    如果路由器或目标主机数据包发现字段为空,则丢弃该数据包并将参数“无法理解”消息发送到源。

2) Query Messages

2)查询讯息

These are the messages from which the ICMP queries for the status of a host. The list of common query messages is being given below with their code.

这些是ICMP从中查询主机状态的消息。 常见查询消息的列表及其代码在下面给出。

  • Echo Request (Code 8) & Echo reply (code 0):

    回音请求(代码8)和回音(代码0):

    This pair of Query Messages is used to diagnose problems in the network. Both of these messages determine whether two hosts can communicate with each other or not.

    这对查询消息用于诊断网络中的问题。 这两个消息都确定两个主机是否可以相互通信。

  • Time-stamp Request (Code 13) & Time stamp Reply (Code 14):

    时间戳记请求(代码13)和时间戳回复(代码14):

    The time it takes to travel a host from one host to another host is detected by time stamp request & reply messages.

    通过时间戳请求和答复消息检测将主机从一台主机传输到另一台主机所花费的时间。

  • Address Mask Request (Code 17) & Address Mask Reply (Code 18):

    地址掩码请求(代码17)和地址掩码回复(代码18):

    A host may be aware of its own IP address but it is not necessary that it is aware of its own subnet mask. To know your subnet mask sends the address mask request to the host router and the router sends this host's subnet mask address as the mask reply message. If the host is aware of the router's address, then he sends the request directly to the router, otherwise this request is broadcast.

    主机可能知道其自己的IP地址,但不必知道其自己的子网掩码。 要知道您的子网掩码将地址掩码请求发送到主机路由器,并且路由器会将该主机的子网掩码地址作为掩码回复消息发送。 如果主机知道路由器的地址,则他将请求直接发送到路由器,否则将广播该请求。

ICMP(Internet控制消息协议)消息格式 (ICMP (Internet Control Message Protocol) Message Format )

So far you learned about 2 types of messages sent by ICMP. Let's now try to know the format of ICMP messages. The format of the lower ICMP message is being showcased below:

到目前为止,您了解了ICMP发送的两种消息。 现在,让我们尝试了解ICMP消息的格式。 下层ICMP消息的格式如下所示:

Although ICMP header is different for each message type, 3 fields of the beginning are similar in all messages. The total size of these 3 fields is 4 byte. These fields are being given in detail.

尽管每种消息类型的ICMP头均不同,但是所有消息中开头的3个字段都相似。 这3个字段的总大小为4个字节。 这些字段正在详细说明。

  • Type:

    类型:

    This defines the type of field message. For example, when doing any type of error report, the code related to that error is defined in this field. Similarly if there is a query message then this field will come in that query's code.

    这定义了字段消息的类型。 例如,执行任何类型的错误报告时,都在此字段中定义了与该错误相关的代码。 同样,如果有查询消息,则该字段将出现在该查询的代码中。

  • Code:

    码:

    For error messages, this defines the sub type of field error. For example, if the destination unreachable error has occurred, then the code field will indicate what type of destination is unreachable error such as network unreachable (code 0), host unreachable (code 1) or protocol unreachable (code 2) error etc. These sub types of Errors are also defined by codes.

    对于错误消息,这定义了字段错误的子类型。 例如,如果发生了目的地不可达错误,则代码字段将指示什么类型的目的地不可达错误,例如网络不可达(代码0),主机不可达(代码1)或协议不可达(代码2)错误等。这些错误的子类型也由代码定义。

  • Checksum:

    校验和:

    The checksum is calculated by the header and the data that is used to detect the errors.

    校验和由标头和用于检测错误的数据计算。

  • Rest of the Header:

    标题的其余部分:

    As you know the ICMP message is encapsulated in the IP datagram. Rest of the header section in the ICMP message shows the remaining IP header.

    如您所知,ICMP消息封装在IP数据报中。 ICMP消息中标头部分的其余部分显示了剩余的IP标头。

  • Data:

    数据:

    In the context of error messages, the packet in this section contains the complete information of the packet.

    在错误消息的上下文中,此部分中的数据包包含该数据包的完整信息。

翻译自: https://www.includehelp.com/computer-networks/types-of-icmp-messages-and-icmp-message-format.aspx

icmp消息类型报告传输

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/545762.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

一文详解「队列」,手撸队列的3种方法!

作者 | 王磊来源 | Java中文社群(ID:javacn666)转载请联系授权(微信ID:GG_Stone)本文已收录至我的 Github《算法图解》系列:https://github.com/vipstone/algorithm前面我们介绍了栈&#xff08…

Oracle11完全卸载方法

一、在oracle11G以前卸载oracle会存在卸载不干净,导致再次安装失败的情况,在运行services.msc打开服务,停止Oracle的所有服务。二、 oracle11G自带一个卸载批处理\app\Administrator\product\11.2.0\dbhome_1\deinstall\deinstall.bat运行该批…

斐波拉切数列

问题陈述: Fibonacci为1200年代的欧洲数学家,在他的著作中曾经提到:若有一只兔子每个月生一只小兔子,一个月后小兔子也开始生产。起始只有一只兔子,一个月后就有两只兔子,二个月后有三只兔子,三…

自定义设置一个屏保程序

用C语言写一个简单的窗口程序&#xff0c;目的是生成一个可视化的图形窗口&#xff0c;需要用到EasyX库&#xff0c;可在文章末尾的网盘链接中下载。该程序退出需左击鼠标&#xff0c;否则无法退出。 #include<stdio.h> #include<stdlib.h> #include<windows.h…

JavaScript中带示例的字符串search()方法

字符串search()方法 (String search() Method) search() is method is a String method, it is used to check whether a substring exists in the given string or not. It returns the starting index of the substring from the string where substring exists. If substrin…

漫画:如何找到链表的倒数第n个结点?

————— 第二天 —————什么意思呢&#xff1f;我们以下面这个链表为例&#xff1a;给定链表的头结点&#xff0c;但并不知道链表的实际长度&#xff0c;要求我们找到链表的倒数第n个结点。假设n3&#xff0c;那么要寻找的结点就是元素1&#xff1a;如何利用队列呢&…

转:开源图形库 c语言-图形图像库 集合

Google三维API O3DO3D 是一个开源的 Web API 用来在浏览器上创建界面丰富的交互式的 3D 应用程序。这是一种基于网页的可控3D标准。此格式期望真正的基于浏览器&#xff0c;独立于操作系统之外&#xff0c;并且支持主流的3D显卡&#xff0c;这样就可以在网页中实现效果逼真的3D…

cacti添加I/O监控

首先下载snmpdiskio-0.9.6.zip,文件不好找&#xff0c;我已经放在本文章的附件里面。解压snmpdiskio-0.9.6.zip复制partition.xml到cacti/resource/snmp_queries/下面[roottest]# cp partition.xml /home/wwwroot/default/cacti/resource/snmp_queries/分别导入模板文件&#x…

数组中的reverse_数组reverse()方法以及JavaScript中的示例

数组中的reverseJavaScript reverse()方法 (JavaScript reverse() method) reverse() method is used to reverse the order of the elements in an array, it changes the actual array and also returns an array with reversed elements. reverse()方法用于反转数组中元素的…

磊哥私藏书单分享,160买400的书!

程序员的节日&#xff08;10.24&#xff09;到了&#xff0c;当当的活动也搞起来了&#xff0c;作为有上进心的你&#xff0c;怎么可能停止学习和进步呢&#xff1f;所以磊哥在当当满 400 元减 200 元的基础上&#xff0c;有要了一个减 40 的劵&#xff0c;也就是只需要花 160 …

ORACLE中使用递归查询

在数据库查询中常常会碰到要查询树形结构的数据&#xff0c;需要用一个字段的数据当做下一条记录的父节点继续查询&#xff0c;如果在不知道有多少级节点的情况下一次次手写SQL查询会很繁琐而没有效率&#xff0c;这时可以使用 oracle中的connect with prior递归算法&#xff1…

linux——回射服务器

回射服务器即客户端发送一段数据给服务器&#xff0c;服务器再将这段数据原封不动的发送给客户端&#xff0c;原理很简单&#xff0c;原理图如下&#xff1a; 以TCP协议为例&#xff0c;客户端、服务器代码如下&#xff1a; ** 服务器&#xff1a; ** #include <stdio.h…

Android 5.0 API 的变化——开发人员注意

Android 5.0 API变化译自 http://developer.android.com/intl/zh-cn/about/versions/android-5.0.html —— By NashLegendSample示例在这里找&#xff1a;https://github.com/googlesamples/原译文在我的github上&#xff1a;https://github.com/NashLegend/ProjectBabel/blob…

dbms标识符无效_DBMS中的聚合运算符(分组依据和具有子句)

dbms标识符无效综合运营商 (Aggregate Operators) To calculate aggregate values, one requires some aggregate operators to perform this task. These operators run over the columns of a relation. The total number of five aggregate operators is supported by SQL a…

Java中的5大队列,你知道几个?

作者 | 王磊来源 | Java中文社群&#xff08;ID&#xff1a;javacn666&#xff09;转载请联系授权&#xff08;微信ID&#xff1a;GG_Stone&#xff09;本文已收录至 https://github.com/vipstone/algorithm 《算法图解》系列。通过前面文章的学习《一文详解「队列」&#xff0…

mysql中int、bigint、smallint 和 tinyint的区别与长度

各种整形&#xff0c;总结留作参考。bigint从 -2^63 (-9223372036854775808) 到 2^63-1 (9223372036854775807) 的整型数据&#xff08;所有数字&#xff09;。存储大小为 8 个字节。int从 -2^31 (-2,147,483,648) 到 2^31 – 1 (2,147,483,647) 的整型数据&#xff08;所有数字…

linux——回射服务器多并发(多进程)

多并发原理如图&#xff0c;多个客户端连接一个服务器&#xff0c;无论哪个客户端发送数据给服务器&#xff0c;服务器都能把数据准确的返回给这个客户端。 在socket编程中&#xff0c;socket这种文件描述符被默认设置为阻塞&#xff0c;故而read函数和accept函数时阻塞函数&a…

算法图解:如何用两个栈实现一个队列?

作者 | 王磊来源 | Java中文社群&#xff08;ID&#xff1a;javacn666&#xff09;转载请联系授权&#xff08;微信ID&#xff1a;GG_Stone&#xff09;本文已收录至 https://github.com/vipstone/algorithm 《算法图解》系列。队列和栈是计算机中两个非常重要的数据结构&#…

notepad++ 偶数行_C ++程序查找前N个偶数的立方和

notepad 偶数行The problem is we have a number N and we have to find sum of first N Even natural numbers. 问题是我们有一个数N &#xff0c;我们必须找到前N个偶数自然数之和。 Example: 例&#xff1a; Input:n 3Output:288 (2^3 4^36^3)A simple solution is give…

Auto activation triggers for Java(代码提示)功能扩展

1.打开Eclipse 后“window”→“Preferences”&#xff0c;选择“java”&#xff0c;展开&#xff0c;“Editor”&#xff0c;选择“Content Assist”。2.选择“Content Assist”&#xff0c;然后看到右边&#xff0c;右边的“Auto-Activation”下面的“Auto Activation trigge…