ICMP type 38, Domain Name reply

Description:

  Implementation
Host Mandatory.
Router Mandatory.

This message is generated in response to the ICMP type 37, Domain Name request message.

RFC 1788, page 5:

The IP Source in a Reply MUST be the same as the IP Destination of the corresponding Request message.


Packet format:

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
Time-to-live
Names
:::

Type. 8 bits. Set to 38.

Code. 8 bits. Set 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 set 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.
Copied from the request.

Sequence number. 16 bits.
Copied from the request.

Time-to-Live. 32 bits.
The number of seconds that the name may be cached. For historic reasons, this value is a signed 2s complement number.

Names. Variable length.
Zero or more Fully Qualified Domain Names. The length of this field is determined from the total length of the datagram. When no names are known, the field is eliminated and the reply is sent as an authoritative indication that no name is known. When more than one name is known, all such names should be listed. Any name which cannot entirely fit within the Reply MTU is not sent in the reply.


Host and Router Implementations:

RFC 1788, pages 5 and 6:

Every host and router MUST implement an ICMP Domain Name server function that receives Domain Name Requests and sends corresponding Domain Name Replies.

A host SHOULD also implement an application- layer interface for sending a Domain Name Request and receiving a Domain Name Reply, for diagnostic purposes.


RFCs:

[RFC 1788] ICMP Domain Name Messages.