ICMP Time Exceeded
   HOME

TheInfoList



OR:

The Internet Control Message Protocol (ICMP) is a supporting
protocol Protocol may refer to: Sociology and politics * Protocol (politics), a formal agreement between nation states * Protocol (diplomacy), the etiquette of diplomacy and affairs of state * Etiquette, a code of personal behavior Science and technology ...
in the
Internet protocol suite The Internet protocol suite, commonly known as TCP/IP, is a framework for organizing the set of communication protocols used in the Internet and similar computer networks according to functional criteria. The foundational protocols in the sui ...
. It is used by
network device Networking hardware, also known as network equipment or computer networking devices, are electronic devices which are required for communication and interaction between devices on a computer network. Specifically, they mediate data transmission in ...
s, including routers, to send error messages and operational information indicating success or failure when communicating with another
IP address An Internet Protocol address (IP address) is a numerical label such as that is connected to a computer network that uses the Internet Protocol for communication.. Updated by . An IP address serves two main functions: network interface ident ...
, for example, an error is indicated when a requested service is not available or that a host or router could not be reached. ICMP differs from
transport protocol Transport (in British English), or transportation (in American English), is the intentional movement of humans, animals, and goods from one location to another. Modes of transport include air, land (rail and road), water, cable, pipeline ...
s such as TCP and UDP in that it is not typically used to exchange data between systems, nor is it regularly employed by end-user network applications (with the exception of some diagnostic tools like
ping Ping may refer to: Arts and entertainment Fictional characters * Ping, a domesticated Chinese duck in the illustrated book '' The Story about Ping'', first published in 1933 * Ping, a minor character in ''Seinfeld'', an NBC sitcom * Ping, a c ...
and traceroute). ICMP for
IPv4 Internet Protocol version 4 (IPv4) is the fourth version of the Internet Protocol (IP). It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. IPv4 was the first version d ...
is defined in RFC 792. A separate
ICMPv6 Internet Control Message Protocol version 6 (ICMPv6) is the implementation of the Internet Control Message Protocol (ICMP) for Internet Protocol version 6 (IPv6). ICMPv6 is an integral part of IPv6 and performs error reporting and diagnostic fun ...
, defined by RFC 4443, is used with
IPv6 Internet Protocol version 6 (IPv6) is the most recent version of the Internet Protocol (IP), the communications protocol that provides an identification and location system for computers on networks and routes traffic across the Internet. I ...
.


Technical details

ICMP is part of the Internet protocol suite as defined in RFC 792. ICMP messages are typically used for diagnostic or control purposes or generated in response to errors in IP operations (as specified in RFC 1122). ICMP errors are directed to the source IP address of the originating packet. For example, every device (such as an intermediate router) forwarding an IP
datagram A datagram is a basic transfer unit associated with a packet-switched network. Datagrams are typically structured in header and payload sections. Datagrams provide a connectionless communication service across a packet-switched network. The deliv ...
first decrements the
time to live Time to live (TTL) or hop limit is a mechanism which limits the lifespan or lifetime of data in a computer or network. TTL may be implemented as a counter or timestamp attached to or embedded in the data. Once the prescribed event count or time ...
(TTL) field in the IP header by one. If the resulting TTL is 0, the packet is discarded and an ICMP time exceeded in transit message is sent to the datagram's source address. Many commonly used network utilities are based on ICMP messages. The traceroute command can be implemented by transmitting IP datagrams with specially set IP TTL header fields, and looking for ICMP time exceeded in transit and Destination unreachable messages generated in response. The related
ping Ping may refer to: Arts and entertainment Fictional characters * Ping, a domesticated Chinese duck in the illustrated book '' The Story about Ping'', first published in 1933 * Ping, a minor character in ''Seinfeld'', an NBC sitcom * Ping, a c ...
utility is implemented using the ICMP ''echo request'' and ''echo reply'' messages. ICMP uses the basic support of IP as if it were a higher-level protocol, however, ICMP is actually an integral part of IP. Although ICMP messages are contained within standard IP packets, ICMP messages are usually processed as a special case, distinguished from normal IP processing. In many cases, it is necessary to inspect the contents of the ICMP message and deliver the appropriate error message to the application responsible for transmitting the IP packet that prompted the ICMP message to be sent. ICMP is a network-layer protocol. There is no TCP or UDP port number associated with ICMP packets as these numbers are associated with the
transport layer In computer networking, the transport layer is a conceptual division of methods in the layered architecture of protocols in the network stack in the Internet protocol suite and the OSI model. The protocols of this layer provide end-to-e ...
above.


