ICMP type 8, Echo request |
Description | Glossary | RFCs | Publications | Obsolete RFCs |
Protocol suite: | TCP/IP. |
Protocol type: | Transport layer control protocol. |
Base protocol: | ICMP, Internet Control Message Protocol. |
Related ICMP message: | Echo reply. |
Host implementation: | Mandatory. |
Router implementation: | Mandatory. |
Links: | IANA: ICMP parameters. |
The Identifier, sequence number and data fields should be returned to the sender unaltered
RFC 792, page 15:
The data received in the echo request message must be returned in the echo reply message.
The identifier and sequence number may be used by the echo sender to aid in matching the replies with the echo requests. For example, the identifier might be used like a port in TCP or UDP to identify a session, and the sequence number might be incremented on each echo request sent. The echoing node returns these same values in the echo reply.
Code 0 may be received from a gateway or a host.
Host Implementation:
RFC 1122, page 42:
Every host MUST implement an ICMP Echo server function that receives Echo Requests and sends corresponding Echo Replies.
A host SHOULD also implement an application-layer interface for sending an Echo Request and receiving an Echo Reply, for diagnostic purposes.
An ICMP Echo Request destined to an IP broadcast or IP multicast address MAY be silently discarded.
Router Implementation:
RFC 1812, pages 58 and 59:
A router MUST implement an ICMP Echo server function that receives Echo Requests sent to the router, and sends corresponding Echo Replies. A router MUST be prepared to receive, reassemble and echo an ICMP Echo Request datagram at least as the maximum of 576 and the MTUs of all the connected networks.
The Echo server function MAY choose not to respond to ICMP echo requests addressed to IP broadcast or IP multicast addresses.
A router SHOULD have a configuration option that, if enabled, causes the router to silently ignore all ICMP echo requests; if provided, this option MUST default to allowing responses.
A router MUST also implement a user/application-layer interface for sending an Echo Request and receiving an Echo Reply, for diagnostic purposes. All ICMP Echo Reply messages MUST be passed to this interface.
The IP source address in an ICMP Echo Reply MUST be the same as the specific-destination address of the corresponding ICMP Echo Request message.
Data received in an ICMP Echo Request MUST be entirely included in the resulting Echo Reply.
If a Record Route and/or Timestamp option is received in an ICMP Echo Request, this option (these options) SHOULD be updated to include the current router and included in the IP header of the Echo Reply message, without truncation. Thus, the recorded route will be for the entire round trip.
If a Source Route option is received in an ICMP Echo Request, the return route MUST be reversed and used as a Source Route option for the Echo Reply message, unless the router is aware of policy that would prevent the delivery of the message.
MAC header | IP header | ICMP header | Data ::: |
ICMP type 8, Echo request message:
00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Type | Code | ICMP header checksum | |||||||||||||||||||||||||||||
Identifier | Sequence number | ||||||||||||||||||||||||||||||
Data ::: |
Type. 8 bits. Set to 8.
Code. 8 bits. Cleared to 0.
ICMP Header Checksum.
16 bits.
The 16-bit one's complement of the one's complement sum of the ICMP message, starting with the ICMP Type field.
When the checksum is computed, the checksum field should first be cleared to 0.
When the data packet is transmitted, the checksum is computed and inserted into this field.
When the data packet is received, the checksum is again computed and verified against the checksum field.
If the two checksums do not match then an error has occurred.
Identifier.
16 bits.
This field is used to help match echo requests to the associated reply.
It may be cleared to zero.
Sequence number.
16 bits.
This field is used to help match echo requests to the associated reply.
It may be cleared to zero.
Data.
Variable length.
Implementation specific data.
RFCs:
[RFC 792] INTERNET CONTROL MESSAGE PROTOCOL.
[RFC 1122] Requirements for Internet Hosts -- Communication Layers.
[RFC 1812] Requirements for IP Version 4 Routers.
[RFC 1009] Requirements for Internet Gateways.
[RFC 1716] Towards Requirements for IP Routers.
Description | Glossary | RFCs | Publications | Obsolete RFCs |