Internet Message Control Protocol

format_list_bulleted Contenido keyboard_arrow_down
ImprimirCitar

The Internet control message protocol (in English): Internet Control Message Protocol and known for its acronyms ICMP) is part of the set of IP protocols. It is used to send error messages and operational information indicating, for example, that a host cannot be located or that a service that has been requested is not available. These ICMP protocol messages are sent to the IP address of the package.

As a protocol to the ICMP "Network Layer" differs from the protocols of the "Transportation Layer" (such as TCP and UDP), in which it is not generally used to exchange information between systems, nor for user applications (with the exception of some tools such as ping and traceroute, which use ICMP messages for diagnostic purposes).

Technical aspects

Bit 0 7 Bit 8 15 Bit 16 23 Bit 24 31
Type Code Verification amount

Data (optional)

This protocol is part of the set of IP protocols and is defined in RFC 792. ICMP messages are commonly used for diagnostic and control purposes, or generated in response to errors in IP operations (as specified in RFC 1122), and are sent to the IP address of the package that led to the generation of the ICMP message.

The ICMP version for IPv4 is also known as ICMPv4. IPv6 has its equivalent protocol ICMPv6.

The protocol is used when a host cannot be reached, when the life time of a package has expired, when a requested service is not available, etc. That is, it is used to handle necessary error and control messages on network systems by informing the original source to avoid or correct the detected problem.

As an example, each router that forwards an IP datagram has to decrease the life time field (TTL) of the IP header in a unit; if the TTL reaches zero, a type 11 ICMP message ("Exceeded Time") is sent to the originator of the datagram.

ICMP messages are built at the level of the "Network Layer". Thus, IP encapsulates the ICMP message with a new header (to get the response messages from the original host), and transmits the resulting datagram in the usual way. Each ICMP message is encapsulated in a single IP datagram, so delivery is not guaranteed.

While ICMP employs the basic IP support as if it were a higher-level protocol is, in fact, an integral part of IP. Despite being encapsulated in common packages, ICMP messages are usually processed in a special way by receiving a different treatment from normal IP processing. In many cases it is necessary to analyze the contents of the ICMP message to determine the appropriate type of error that should be sent to the responsible application to transmit the IP package that requested the sending of the ICMP message.

Many common network utilities are based on ICMP messages. The traceroute command can be implemented by transmitting datagrams with special TTL values in the header, and then by analyzing the "Unalcable Destiny" and "Excessed Time" (types 3 and 11) messages generated as an answer. The ping tool is implemented using ICMP's "Echo request" and "Echo reply".

Structure of an ICMP segment

ICMP starts after the IPv4 header and is identified by protocol number “1”. All ICMP packets will have an 8-byte header and variable-size data section. The first 4 bytes of the header will be consistent. The first byte is reserved for the ICMP type. The second octet is for the ICMP code. The third and fourth byte is a checksum of the entire ICMP message. The content of the remaining 4 bytes of the header may vary depending on the function type and the ICMP code.

Error messages for this protocol contain a data section that includes all the IP headers plus the first 8 bytes of data from the IP packet that caused the error message. The ICMP packet is encapsulated in a new IP packet.

Bits 0-7 8-15 16-23 24-31

0 Type Code Checksum
32 Header challenge
  • Type - Type of ICMP as specified below.
  • Code - Subtype the given guy.
  • Checksum - Error checking data. Calculated from the ICMP header + data, with a value of 0 for this field. The checksum algorithm is specified in RFC 1071.
  • Header Challenge - Four field byte. It can vary depending on the type and ICMP code.

Control Messages

Echo Reply

An Echo Reply in the ICMP protocol is a message generated in response to an Echo Request message.

Message Format:

0001020304050607 0809101112131415 1617181920212223 2425262728293031
Type = 0 Code = 0 Checksum
Identifier Sequence number
Data:::
  • The type and code should be 0.
  • The identifier and the sequence number can be used by the customer to associate each Echo Request to each Echo Reply.
  • The data included in the Echo Request must always be in the Echo Reply data.

Destination Unreachable

Destination Unreachable is a type of ICMP packet whose function is to carry a message that is generated by a router, and is sent to the originating host, which receives the message issued by the router.

The message itself means that this router considers the destination that the host wants to reach unreachable.

If it is received from the destination host, it means that the protocol that was tried to be accessed is not active at that moment.

0001020304050607 0809101112131415 1617181920212223 2425262728293031
Type = 3 Code Checksum
Identifier Sequence number
Data:::

The Type field has the value 3. The code field will contain one of the following values:

Code Description
0 Network unreachable
1 Unreachable host
2 Protocol unreachable
3 Port unreachable
4 Fragmentation needed, but do not fragment bit set
5 Source route failed
6 Destination network unknown
7 Destination unknown
8 Source host isolated error (military use only)
9 The destination network is administratively prohibited
10 The destination host is administratively prohibited
11 The network is unreachable for Type Of Service
12 The host is unreachable for Type Of Service
13 Communication administratively prohibited (administrative filtering prevents packet from being forwarded)
14 Host precedence violation (indicates the requested precedence is not permitted for the combination of host or network and port)
15 Precedence cutoff in effect (precedence of datagram is below the level set by the network administrators)

