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消息類型報告傳輸
總結
以上是生活随笔為你收集整理的icmp消息类型报告传输_ICMP消息的类型和ICMP消息格式的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ipv6寻址_有类和无类寻址:IPV4寻
- 下一篇: ai怎么约束每个字的大小_人工智能的约束