Datagram structure

The ICMP packet is encapsulated in an IPv4 packet. The packet consists of header and data sections.


Header

The ICMP header starts after the
IPv4 header Internet Protocol version 4 (IPv4) is the fourth version of the Internet Protocol (IP). It is one of the core protocols of standards-based internetworking methods in the Internet and other packet-switched networks. IPv4 was the first version de ...
and is identified by
IP protocol number This is a list of the IP protocol numbers found in the field ''Protocol'' of the IPv4 header and the ''Next Header'' field of the IPv6 header. It is an identifier for the encapsulated protocol and determines the layout of the data that immediately ...
'1'. All ICMP packets have an 8-byte header and variable-sized data section. The first 4 bytes of the header have fixed format, while the last 4 bytes depend on the type/code of that ICMP packet. ; Type : ICMP type, see . ; Code : ICMP subtype, see . ; Checksum : Internet checksum (RFC 1071) for error checking, calculated from the ICMP header and data with value 0 substituted for this field. ; Rest of header : Four-byte field, contents vary based on the ICMP type and code.


Data

ICMP error messages contain a data section that includes a copy of the entire IPv4 header, plus at least the first eight bytes of data from the IPv4 packet that caused the error message. The length of ICMP error messages should not exceed 576 bytes. This data is used by the host to match the message to the appropriate process. If a higher level protocol uses port numbers, they are assumed to be in the first eight bytes of the original datagram's data. The variable size of the ICMP packet data section has been exploited. In the "
Ping of death A ping of death is a type of attack on a computer system that involves sending a malformed or otherwise malicious ping to a computer. A correctly formed ping packet is typically 56 bytes in size, or 64 bytes when the Internet Control ...
", large or fragmented ICMP packets are used for
denial-of-service attacks In computing, a denial-of-service attack (DoS attack) is a cyber-attack in which the perpetrator seeks to make a machine or network resource unavailable to its intended users by temporarily or indefinitely disrupting services of a host conne ...
. ICMP data can also be used to create
covert channels In computer security, a covert channel is a type of attack that creates a capability to transfer information objects between processes that are not supposed to be allowed to communicate by the computer security policy. The term, originated in 19 ...
for communication. These channels are known as ICMP tunnels.


Control messages

Control messages are identified by the value in the ''type'' field. The ''code'' field gives additional context information for the message. Some control messages have been
deprecated In several fields, especially computing, deprecation is the discouragement of use of some terminology, feature, design, or practice, typically because it has been superseded or is no longer considered efficient or safe, without completely removing ...
since the protocol was first introduced.


Source quench

''Source Quench'' requests that the sender decrease the rate of messages sent to a router or host. This message may be generated if a router or host does not have sufficient buffer space to process the request, or may occur if the router or host buffer is approaching its limit. Data is sent at a very high speed from a host or from several hosts at the same time to a particular router on a network. Although a router has buffering capabilities, the buffering is limited to within a specified range. The router cannot queue any more data than the capacity of the limited buffering space. Thus if the queue gets filled up, incoming data is discarded until the queue is no longer full. But as no acknowledgement mechanism is present in the network layer, the client does not know whether the data has reached the destination successfully. Hence some remedial measures should be taken by the network layer to avoid these kind of situations. These measures are referred to as source quench. In a source quench mechanism, the router sees that the incoming data rate is much faster than the outgoing data rate, and sends an ICMP message to the clients, informing them that they should slow down their data transfer speeds or wait for a certain amount of time before attempting to send more data. When a client receives this message, it will automatically slow down the outgoing data rate or wait for a sufficient amount of time, which enables the router to empty the queue. Thus the source quench ICMP message acts as flow control in the network layer. Since research suggested that "ICMP Source Quench asan ineffective (and unfair) antidote for congestion", routers' creation of source quench messages was deprecated in 1995 by RFC 1812. Furthermore, forwarding of and any kind of reaction to (flow control actions) source quench messages was deprecated from 2012 by RFC 6633. Where: :Type must be set to 4 :Code must be set to 0 :IP header and additional data is used by the sender to match the reply with the associated request


