Icmp:internet Control Message Protocol

Source: Internet
Author: User

1. Introduction

ICMP is considered to be part of the IP layer. It transmits error messages and other matters needing attention.

2. Types of ICMP messages

The message type is determined by the 8-bit type and 8-bit code in the ICMP message.

The following conditions do not cause ICMP error messages:

    1. ICMP error message
    2. The destination address is the IP datagram of the broadcast address
    3. Datagrams that are broadcast as link layers
    4. is not the first piece of IP shard
    5. The source address is not a single host datagram, that is, the source address cannot be 0 address, loopback address, broadcast address, and multicast address

The above rules are designed to prevent the generation of broadcast storms.

3. ICMP address mask request and reply

This message is used for diskless systems to obtain their own subnet masks during the boot process.

The identifier and serial number fields have a send-side arbitrary selection setting, which is returned at the time of the reply and the sender can match the answer to the request.

Assuming that the requesting host knows its Internet address and then 255.255.255.255 the broadcast address mask request message to the destination address, then all the addresses in the Address Mask field are "0", and the router that knows the correct address mask returns an address mask reply message. The response message contains the address mask required by the requesting host.

4. ICMP timestamp request and reply

This message allows the system to query the current time to another system. The recommended value returned is the number of milliseconds since midnight (coordinated Universal time, UTC).

  

The requester fills in the initiation timestamp and then sends the message. When the answering system receives the request message, it fills in the receive timestamp and fills in the sending timestamp when the reply is sent. The reason for providing three fields is to have the sender calculate the time to send the request and the time to send the response, respectively.

Considering the time of the message transmission, the actual school needs to be adjusted (DIFFERENCE-RTT/2).

5. ICMP Port Unreachable error

One rule of ICMP is that the ICMP error message must contain the datagram IP header that generated the error message, and must include at least the first 8 bytes following the IP header, as shown in.

The UDP header contains the source port number, destination port number, length, and checksum.

The IP header is sent back because it contains the Protocol field, which allows ICMP to know how to interpret the next 8 bytes.

6.4.4BSD Processing of ICMP packets

  

The response request and response messages used by the PING program, and the ICMP packets that handle IP routing, are also described later.

Icmp:internet Control Message Protocol

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.