|ICMP type 0, Echo reply|
|Protocol type:||Transport layer control protocol.|
|Base protocol:||ICMP, Internet Control Message Protocol.|
|Related ICMP message:||Echo request.|
|Links:||IANA: ICMP parameters.|
This message is generated in response to an ICMP Echo request message.
The Identifier, Sequence number and Data fields MUST be returned to the sender unaltered.
RFC 792, page 15:
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 echoer returns these same values in the echo reply.
Every host MUST implement an ICMP Echo server function that receives Echo Requests and sends corresponding Echo Replies.
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.
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 0, Echo reply message:
|Type||Code||ICMP header checksum|
Cleared to 0.
Cleared to 0.
ICMP Header Checksum.
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.
Can be used to help match echo requests to the associated reply. It may be cleared to zero.
Used to help match echo requests to the associated reply. It may be cleared to zero.
Implementation specific data.
[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.