Redirect

''Redirect'' requests data packets be sent on an alternative route. ICMP Redirect is a mechanism for routers to convey routing information to hosts. The message informs a host to update its routing information (to send packets on an alternative route). If a host tries to send data through a router (R1) and R1 sends the data on another router (R2) and a direct path from the host to R2 is available (that is, the host and R2 are on the same
subnetwork A subnetwork or subnet is a logical subdivision of an IP network. Updated by RFC 6918. The practice of dividing a network into two or more networks is called subnetting. Computers that belong to the same subnet are addressed with an identica ...
), then R1 will send a redirect message to inform the host that the best route for the destination is via R2. The host should then change its route information and send packets for that destination directly to R2. The router will still send the original
datagram A datagram is a basic transfer unit associated with a packet-switched network. Datagrams are typically structured in header and payload sections. Datagrams provide a connectionless communication service across a packet-switched network. The deliv ...
to the intended destination. However, if the datagram contains routing information, this message will not be sent even if a better route is available. RFC 1122 states that redirects should only be sent by gateways and should not be sent by Internet hosts. Where: : Type must be set to 5. : Code specifies the reason for the redirection, and may be one of the following: :: : IP address is the 32-bit address of the gateway to which the redirection should be sent. : IP header and additional data is included to allow the host to match the reply with the request that caused the redirection reply.


Time exceeded

''Time Exceeded'' is generated by a gateway to inform the source of a discarded
datagram A datagram is a basic transfer unit associated with a packet-switched network. Datagrams are typically structured in header and payload sections. Datagrams provide a connectionless communication service across a packet-switched network. The deliv ...
due to the
time to live Time to live (TTL) or hop limit is a mechanism which limits the lifespan or lifetime of data in a computer or network. TTL may be implemented as a counter or timestamp attached to or embedded in the data. Once the prescribed event count or time ...
field reaching zero. A time exceeded message may also be sent by a host if it fails to reassemble a fragmented datagram within its time limit. Time exceeded messages are used by the traceroute utility to identify gateways on the path between two hosts. Where: :Type must be set to 11 :Code specifies the reason for the ''time exceeded'' message, include the following: :: :IP header and first 64 bits of the original
payload Payload is the object or the entity which is being carried by an aircraft or launch vehicle. Sometimes payload also refers to the carrying capacity of an aircraft or launch vehicle, usually measured in terms of weight. Depending on the nature of ...
are used by the source host to match the time exceeded message to the discarded datagram. For higher-level protocols such as UDP and TCP the 64-bit payload will include the source and destination ports of the discarded packet.


Timestamp

''Timestamp'' is used for time synchronization. The originating
timestamp A timestamp is a sequence of characters or encoded information identifying when a certain event occurred, usually giving date and time of day, sometimes accurate to a small fraction of a second. Timestamps do not have to be based on some absolut ...
is set to the time (in milliseconds since midnight) the sender last touched the packet. The receive and transmit timestamps are not used. Where: :Type must be set to 13 :Code must be set to 0 :Identifier and Sequence Number can be used by the client to match the timestamp reply with the timestamp request. :Originate timestamp is the number of milliseconds since midnight
Universal Time Universal Time (UT or UT1) is a time standard based on Earth's rotation. While originally it was mean solar time at 0° longitude, precise measurements of the Sun are difficult. Therefore, UT1 is computed from a measure of the Earth's angle wit ...
(UT). If a UT reference is not available the most-significant bit can be set to indicate a non-standard time value.


Timestamp reply

