ICMP (Internet Control Message Protocol) is a protocol between the network layer and the transport layer. Its main function is to transmit network diagnostic information.
The information transmitted by ICMP can be divided into two categories, one is error information, and this type of information can be used to diagnose network faults. We already know that the IP protocol works like "best effort". If the IP packet is not transmitted to the destination, or if the IP packet is incorrect, the IP protocol itself will not make further efforts. However, the host that sends the IP packet upstream and the relay router do not know that errors and failures have occurred downstream, and they may continue to send IP packets. Through the ICMP packet, the downstream router and host can report the error information to the upstream, so that the upstream router and the host can adjust. The main thing is that ICMP only provides a specific type of error report, which cannot help the IP protocol become "reliable." (reliable) agreement. Another type of information is advisory in nature, such as who a router asks for on each router in the path, and then each router also responds with an ICMP packet.
Note: ICMP is based on the IP protocol, that is, an ICMP packet needs to be encapsulated in an IP packet and then transmitted over the Internet. ICMP is an essential part of the IP suite, that is, any computer that supports the IP protocol must implement ICMP. .
The structure of the ICMP package:It's a bit complicated, but it's a comment, the content is not complicated. Let me show you one by one:
ICMP packets will have Type, Code, and Checksum. The Type identifies the large type of ICMP packet, and Code is a subdivision small type within Type. For different error messages or information, there will be different Types and Codes. From the above we can see that ICMP supports a wide variety of types, with a variety of functions. Checksum is similar to the IP header checksum, but with In the IP protocol, the checksum only verifies that the header is different. The Checksum here checks the entire ICMP packet (including the header and data).
The remaining ICMP packet formats vary by type. On the other hand, ICMP packets are usually triggered by an IP packet. The header and part of the data that triggers the IP packet will be included in the data portion of the ICMP packet.
The ICMP protocol is the basis for implementing the ping command and the traceroute command. These two tools are often used for network troubleshooting.
Common ICMP packet typesEcho belongs to information information. The ping command utilizes this type of ICMP packet. When the ping command is used, an Echo-inquiry type ICMP packet will be sent to the target host, and after receiving the ICMP packet, the target host will reply to the Echo-answer type ICMP packet and include the inquiry ICMP packet in the data portion. The .ping command is an important tool for our network troubleshooting. For example, an IP address can receive a reply through the ping command, and other network protocol communication methods are also likely to succeed.
Source quench is an error message. If a host quickly transmits data to the destination, and the destination host does not have matching processing capabilities, the destination host can send an ICMP packet of the type to the originating host, alerting the originating host to slow down the sending speed.
Destination Unreachable (DesTInaTIon Uncreachale) is an error message. If a router receives an IP packet that has no further relay, it will want to start the host to send this type of ICMP packet. For example, when the IP packet arrives at the last router and the router finds the destination host down, it sends an ICMP packet of the DesTInaton Unreacherable type to the originating host. There are other possible reasons why the destination cannot be reached, such as the absence of a relay path, such as a port number that is not received.
Timeout (TIme Exceded) is an error message. Time to Live (TTL) in IPV4 and Hop Limit in IPV6 are decremented with the passing router. When this area value is reduced to 0, the IP packet is considered to be timed out (Time). Exceeded).Time Exceeded is the ICMP packet sent by the router to the originating host when the TTL is reduced to 0, and it is notified that a timeout error has occurred.
Traceroute takes advantage of this type of ICMP packet. The traceroute command is used to discover the various routers on the IP relay path. It sends an IP packet to the destination. The first time, the TTL is set to 1, causing a Time Exceeded error on the first router. In this way, the first router recovers the ICMP packet, so that the originating host knows the information of the first router of the path. Then the TTL is set to 2, 3, 4. . Until the destination host is reached. In this way, each router along the way will send an ICMP packet to the originating host to report the error. Traceroute prints the information of the ICMP packet on the screen, which is the information of the relay path.
Redirecting is an error message. When a router receives an IP packet and compares its routing table, it finds that it should not receive the IP packet. It sends a redirected type of ICMP to the originating host, reminding the originating host to modify its routing table. For example, the following network:
If 145.1 sends an IP packet to 145.15, the result is received by the intermediate router through the NIC of 145.17. Then the router will find that according to its routing table, this IP packet should be returned in the same way. Then the router can determine that the routing table of 145.1 may have a problem. Therefore, the router will send an ICMP packet of the redirect type to 145.1.
Neighbor Discovery of IPV6
The ARP protocol is used to discover the correspondence between the surrounding IP address and the MAC address. However, the ARP protocol is only used for IPV4, and the IPV6 does not use the ARP protocol. The IPV6 packet implements the ARp function through Neighbor Discovery (ND, Neighbor Discovery). The working mode of the ND is related to the ARP type, but it is based on the ICMP protocol. Neighbor Solicitatin and Neighbor Advertisement types. These two types correspond to the query and reply information of the ARP protocol.
What is the role of the ICMP protocol?The ICMP protocol is mainly used to detect network communication faults and implement link tracking. The most typical applications are PING and tracerooute.
PING:
The link between the source host and the destination host is detected by sending a loopback request message and a loopback reply message, whether the destination is reachable, and the delay of the communication.
Traceroute:
The link address information is obtained by sending a probe packet. The first probe packet has a TTL of 1. When the first router arrives, the TTL is decremented by 1 to 0. Therefore, the probe packet is discarded, and the ICMP time is sent back to the source host. At this time, the source host obtains the first packet. The IP address of the router; then the source host sends a second probe packet, the TTL is incremented to 2, the TTL of the first router is reduced to 1 and the probe packet is forwarded to the second router. At this time, the TTL is decreased to 0. Drop the probe packet and send the ICMP timeout message to the source host, the source host obtains the IP address of the second router; and so on, until the probe packet reaches the destination of the traceroute, then the source host obtains The IP address of each hop route to the destination.
With zinc as the base,the product is added 2 to 15% aluminium,with welding flux content of 10 to 20%
Wildely used in copper-aluminium,copper bus-aluminium foil,Aluminium-aluminium and aluminium alloy welding.
Welding Wire,Flux-Cored Copper Aluminum Welding Wire,Mig Welding Wire,Aluminium Welding Wires
Shaoxing Tianlong Tin Materials Co.,Ltd. , https://www.tianlongspray.com