UDP Encapsulation of Stream Control Transmission Protocol (SCTP) Packets for End-Host to End-Host Communication
Muenster University of Applied SciencesStegerwaldstrasse 3948565 SteinfurtDEtuexen@fh-muenster.deAdara NetworksChapinSC29036USrandall@lakerest.netexampleThis 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.This document describes a simple method of encapsulating SCTP packets
into UDP packets. SCTP, as defined in , runs directly
over IPv4 or IPv6. There are two main reasons for encapsulating SCTP packets:
To allow SCTP traffic to pass through legacy NATs, which do not provide native
SCTP support as specified in and
.To allow SCTP to be implemented on hosts that do not provide direct
access to the IP layer. In particular, applications can use their own
SCTP implementation if the operating system does not provide one.SCTP provides the necessary congestion control and reliability service
that UDP does not perform.The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL"
in this document are to be interpreted as described in
.This section discusses two important use cases for encapsulating
SCTP into UDP.Some operating systems support SCTP natively. For other
operating systems, implementations are available but require
special privileges to install and/or use them. In some cases,
a kernel implementation might not be available at all. When providing
an SCTP implementation as part of a user process, most operating
systems require special privileges to access the IP layer
directly.Using UDP encapsulation makes it possible to provide an
SCTP implementation as part of a user process that does not
require any special privileges.A crucial point for implementing SCTP in user space is that the
source address of outgoing packets needs to be controlled.
This is not an issue if the SCTP stack can use all addresses configured
at the IP layer as source addresses.
However, it is an issue when also using the address management required for
NAT traversal, described in .Using UDP encapsulation allows SCTP communication when
traversing legacy NATs (i.e, those NATs not supporting SCTP as described in
and
).
For single-homed associations, IP addresses MUST NOT be listed in
the INIT and INIT-ACK chunks.
To use multiple addresses, the dynamic address reconfiguration extension
described in MUST be used only with wildcard addresses
in the ASCONF chunks (Address Configuration Change Chunks) in combination with .For multihomed SCTP associations, the address management
as described in MUST be performed.SCTP sends periodic HEARTBEAT chunks on all idle paths.
These can keep the NAT state alive.As requires a limited scope,
this document only covers SCTP endpoints dealing with legacy constraints
as described in . It doesn't cover generic tunneling
endpoints.Obviously, the exit strategy is to use hosts supporting SCTP natively and
middleboxes supporting SCTP as specified in
and
.UDP-encapsulated SCTP is normally communicated between SCTP stacks
using the IANA-assigned UDP port number 9899 (sctp-tunneling) on both
ends. There are circumstances where other ports may be used on either
end: As stated earlier, implementations in the application space
might be required to use ports other than the registered port.
Since NAT
boxes might change UDP port numbers, the receiver might observe other
UDP port numbers than were used by the sender.
Discovery of alternate ports is outside of the scope of this document,
but this section describes considerations for SCTP stack design in light
of their potential use.Each SCTP stack uses a single local UDP encapsulation port number as
the destination port for all its incoming SCTP packets.
While the uniqueness of the local UDP encapsulation port number is not
necessarily required for the protocol, this greatly simplifies implementation
design, since different ports for each address would require a sender
implementation to choose the appropriate port while doing source address
selection.
Using a single local UDP encapsulation port number per host is not possible
if the SCTP stack is implemented as part of each application, there are multiple
applications, and some of the applications want to use the same IP address.An SCTP implementation supporting UDP encapsulation MUST maintain a
remote UDP encapsulation port number per destination address for each
SCTP association. Again, because the remote stack may be using ports other
than the well-known port, each port may be different from each stack.
However, because of remapping of ports by NATs, the remote ports
associated with different remote IP addresses may not be identical,
even if they are associated with the same stack.Implementation note: Because the well-known port might not be used,
implementations need to allow other port numbers to be specified as a
local or remote UDP encapsulation port number through APIs.To encapsulate an SCTP packet, a UDP header
as defined in is inserted between
the IP header as defined in
and the SCTP common header as defined in . shows the packet
format of an encapsulated SCTP packet when IPv4 is
used.The packet format for an encapsulated SCTP packet when using
IPv6 as defined in is shown in
.
Please note that the number m of IPv6 extension headers can be 0.Within the UDP header, the source port MUST be the local UDP
encapsulation port number of the SCTP stack, and the destination port MUST be the remote UDP encapsulation port number
maintained for the association and the destination address to which the
packet is sent (see ).Because the SCTP packet is the UDP payload, the length of the
UDP packet MUST be the length of the SCTP packet plus the size of
the UDP header.
The SCTP checksum MUST be computed for IPv4 and IPv6, and the UDP checksum
SHOULD be computed for IPv4 and IPv6. (See regarding IPv4;
see
and regarding IPv6.)
Although UDP with a zero checksum over IPv6 is allowed under certain
constraints , this document does not
specify mechanisms for this mode.
Deployed support may be limited; also, at the time of writing, the use of a zero
UDP checksum would be counter to the goal of legacy NAT traversal.When an encapsulated packet is received, the UDP header
is removed.
Then, the generic lookup is performed, as done by an SCTP stack
whenever a packet is received, to find the association
for the received SCTP packet. After finding the SCTP association
(which includes checking the verification tag),
the UDP source port MUST be stored as the encapsulation port for
the destination address the SCTP packet is received from
(see ).When a non-encapsulated SCTP packet is received by the
SCTP stack, the encapsulation of outgoing packets belonging
to the same association and the corresponding destination
address MUST be disabled.When receiving ICMP or ICMPv6 response packets, there might not
be enough bytes in the payload to identify the SCTP association
that the SCTP packet triggering the ICMP or ICMPv6 packet belongs to.
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.
In particular, this means that the SCTP stack MUST NOT rely on receiving
ICMP or ICMPv6 messages.
Implementation constraints could prevent processing received
ICMP or ICMPv6 messages.If received ICMP or ICMPv6 messages are processed,
the following mapping SHOULD apply:
ICMP messages with type 'Destination Unreachable' and code
'Port Unreachable' SHOULD be treated as ICMP messages
with type 'Destination Unreachable' and code 'Protocol Unreachable'.
See for more details.ICMPv6 messages with type 'Destination Unreachable' and code
'Port Unreachable' SHOULD be treated as ICMPv6 messages with type
'Parameter Problem' and code 'unrecognized Next Header type encountered'.
See for more details.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.
If it stops encapsulating them, the Path MTU SHOULD be increased by
the size of the UDP header.When performing Path MTU discovery as described in
and ,
it MUST be taken into account that one cannot rely on the feedback
provided by ICMP or ICMPv6 due to the limitation laid out in
.If the implementation does not allow control of the Don't Fragment
(DF) bit contained in the IPv4 header, then Path MTU discovery can't be used.
In this case, an implementation-specific value should be used instead.When using UDP encapsulation for legacy NAT traversal, IP addresses that
might require translation MUST NOT be put into any SCTP packet.This means that a multihomed SCTP association is set up initially as a
single-homed one, and the protocol extension
in combination with is used to add the other
addresses. Only wildcard addresses are put into the SCTP packet.When addresses are changed during the lifetime of an association
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 addresses seen by the peer might
have changed.If the implementation supports the sending and receiving of the
ECN bits for the IP protocols being used by an SCTP association,
the ECN bits MUST NOT be changed during sending and receiving.This section describes how the socket API defined in
needs to be extended to provide a way for the
application to control the UDP encapsulation.Please note that this section is informational only.A socket API implementation based on
is extended by supporting one new read/write socket option.This socket option can be used to set and retrieve the UDP encapsulation
port number. This allows an endpoint to encapsulate initial packets.
This parameter is ignored for one-to-one style sockets.
For one-to-many style sockets, the application may fill in an association
identifier or SCTP_FUTURE_ASSOC for this query.
It is an error to use SCTP_{CURRENT|ALL}_ASSOC in sue_assoc_id.
This specifies which address is of interest. If a wildcard address
is provided, it applies only to future paths.
The UDP port number in network byte order; used as the destination port number
for UDP encapsulation. Providing a value of 0 disables UDP encapsulation.This document refers to the already assigned UDP port 9899 (sctp-tunneling).
IANA has updated this assignment to refer to this document.
As per , the Assignee is [IESG] and
the Contact is [IETF_Chair].Please note that the TCP port 9899 (sctp-tunneling) assignment is not
needed anymore, and IANA has removed this TCP port number assignment
and marked TCP port 9899 as "Reserved".Encapsulating SCTP into UDP does not add any additional
security considerations to the ones given in
and
.Firewalls inspecting SCTP packets must also be aware of the encapsulation
and apply corresponding rules to the encapsulated packets.An attacker might send a malicious UDP packet towards an SCTP endpoint
to change the encapsulation port for a single remote address of
a particular SCTP association.
However, as specified in , this requires the usage
of one of the two negotiated verification tags.
This protects against blind attackers the same way as described
in for SCTP over IPv4 or IPv6.
Non-blind attackers can affect SCTP association using the UDP encapsulation
described in this document in the same way as SCTP associations not
using the UDP encapsulation of SCTP described here.The authors wish to thank
Stewart Bryant,
Dave Crocker,
Gorry Fairhurst,
Tero Kivinen,
Barry Leiba,
Pete Resnick,
Martin Stiemerling,
Irene Ruengeler,
and Dan Wing
for their invaluable comments.Stream Control
Transmission Protocol (SCTP) Network Address TranslationStream
Control Transmission Protocol [RFC4960] provides a reliable communications
channel between two end-hosts in many ways similar to TCP [RFC0793]. With the
widespread deployment of Network Address Translators (NAT), specialized code
has been added to NAT for TCP that allows multiple hosts to reside behind a NAT
and yet use only a single globally unique IPv4 address, even when two hosts
(behind a NAT) choose the same port numbers for their connection. This
additional code is sometimes classified as Network Address and Port Translation
or NAPT. To date, specialized code for SCTP has NOT yet been added to most
NATs so that only pure NAT is available. The end result of this is that only
one SCTP capable host can be behind a NAT. This document describes an SCTP
specific variant of NAT which provides similar features of NAPT in the single
point and multi-point traversal scenario.Stream Control
Transmission Protocol (SCTP) Network Address Translation SupportStream
Control Transmission Protocol [RFC4960] provides a reliable communications
channel between two end-hosts in many ways similar to TCP [RFC0793]. With the
widespread deployment of Network Address Translators (NAT), specialized code
has been added to NAT for TCP that allows multiple hosts to reside behind a NAT
and yet use only a single globally unique IPv4 address, even when two hosts
(behind a NAT) choose the same port numbers for their connection. This
additional code is sometimes classified as Network Address and Port Translation
(NAPT). To date, specialized code for SCTP has not yet been added to most NATs
so that only pure NAT is available. The end result of this is that only one
SCTP capable host can be behind a NAT. This document describes the protocol
extensions required for the SCTP endpoints to help NATs provide similar
features of NAPT in the single-point and multi-point traversal
scenario.