RFC 8781

Discovering PREF64 in Router Advertisements

๐Ÿ“… published April 2020, from ietf

RFC 8781: Discovering PREF64 in Router Advertisements โœจ

Okay bestie, RFC 8781 is the spec for how a router can tell your device about its NAT64 prefix by sneaking it into a Router Advertisement ๐Ÿฆ‹. Here's the title block tea:

  • RFC number: 8781
  • Title: Discovering PREF64 in Router Advertisements
  • Authors: L. Colitti and J. Linkova, both at Google ๐Ÿงš
  • Category: Standards Track (ISSN 2070-1721)
  • Date: April 2020
  • Obsoletes / Updates: the header doesn't list any, so this one isn't replacing or patching another RFC ๐Ÿ’…

Abstract โœจ

So this doc defines a Neighbor Discovery option you put inside Router Advertisements (RAs) ๐Ÿ’–. Its whole job is letting routers share NAT64 prefixes with hosts. NAT64 is Network Address and Protocol Translation from IPv6 clients to IPv4 servers, so it's how IPv6 folks still reach IPv4 stuff ๐ŸŒธ.

Status of This Memo ๐ŸŽ€

Okay, so this is an Internet Standards Track document ๐Ÿ”ฅ. It's a product of the Internet Engineering Task Force (IETF), it represents the consensus of the IETF community, and it got public review and was approved by the Internet Engineering Steering Group (IESG). If you want more on Internet Standards, check Section 2 of RFC 7841 ๐Ÿฆ‹.

For the current status, any errata, and how to send feedback, go to https://www.rfc-editor.org/info/rfc8781 ๐ŸŒˆ.

Copyright (c) 2020 IETF Trust and the persons identified as the document authors. All rights reserved ๐Ÿ’….

This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please actually read these, because they lay out your rights and restrictions for this document ๐Ÿ™ˆ. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Simplified BSD License โญ.

Table of Contents ๐Ÿ“

1.  Introduction
  1.1.  Requirements Language
  1.2.  Terminology
2.  Use Cases for Communicating the NAT64 Prefix to Hosts
3.  Why Include the NAT64 Prefix in Router Advertisements?
4.  Option Format
  4.1.  Scaled Lifetime Processing
5.  Usage Guidelines
  5.1.  Handling Multiple NAT64 Prefixes
  5.2.  PREF64 Consistency
6.  IANA Considerations
7.  Security Considerations
8.  References
  8.1.  Normative References
  8.2.  Informative References
Acknowledgements
Authors' Addresses

1. Introduction ๐ŸŒธ

Okay so NAT64 [RFC6146] with DNS Extensions for Network Address Translation from IPv6 clients to IPv4 servers (DNS64) [RFC6147] is a widely deployed mechanism for giving IPv4 access on IPv6-only networks, and it's honestly iconic โœจ. In a bunch of scenarios, the host needs to know which NAT64 prefix the network is using. So this doc specifies a Neighbor Discovery [RFC4861] option to go in Router Advertisements (RAs), so routers can communicate NAT64 prefixes to hosts ๐Ÿ’–.

1.1. Requirements Language ๐ŸŽ€

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here ๐Ÿงš.

1.2. Terminology ๐Ÿ’…

  • PREF64 (or NAT64 prefix): an IPv6 prefix used for IPv6 address synthesis [RFC6146] ๐Ÿฆ‹
  • NAT64: Network Address and Protocol Translation from IPv6 clients to IPv4 servers [RFC6146] ๐ŸŒˆ
  • Router Advertisement (RA): a message used by IPv6 routers to advertise their presence together with various link and Internet parameters [RFC4861] โœจ
  • DNS64: a mechanism for synthesizing AAAA records from A records [RFC6147] ๐Ÿ’œ

2. Use Cases for Communicating the NAT64 Prefix to Hosts ๐Ÿ“

