57a. Echo and Echo Reply MessageThe Echo and Echo Reply test the communication path from a sender to a destination.
Type Field The Type Field indicates the type of ICMP message. An Echo request message will have the number 8 in the Type field and an Echo Reply message will have the number 0. Code Field The Code Field is used by the different message formats to indicate specific error conditions. For Echo, the code field is always 0. Checksum The Checksum is the 16-bit ones's complement of the one's complement sum of the ICMP message starting with the ICMP Type. Identifier and Sequence Number 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. Data The data received in the echo message must be returned in the echo reply message.
|
0 1 2 3 4 5 6 7 |
8 9 10 11 12 13 14 15 |
16 17 18 19 20 21 22 23 |
24 25 26 27 28 29 30 31 |
Type (8 bits) |
Code (8 bits) |
Checksum (16 bits) | |
Unused | |||
Internet Header + 64 bits of Original Data Datagram |
Type Field
The Type Field indicates the type of ICMP message. A Destination Unreachable message will have the number 3 in the Type field.
Code Field
The Code Field is used by the different message formats to indicate specific error conditions. For Destination Unreachable, the code field is:
0 = net unreachable
1 = host unreachable
2 = protocol unreachable
3 = port unreachable
4 = fragmentation needed and DF set
5 = source route failed
Codes 0, 1, 4, and 5 may be sent from a router. Codes 2 and 3 may be sent from a host
Checksum
The checksum is the 16-bit ones's complement of the one's complement sum of the ICMP message starting with the ICMP Type.
Unused
The 32 bits are not used and ignored.
Internet Header + 64 bits of Data Datagram
The IP header plus the first 64 bits of the original datagram's data. 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 64 data bits of the original datagram's data.
If a router does not have enough buffer space and becomes congested or is approaching its capacity, it may send a Source Quench message to the datagram source host. The source quench message is a request to the host to cut back the rate at which it is sending traffic to the internet destination.
0 1 2 3 4 5 6 7 |
8 9 10 11 12 13 14 15 |
16 17 18 19 20 21 22 23 |
24 25 26 27 28 29 30 31 |
Type (8 bits) |
Code (8 bits) |
Checksum (16 bits) | |
Unused | |||
Internet Header + 64 bits of Original Data Datagram |
Type Field
The Type Field indicates the type of ICMP message. An Source Quench message will have the number 4 in the Type field .
Code Field
The Code Field is used by the different message formats to indicate specific error conditions. For Source Quench, the code field is always 0.
Checksum
The checksum is the 16-bit ones's complement of the one's complement sum of the ICMP message starting with the ICMP Type.
Unused
The 32 bits are not used and ignored.
Internet Header + 64 bits of Data Datagram
The IP header plus the first 64 bits of the original datagram's data. 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 64 data bits of the original datagram's data.
If a router find the Time To Live (TTL) field has expired (set to zero), the router will discard the IP datagram. It may send a Time Exceeded message to the source Host.
0 1 2 3 4 5 6 7 |
8 9 10 11 12 13 14 15 |
16 17 18 19 20 21 22 23 |
24 25 26 27 28 29 30 31 |
Type (8 bits) |
Code (8 bits) |
Checksum (16 bits) | |
Unused | |||
Internet Header + 64 bits of Original Data Datagram |
Type Field
The Type Field indicates the type of ICMP message. A Time Exceeded message will have the number 11 in the Type field.
Code Field
The Code Field is used by the different message formats to indicate specific error conditions. For Echo, the code field is:
0 = time to live exceeded in transi
1 = fragment reassembly time exceeded
Checksum
The checksum is the 16-bit ones's complement of the one's complement sum of the ICMP message starting with the ICMP Type.
Unused
The 32 bits are not used and ignored.
Internet Header + 64 bits of Data Datagram
The IP header plus the first 64 bits of the original datagram's data. 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 64 data bits of the original datagram's data.
If a router or host finds a problem with an IP header, it must discard the datagram. The source host may be notified by being sent a Parameter Problem message. The Parameter Problem message identifies the octet of the original datagram's header where the error was detected.
0 1 2 3 4 5 6 7 |
8 9 10 11 12 13 14 15 |
16 17 18 19 20 21 22 23 |
24 25 26 27 28 29 30 31 |
Type (8 bits) |
Code (8 bits) |
Checksum (16 bits) | |
Pointer (8 bits) |
Unused | ||
Internet Header + 64 bits of Original Data Datagram |
Type Field
The Type Field indicates the type of ICMP message. A Parameter Problem message will have the number 12 in the Type field.
Code Field
The Code Field is used by the different message formats to indicate specific error conditions. For Parameter Problem message, the code field is 0 when the Pointer field indicates the error.
Checksum
The checksum is the 16-bit ones's complement of the one's complement sum of the ICMP message starting with the ICMP Type.
Pointer
The pointer identifies the octet of the original datagram's header where the error was detected (it may be in the middle of an option).
Unused
The 24 bits are not used and ignored.
Internet Header + 64 bits of Data Datagram
The IP header plus the first 64 bits of the original datagram's data. 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 64 data bits of the original datagram's data.
If a router (Router A) receives a datagram to forward from a host on the same network. The router (Router A) checks its routing table and finds out that the shortest path is via another router (Router B) on the same network. Router A sends a Redirect message to the host with the IP address of Router B.
0 1 2 3 4 5 6 7 |
8 9 10 11 12 13 14 15 |
16 17 18 19 20 21 22 23 |
24 25 26 27 28 29 30 31 |
Type (8 bits) |
Code (8 bits) |
Checksum (16 bits) | |
Gateway Internet Address | |||
Internet Header + 64 bits of Original Data Datagram |
Type Field
The Type Field indicates the type of ICMP message. A Redirect message will have the number 5 in the Type field.
Code Field
The Code Field is used by the different message formats to indicate specific error conditions. For the Redirect message, the code field is:
0 = Redirect datagrams for the Network
1 = Redirect datagrams for the Host
2 = Redirect datagrams for the Type of Service and Network
3 = Redirect datagrams for the Type of Service and Host
Checksum
The checksum is the 16-bit ones's complement of the one's complement sum of the ICMP message starting with the ICMP Type.
Gateway Internet Address
This field is used to indicate the router with the shortest path to the destination network
Internet Header + 64 bits of Data Datagram
The IP header plus the first 64 bits of the original datagram's data. 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 64 data bits of the original datagram's data.
The Timestamp messages are best known as part of the traceroute (tracert in Windows) programs. The purpose is to measure the round trip time it takes to go from a source to a destination host. The Timestamp message is a request for measuring roundtrip time. The Timestamp Reply is the reply to a Timestamp message.
0 1 2 3 4 5 6 7 |
8 9 10 11 12 13 14 15 |
16 17 18 19 20 21 22 23 |
24 25 26 27 28 29 30 31 |
Type (8 bits) |
Code (8 bits) |
Checksum (16 bits) | |
Identifier (16 bits) |
Sequence number (16 bits) | ||
Originate Timestamp | |||
Receive Timestamp | |||
Transmit Timestamp |
Type Field
The Type Field indicates the type of ICMP message. A Timestamp message will have the number 13 in the Type field and a Timestamp Reply message will have the number 14.
Code Field
The Code Field is used by the different message formats to indicate specific error conditions. For the Timestamp message, the code field is 0.
Checksum
The checksum is the 16-bit ones's complement of the one's complement sum of the ICMP message starting with the ICMP Type.
Identifier and Sequence Number
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.
Originate Timestamp
The Originate Timestamp is the time in units of 32 milliseconds since midnight Universal Time (UT) when the datagram was transmitted from the source.
Receive Timestamp
The Receive Timestamp is the time in units of 32 milliseconds since midnight Universal Time (UT) when the datagram was received at the destination.
Transmit Timestamp
The Transmit Timestamp is the time in units of 32 milliseconds since midnight Universal Time (UT) when the Timestamp Reply datagram was transmitted from the destination.
If the time is not available in miliseconds 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 Address Mask Request is used by a host to determine what its address mask is on a network. The Address Mask Reply message is the reply from a router or a host to the source host with the correct address mask for the network.
0 1 2 3 4 5 6 7 |
8 9 10 11 12 13 14 15 |
16 17 18 19 20 21 22 23 |
24 25 26 27 28 29 30 31 |
Type (8 bits) |
Code (8 bits) |
Checksum (16 bits) | |
Identifier (16 bits) |
Sequence number (16 bits) | ||
Address Mask |
Type Field
The Type Field indicates the type of ICMP message. An Address Mask Request message will have the number 17 in the Type field and an Address Mask Reply message will have the number 18.
Code Field
The Code Field is used by the different message formats to indicate specific error conditions. For Address Mask messages, the code field is always 0.
Checksum
The Checksum is the 16-bit ones's complement of the one's complement sum of the ICMP message starting with the ICMP Type.
Identifier and Sequence Number
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.
Address Mask
The Address Mask field contains the 32 bit subnet mask for the network (e.g. 255.255.255.0).
Introduction to Data Communications | ||
---|---|---|
Previous | Table of Contents | Next |