''Timestamp Reply'' replies to a ''
Timestamp A timestamp is a sequence of characters or encoded information identifying when a certain event occurred, usually giving date and time of day, sometimes accurate to a small fraction of a second. Timestamps do not have to be based on some absolut ...
'' message. It consists of the originating timestamp sent by the sender of the ''Timestamp'' as well as a receive timestamp indicating when the ''Timestamp'' was received and a transmit timestamp indicating when the ''Timestamp reply'' was sent. Where: :Type must be set to 14 :Code must be set to 0 :Identifier and Sequence number can be used by the client to match the reply with the request that caused the reply. :Originate timestamp is the time the sender last touched the message before sending it. :Receive timestamp is the time the echoer first touched it on receipt. :Transmit timestamp is the time the echoer last touched the message on 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 in a timestamp provided the high order bit of the timestamp is also set to indicate this non-standard value. The use of Timestamp and Timestamp Reply messages to synchronize the clocks of Internet nodes has largely been replaced by the UDP-based
Network Time Protocol The Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable- latency data networks. In operation since before 1985, NTP is one of the oldest Internet protocols in ...
and the
Precision Time Protocol The Precision Time Protocol (PTP) is a protocol used to synchronize clocks throughout a computer network. On a local area network, it achieves clock accuracy in the sub-microsecond range, making it suitable for measurement and control systems. ...
.


Address mask request

''Address mask request'' is normally sent by a host to a router in order to obtain an appropriate
subnet mask A subnetwork or subnet is a logical subdivision of an IP network. Updated by RFC 6918. The practice of dividing a network into two or more networks is called subnetting. Computers that belong to the same subnet are addressed with an identical ...
. Recipients should reply to this message with an '' Address mask reply'' message. Where: :Type must be set to 17 :Code must be set to 0 :Address mask can be set to 0 ICMP Address Mask Request may be used as a part of reconnaissance attack to gather information on the target network, therefore ICMP Address Mask Reply is disabled by default on Cisco IOS.


Address mask reply

''Address mask reply'' is used to reply to an address mask request message with an appropriate subnet mask. Where: :Type must be set to 18 :Code must be set to 0 :Address mask should be set to the subnet mask


Destination unreachable

''Destination unreachable'' is generated by the host or its inbound gateway to inform the client that the destination is unreachable for some reason. Reasons for this message may include: the physical connection to the host does not exist (distance is infinite); the indicated protocol or port is not active; the data must be fragmented but the 'don't fragment' flag is on. Unreachable TCP ports notably respond with TCP RST rather than a ''destination unreachable'' type 3 as might be expected. ''Destination unreachable'' is never reported for
IP multicast IP multicast is a method of sending Internet Protocol (IP) datagrams to a group of interested receivers in a single transmission. It is the IP-specific form of multicast and is used for streaming media and other network applications. It uses speci ...
transmissions. Where: :Type field (bits 0–7) must be set to 3 :Code field (bits 8–15) is used to specify the type of error, and can be any of the following: :: :Next-hop MTU field (bits 48–63) contains the MTU of the next-hop network if a code 4 error occurs. :IP header and additional data is included to allow the client to match the reply with the request that caused the destination unreachable reply.


See also

* ICMP tunnel *
ICMP hole punching ICMP hole punching is a technique employed in network address translator (NAT) applications for maintaining Internet Control Message Protocol (ICMP) packet streams that traverse the NAT. NAT traversal techniques are typically required for clien ...
* ICMP Router Discovery Protocol * Pathping * Path MTU Discovery *
Smurf attack A Smurf attack is a distributed denial-of-service attack in which large numbers of Internet Control Message Protocol (ICMP) packets with the intended victim's spoofed source IP are broadcast to a computer network using an IP broadcast address. ...


References


Sources


RFCs

* , ''Internet Control Message Protocol'' * , ''Internet Standard Subnetting Procedure'' * , ''Something a Host Could Do with Source Quench: The Source Quench Introduced Delay (SQuID)'' * , ''Requirements for Internet Hosts – Communication Layers'' * , ''Towards Requirements for IP Routers'' * , ''Requirements for IP Version 4 Routers'' * , ''Extended ICMP to Support Multi-Part Messages''


External links


IANA ICMP parameters

IANA protocol numbers
* {{Authority control Internet protocols Internet Standards Internet layer protocols Network layer protocols