On networks running NAT64, it's super useful for hosts to know the NAT64 prefix, and here's why, bestie ๐Ÿ‘‘:

  • Enabling DNS64 functions on end hosts. In particular:
    • Local DNSSEC validation (DNS64 in stub-resolver mode). As discussed in [RFC6147], Section 2, the stub resolver in the host "will try to obtain (real) AAAA RRs, and in case they are not available, the DNS64 function will synthesize AAAA RRs for internal usage." So to do the DNS64 function, the stub resolver needs the NAT64 prefix. That's required in order to use DNSSEC on a NAT64 network ๐Ÿ”ฅ.
    • Trusted DNS server. AAAA synthesis is required so the host can use a DNS server the network didn't provide, like a DNS-over-TLS [RFC7858] or DNS-over-HTTPS [RFC8484] server it already has a trust relationship with ๐Ÿซถ.
    • Networks with no DNS64 server. Hosts that support AAAA synthesis and know the NAT64 prefix in use don't need the network to do the DNS64 function at all ๐Ÿ™ˆ.
  • Enabling NAT64 address-translation functions on end hosts. For example:
    • IPv4 address literals on an IPv6-only host. As described in [RFC8305], Section 7.1, IPv6-only hosts connecting to IPv4 address literals can translate the IPv4 literal to an IPv6 literal ๐Ÿฆ‹.
    • 464XLAT [RFC6877]. 464XLAT requires the host to be aware of the NAT64 prefix ๐ŸŒธ.

3. Why Include the NAT64 Prefix in Router Advertisements? ๐Ÿ’–

Okay so why put the NAT64 prefix in RAs at all? Here's the lore โœจ:

  • Fate sharing: NAT64 requires routing to be configured. IPv6 routing configuration requires receiving an IPv6 RA [RFC4861]. So using RAs to give hosts the NAT64 prefix means NAT64 reachability info shares the fate of the rest of the network config on the host ๐Ÿงš.
  • Atomic configuration: Including the NAT64 prefix in the RA minimizes the number of packets needed to configure a host. Only one packet (an RA) is needed to finish the network configuration. That speeds up connecting to a network that supports NAT64/DNS64, and it simplifies host implementation by removing the chance that a host ends up with an incomplete Layer 3 configuration (like IPv6 addresses and prefixes but no NAT64 prefix) ๐ŸŽ€.
  • Updatability: You can change the NAT64 prefix at any time, because when it changes, you can notify hosts by sending a new RA ๐ŸŒˆ.
  • Deployability: All IPv6 hosts and networks are required to support Neighbor Discovery [RFC4861], so just a minor extension to the existing implementation is required. Other options, like [RFC7225], require implementing other protocols (e.g., Port Control Protocol (PCP) [RFC7225]), which could be an obstacle for deployment ๐Ÿ’….

4. Option Format ๐Ÿ‘‘

Here's the layout, bestie ๐Ÿ’œ:

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |     Type      |    Length     |     Scaled Lifetime     | PLC |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                                                               |
     +                                                               +
     |              Highest 96 bits of the Prefix                    |
     +                                                               +
     |                                                               |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Figure 1: NAT64 Prefix Option Format

Here are the fields ๐Ÿฆ‹:

  • Type: 8-bit identifier of the PREF64 option type (38) ๐ŸŒธ
  • Length: 8-bit unsigned integer. The length of the option (including the Type and Length fields) is in units of 8 octets. The sender MUST set the length to 2. The receiver MUST ignore the PREF64 option if the Length field value is not 2 ๐Ÿ”ฅ.
  • Scaled Lifetime: 13-bit unsigned integer. The maximum time in units of 8 seconds over which this NAT64 prefix MAY be used. See Section 4.1 for the Scaled Lifetime field processing rules โœจ.
  • PLC (Prefix Length Code): 3-bit unsigned integer. This field encodes the NAT64 Prefix Length defined in [RFC6052]. The PLC field values 0, 1, 2, 3, 4, and 5 indicate the NAT64 prefix length of 96, 64, 56, 48, 40, and 32 bits, respectively. The receiver MUST ignore the PREF64 option if the Prefix Length Code field is not set to one of those values ๐Ÿงš.
  • Highest 96 bits of the Prefix: 96-bit unsigned integer. Contains bits 0 - 95 of the NAT64 prefix ๐Ÿ’–.

4.1. Scaled Lifetime Processing ๐ŸŒˆ

It would be highly undesirable for the NAT64 prefix to have a lifetime shorter than the Router Lifetime, which is defined in Section 4.2 of [RFC4861] as a 16-bit unsigned integer ๐Ÿ˜ญ. If the NAT64 prefix lifetime isn't at least equal to the default Router Lifetime, the NAT64 prefix lifetime could expire before the next unsolicited RA shows up, and that's a whole mess ๐Ÿ’€. So the Scaled Lifetime encodes the NAT64 prefix lifetime in units of 8 seconds ๐ŸŽ€. The receiver MUST multiply the Scaled Lifetime value by 8 (for example, by a logical left shift) to calculate the maximum time in seconds the prefix MAY be used. The maximum lifetime of the NAT64 prefix is thus 65528 seconds โญ. To make sure the NAT64 prefix doesn't expire before the default router, it is NOT RECOMMENDED to configure default Router Lifetimes greater than 65528 seconds when using this option ๐Ÿซถ. A lifetime of 0 indicates that the prefix SHOULD NOT be used anymore ๐Ÿ™ˆ.

