ietf-corpus

rfc-4884

Extended ICMP to Support Multi-Part Messages

R. Bonica, D. Gan, D. Tappan, C. Pignataro
date2007-04 streamIETF wgnon working group statusPROPOSED STANDARD pages19 canonicalhttps://www.rfc-editor.org/rfc/rfc4884 doi10.17487/RFC4884 errataview
This document redefines selected ICMP messages to support multi-part operation. A multi-part ICMP message carries all of the information that ICMP messages carried previously, as well as additional information that applications may require. Multi-part messages are supported by an ICMP extension structure. The extension structure is situated at the end of the ICMP message. It includes an extension header followed by one or more extension objects. Each extension object contains an object header and object payload. All object headers share a common format. This document further redefines the above mentioned ICMP messages by specifying a length attribute. All of the currently defined ICMP messages to which an extension structure can be appended include an "original datagram" field. The "original datagram" field contains the initial octets of the datagram that elicited the ICMP error message. Although the original datagram field is of variable length, the ICMP message does not include a field that specifies its length. Therefore, in order to facilitate message parsing, this document allocates eight previously reserved bits to reflect the length of the "original datagram" field. The proposed modifications change the requirements for ICMP compliance. The impact of these changes on compliant implementations is discussed, and new requirements for future implementations are presented. This memo updates RFC 792 and RFC 4443. [STANDARDS-TRACK]

updated by

updates

Extracted elements (22)

design-rationale §1

Appending additional information to existing ICMP messages (e.g., Time Exceeded) is preferred over defining new message types, avoiding the need to emit two separate ICMP messages whenever a packet is dropped due to TTL expiration.

ip

design-rationale §4.6

Extensions were not defined for ICMPv6 'Packet Too Big' and 'Parameter Problem' messages because these messages lack space for a length attribute, making it impossible to delimit the 'original datagram' field from extension data.

ip

design-rationale §5.1

The 128-octet minimum for the 'original datagram' field was chosen for backwards compatibility: classic applications that receive an ICMP message with extensions will misinterpret extensions as part of the original datagram, but this only affects applications that process beyond the 128th octet, which are extremely rare.

ip

design-rationale §4

The length attribute for ICMPv4 and ICMPv6 was placed in previously reserved octets (sixth octet for ICMPv4, fifth octet for ICMPv6) so that the extension structure could be added without changing the positions of existing fields, enabling backwards compatibility.

ip

interoperability-note §6

ICMP extensions do not interfere with NAT as defined in RFC 3022, because the outermost IP header (the only field NAT modifies) is guaranteed to be contained within the first 128 octets of the 'original datagram' field. However, a non-conforming NAT that overwrites the length attribute with zeros produces a packet indistinguishable from a non-compliant ICMP implementation.

ip, nat

interoperability-note §5.3

Non-compliant applications assume the ICMPv4 Extension Structure begins at the 137th octet (after 8 bytes of fixed header and 128 bytes of original datagram). They will only correctly parse compliant extensions if the 'original datagram' field contains exactly 128 octets.

ip

interoperability-note §5

Non-compliant ICMP implementations (produced 1999 to publication) may append the extension structure to Time Exceeded and Destination Unreachable messages with exactly 128 octets of original datagram and correct checksums, but without specifying the length attribute. Compliant applications receiving such messages will see a zero length attribute and incorrectly determine no extensions are present.

ip

normative-requirement §5.5 MUST

Compliant TRACEROUTE implementations MUST include a non-default operation mode to interpret non-compliant responses by parsing for a valid extension header at a fixed location assuming a 128-octet 'original datagram' field.

ip

normative-requirement §3 SHOULD

ICMP messages defined in the future SHOULD indicate whether or not they support the extension mechanism defined in this specification; it is recommended that all new messages support extensions.

ip

normative-requirement §4.6 MUST NOT

The ICMP Extension Structure MUST NOT be appended to any ICMP messages other than ICMPv4 Destination Unreachable, Time Exceeded, and Parameter Problem, and ICMPv6 Destination Unreachable and Time Exceeded.

ip

normative-requirement §4 MUST

The length attribute MUST be specified when the ICMP Extension Structure is appended to the affected ICMPv4 (Destination Unreachable, Time Exceeded, Parameter Problem) and ICMPv6 (Destination Unreachable, Time Exceeded) messages.

ip

normative-requirement §7 MUST NOT

The total length of the ICMP message, including extensions, MUST NOT exceed the minimum reassembly buffer size (576 octets for ICMPv4 or 1280 octets for ICMPv6).

ip

normative-requirement §5.4 MUST

When a compliant application receives an ICMP message and the length attribute is zero, it MUST determine that the message contains no extensions.

ip

normative-requirement §3 MUST

When the ICMP Extension Structure is appended to an ICMPv6 message with an 'original datagram' field, that field MUST be zero padded to the nearest 64-bit boundary.

ip

protocol-element §7

The ICMP Extension Structure is an optional structure appended to the end of selected ICMP messages. It consists of exactly one Extension Header followed by one or more extension objects, each containing an object header and payload.

ip, security

registry §10

IANA has established a registry of ICMP Extension Object classes and class sub-types. Class-Num values 0xF7–0xFF are reserved for private use. Object class values are assignable on a first-come-first-served basis. Sub-type value assignment policy is defined per class.

registry, ip

security-consideration §9

This memo does not define conditions under which a router sends ICMP messages and therefore does not expose routers to new denial-of-service attacks, though routers may need to rate-limit ICMP message transmission.

security, ip

security-consideration §9

Upon receipt of an ICMP message, application software must verify the extension checksum and check for syntactic correctness. Improperly specified length attributes and other syntax problems may result in buffer overruns.

security, ip

wire-format §8

Each ICMP Extension Object header is a 32-bit structure with a 16-bit Length field (total object length in octets including header), an 8-bit Class-Num field (object class), and an 8-bit C-Type field (object sub-type), followed by the object payload.

ip

wire-format §4

For ICMPv4 messages (Destination Unreachable, Time Exceeded, Parameter Problem), an 8-bit Length field is placed in the sixth octet (previously reserved) of the second word, representing the length of the padded 'original datagram' field measured in 32-bit words.

ip

wire-format §4

For ICMPv6 messages (Destination Unreachable, Time Exceeded), an 8-bit Length field is placed in the fifth octet (previously reserved) of the second word, representing the length of the padded 'original datagram' field measured in 64-bit words.

ip

wire-format §7

The ICMP Extension Header is a 32-bit structure with a 4-bit Version field (value 2), a 12-bit Reserved field (must be zero), and a 16-bit Checksum field containing the one's complement of the one's complement sum of the data structure.

ip