rfc-6936

Applicability Statement for the Use of IPv6 UDP Datagrams with Zero Checksums

G. Fairhurst, M. Westerlund
date2013-04 streamIETF areaint wg6man statusPROPOSED STANDARD pages40 canonicalhttps://www.rfc-editor.org/rfc/rfc6936 doi10.17487/RFC6936 errataview
This document provides an applicability statement for the use of UDP transport checksums with IPv6. It defines recommendations and requirements for the use of IPv6 UDP datagrams with a zero UDP checksum. It describes the issues and design principles that need to be considered when UDP is used with IPv6 to support tunnel encapsulations, and it examines the role of the IPv6 UDP transport checksum. The document also identifies issues and constraints for deployment on network paths that include middleboxes. An appendix presents a summary of the trade-offs that were considered in evaluating the safety of the update to RFC 2460 that changes the use of the UDP checksum with IPv6.

Extracted elements (27)

design-rationale §A.2.6

Among all alternatives evaluated (IP-in-IP, UDP-Lite, delta checksum, UDPTT, IPv6 Destination Options header, checksum-ignore), zero UDP checksum was selected as the best fit because it minimizes per-packet processing, works with the largest class of existing middleboxes, and is identifiable (unlike silent checksum-ignore).

udp, ip

design-rationale §1.3.2

For tunnel encapsulations, the inner payload (e.g., an IP packet) already carries its own integrity check, making the outer UDP checksum redundant. AMT replication also requires a different pseudo-header per tunnel egress, making full checksum computation an unwarranted burden for lightweight tunnel protocols.

udp, ip

design-rationale §1.3.3

Hardware routers commonly expose only the first ~128 bytes of a packet to their forwarding engine. Computing a full-datagram UDP checksum requires access to the entire packet, making RFC 2460's mandatory UDP checksum poorly suited for tunnel ingress/egress routers and impacting router design, performance, energy consumption, and cost.

udp, ip

design-rationale §3

IPv6 lacks a network-layer header checksum (unlike IPv4), so the UDP transport checksum in IPv6 is overloaded with functions including verifying destination address correctness, extension header delimitation, reassembly, payload length, port demultiplexing, and payload integrity. Removing the UDP checksum therefore has greater risk in IPv6 than in IPv4.

udp, ip

design-rationale §2.2.1

UDP-Lite was evaluated as an alternative but rejected for general Internet tunnel use because it uses a distinct IPv6 Next Header value that nearly all deployed middleboxes (load balancers, NATs, firewalls) do not recognize, making it less deployable than zero-checksum UDP.

udp, ip

interoperability-note §5

A middlebox MUST NOT maintain separate state for a UDP flow based on the checksum field value; doing so would break bidirectional flows where one direction uses a calculated checksum and the other uses a zero checksum.

udp, ip, nat

interoperability-note §1.3.4

Firewalls and NATs conforming to RFC 2460 will regard zero-checksum IPv6 UDP datagrams as invalid and discard them. A NAT that increments the checksum field will also corrupt a zero-checksum datagram. Both must be updated before zero-checksum traffic can traverse them.

udp, ip, nat

interoperability-note §3.1.5

Fragmentation of datagrams with a zero UDP checksum does not worsen corruption detection compared to commonly used IP-in-IP tunnels, but recursive tunneling that applies fragmentation at multiple layers without per-layer verification significantly raises the probability of undetected errors.

udp, ip

normative-requirement §5 MUST

A middlebox MUST allow forwarding of IPv6 UDP datagrams with both zero and standard checksums using the same UDP port, and MUST NOT maintain separate flow state depending on whether a datagram's UDP checksum field is zero or non-zero.

udp, ip

normative-requirement §4 MUST NOT

A port for which zero UDP checksum has been enabled MUST NOT log a received datagram solely because the checksum value is zero; however, datagrams received with zero checksum on ports that have not enabled it SHOULD still be logged per RFC 2460.

udp, ip

normative-requirement §5 MUST

A transported protocol MUST be designed so that corruption of any header information does not result in accumulation of incorrect state; it must be robust when malformed or misdelivered packets arrive on a listening port.

udp, ip

normative-requirement §5 MUST