Satiable Source

The Satiable Source: Requests coming from the sender are slowed down based on the messages sent to a host or router. This message may be generated if a router or host is running low on buffer space to process this request, or the host's or router's buffer may be reaching its limit.

Information is sent at a very high speed from one host or several hosts at the same time to a particular router on the network. Although a router has buffering capabilities, it is limited within a specific range. The router cannot put more data than it exceeds the storage capacity provided by the buffer. In this way, if the queue is full, the information is discarded until the queue is no longer saturated. But since no confirmation mechanism is present in the network layer, the user has no knowledge if the information has reached its destination successfully. Hence some corrective measures must be taken by means of the network layer to prevent these types of situations. These measurements are referred to as source damping. In a source cooling mechanism, the router considers that the incoming data rate is faster than the outgoing data rate, and sends an ICMP message to the clients, informing them to slow down their data transfer rate or wait a certain amount of time. time to send data again. The user receiving this notification will automatically slow down the outgoing data rate or wait until a sufficient amount of time has elapsed to allow the router to empty the queue. Therefore source satiate ICMP message acts as flow control at the network layer.

Message of Sacred Source
0001020304050607 0809101112131415 1617181920212223 2425262728293031
Type=4 Code = 0 Header
No Use
IP head and 8 first bytes of data from the original datagram

Where Type should be set to 4 Code should be set to 0 IP header and additional data is used by the sender to match the response to the corresponding request

Redirects

Redirect requests that data packets be sent on an alternate route. ICMP Redirect is a mechanism for routers to transfer data from the router to hosts. The message informs the receiver (hosts) to update its routing information. If a host tries to send information through Router 1 and Router 1 sends the information to Router 2 and a direct path from the host to Router 2 is available (that is, the host and Router 2 are on the same Ethernet segment), then router 1 will send a redirect notification to inform the host that the best path to reach its destination is through router 2. The host should then send packets directly to router 2. And router 2 will try to send the original datagram to the destination provided. However, if the datagram contains routing data, this notification will not be sent even if better paths are available.

Redirect Message
0001020304050607 0809101112131415 1617181920212223 2425262728293031
Type=5 Code Head
IP address
IP header and the first 8 bytes of the original datagram

Where:

Type Established in 5.
Code Specifies the reason for the redirect, may be one of the following:
Code Description
0 Redirection of the Network
1 Redirect for the Host
2 Redirection of Service and Network Type
3 Redirect for Service Type and Host
IP address It is the 32-bit address of the entrance door to the address in which it must be sent.
IP Head These are the additional data included to allow the host to match the response to the redirect request.

Echo Request

The Echo Request is a control message that is sent to a host with the expectation of receiving an Echo Reply from it. This is known as Ping and is a utility of the ICMP protocol, IP subprotocol. Every host must respond to an Echo Request with an Echo Reply that contains exactly the same data as the first.

Message format:

0001020304050607 0809101112131415 1617181920212223 2425262728293031
Type = 8 Code = 0 Checksum
Identifier Sequence number
Data:::
  • The guy must be 8.
  • The code must be 0.
  • The identifier and the sequence number can be used by the customer to associate each Echo Request to each Echo Reply.
  • The data included in the Echo Request must always be in the Echo Reply data.

Time Exceeded

A Timeout is created by a gateway to inform the source of a datagram due to the field time-to-live reaching zero. A timeout message can also be sent by a host if it fails to reassemble a fragmentation datagram within its time limit.

Timeout messages are used by the Route Trace utility to identify gateways in changing hosts.

Message time Exceded
0001020304050607 0809101112131415 1617181920212223 2425262728293031
Type= 11 Code Head
No use.
IP header and the first 8 bytes of the original datagram

Where:

Type to be established by 11
Code specify the reason for the exceeded time message, the following points are included:
CodeDescription
0 Lifetime Exced in Transit
1 Time exceeded in the Fragment re assembly.

The IP header and the first 64 bits of the original payload are used by the originating host to match the time exceeded message for the discarded datagram. For higher level protocols, such as UDP (User Datagram Protocol) and TCP (Transmission Control Protocol) the 64-bit payload bit will include the source and destination ports of the dropped packet.

Timestamp

Timestamp is used for time synchronization. It consists of the origin of the timestamp

Time Mark Message
0001020304050607 0809101112131415 1617181920212223 2425262728293031
Type= 13 Code= 0 Head
Identifier Sequence Number
Create a timestamp

Where:

Type to be established by 13
Code to be established in 0
Identifier and sequence number can be used by the customer to match the time mark response to the time mark request.
Create a timestamp is the number of milliseconds from the middle night Universal Time (UT). If a UT reference is not available the most significant bit can be configured to indicate a non-standard time value.

Response Timestamp

