ietf-corpus

rfc-6156

Traversal Using Relays around NAT (TURN) Extension for IPv6

G. Camarillo, O. Novo, S. Perreault (Editor)
date2011-04 streamIETF areatsv wgbehave statusPROPOSED STANDARD pages14 canonicalhttps://www.rfc-editor.org/rfc/rfc6156 doi10.17487/RFC6156
This document adds IPv6 support to Traversal Using Relays around NAT (TURN). IPv6 support in TURN includes IPv4-to-IPv6, IPv6-to-IPv6, and IPv6-to-IPv4 relaying. This document defines the REQUESTED- ADDRESS-FAMILY attribute for TURN. The REQUESTED-ADDRESS-FAMILY attribute allows a client to explicitly request the address type the TURN server will allocate (e.g., an IPv4-only node may request the TURN server to allocate an IPv6 address). [STANDARDS-TRACK]

obsoleted by

Extracted elements (28)

design-rationale §3

A client wishing to allocate both an IPv4 and an IPv6 relayed transport address must perform two separate Allocate requests, one per address family. This is because TURN allocates a single relayed transport address per allocation request, and Allocate requests cannot carry more than one REQUESTED-ADDRESS-FAMILY attribute.

nat, ip, v6ops

design-rationale §8

The packet translation behaviors are designed so that a TURN server can be implemented as a user-land application without special OS privileges, consistent with the principle stated in RFC 5766 Section 2.6. Both preferred and alternate translation behaviors follow this constraint.

nat, ip, v6ops

interoperability-note §4.2

If a TURN server does not understand the REQUESTED-ADDRESS-FAMILY attribute (e.g., a legacy server), it generates a 420 (Unknown Attribute) Allocate error response containing an UNKNOWN-ATTRIBUTE attribute, per RFC 5389 comprehension-required attribute rules.

nat, ip

normative-requirement §4.1 MUST NOT

Clients MUST NOT include a REQUESTED-ADDRESS-FAMILY attribute in an Allocate request that also contains a RESERVATION-TOKEN attribute. If a server receives a request with both, it replies with a 400 (Bad Request) error.

nat, ip

normative-requirement §4.1 MUST NOT

Clients MUST NOT include more than one REQUESTED-ADDRESS-FAMILY attribute in an Allocate request.

nat, ip

normative-requirement §8.1 MUST

For both preferred and alternate behavior in all translation directions (IPv4-to-IPv6, IPv6-to-IPv6, IPv6-to-IPv4), the DONT-FRAGMENT attribute MUST be ignored by the server.

nat, ip, v6ops

normative-requirement §5.2 MUST

If a server receives a Refresh Request with a REQUESTED-ADDRESS-FAMILY attribute whose value does not match the address family of the allocation, the server MUST reply with a 443 (Peer Address Family Mismatch) Refresh error response.

nat, ip

normative-requirement §6.2 MUST

If an XOR-PEER-ADDRESS attribute in a CreatePermission request contains an address of a different family than the allocation's relayed transport address, the server MUST generate an error response with the 443 (Peer Address Family Mismatch) code.

nat, ip

normative-requirement §4.3 MUST NOT

If the client receives an Allocate error response with the 440 (Address Family not Supported) error code, the client MUST NOT retry its request.

nat, ip

normative-requirement §4.2 MUST

If the REQUESTED-ADDRESS-FAMILY attribute is absent from an Allocate request, the server MUST allocate an IPv4 relayed transport address. If local policy disables IPv4 allocation, the server returns a 440 (Address Family not Supported) error.

nat, ip, v6ops

normative-requirement §4.2 MUST

If the server does not support the address family requested by the client, it MUST generate an Allocate error response including an ERROR-CODE attribute with the 440 (Address Family not Supported) response code.

nat, ip

normative-requirement §7.1 MUST

In a ChannelBind request, the client MUST only include an XOR-PEER-ADDRESS attribute with an address of the same address family as the allocation's relayed transport address; if mismatched, the server MUST return a 443 error.

nat, ip

normative-requirement §6.1 MUST

In a CreatePermission request, the client MUST only include XOR-PEER-ADDRESS attributes with addresses of the same address family as that of the allocation's relayed transport address.

nat, ip

normative-requirement §5.1 MUST NOT