A transported protocol with a non-tunnel payload or one encapsulating non-IP packets MUST include a CRC or other packet-integrity mechanism, unless the non-IP payload is specifically designed for a lower layer that does not provide packet integrity guarantees.

udp, ip

normative-requirement §5 RECOMMENDED

An integrity mechanism is always RECOMMENDED at the transported protocol layer to ensure that corruption rates of the delivered payload are not increased; a mechanism that isolates causes of corruption (misdelivery, IPv6 header corruption, tunnel header corruption) is also expected.

udp, ip, security

normative-requirement §4 MUST

IPv6 nodes MUST provide a mechanism (e.g., socket API) for the application or protocol to indicate which ports are enabled to send datagrams with a zero UDP checksum.

udp, ip

normative-requirement §4 MUST

IPv6 nodes MUST provide a method for an application or protocol to require that a particular UDP datagram be sent with a calculated checksum at any time, even when the socket is operating in zero-checksum mode (e.g., for keepalive datagrams).

udp, ip

normative-requirement §4 SHOULD NOT

IPv6 nodes SHOULD NOT, by default, allow the zero UDP checksum method for transmission.

udp, ip

normative-requirement §4 MUST

IPv6 nodes supporting zero UDP checksum MUST also accept reception of datagrams with a calculated (non-zero) checksum on all ports configured for zero-checksum reception, and MUST apply the RFC 2460 reception method when the checksum field is not zero.

udp, ip

normative-requirement §4 MUST

IPv6 nodes that receive ICMPv6 messages referring to packets with a zero UDP checksum MUST validate the consistency of the reported packet (address and port numbers) to verify that it actually originated from the node before acting on the ICMPv6 information.

udp, ip

normative-requirement §5 SHOULD

Keepalive messages SHOULD include both UDP datagrams with a calculated checksum and datagrams with a zero UDP checksum, so the remote endpoint can distinguish between a general path failure and selective dropping of zero-checksum datagrams.

udp, ip

normative-requirement §4 MUST

The default IPv6 receiver behavior MUST be to discard all IPv6 packets carrying UDP datagrams with a zero checksum; zero-checksum reception must be explicitly enabled per port.

udp, ip

normative-requirement §5 SHOULD

Transported protocols SHOULD send keepalive messages with a zero UDP checksum to discover paths with middleboxes that drop zero-checksum packets; an endpoint that observes appreciable keepalive loss MAY terminate the tunnel.

udp, ip

normative-requirement §5 MUST

Transported protocols that enable zero UDP checksum MUST enable this only for a specific port or port range, and this must be enabled at both the sending and receiving endpoints for a UDP flow.

udp, ip

protocol-element §3.3

Path validation is required before relying on zero UDP checksum: a sender must probe the path, because middleboxes conforming to RFC 2460 will discard zero-checksum datagrams. A bidirectional path does not necessarily support zero checksum in both directions, and path characteristics may change, requiring periodic re-validation.

udp, ip

protocol-element §3.4

The zero UDP checksum method for IPv6 is defined in RFC 6935 and is applicable only to specific protocols or tunnel encapsulations that explicitly opt in on a per-port basis. It is not a general replacement for the mandatory checksum defined in RFC 2460, and IPv6 with zero UDP checksum is not equivalent to IPv4 with zero UDP checksum.

udp, ip

security-consideration §7

If a tunnel egress handles zero-checksum packets in the fast path but non-zero checksum packets in the slow path, an attacker can inject non-zero checksummed packets to cause overload. Protection must include source-address filtering and rate-limiting of non-zero checksum traffic on zero-checksum tunnel ports.

udp, ip, security

security-consideration §7

Probing the network path to determine whether it supports zero UDP checksum packets can reveal the operating system or tunnel type to an on-path observer. If the probing mechanism is visible in the network (e.g., not protected by IPsec), it discloses configuration information.

udp, ip, security, privacy

security-consideration §7

Transport checksums serve as the first stage of stack protection and enable accurate packet counter logging and detection of unusual behaviors; removing the UDP checksum for IPv6 requires compensating integrity mechanisms at the tunnel or application layer to preserve these properties.

udp, ip, security