Response to a timestamp of the message. It consists of the original timestamp sent by the sender of the timestamp, as well as a timestamp and thus receive a timestamp from the transmission.

Answer Timestamp
0001020304050607 0809101112131415 1617181920212223 2425262728293031
Type= 14 Code= 0 head
Identifier Sequence Number
Create a timestamp
Receive a timestamp
Transmit a timestamp

Where:

Type Must be established in 14
Codigio Established at 0
Idenficator and Sequence Number can be used by the customer to match the response to the request he made.
Create a timestamp is the last time the sender touches the message before sending it.
Receive timestamp is the time when the echo generator received the request message.
Transmit a timestamp is the time the echo generator last touched the message before sending it.

All timestamps are in units of milliseconds since midnight UT. If the time is not available in milliseconds or cannot be provided with respect to midnight UT then any time can be inserted into a timestamp as long as the high-order bit of the timestamp is also set as an indicator of the standard value.

Mask Address Request

is normally sent by a host to a router in order to obtain a suitable Subnet Mask. Senders must reply to this message with a Mask Address Request.

Request for Mask Management
0001020304050607 0809101112131415 1617181920212223 2425262728293031
Type= 17 Code= 0 Checksum
Identifier Sequence Number
Mask Direction

Where:

Type to be established in 17
Code to be established in 0
Mask Direction can be adjusted to 0

ICMP Address Mask Solicitation can be used as part of a handshake process to gather information about the destination network, therefore ICMP Address Mask Solicitation is disabled by default in Cisco IOS.

Response to Mask Address

Address Mask Response is used to respond to an address mask request message with an appropriate subnet mask.

Response to the Mask Directorate
0001020304050607 0809101112131415 1617181920212223 2425262728293031
Type= 18 Code= 0 Checksum
Identifier Sequence Number
Mask Direction

Where:

Type 18
Code to be established in 0
Mask Direction must be established in the subnet mask

Message Destination Unreachable

Destination Unreachable is generated by the host or at the incoming gateway to inform the client that the destination is unreachable for some reason. A destination unreachable message can be generated as a result of a TCP, UDP, or ICMP or other transmission. TCP unreachable ports mostly respond with TCP RST instead of a destination unreachable type 3 as it used to be. wait.

The error is not generated if the original datagram has an IP Multicast destination address. Reasons for this message may include: physical connection to host does not exist (distance is infinite), indicated protocol or port is not active, data should be fragmented but "do not fragment" It is active.

Unable Message Destination
0001020304050607 0809101112131415 1617181920212223 2425262728293031
Type=3 Code Header
No use Next jump MTU
IP header and the first 8 data bytes of the original datagram.

Where:

Type field(bits 0-7) must be established in 3
Code field(bits 8-15) is used to specify a type of error.

Encapsulation

An ICMP message is encapsulated in IP:

 Header L2 日本語 Cabecera IP 日本語 Cabecera ICMP Data....

ICMP header

ICMP can be used to transmit different types of management messages, which are mainly identified by the type and the corresponding code.

Bit of the Message:
 0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
 Code 日本語
Data...

Protocol Format

Example of sending and receiving a ping

List of allowed control messages (incomplete):

  • 0 - Echo Reply
  • 1 - Reserved
  • 2 - Reserved
  • 3 - Destination Unreachable
  • 4 - Source Quench
  • 5 - Redirect Message
  • 6 - Alterna de Host
  • 7 - Reserved
  • 8 - Echo Request (Ping)
  • 9 - Router announcement
  • 10 - Request for Router
  • 11 - Exced time
  • 12 - Parameter Problem
  • 13 - Time mark
  • 14 - Time Mark Response
  • 15 - Request for Information
  • 16 - Information Response
  • 17 - Request for Mask Management
  • 18 - Management Mask Response
  • 19 - Reserved for security
  • 20-29 - Reserved for robustness experiments
  • 30 - Traceroute
  • 31 - Datagram Conversion Error
  • 32 - Mobile Host Management
  • 33 - IPv6
  • 34 - IPv6
  • 35 - Request for Mobile Registration
  • 36 - Field Registration Response
  • 37 - Request for Domain Name
  • 38 - Domain Name Response
  • 39 - SKIP Discovery Algorithm Protocol
  • 40 - Photuris, Security Falls
  • 41 - ICMP messages used by security protocols like Seamoby
  • 42 - Extended Echo Request
  • 43 - Extended Echo Reply
  • 44-252 — Unassigned

(Source: IANA ICMP Parameters)

Contenido relacionado

Help: FAQ

Here are some of the frequently asked questions about Wikipedia in...

Wind instrument

The wind instruments or aerophones are a family of musical instruments which produce sound by the vibration of the air content inside, without the need for...

Help:How to edit a page

Wikipedia is a wiki. This means that anyone can easily edit any page and their changes will be visible immediately. Here you will learn how to edit a page....
Más resultados...
Tamaño del texto:
undoredo
format_boldformat_italicformat_underlinedstrikethrough_ssuperscriptsubscriptlink
save