Internet-Draft | pio-p-flag | May 2024 |
Colitti, et al. | Expires 10 November 2024 | [Page] |
This document defines a "P" flag in the Prefix Information Option (PIO) of IPv6 Router Advertisements (RAs). The flag is used to indicate that the network prefers that clients do not use the prefix provided in the PIO for SLAAC but request a prefix via DHCPv6 PD instead, and use that delegated prefix to form addresses.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 10 November 2024.¶
Copyright (c) 2024 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 review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
IPv6-capable devices, especially mobile devices, usually have multiple global IPv6 addresses, such as stable addresses ([RFC8064]), temporary addresses ([RFC8981]), 464XLAT addresses ([RFC6877]), and dedicated addresses for virtual systems such as VMs or containers. Additionally, these devices often extend the network, either externally to other devices (e.g., when tethering) or internally, to virtual systems.¶
Extending the network to other devices or virtual systems requires that the device provide a way for those systems to obtain IP addresses. These addresses may be part of a prefix that is delegated to the device. Or they may be obtained by the device via other means such as by running SLAAC or DHCPv6 address assignment on the shared on-link prefix, and shared with other devices via ND proxying [RFC8981].¶
On large networks, the latter mode creates scalability issues, as the network infrastructure devices need to maintain state per address: IPv6 neighbor cache, SAVI mappings ([RFC7039]), VXLAN routes, etc. [I-D.ietf-v6ops-dhcp-pd-per-device] provides a a solution that uses DHCPv6 PD [RFC8415] to provide a client with a dedicated prefix, which can be used to form addresses. This solves the scaling issues because the amount of state that has to be maintained by the network depends on the number of devices and does not depend anymore on how many addresses those devices are using.¶
On small networks, scaling to support multiple individual IPv6 addresses is less of a concern, because many home routers support hundreds of neighbor cache entries. On the other hand, address space is more limited compared to the number of hosts connected - the smallest home network might only have /60 prefixes, or even just a single /64. In such networks delegating an unique prefix per client would not provide any notable scalability benefits and would introduce a risk of address exhaustion.¶
When a host connects to a network which provides a shared prefix in PIO to be used for SLAAC and also supports delegating per-host prefix via DHCPv6 PD, the host cannot know in advance which address assignment method is most appropriate for the network. It's desirable to have a mechanism for the network to communicate the preference to the host.¶
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.¶
The network administrator might want to indicate to hosts that requesting a prefix via DHCPv6 PD and using that prefix for address assignment (see [I-D.ietf-v6ops-dhcp-pd-per-device]) should be preferred over using individual addresses from the on-link prefix. The information is passed to the host via a P flag in the Prefix Information Option (PIO). The reason for it being a PIO flag is as follows:¶
Note that the prefix(es) that the client obtains via DHCPv6 PD are not related in any way to the prefix(es) in the Router Advertisement which have the P bit set.¶
The P flag (also called DHCPv6-PD preferred flag) is a 1-bit PIO flag, located after the R flag ([RFC6275]). When set, indicates that this prefix SHOULD NOT be used for stateless address configuration. Instead the host SHOULD request a dedicated prefix via DHCPv6-PD and use that prefix for stateless address configuration.¶
Adding the P flag reduces the PIO Reserved1 field ([RFC4861], [RFC8425]) from 5 bits to 4 bits. The resulting format of the Prefix Information Option is as follows:¶
Routers SHOULD set the P flag to zero by default, unless explicitly configured by the administrator, and SHOULD allow the operator to set the P flag value for any given prefix.¶
This specification only applies to hosts which support DHCPv6 prefix delegation. Hosts which do not support DHCPv6 prefix delegation MUST ignore the P flag.¶
For each interface, the host MUST keep a list of every PIO it has received that has the P flag set and a nonzero Preferred Lifetime. The list affects the behaviour of the DHCPv6 client as follows:¶
When a host requests a prefix via DHCPv6 PD, it MUST use the prefix length hint Section 18.2.4 of [RFC8415] to request a prefix that is short enough to form addresses via SLAAC.¶
In order to achieve the scalability benefits of using DHCPv6 PD, the host SHOULD prefer to form addresses from the delegated prefix instead of using individual addresses in the on-link prefixes. Therefore, when the host requests a prefix using DHCPv6 PD:¶
If the host does not obtain any suitable prefixes via DHCPv6 PD, it MAY choose to fall back to other address assignment mechanisms, such as forming addresses via SLAAC (if the PIO has the A flag set to 1) and/or requesting addresses via DHCPv6.¶
The P flag is meaningless for link-local prefixes and any Prefix Information Option containing the link-local prefix MUST be ignored as specified in Section 5.5.3 of [RFC4862].¶
If the received prefix is too long to be used for SLAAC, the host MUST ignore it. If the prefix is shorter than required for SLAAC, the host SHOULD accept it, allocate one or more longer prefix suitable for SLAAC and use the prefixes as described below.¶
For every accepted prefix:¶
The host MUST NOT forward packets with destination addresses within a delegated prefix to the interface that it obtained the prefix on, as this will cause a routing loop. This problem will not occur if the host has assigned the prefix to a downstream interface. If the host has not assigned the prefix to a downstream interface, then one way to prevent this problem this is to add to its routing table a high-metric discard route for the delegated prefix. Similarly, the host MUST NOT send packets with destination addresses in the delegated prefix to the interface that it obtained the prefix on.¶
If the host doesn't obtain any suitable prefixes via DHCPv6 PD it MAY choose, as a fallback mechanism, to form addresses via SLAAC using PIOs with A flag set to 1.¶
The P bit is purely a positive indicator, telling nodes that DHCPv6 Prefix Delegation is available and the network prefers the node use it. The absence of any PIOs with the P bit does not carry any kind of signal to the opposite, and MUST NOT be processed to mean that DHCPv6-PD is absent. In particular, nodes that are already running DHCPv6 PD either by explicit configuration or by default MUST NOT disable DHCPv6 PD on the absence of PIOs with the P bit set. A very common example of this are CE routers as described by [RFC7084].¶
For the purpose of source address selection [RFC6724], if the host forms addresses from a delegated prefix, it SHOULD treat those addresses as if they were assigned to the interface on which the prefix was received. This includes placing them in the candidate set, and associating them with the outgoing interface when implementing rule 5.¶
In multi-prefix multihoming, the host generally needs to associate the prefix with the router that advertised it (see for example, [RFC6724] Rule 5.5). If the host supports Rule 5.5, then it SHOULD associate each prefix with the link-local address of the DHCPv6 relay from which it received the REPLY packet. When receiving multiple REPLYs carrying the same prefix from distinct link-local addresses, the host SHOULD associate that prefix with all of these addresses. This can commonly happen in networks with redundant routers and DHCPv6 relays.¶
This document makes the following changes to Section 5.5.3 of [RFC4862]:¶
OLD TEXT¶
===¶
For each Prefix-Information option in the Router Advertisement:¶
a) If the Autonomous flag is not set, silently ignore the Prefix Information option.¶
===¶
NEW TEXT: Insert the following text after "For each Prefix-Information option in the Router Advertisement:" but before "If the Autonomous flag is not set, silently ignore the Prefix Information option.":¶
===¶
a) If the P flag is set, start the DHCPv6 PD process and use the delegated prefix to assign addresses to the interfaces as described in draft-ietf-6man-pio-pflag. The Prefix Information option SHOULD be processed as if the A flag is set to zero.¶
===¶
The mechanism described in this document relies on the information provided in the Router Advertisement and therefore shares the same security model as SLAAC. If the network doesn't implement RA Guard [RFC6105], an attacker might send RAs containing the PIO used by the network, set the P flag to 1 and force hosts to ignore the A flag. In the absence of DHCPv6 PD infrastructure, hosts would experience delays in obtaining IPv6 addresses (as no delegated prefixes are available, hosts MAY choose to fallback to SLAAC).¶
The attacker might force hosts to oscillate between DHCPv6 PD and PIO-based SLAAC by sending the same set of PIOs with and then w/o P flag set. That would cause the clients to issue REBIND requests, increasing the load on the DHCP infrastructure. However Section 14.1 of [RFC8415] requires that DHCPv6 PD clients rate limit transmitted DHCPv6 messages.¶
It should be noted that if the network allows rogue RAs to be sent, the attacker would be able to disrupt hosts connectivity anyway, so this document doesn't introduce any fundamentally new security considerations.¶
Implementing the P flag on a host / receiving side enables other systems on the network to trigger running DHCPv6 on that network. Doing so may reveal some minor additional information about the host, most prominently the hostname. This is the same consideration as for the M flag.¶
No privacy considerations result from supporting the P flag on the sender side.¶
This memo requests that IANA allocate bit 3 from the "IPv6 Neighbor Discovery Prefix Information Option Flags" registry created by [RFC8425] for use as the P flag as described in this document. The following entry should be appended:¶
PIO Option Bit | Description | Reference |
---|---|---|
3 | P - DHCPv6-PD preferred flag | [THIS DOCUMENT] |
Thanks to Brian Carpenter, Tim Chown, Fernando Gont, Suresh Krishnan, Andrew McGregor, Tomek Mrugalski, Timothy Winters for the discussions, the input and all contribution.¶