The client MUST NOT include any REQUESTED-ADDRESS-FAMILY attribute in a Refresh Request; the address family of an existing allocation cannot be changed via refresh.

nat, ip

normative-requirement §9.1 MUST NOT

To mitigate the tunnel amplification attack, a TURN relay MUST NOT accept Teredo or 6to4 addresses in allocation or channel binding requests, and it is RECOMMENDED that relays not accept requests from or forward data to addresses known to be tunneled.

security, nat, ip, v6ops

normative-requirement §8 MUST

TURN relays performing any IPv4/IPv6 translation MUST translate the IP addresses and port numbers of packets based on the allocation's state information as specified in RFC 5766.

nat, ip, v6ops

protocol-element §4.2.1

Error code 440 (Address Family not Supported) is defined for cases where the TURN server does not support the address family requested by the client in an Allocate request.

nat, ip, v6ops, registry

protocol-element §6.2.1

Error code 443 (Peer Address Family Mismatch) is defined for cases where a peer address in a CreatePermission or ChannelBind request is of a different address family than the relayed transport address of the allocation.

nat, ip, registry

protocol-element §8.1

For IPv4-to-IPv6 translations, the relay translates Traffic Class, Flow Label (preferred: set to 0), Hop Limit, and Fragmentation per RFC 6145. Extension headers are stripped except for the Fragment Header. The DONT-FRAGMENT attribute MUST be ignored.

nat, ip, v6ops

protocol-element §8.3

For IPv6-to-IPv4 translations, the relay translates Type of Service, Time to Live, and Fragmentation per RFC 6145. When outgoing size exceeds MTU, the relay generates an ICMPv6 Packet Too Big error. The DONT-FRAGMENT attribute MUST be ignored.

nat, ip, v6ops

protocol-element §8.2

For IPv6-to-IPv6 translations, the relay treats the two flows independently: Flow Label SHOULD NOT be copied, Hop Limit is decremented as a router, and fragmentation logic preserves or regenerates Fragment Headers based on MTU. Outgoing fragments exceeding MTU must be no more than 1280 bytes.

nat, ip, v6ops

protocol-element §4.1.1

The REQUESTED-ADDRESS-FAMILY attribute (type 0x0017) is a new comprehension-required STUN attribute allowing a client to request a specific address family (IPv4 or IPv6) for a TURN allocation. It is encoded as a TLV with a 1-byte Family field (0x01 for IPv4, 0x02 for IPv6) and 24 bits of reserved zero padding, for a total value length of 4 bytes.

nat, ip, v6ops, registry

registry §10.1

This document registers STUN attribute type 0x0017 (REQUESTED-ADDRESS-FAMILY) in the IANA STUN Attributes registry. The attribute is comprehension-required (value < 0x8000).

registry, nat, ip

registry §10.2

This document registers two new STUN error codes in the IANA STUN Error Codes registry: 440 (Address Family not Supported) and 443 (Peer Address Family Mismatch).

registry, nat, ip

security-consideration §9.1

A tunnel amplification attack is possible when an attacker spoofs Allocate and ChannelBind requests to establish a loop between a TURN relay (doing IPv6-to-IPv4 translation) and an IPv4-IPv6 tunnel endpoint. The attacker sends nested TURN-channeled IPv6 packets that bounce between the relay and the tunnel, amplifying traffic up to roughly 4:1 within a 1500-byte MTU.

security, nat, ip, v6ops

security-consideration §9

Enabling IPv4-to-IPv6 and IPv6-to-IPv4 translation via TURN creates new paths for clients to reach address families they would not otherwise access (e.g., an IPv4-only client gaining IPv6 Internet access). Security and monitoring policies must account for this new capability.

security, nat, ip, v6ops

security-consideration §9

The loop attack described in RFC 5766 Section 17.1.7 may be more easily executed over IPv6 where address spoofing is simpler. Mitigation is the same as for IPv4.

security, nat, ip

wire-format §4.1.1

REQUESTED-ADDRESS-FAMILY attribute wire format: 16-bit Type (0x0017), 16-bit Length (4), 8-bit Family (0x01=IPv4, 0x02=IPv6), 24-bit Reserved (must be zero on send, ignored on receive). Total attribute size is 8 bytes including the TLV header.

nat, ip, v6ops