By default, the value of the Scaled Lifetime field SHOULD be set to the lesser of 3 x MaxRtrAdvInterval [RFC4861] divided by 8, or 8191 ๐Ÿฆ‹.

Router vendors SHOULD allow administrators to specify nonzero lifetime values that aren't divisible by 8 ๐ŸŒธ. In those cases, the router SHOULD round the provided value up to the nearest integer that is divisible by 8 and smaller than 65536, then divide the result by 8 (or perform a logical right shift by 3) and set the Scaled Lifetime field to the resulting value ๐Ÿงš. If a nonzero lifetime value that's going to be divided by 8 (or go through a logical right shift by 3) is less than 8, then the Scaled Lifetime field SHOULD be set to 1 โœจ. That last step makes sure lifetimes under 8 seconds still get encoded as a nonzero Scaled Lifetime ๐Ÿ’–.

5. Usage Guidelines โœจ

Okay so this option gives you exactly one NAT64 prefix for all IPv4 destinations ๐Ÿ’–. If the network operator wants different chunks of the IPv4 address space to go to different NAT64 devices, no problem bestie, they just route more specific subprefixes of the NAT64 prefix to each device ๐Ÿฆ‹. Like, say an operator is using the [RFC1918] address space 10.0.0.0/8 internally ๐ŸŒธ. They might want 10.0.0.0/8 to go through NAT64 device A, and everything else in IPv4 space to go through NAT64 device B ๐Ÿ’…. If the operator's NAT64 prefix is 2001:db8:a:b::/96, then they can route 2001:db8:a:b::a00:0/104 to NAT64 A and 2001:db8:a:b::/96 to NAT64 B ๐Ÿงš. The main character move is just being specific ๐Ÿ‘‘.

This option can show up more than once in an RA ๐ŸŽ€. That happens when you're gracefully renumbering the network from one NAT64 prefix to another ๐ŸŒˆ. Host behavior for synthesizing IPv6 addresses from IPv4 addresses SHOULD follow the recommendations in Section 3 of [RFC7050] ๐Ÿซถ, but only for the NAT64 prefixes that have a nonzero lifetime โญ.

Lowkey, there's a catch ๐Ÿ™ˆ. In a network (or provisioning domain) that has both IPv4 and NAT64, you might want certain IPv4 addresses to not get translated ๐Ÿ’€. Like private address ranges that are local to that network and shouldn't be reached through the NAT64 ๐Ÿ”’. This kind of config can't be conveyed to hosts with this option, or with other NAT64 prefix provisioning mechanisms like [RFC7050] or [RFC7225] ๐Ÿ˜ญ. This problem doesn't apply in IPv6-only networks though ๐Ÿ™Œ, because the host there has no IPv4 address and can't reach any IPv4 destinations without the NAT64 ๐Ÿ’œ.

5.1. Handling Multiple NAT64 Prefixes ๐Ÿ“

Sometimes a host can get multiple NAT64 prefixes from different sources ๐ŸŒŸ. Possible scenarios include (but are not limited to) ๐Ÿ‘€:

  • the host is using multiple ways to discover PREF64 prefixes (e.g., by using PCP [RFC7225]) and/or resolving an IPv4-only fully qualified domain name [RFC7050] on top of getting the PREF64 RA option ๐Ÿ’–;
  • the PREF64 option shows up more than once in a single RA ๐Ÿฆ‹;
  • the host receives multiple RAs with different PREF64 prefixes on a given interface ๐Ÿงš.

When multiple PREF64s are found through the RA PREF64 Option (either the Option shows up more than once in one RA, or multiple RAs come in), host behavior for synthesizing IPv6 addresses from IPv4 addresses SHOULD follow the recommendations in Section 3 of [RFC7050], but only for the NAT64 prefixes that have a nonzero lifetime ๐ŸŽ€.

