|ICMP type 17, Address mask request|
|Protocol type:||Transport layer control protocol.|
|Base protocol:||ICMP, Internet Control Message Protocol.|
|Related ICMP message:||Address mask reply.|
|Links:||IANA: ICMP parameters.|
RFC 950, page 11:
A gateway receiving an address mask request should return it with the address mask field set to the 32-bit mask of the bits identifying the subnet and network, for the subnet on which the request was received.
If the requesting host does not know its own IP address, it may leave the source field zero; the reply should then be broadcast. However, this approach should be avoided if at all possible, since it increases the superfluous broadcast load on the network. Even when the replies are broadcast, since there is only one possible address mask for a subnet, there is no need to match requests with replies. The "Identifier" and "Sequence Number" fields can be ignored.
RFC 1122, pages 45 and 46:
A host MUST support the first, and MAY implement all three, of the following methods for determining the address mask(s) corresponding to its IP address(es): (1) static configuration information; (2) obtaining the address mask(s) dynamically as a side- effect of the system initialization process; and (3) sending ICMP Address Mask Request(s) and receiving ICMP Address Mask Reply(s).
The choice of method to be used in a particular host MUST be configurable.
The choice of method to be used in a particular host MUST be configurable. When method (3), the use of Address Mask messages, is enabled, then: (a) When it initializes, the host MUST broadcast an Address Mask Request message on the connected network corresponding to the IP address. It MUST retransmit this message a small number of times if it does not receive an immediate Address Mask Reply. (b) Until it has received an Address Mask Reply, the host SHOULD assume a mask appropriate for the address class of the IP address, i.e., assume that the connected network is not subnetted. (c) The first Address Mask Reply message received MUST be used to set the address mask corresponding to the particular local IP address. This is true even if the first Address Mask Reply message is "unsolicited", in which case it will have been broadcast and may arrive after the host has ceased to retransmit Address Mask Requests. Once the mask has been set by an Address Mask Reply, later Address Mask Reply messages MUST be (silently) ignored.
Conversely, if Address Mask messages are disabled, then no ICMP Address Mask Requests will be sent, and any ICMP Address Mask Replies received for that local IP address MUST be (silently) ignored.
A host SHOULD make some reasonableness check on any address mask it installs.
With a statically configured address mask, there SHOULD be an additional configuration flag that determines whether the host is to act as an authoritative agent for this mask, i.e., whether it will answer Address Mask Request messages using this mask.
See "System Initialization" in [RFC-1123] for more information about the use of Address Mask Request/Reply messages.
RFC 1812, page 61:
A router SHOULD have a configuration option for each logical interface specifying whether the router is allowed to answer Address Mask Requests for that interface; this option MUST default to allowing responses. A router MUST NOT respond to an Address Mask Request before the router knows the correct address mask.
A router MUST NOT respond to an Address Mask Request that has a source address of 0.0.0.0 and which arrives on a physical interface that has associated with it multiple logical interfaces and the address masks for those interfaces are not all the same.
|MAC header||IP header||ICMP message 17|
|Type||Code||ICMP header checksum|
Type. 8 bits. Set to 17.
Code. 8 bits. Always 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 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.
The identifier is used to help match the request to the associated reply. It may be set to zero.
The sequence number is used to help match the request to the associated reply. It may be set to zero.
The subnet mask of the requesting host.
[RFC 950] IP Subnet Extension.
[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.