1.ICMP allows the host or router to report error conditions and submit reports on anomalies, in order to more effectively forward IP datagrams and improve the chances of delivery success;
2.ICMP is not a high-level protocol, because the ICMP packet is in the IP datagram, as part of the data, so it is the IP layer protocol;
Types of 3.ICMP messages:
(1) ICMP error Reporting message
(2) ICMP inquiry message
Format of the 4.ICMP message:
(1) The first 4 bytes are in a uniform format, with a total of three fields: type, code, inspection and;
(2) The next 4 bytes, related to the type of ICMP, and finally the data field, whose length depends on the type of ICMP;
5. Several commonly used ICMP message types:
* * ERROR Report message:
① Endpoint Unreachable: Type value 3, when the router or host fails to deliver the data, send the endpoint unreachable message to the source point;
② Source suppression: A type value of 4, when the router or host is dropped due to congestion and discard the datagram, the source point is sent to suppress the message, so that the source is aware that the datagram should be sent at a slower rate;
③ Time Exceeded: Type value 11, when the router receives a time-to-live datagram, in addition to discarding the datagram, but also to the source point to send more than the message, when the end of a predetermined period of time can not receive a datagram of all the data sheet, the received data is discarded and sent to the source point over the message;
④ parameter Problem: Type value 12, when the router or destination host to receive the header of the datagram has the wrong value of the field, discard the datagram, and send a parameter problem message to the source point;
⑤ Change Route (redirect): Type value 5, router to change the routing message sent to the host, let the host know the next time the datagram should be sent to another router;
⑥ all of the data fields in the ICMP error reporting message have the same format, extracting the first 8 bytes of the IP datagram received for error reporting and the data field as the data field for the ICMP packet, plus 8 bytes of the corresponding ICMP error reporting message, constitutes an ICMP error reporting message
* * There are several situations where ICMP error Reporting messages should not be sent:
① ICMP Error Reporting messages are no longer sent to ICMP error reporting messages;
② ICMP Error Reporting messages are not sent to all subsequent datagrams of the first Shard's data sheet;
③ does not send datagrams with multicast addresses, ICMP error reporting messages;
④ do not send ICMP error reporting messages to datagrams with special addresses (such as 127.0.0.0 or 0.0.0.0);
* * Inquiry Message:
① echo Request or Answer: the Type value 8 or the 10,ICMP Echo request message is an inquiry sent by the router or host to a specific purpose, the host receiving this message must send the ICMP echo reply message to the source host or router, which is used to test whether the destination station can reach and understand its relevant state;
② Timestamp Request or Answer: a type value of 13 or 14,icmp timestamp request message is to ask a host or router to answer the current date and time;
Applications for 6.ICMP:
(1) Packet Inter-network detection ping: used to test the connectivity between two hosts; the ping uses an ICMP echo request and a loopback reply message; Ping is an example of the use of the network layer ICMP directly by the application layer;
(2) Another very useful application is traceroute: used to track a packet from the source to the end of the path; Traceroute sends a series of IP datagrams from the source host to the destination, and the datagram encapsulates the undelivered UDP user data; The time-to-live TTL of the first datagram is set to , the second one is set to 2, and so on; Gets the routing information;
2016.7.9 Computer Network Review Essentials Fourth chapter of the Internet Control Message Protocol ICMP