ietf-corpus

rfc-6951

UDP Encapsulation of Stream Control Transmission Protocol (SCTP) Packets for End-Host to End-Host Communication

M. Tuexen, R. Stewart
date2013-05 streamIETF areawit wgtsvwg statusPROPOSED STANDARD pages12 canonicalhttps://www.rfc-editor.org/rfc/rfc6951 doi10.17487/RFC6951
This document describes a simple method of encapsulating Stream Control Transmission Protocol (SCTP) packets into UDP packets and its limitations. This allows the usage of SCTP in networks with legacy NATs that do not support SCTP. It can also be used to implement SCTP on hosts without directly accessing the IP layer, for example, implementing it as part of the application without requiring special privileges. Please note that this document only describes the functionality required within an SCTP stack to add on UDP encapsulation, providing only those mechanisms for two end-hosts to communicate with each other over UDP ports. In particular, it does not provide mechanisms to determine whether UDP encapsulation is being used by the peer, nor the mechanisms for determining which remote UDP port number can be used. These functions are out of scope for this document. This document covers only end-hosts and not tunneling (egress or ingress) endpoints.

updated by

Extracted elements (23)

design-rationale §5.1

Each SCTP stack uses a single local UDP encapsulation port number as the destination for all incoming SCTP packets. Using a single port greatly simplifies implementation because multiple per-address ports would require the sender to choose the correct port during source address selection.

sctp, udp

design-rationale §3.2

SCTP sends periodic HEARTBEAT chunks on all idle paths. When using UDP encapsulation for legacy NAT traversal, these HEARTBEATs serve the additional function of keeping NAT state alive for each path.

sctp, nat, udp

design-rationale §1

UDP encapsulation of SCTP serves two purposes: enabling SCTP traffic to pass through legacy NATs that lack native SCTP support, and allowing SCTP to be implemented in user space on hosts without direct IP-layer access, removing the need for special operating system privileges.

sctp, nat, udp

interoperability-note §5.3

Although zero UDP checksum over IPv6 is allowed under RFC 6936, this document does not specify mechanisms for that mode. Deployed support may be limited, and at the time of writing, a zero UDP checksum would be counter to the goal of legacy NAT traversal.

sctp, udp, nat

normative-requirement §5.1 MUST

An SCTP implementation supporting UDP encapsulation MUST maintain a remote UDP encapsulation port number per destination address for each SCTP association, because remapping by NATs may cause different remote IP addresses of the same stack to appear on different ports.

sctp, udp, nat

normative-requirement §5.3 MUST

During encapsulation, the UDP source port MUST be the local UDP encapsulation port number of the SCTP stack, and the UDP destination port MUST be the remote UDP encapsulation port number maintained for the association and the destination address.

sctp, udp

normative-requirement §3.2 MUST NOT

For legacy NAT traversal with single-homed associations, IP addresses MUST NOT be listed in the INIT and INIT-ACK chunks. To use multiple addresses, RFC 5061 MUST be used only with wildcard addresses in ASCONF chunks in combination with RFC 4895.

sctp, nat

normative-requirement §5.5 MUST NOT

If a received ICMP or ICMPv6 packet cannot be related to a specific SCTP association or the verification tag cannot be verified, it MUST be discarded silently. The SCTP stack MUST NOT rely on receiving ICMP or ICMPv6 messages.

sctp, udp

normative-requirement §5.6 MUST

If an SCTP endpoint starts to encapsulate the packets of a path, it MUST decrease the Path MTU of that path by the size of the UDP header. PMTU discovery using ICMP feedback cannot be relied upon due to the ICMP limitations described in Section 5.5.

sctp, udp

normative-requirement §5.5 SHOULD

If ICMP/ICMPv6 messages are processed, ICMP 'Destination Unreachable / Port Unreachable' SHOULD be treated as 'Destination Unreachable / Protocol Unreachable' (IPv4), and ICMPv6 'Destination Unreachable / Port Unreachable' SHOULD be treated as 'Parameter Problem / unrecognized Next Header type encountered' (IPv6).

sctp, udp

normative-requirement §5.8 MUST NOT

If the implementation supports sending and receiving ECN bits for the IP protocols used by an SCTP association, the ECN bits MUST NOT be changed during sending and receiving.

sctp, ecn, udp

normative-requirement §5.3 MUST

The UDP packet length MUST be the SCTP packet length plus the size of the UDP header. The SCTP checksum MUST be computed for both IPv4 and IPv6; the UDP checksum SHOULD be computed for both IPv4 and IPv6.

sctp, udp

normative-requirement §5.4 MUST

Upon decapsulation, after removing the UDP header and finding the SCTP association via the verification tag, the UDP source port MUST be stored as the encapsulation port for the destination address from which the SCTP packet was received.

sctp, udp

normative-requirement §5.4 MUST

When a non-encapsulated SCTP packet is received, encapsulation of outgoing packets belonging to the same association and the corresponding destination address MUST be disabled.

sctp, udp

normative-requirement §5.7 MUST

When addresses are changed during the lifetime of an association, the RFC 5061 dynamic address reconfiguration extension MUST be used with wildcard addresses only. If an SCTP endpoint receives an ABORT with the T-bit set, it MAY use this as an indication that the peer's visible addresses may have changed.

sctp, nat

normative-requirement §5.7 MUST NOT

When using UDP encapsulation for legacy NAT traversal, IP addresses that might require translation MUST NOT be put into any SCTP packet. A multihomed association must be set up initially as single-homed, and RFC 5061 with RFC 4895 must be used with wildcard addresses only to add additional addresses.

sctp, nat, udp

protocol-element §6.1

The SCTP_REMOTE_UDP_ENCAPS_PORT socket option (struct sctp_udpencaps with fields sue_assoc_id, sue_address, sue_port) allows an application to set and retrieve the remote UDP encapsulation port number per association and destination address. Setting sue_port to 0 disables UDP encapsulation.

sctp, udp

protocol-element §5.1

UDP-encapsulated SCTP normally uses IANA-assigned UDP port 9899 (sctp-tunneling) on both ends. Implementations in application space may use other ports, and NAT boxes may remap port numbers, so implementations must handle port numbers other than 9899.

sctp, udp, nat

registry §7

IANA updated the existing UDP port 9899 (sctp-tunneling) assignment to refer to this document. The TCP port 9899 (sctp-tunneling) assignment was removed and TCP port 9899 was marked as 'Reserved' since it is no longer needed.

sctp, udp, registry

security-consideration §8

Encapsulating SCTP into UDP does not add any security considerations beyond those in RFC 4960 and RFC 5061. An attacker attempting to change the encapsulation port for a remote address must supply a valid verification tag, providing the same blind-attacker protection as native SCTP.

sctp, udp, security

security-consideration §8

Firewalls that inspect SCTP packets must also be aware of UDP encapsulation and apply corresponding rules to the encapsulated packets; otherwise, encapsulated SCTP traffic may bypass SCTP-specific firewall policies.

sctp, udp, security

wire-format §5.2

For IPv4, the encapsulated packet format is: IPv4 Header | UDP Header | SCTP Common Header | SCTP Chunk #1 ... SCTP Chunk #n. The UDP header is inserted between the IP header and the SCTP common header.

sctp, udp, ip

wire-format §5.2

For IPv6, the encapsulated packet format is: IPv6 Base Header | IPv6 Extension Headers (0 or more) | UDP Header | SCTP Common Header | SCTP Chunk #1 ... SCTP Chunk #n.

sctp, udp, ip