When different PREF64s are found using multiple mechanisms, hosts SHOULD select one source of information only ๐Ÿ’…. The RECOMMENDED order is ๐Ÿ“‹:

  • PCP-discovered prefixes [RFC7225], if supported;
  • PREF64s discovered via the RA Option;
  • PREF64s resolving an IPv4-only fully qualified domain name [RFC7050]
Note: If the network provides PREF64s via both this RA Option and [RFC7225], hosts that get the PREF64 via the RA Option may choose to use it right away (before waiting for the PCP to complete) ๐Ÿƒโ€โ™€๏ธ. So some traffic might not reflect any more detailed config that PCP provides ๐Ÿ™ˆ.

The host SHOULD treat the PREF64 as being specific to the network interface it was received on ๐ŸŒธ. Hosts that are aware of Provisioning Domain (PvD, [RFC7556]) MUST treat the PREF64 as being scoped to the implicit or explicit PvD ๐Ÿ‘‘.

5.2. PREF64 Consistency ๐Ÿ”

Section 6.2.7 of [RFC4861] recommends that routers inspect RAs sent by other routers, so that all routers onlink advertise consistent information ๐Ÿซถ. Routers SHOULD inspect valid PREF64 options received on a given link and verify the consistency โœจ. Detected inconsistencies mean one or more routers might be misconfigured ๐Ÿ˜ฌ. Routers SHOULD log such cases to system or network management ๐Ÿ“. Routers SHOULD check and compare the following information ๐Ÿ‘€:

  • set of PREF64s with a nonzero lifetime;
  • set of PREF64s with a zero lifetime.

Routers that are aware of PvD ([RFC7556]) MUST only compare information scoped to the same implicit or explicit PvD ๐Ÿ’–.


6. IANA Considerations ๐ŸŒˆ

IANA has assigned a new IPv6 Neighbor Discovery Option type for the PREF64 option defined in this document, in the "IPv6 Neighbor Discovery Option Formats" registry [IANA] ๐ŸŽ€.

                          +---------------+------+
                          | Description   | Type |
                          +===============+======+
                          | PREF64 option | 38   |
                          +---------------+------+

                             Table 1: New IANA
                            Registry Assignment

7. Security Considerations ๐Ÿ”

Okay bestie, this section is SERIOUS ๐Ÿ˜ญ๐Ÿ”ฅ Read it twice.

Because RAs are required in all IPv6 configuration scenarios, on IPv6-only networks, RAs must already be secured, e.g., by deploying an RA-Guard [RFC6105] ๐Ÿ›ก๏ธ. Providing all configuration in RAs cuts down the attack surface that malicious attackers can target when they're trying to give hosts invalid config ๐Ÿ’€, compared to spreading the config across multiple mechanisms that each need to be secured on their own ๐Ÿ™ƒ.

If a host gets an incorrect NAT64 prefix, the IPv6-only host might not be able to talk to IPv4-only destinations ๐Ÿ˜ต. Connectivity to destinations reachable over IPv6 would not be impacted just by giving a host an incorrect prefix ๐Ÿ™Œ. However, if attackers can send rogue RAs, they can perform denial-of-service or man-in-the-middle attacks, as described in [RFC6104] ๐Ÿšจ๐Ÿ˜ฑ.

The security measures that must already be in place to make sure RAs only come from legitimate sources eliminate the problem of NAT64 prefix validation described in Section 3.1 of [RFC7050] โœ…๐Ÿ’….

8. References ๐Ÿ“š

8.1. Normative References ๐Ÿ’–

8.2. Informative References ๐Ÿง 

Acknowledgements ๐Ÿซถ

Thanks to the following people (in alphabetical order) for their review and feedback ๐Ÿ’–: Mikael Abrahamsson, Mark Andrews, Brian E Carpenter, David Farmer, Nick Heatley, Robert Hinden, Martin Hunek, Tatuya Jinmei, Benjamin Kaduk, Erik Kline, Suresh Krishnan, Warren Kumari, David Lamparter, Barry Leiba, Jordi Palet Martinez, Tommy Pauly, Alexandre Petrescu, Michael Richardson, David Schinazi, Ole Troan, Eric Vynke, Bernie Volz โœจ.

Authors' Addresses ๐Ÿ“ฎ

Lorenzo Colitti Google Shibuya 3-21-3, Tokyo 150-0002 Japan

Email: lorenzo@google.com

Jen Linkova Google 1 Darling Island Rd Pyrmont NSW 2009 Australia

Email: furry@google.com

๐Ÿ“ฆ where this page comes from