RFC 8981
Temporary Address Extensions for Stateless Address Autoconfiguration in IPv6
Title Block π
Temporary Address Extensions for Stateless Address Autoconfiguration in IPv6 is RFC 8981 π¦, published in February 2021 by the IETF. It's a Standards Track document, which means it's an official Internet standard, and its ISSN is 2070-1721.
The authors are F. Gont (SI6 Networks), S. Krishnan (Kaloom), T. Narten, and R. Draves (Microsoft Research). Narten's affiliation isn't listed in the original, so I'm not adding one π.
This RFC obsoletes RFC 4941 π, so it replaces that older document as the go-to spec. It doesn't update any other RFCs.
Abstract π
Okay bestie, so this doc is an extension to IPv6 Stateless Address Autoconfiguration (SLAAC) β¨ that makes hosts generate temporary addresses with randomized interface identifiers, one for each prefix advertised with autoconfiguration turned on π.
Why does this matter? Changing addresses over time shrinks the window where eavesdroppers and other info collectors can easily correlate network activity, which is what happens when the same address shows up across multiple transactions from the same host π. It also lowers the exposure window, meaning a host is less reachable through an address that got revealed during active communication. Iconic π .
This document obsoletes RFC 4941 π«Ά.
Status of This Memo π
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 β¨, it got public review, and the Internet Engineering Steering Group (IESG) approved it for publication. For more on Internet Standards, check Section 2 of RFC 7841 π.
Want the current status, any errata, or a way to send feedback? Head to https://www.rfc-editor.org/info/rfc8981 π¦.
Copyright Notice πΈ
Copyright (c) 2021 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) as they stand on the publication date. Please actually read these, because they spell out your rights and restrictions π. Any Code Components pulled out of this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions, and they come with no warranty, as described in the Simplified BSD License π.
Table of Contents π§
1. Introduction
1.1. Terminology
1.2. Problem Statement
2. Background
2.1. Extended Use of the Same Identifier
2.2. Possible Approaches
3. Protocol Description
3.1. Design Guidelines
3.2. Assumptions
3.3. Generation of Randomized IIDs
3.3.1. Simple Randomized IIDs
3.3.2. Generation of IIDs with Pseudorandom Functions
3.4. Generating Temporary Addresses
3.5. Expiration of Temporary Addresses
3.6. Regeneration of Temporary Addresses
3.7. Implementation Considerations
3.8. Defined Protocol Parameters and Configuration Variables
4. Implications of Changing IIDs
5. Significant Changes from RFC 4941
6. Future Work
7. IANA Considerations
8. Security Considerations
9. References
9.1. Normative References
9.2. Informative References
Acknowledgments
Authors' Addresses
1. Introduction β¨
Let's start with the basics π . [RFC4862] defines Stateless Address Autoconfiguration (SLAAC) for IPv6, and normally it gives hosts one or more "stable" IPv6 addresses. Each one is a network prefix from a local router, plus an interface identifier (IID) the host makes up locally π§©.
The security and privacy problems with those addresses are covered in detail in [RFC7721], [RFC7217], and [RFC7707] π. This document extends SLAAC to generate temporary addresses, which helps with some of those problems π. It's a revision of RFC 4941 and formally obsoletes it. Section 5 walks through the changes from [RFC4941] β¨.
Default address selection for IPv6 is specified in [RFC6724] π. Sometimes the choice between stable and temporary addresses can only be made by an application. Some apps might always want temporary addresses, others only in certain situations, and some never π. An Application Programming Interface (API) like the one in [RFC5014] lets individual apps say they'd prefer temporary addresses π.
Section 2 gives background. Section 3 describes how to generate temporary addresses. Section 4 talks about what changing IIDs implies. Section 5 covers the changes from [RFC4941] π¦.
1.1. Terminology
Here's where the capital-letter key words live π. 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 π. Lowercase versions are just regular words, so no stress β¨.
The terms "public address", "stable address", "temporary address", "constant IID", "stable IID", and "temporary IID" are to be interpreted as specified in [RFC7721] πΈ.
"Global-scope addresses" is the umbrella term this document uses for both "Global unicast addresses" (from [RFC4291]) and "Unique local addresses" (from [RFC4193]) π. It does not mean "globally reachable addresses" from [RFC8190] π ββοΈ.
1.2. Problem Statement
Addresses made by SLAAC [RFC4862] carry an embedded interface identifier, and that identifier can stay the same forever π. Whenever one fixed identifier shows up in multiple contexts, it becomes possible to link activity that looks totally unrelated π.
Here's who can do the correlating:
- An attacker sitting on the path between the host and the peers it's talking to, who can see the IPv6 addresses in the datagrams π.
- An attacker who can get into the communication logs of the peers the host has talked with π.
Since the identifier lives inside the IPv6 address, it can't be hidden π. This document fixes that by generating interface identifiers that change over time π¦.
Heads up: an on-path attacker can still do a lot of correlation using other stuff too π¬.
- The payload contents of unencrypted packets on the wire π¦.
- The characteristics of the packets, like packet size and timing β±οΈ.
Using temporary addresses won't stop that kind of correlation π ββοΈ. It also won't stop an on-link observer, like the host's default router, from tracking all of the host's addresses π«.
2. Background π
This section digs deeper into the problem, gives context for judging how much the concerns matter in specific environments, and compares everything to existing practice π§.
2.1. Extended Use of the Same Identifier
Using a non-changing IID to build addresses is one specific case of a bigger pattern: a constant identifier that gets reused for a long time across lots of separate activities π. Anytime the same identifier shows up in multiple contexts, it can be used to connect activity that seems unrelated π΅οΈββοΈ. For example, a network sniffer placed on a link that carries all the traffic to and from one host could track which destinations that host talked to, and when π. In some cases that info can reveal things like what hours an employee was active, or when someone is at home π .
You might think changing the address regularly would help privacy in those environments π€. But the network-prefix part of an address is a constant identifier too π‘. All the hosts at, say, a home have the same network prefix, and that prefix pinpoints where those hosts are on the network π. That has privacy implications as well, just not at the same granularity as the concern this document targets π―. Specifically, every host inside a home could be grouped together for collecting info π§Ί. And if the network only has a very small number of hosts (say, just one), changing just the IID won't enhance privacy, because the prefix is still acting as a constant identifier π€.
Correlating seemingly unrelated activities needs an identifier that can be recognized over time across different contexts π§ . IP addresses are one obvious example, but there are more π. For example:
- Lots of hosts also have DNS names tied to their addresses, and then the DNS name acts as a similar identifier π. Getting the DNS name takes more work (it may need a DNS query), but the info is often easy to find π. In those cases, changing the address over time would do little for the concerns in this document, unless the DNS name also changes at the same time (see Section 4) π .
- Web browsers and servers usually swap "cookies" with each other [RFC6265] πͺ. Cookies let web servers connect what you're doing now with what you did before π. A common use is sending targeted ads to a user, by using the cookie the browser sends to figure out what earlier queries were made (like what type of info someone looked up) π―. Based on those earlier queries, ads can get matched to the end user's (assumed) interests ποΈ.
Using a constant identifier inside an address is a big deal, because addresses are fundamental to communication and can't easily be hidden from eavesdroppers and other parties π±. Even when higher layers encrypt their payloads, the addresses in packet headers show up in plain sight ποΈ. So if a mobile host (like a laptop) connects from several different locations, an eavesdropper might be able to track that laptop as it moves around, even if the upper-layer payloads are encrypted π»πΆββοΈ.
Changing addresses over time shrinks the window where eavesdroppers and other info collectors can easily correlate network activity, when the same address is used for multiple transactions by the same host β³. It also reduces the window of exposure, during which a host can be reached through an address that got revealed by active communication π.
The security and privacy implications of IPv6 addresses are covered in detail in [RFC7721], [RFC7707], and [RFC7217] π.
βοΈ Part 1 of 5 is done! Part 2 picks up with Section 2.2 "Possible Approaches" and keeps the good stuff coming π«Άβ¨
2.2. Possible Approaches β¨
okay so bestie, the first idea is actually really compatible with how SLAAC works π . You could just change the IID part of the address over time π¦. And lowkey, that makes it way harder for someone to look at IP addresses from separate transactions and figure out which ones belong to the same host π. This is true whether or not the routing-prefix part of the address changes too, so it's giving double protection π₯.
Okay now here's the thing π«Ά. A lot of hosts are both clients AND servers at the same time. For those, the host needs a name (like a DNS domain name) so it can act as a server π. Honestly, whether the address stays fixed or changes doesn't matter all that much for privacy, because the name stays the same and works as a constant identifier π. BUT when the host is acting as a client (like when it starts a conversation), it might want to switch up the addresses it uses π. So in these setups, you might need more than one address π. You'd have a stable address tied to the name, which takes incoming connection requests from other hosts, plus a temporary address that hides who the client is when it starts talking to someone π§.
On the flip side, a host that's ONLY a client might just want to use temporary addresses for public communication π.
And to make it hard to guess whether two different IIDs belong to the same host, the algorithm that makes the alternate identifiers has to include some input that is unpredictable π. It needs to be unpredictable from the point of view of the outside entities collecting info π.
3. Protocol Description β¨
The next subsections lay out the procedures for generating IPv6 temporary addresses π.
3.1. Design Guidelines π
Temporary addresses have these properties π¦:
- Temporary addresses are usually used for starting outgoing sessions π.
- Temporary addresses get used for a short time (usually hours to days) and then they get deprecated πΈ. Deprecated addresses can still be used for connections that are already established, but they are NOT used to start new connections π.
- New temporary addresses keep getting generated over time to replace the ones that expire (meaning they become deprecated and then eventually invalidated) π₯.
- Temporary addresses MUST have a limited lifetime (a limited "valid lifetime" and "preferred lifetime" from [RFC4862]) π. The lifetime of an address SHOULD be reduced further when privacy-relevant events happen (like a host attaching to a different network, or a randomized Media Access Control (MAC) address getting regenerated) π. The lifetime of temporary addresses MUST be statistically different for different addresses, so it's hard to predict or infer when a new temporary address gets made, or to connect a newly generated address with an existing one π.
- By default, one address is generated for each prefix advertised by SLAAC π. The resulting interface identifiers MUST be statistically different when addresses are configured for different prefixes or different network interfaces π§. This means that, given two addresses, it MUST be difficult for an outside entity to infer whether they correspond to the same host or network interface π.
- It MUST be difficult for an outside entity to predict the interface identifiers that will be used for temporary addresses π«Ά, even if they know the algorithm or method used to generate them, and/or the IIDs previously used for other temporary addresses π. These IIDs MUST be semantically opaque [RFC7136] and MUST NOT follow any specific patterns π .
3.2. Assumptions π
The following algorithm assumes that, for a given temporary address, an implementation can figure out the prefix it was generated from π¦. When a temporary address gets deprecated, a new temporary address is generated π₯. The specific valid and preferred lifetimes for the new address depend on the lifetime values set for the prefix it came from π.
Finally, this document assumes that, when a host starts outgoing communications, temporary addresses can be given preference over stable addresses (if available), when the device is set up to do that π. [RFC6724] REQUIRES implementations to provide a mechanism that lets an application configure its preference for temporary addresses over stable addresses π. It also lets an implementation prefer temporary addresses by default, so connections the host starts can use temporary addresses without needing application-specific enablement β¨. This document also assumes that an API will exist that lets individual applications say whether they prefer temporary or stable addresses, and override the system defaults (see, for example, [RFC5014]) πΈ.
3.3. Generation of Randomized IIDs π§
The following subsections specify example algorithms for generating temporary IIDs that follow the guidelines in Section 3.1 of this document π. The algorithm in Section 3.3.1 assumes a pseudorandom number generator (PRNG) is available on the system π. The algorithm in Section 3.3.2 allows code reuse by hosts that implement [RFC7217] π«Ά.
3.3.1. Simple Randomized IIDs π
One approach is to pick a pseudorandom number of the right length π¦. A host using this algorithm SHOULD generate IIDs as follows π:
- Get a random number from a PRNG that can produce random numbers with at least as many bits as the IID needs (see the next step) π₯. [RFC4086] specifies randomness requirements for security π.
- The IID is made by taking as many bits from the random number from the previous step as necessary π . See [RFC7136] for the number of bits needed (that is, the length of the IID) π. See also [RFC7421] for a discussion of the privacy implications of the IID length π. Note: there are no special bits in an IID [RFC7136] β¨.
- The resulting IID MUST be compared against the reserved IPv6 IIDs [RFC5453] [IANA-RESERVED-IID] and against the IIDs already used in an address on the same network interface and the same network prefix π. If the identifier is unacceptable, a new IID SHOULD be generated by repeating the algorithm from the first step π.
3.3.2. Generation of IIDs with Pseudorandom Functions π
The algorithm in [RFC7217] can be extended to generate temporary addresses π§. The nice part is that a host could use a single algorithm for both stable and temporary addresses, just by changing the parameters π.
Hosts would use the following algorithm to generate the temporary IID π«Ά:
- Compute a random identifier with this expression π:
RID = F(Prefix, Net_Iface, Network_ID, Time, DAD_Counter,
secret_key)
Where π¦:
RID: Random Identifier π
F(): A pseudorandom function (PRF) that MUST NOT be computable from the outside (without knowing the secret key) π₯. F() MUST also be difficult to reverse, so it resists attempts to get the secret_key, even when given samples of F()'s output and knowledge or control of the other input parameters π . F() SHOULD produce an output of at least as many bits as the IID needs π. BLAKE3 (256-bit key, arbitrary-length output) [BLAKE3] is one possible option for F() π. Alternatively, F() could be implemented with a keyed-hash message authentication code (HMAC) [RFC2104] πΈ. HMAC-SHA-256 [FIPS-SHS] is one possible option for that implementation alternative β¨. Note: use of HMAC-MD5 [RFC1321] is considered unacceptable for F() [RFC6151] π.
Prefix: The prefix to be used for SLAAC, as learned from an ICMPv6 Router Advertisement message π§.
Net_Iface: The MAC address of the underlying network interface card, in the case the link uses IEEE 802 link-layer identifiers π. Using the MAC address for this parameter (instead of the other options suggested in [RFC7217]) means that regenerating a randomized MAC address will result in a different temporary address π.
Network_ID: Some network-specific data that identifies the subnet this interface is attached to π«Ά. For example, the IEEE 802.11 Service Set Identifier (SSID) of the network the interface is associated with π¦. Also, "Simple Procedures for Detecting Network Attachment in IPv6" ("Simple DNA") [RFC6059] describes ideas that could be used to generate a Network_ID parameter π. This parameter SHOULD be used if some form of "Network_ID" is available π.
Time: An implementation-dependent representation of time π. One possible example is the representation in UNIX-like systems [OPEN-GROUP], which measure time as the number of seconds elapsed since the Epoch (00:00:00 Coordinated Universal Time (UTC), 1 January 1970) β. Adding the "Time" argument results in (statistically) different IIDs over time π₯.
DAD_Counter: A counter used to resolve a conflict where an unacceptable identifier was generated π. This can be the result of Duplicate Address Detection (DAD), or of step 3 below πΈ.
secret_key: A secret key that the attacker does not know π. The secret key SHOULD be at least 128 bits π . It MUST be initialized to a pseudorandom number (see [RFC4086] for randomness requirements for security) when the operating system is "bootstrapped" π§. The secret_key MUST NOT be used for any purpose other than the one discussed in this section π«Ά. For example, implementations MUST NOT use the same secret_key for generating stable addresses [RFC7217] and generating temporary addresses via this algorithm π.
- The IID is finally obtained by taking as many bits from the RID value (computed in the previous step) as necessary, starting from the least significant bit π. See [RFC7136] for the number of bits needed (that is, the length of the IID) π¦. See also [RFC7421] for a discussion of the privacy implications of the IID length π. Note: there are no special bits in an IID [RFC7136] β¨.
- The resulting IID MUST be compared against the reserved IPv6 IIDs [RFC5453] [IANA-RESERVED-IID] and against the IIDs already used in an address on the same network interface and the same network prefix π. If the identifier is unacceptable, the DAD_Counter SHOULD be incremented by 1, and the algorithm SHOULD be restarted from the first step π.
3.4. Generating Temporary Addresses β¨
okay so [RFC4862] is the spec that walks you through making a link-local address when an interface turns on, plus how to make addresses for the other scopes π . This doc builds on that. When a host gets a Router Advertisement with a Prefix Information option that carries a prefix for address autoconfiguration (aka the A bit is set), the host MUST do the following steps π«Ά:
- Process the Prefix Information option as specified in [RFC4862], adjusting the lifetimes of existing temporary addresses, with the overall constraint that no temporary addresses should ever remain "valid" or "preferred" for a time longer than
(TEMP_VALID_LIFETIME)or(TEMP_PREFERRED_LIFETIME - DESYNC_FACTOR), respectively. The configuration variablesTEMP_VALID_LIFETIMEandTEMP_PREFERRED_LIFETIMEcorrespond to the maximum valid lifetime and the maximum preferred lifetime of temporary addresses, respectively.- Note:
DESYNC_FACTORis the value computed when the address was created (see step 4 below). π
- Note:
- One way an implementation can satisfy the above constraints is to associate with each temporary address a creation time (called
CREATION_TIME) that indicates the time at which the address was created. When updating the preferred lifetime of an existing temporary address, it would be set to expire at whichever time is earlier: the time indicated by the received lifetime or(CREATION_TIME + TEMP_PREFERRED_LIFETIME - DESYNC_FACTOR). A similar approach can be used with the valid lifetime.- Note:
DESYNC_FACTORis the value computed when the address was created (see step 4 below). π§
- Note:
- If the host has not configured any temporary address for the corresponding prefix, the host SHOULD create a new temporary address for such prefix.
- Note: For example, a host might implement prefix-specific policies such as not configuring temporary addresses for the Unique Local IPv6 Unicast Addresses (ULAs) [RFC4193] prefix. πΈ
- When creating a temporary address, DESYNC_FACTOR MUST be computed and associated with the newly created address, and the address lifetime values MUST be derived from the corresponding prefix as follows:
- Its valid lifetime is the lower of the Valid Lifetime of the prefix and
TEMP_VALID_LIFETIME. - Its preferred lifetime is the lower of the Preferred Lifetime of the prefix and
TEMP_PREFERRED_LIFETIME - DESYNC_FACTOR.
- Its valid lifetime is the lower of the Valid Lifetime of the prefix and
- A temporary address is created only if this calculated preferred lifetime is greater than
REGEN_ADVANCEtime units. In particular, an implementation MUST NOT create a temporary address with a zero preferred lifetime. π - New temporary addresses MUST be created by appending a randomized IID to the prefix that was received. Section 3.3 of this document specifies some sample algorithms for generating the randomized IID. β¨
- The host MUST perform DAD on the generated temporary address. If DAD indicates the address is already in use, the host MUST generate a new randomized IID and repeat the previous steps as appropriate (starting from step 4), up to
TEMP_IDGEN_RETRIEStimes. If, afterTEMP_IDGEN_RETRIESconsecutive attempts, the host is unable to generate a unique temporary address, the host MUST log a system error and SHOULD NOT attempt to generate a temporary address for the given prefix for the duration of the host's attachment to the network via this interface. This allows hosts to recover from occasional DAD failures or otherwise log the recurrent address collisions. π
3.5. Expiration of Temporary Addresses π¦
When a temporary address becomes deprecated, a new one MUST be generated. This is done by repeating the actions described in Section 3.4, starting at step 4). Note that, in normal operation, except for the transient period when a temporary address is being regenerated, at most one temporary address per prefix should be in a nondeprecated state at any given time on a given interface. Note that if a temporary address becomes deprecated as result of processing a Prefix Information option with a zero preferred lifetime, then a new temporary address MUST NOT be generated (in response to the same Prefix Information option). To ensure that a preferred temporary address is always available, a new temporary address SHOULD be regenerated slightly before its predecessor is deprecated. This is to allow sufficient time to avoid race conditions in the case where generating a new temporary address is not instantaneous, such as when DAD must be performed. The host SHOULD start the process of address regeneration REGEN_ADVANCE time units before a temporary address is deprecated.
As an optional optimization, an implementation MAY remove a deprecated temporary address that is not in use by applications or upper layers, as detailed in Section 6.
3.6. Regeneration of Temporary Addresses π
The frequency at which temporary addresses change depends on how a device is being used (e.g., how frequently it initiates new communication) and the concerns of the end user. The most egregious privacy concerns appear to involve addresses used for long periods of time (from weeks to years). The more frequently an address changes, the less feasible collecting or coordinating information keyed on IIDs becomes. Moreover, the cost of collecting information and attempting to correlate it based on IIDs will only be justified if enough addresses contain non-changing identifiers to make it worthwhile. Thus, having large numbers of clients change their address on a daily or weekly basis is likely to be sufficient to alleviate most privacy concerns.
There are also client costs associated with having a large number of addresses associated with a host (e.g., in doing address lookups, the need to join many multicast groups, etc.). Thus, changing addresses frequently (e.g., every few minutes) may have performance implications.
Hosts following this specification SHOULD generate new temporary addresses over time. This can be achieved by generating a new temporary address REGEN_ADVANCE time units before a temporary address becomes deprecated. As described above, this produces addresses with a preferred lifetime no larger than TEMP_PREFERRED_LIFETIME. The value DESYNC_FACTOR is a random value computed when a temporary address is generated; it ensures that clients do not generate new addresses at a fixed frequency and that clients do not synchronize with each other and generate new addresses at exactly the same time. When the preferred lifetime expires, a new temporary address MUST be generated using the algorithm specified in Section 3.4 (starting at step 4).
Because the frequency at which it is appropriate to generate new addresses varies from one environment to another, implementations SHOULD provide end users with the ability to change the frequency at which addresses are regenerated. The default value is given in TEMP_PREFERRED_LIFETIME and is one day. In addition, the exact time at which to invalidate a temporary address depends on how applications are used by end users. Thus, the suggested default value of two days (TEMP_VALID_LIFETIME) may not be appropriate in all environments. Implementations SHOULD provide end users with the ability to override both of these default values.
Finally, when an interface connects to a new (different) link, existing temporary addresses for the corresponding interface MUST be removed, and new temporary addresses MUST be generated for use on the new link, using the algorithm in Section 3.4. If a device moves from one link to another, generating new temporary addresses ensures that the device uses different randomized IIDs for the temporary addresses associated with the two links, making it more difficult to correlate addresses from the two different links as being from the same host. The host MAY follow any process available to it to determine that the link change has occurred. One such process is described by "Simple DNA" [RFC6059]. Detecting link changes would prevent link down/up events from causing temporary addresses to be (unnecessarily) regenerated. π«Ά
3.7. Implementation Considerations π
Devices implementing this specification MUST provide a way for the end user to explicitly enable or disable the use of temporary addresses. In addition, a site might wish to disable the use of temporary addresses in order to simplify network debugging and operations. Consequently, implementations SHOULD provide a way for trusted system administrators to enable or disable the use of temporary addresses.
Additionally, sites might wish to selectively enable or disable the use of temporary addresses for some prefixes. For example, a site might wish to disable temporary-address generation for ULA [RFC4193] prefixes while still generating temporary addresses for all other prefixes advertised via PIOs for address configuration. Another site might wish to enable temporary-address generation only for the prefixes 2001:db8:1::/48 and 2001:db8:2::/48 while disabling it for all other prefixes. To support this behavior, implementations SHOULD provide a way to enable and disable generation of temporary addresses for specific prefix subranges. This per-prefix setting SHOULD override the global settings on the host with respect to the specified prefix subranges. Note that the per-prefix setting can be applied at any granularity, and not necessarily on a per-subnet basis. π
3.8. Defined Protocol Parameters and Configuration Variables β¨
okay so these are the protocol parameters and config variables this doc defines π think of them as the knobs and dials ποΈ
TEMP_VALID_LIFETIMEπ Default value: 2 days. Users should be able to override the default value.TEMP_PREFERRED_LIFETIMEπΈ Default value: 1 day. Users should be able to override the default value. Note!! TheTEMP_PREFERRED_LIFETIMEvalue MUST be smaller than theTEMP_VALID_LIFETIMEvalue. This avoids the cursed scenario where an address gets used for brand new chats but dies in less than 1 second, and everything gets disrupted πREGEN_ADVANCEπ¦
2 + (TEMP_IDGEN_RETRIES * DupAddrDetectTransmits * RetransTimer /
1000)
Rationale: this one is a function of the other params, because it has to account for the time that might get eaten up by DAD in the worst case ofTEMP_IDGEN_RETRIES. That stops the pathological situation where generating a new temporary address doesn't start early enough. Then a new preferred address would show up before the current preferred temporary address gets deprecated, and that's a mess πRetransTimeris specified in [RFC4861], whileDupAddrDetectTransmitsis specified in [RFC4862]. SinceRetransTimeris measured in milliseconds, the constant1000is in the formula so thatREGEN_ADVANCEends up expressed in seconds β±οΈ
MAX_DESYNC_FACTORπ§0.4 * TEMP_PREFERRED_LIFETIME. This is the upper bound onDESYNC_FACTOR. Rationale: settingMAX_DESYNC_FACTORto0.4 TEMP_PREFERRED_LIFETIMEgives addresses with statistically different lifetimes π With the default values in this section, you also get a max of three concurrent temporary addresses at once. Iconic πDESYNC_FACTORπ A random value within the range 0 -MAX_DESYNC_FACTOR. It gets computed every time a temporary address is generated, and it's associated with that specific address. It MUST be smaller than (TEMP_PREFERRED_LIFETIME-REGEN_ADVANCE).TEMP_IDGEN_RETRIESπ Default value: 3
4. Implications of Changing IIDs π¦
okay this section is the real talk part π«Ά wanting privacy can totally clash with wanting to keep a network running and debug it. When clients use addresses that keep changing, it gets harder to track down and isolate operational problems. For example, when you're looking at packet traces, it can get really tricky to tell whether you're seeing behavior from one errant host or from a whole bunch of them π
It's currently recommended that network deployments give general-purpose hosts multiple IPv6 addresses from each prefix [RFC7934]. BUT, in some scenarios, using a lot of IPv6 addresses can cause problems for network devices that need to keep entries for each IPv6 address in some data structures (for example, SAVI [RFC7039]). For instance, if several addresses are being actively used at once and the Neighbor Caches in network devices aren't big enough to store every address on the link, Neighbor Discovery traffic goes up. That can hurt performance and energy efficiency on networks where multicast is expensive (see, e.g., [MCAST-PROBLEMS]). And honestly, some network-security devices might wrongly think someone is forging IPv6 addresses if temporary addresses get regenerated at a high rate π¨
The use of temporary addresses may cause unexpected difficulties with some applications π
For example, some servers refuse to accept communications from clients whose IP address they can't map to a DNS name. Basically, they do a PTR query to find the DNS name for an IPv6 address, and then they might also do an AAAA query on that returned name to check that it maps back to the same address. So clients that aren't properly registered in the DNS might be unable to get into some services. However, a host's DNS name (if it doesn't change) would work as a constant identifier. Wide deployment of the extension described in this document could shake up the practice of inverse-DNS-based "validation", which has little validity even though it's widely implemented. To meet server challenges, hosts could register temporary addresses in the DNS using random names (for example, a string version of the random address itself), though that comes at the cost of extra complexity.
Also, some applications may not behave robustly if an address becomes invalid while the application is still using it, or if the application opens multiple sessions and expects them all to use the same address π
[RFC4941] used a randomized temporary IID to generate a set of temporary addresses, so temporary addresses configured at a given time for multiple SLAAC prefixes would all use the same IID. Sharing the same IID across multiple addresses meant a host only had to join one solicited-node multicast group per temporary address set π§
This document requires that the IIDs of all temporary addresses on a host are statistically different from each other. So when a network uses multiple prefixes, each temporary address in a set results in a different solicited-node multicast address. That means the number of multicast groups a host has to join depends on how many SLAAC prefixes are used for generating temporary addresses π
So a network that uses multiple prefixes may require hosts to join more multicast groups than RFC 4941 implementations did. If the number of multicast groups got big enough, a host might need to put its network interface card into promiscuous mode. That could make the host process more packets than strictly necessary, which might hurt battery life and overall system performance π
We note that since this document lowers the default TEMP_VALID_LIFETIME from 7 days (in [RFC4941]) to 2 days, there will be fewer concurrent temporary addresses per SLAAC prefix than in RFC 4941 implementations. So for a network that uses, say, between 1 and 3 prefixes, the number of multicast groups will be similar to what RFC 4941 implementations would need πΈ
Implementations that care about the maximum number of multicast groups they'd have to join because of configured addresses, or about the overall number of configured addresses, should consider enforcing implementation-specific limits on things like: the maximum number of configured addresses, the maximum number of SLAAC prefixes used for autoconfiguration, and/or the maximum ratio for TEMP_VALID_LIFETIME/TEMP_PREFERRED_LIFETIME (which ultimately controls the approximate number of concurrent temporary addresses per SLAAC prefix). A lot of these configuration limits are already readily available in SLAAC and RFC 4941 implementations. We note that these configurable limits are meant to prevent pathological behaviors (as opposed to simply limiting how IPv6 addresses get used), since IPv6 implementations are expected to take advantage of using multiple addresses [RFC7934] β
5. Significant Changes from RFC 4941 π
this section is the tea β it sums up the big substantive changes in this doc compared to RFC 4941.
Broadly speaking, this document introduces the following changes:
- Fixes a bunch of flaws in the algorithm for generating temporary addresses. The flaws include using MD5 for computing the temporary IIDs, and reusing the same IID for multiple prefixes (see [RAID2015] and [RFC7721] for further details) π§
- Lets hosts use only temporary addresses. [RFC4941] assumed temporary addresses were configured in addition to stable addresses. This document doesn't imply or require configuring stable addresses, so implementations can now configure both stable and temporary addresses, or temporary addresses only β¨
- Removes the recommendation that temporary addresses be disabled by default. This lines up with BCP 188 ([RFC7258]) and also with BCP 204 ([RFC7934]) π
- Reduces the default maximum valid lifetime for temporary addresses (
TEMP_VALID_LIFETIME).TEMP_VALID_LIFETIMEwent from 1 week to 2 days, which drops the typical number of concurrent temporary addresses from 7 to 3. That eases the possible stress on network elements (see Section 4 for further details) π DESYNC_FACTORis computed each time a temporary address is generated and is associated with that temporary address. So each temporary address has a statistically different preferred lifetime, and temporary addresses aren't generated at any specific frequency π²- Changes the requirement about not trying to regenerate temporary addresses after
TEMP_IDGEN_RETRIESconsecutive DAD failures from "MUST NOT" to "SHOULD NOT" π - The discussion about the security and privacy implications of different address generation techniques has been replaced with references to recent work in this area ([RFC7707], [RFC7721], and [RFC7217]) π‘οΈ
- This document incorporates errata submitted (at the time of writing) for [RFC4941] by Jiri Bohac and Alfred Hoenes π«Ά
6. Future Work π§
an implementation might want to keep track of which addresses the upper layers are using, so it can remove a deprecated temporary address from its internal data structures once no upper-layer protocols are using it (but not before) π This is different from current approaches, where addresses get removed from an interface when they become invalid [RFC4862], no matter whether upper-layer protocols are still using them. For TCP connections, that info is available in control blocks. For UDP-based applications, it may be that only the applications know which addresses are actually in use. So an implementation generally will need to use heuristics to decide when an address is no longer in use π€
7. IANA Considerations π
This document has no IANA actions. π
8. Security Considerations π
okay bestie, this section is SERIOUS but I'm still going to explain it with my whole heart π«Ά so, if only one or two hosts use a given prefix for a really long time, just changing the interface identifier part might not be enough to stop people from linking your activity together π. The prefix itself acts like a constant ID tag π·οΈ. These procedures work best when the prefix is pretty nonstatic or when a fairly large number of hosts are using it π . Also, if you use a temporary address in a session where you log in, any "privacy" for that address is gone for whoever receives your login info π.
This doc also talks about limiting how long interface identifiers live so attackers have a harder time correlating your address-based activity π¦. BUT, the method is believed to be ineffective against sophisticated forms of traffic analysis π. If you want more protection, you may need fancier stuff like onion routing [ONION] π§ β¨.
Ingress filtering is a thing that networks use to stop spoofed source addresses from being used in DDoS attacks π‘οΈ. Now here's the tea π΅: in a network with lots of hosts, new temporary addresses get made pretty fast π©. That can make it hard for ingress/egress filtering to tell apart legit changing temporary addresses from spoofed source addresses that are "in-prefix" (they use a topologically correct prefix plus a nonexistent interface identifier) π. You can deal with this by using access-control on a per-address basis at the network ingress point, but as noted in Section 4, there are costs for doing that πΈ. Not me stressing about this one ππ« .
9. References π
9.1. Normative References π
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-editor.org/info/rfc2119>.
- [RFC4086] Eastlake 3rd, D., Schiller, J., and S. Crocker, "Randomness Requirements for Security", BCP 106, RFC 4086, DOI 10.17487/RFC4086, June 2005, <https://www.rfc-editor.org/info/rfc4086>.
- [RFC4193] Hinden, R. and B. Haberman, "Unique Local IPv6 Unicast Addresses", RFC 4193, DOI 10.17487/RFC4193, October 2005, <https://www.rfc-editor.org/info/rfc4193>.
- [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing Architecture", RFC 4291, DOI 10.17487/RFC4291, February 2006, <https://www.rfc-editor.org/info/rfc4291>.
- [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, DOI 10.17487/RFC4861, September 2007, <https://www.rfc-editor.org/info/rfc4861>.
- [RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless Address Autoconfiguration", RFC 4862, DOI 10.17487/RFC4862, September 2007, <https://www.rfc-editor.org/info/rfc4862>.
- [RFC5453] Krishnan, S., "Reserved IPv6 Interface Identifiers", RFC 5453, DOI 10.17487/RFC5453, February 2009, <https://www.rfc-editor.org/info/rfc5453>.
- [RFC6724] Thaler, D., Ed., Draves, R., Matsumoto, A., and T. Chown, "Default Address Selection for Internet Protocol Version 6 (IPv6)", RFC 6724, DOI 10.17487/RFC6724, September 2012, <https://www.rfc-editor.org/info/rfc6724>.
- [RFC7136] Carpenter, B. and S. Jiang, "Significance of IPv6 Interface Identifiers", RFC 7136, DOI 10.17487/RFC7136, February 2014, <https://www.rfc-editor.org/info/rfc7136>.
- [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, May 2017, <https://www.rfc-editor.org/info/rfc8174>.
9.2. Informative References πΈ
- [BLAKE3] O'Connor, J., Aumasson, J. P., Neves, S., and Z. Wilcox-O'Hearn, "BLAKE3: one function, fast everywhere", 2020, <https://blake3.io/>.
- [FIPS-SHS] NIST, "Secure Hash Standard (SHS)", FIPS PUB 180-4, DOI 10.6028/NIST.FIPS.180-4, August 2015, <https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf>.
- [IANA-RESERVED-IID] IANA, "Reserved IPv6 Interface Identifiers", <https://www.iana.org/assignments/ipv6-interface-ids>.
- [MCAST-PROBLEMS] Perkins, C. E., McBride, M., Stanley, D., Kumari, W., and J. C. Zuniga, "Multicast Considerations over IEEE 802 Wireless Media", Work in Progress, Internet-Draft, draft-ietf-mboned-ieee802-mcast-problems-13, 4 February 2021, <https://tools.ietf.org/html/draft-ietf-mboned-ieee802-mcast-problems-13>.
- [ONION] Reed, M.G., Syverson, P.F., and D.M. Goldschlag, "Proxies for Anonymous Routing", Proceedings of the 12th Annual Computer Security Applications Conference, DOI 10.1109/CSAC.1996.569678, December 1996, <https://doi.org/10.1109/CSAC.1996.569678>.
- [OPEN-GROUP] The Open Group, "The Open Group Base Specifications Issue 7", Section 4.16 Seconds Since the Epoch, IEEE Std 1003.1, 2016, <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/contents.html>.
- [RAID2015] Ullrich, J. and E.R. Weippl, "Privacy is Not an Option: Attacking the IPv6 Privacy Extension", International Symposium on Recent Advances in Intrusion Detection (RAID), 2015, <https://publications.sba-research.org/publications/Ullrich2015Privacy.pdf>.
- [RFC1321] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, DOI 10.17487/RFC1321, April 1992, <https://www.rfc-editor.org/info/rfc1321>.
- [RFC2104] Krawczyk, H., Bellare, M., and R. Canetti, "HMAC: Keyed-Hashing for Message Authentication", RFC 2104, DOI 10.17487/RFC2104, February 1997, <https://www.rfc-editor.org/info/rfc2104>.
- [RFC4941] Narten, T., Draves, R., and S. Krishnan, "Privacy Extensions for Stateless Address Autoconfiguration in IPv6", RFC 4941, DOI 10.17487/RFC4941, September 2007, <https://www.rfc-editor.org/info/rfc4941>.
- [RFC5014] Nordmark, E., Chakrabarti, S., and J. Laganier, "IPv6 Socket API for Source Address Selection", RFC 5014, DOI 10.17487/RFC5014, September 2007, <https://www.rfc-editor.org/info/rfc5014>.
- [RFC6059] Krishnan, S. and G. Daley, "Simple Procedures for Detecting Network Attachment in IPv6", RFC 6059, DOI 10.17487/RFC6059, November 2010, <https://www.rfc-editor.org/info/rfc6059>.
- [RFC6151] Turner, S. and L. Chen, "Updated Security Considerations for the MD5 Message-Digest and the HMAC-MD5 Algorithms", RFC 6151, DOI 10.17487/RFC6151, March 2011, <https://www.rfc-editor.org/info/rfc6151>.
- [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, DOI 10.17487/RFC6265, April 2011, <https://www.rfc-editor.org/info/rfc6265>.
- [RFC7039] Wu, J., Bi, J., Bagnulo, M., Baker, F., and C. Vogt, Ed., "Source Address Validation Improvement (SAVI) Framework", RFC 7039, DOI 10.17487/RFC7039, October 2013, <https://www.rfc-editor.org/info/rfc7039>.
- [RFC7217] Gont, F., "A Method for Generating Semantically Opaque Interface Identifiers with IPv6 Stateless Address Autoconfiguration (SLAAC)", RFC 7217, DOI 10.17487/RFC7217, April 2014, <https://www.rfc-editor.org/info/rfc7217>.
- [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May 2014, <https://www.rfc-editor.org/info/rfc7258>.
- [RFC7421] Carpenter, B., Ed., Chown, T., Gont, F., Jiang, S., Petrescu, A., and A. Yourtchenko, "Analysis of the 64-bit Boundary in IPv6 Addressing", RFC 7421, DOI 10.17487/RFC7421, January 2015, <https://www.rfc-editor.org/info/rfc7421>.
- [RFC7707] Gont, F. and T. Chown, "Network Reconnaissance in IPv6 Networks", RFC 7707, DOI 10.17487/RFC7707, March 2016, <https://www.rfc-editor.org/info/rfc7707>.
- [RFC7721] Cooper, A., Gont, F., and D. Thaler, "Security and Privacy Considerations for IPv6 Address Generation Mechanisms", RFC 7721, DOI 10.17487/RFC7721, March 2016, <https://www.rfc-editor.org/info/rfc7721>.
- [RFC7934] Colitti, L., Cerf, V., Cheshire, S., and D. Schinazi, "Host Address Availability Recommendations", BCP 204, RFC 7934, DOI 10.17487/RFC7934, July 2016, <https://www.rfc-editor.org/info/rfc7934>.
- [RFC8190] Bonica, R., Cotton, M., Haberman, B., and L. Vegoda, "Updates to the Special-Purpose IP Address Registries", BCP 153, RFC 8190, DOI 10.17487/RFC8190, June 2017, <https://www.rfc-editor.org/info/rfc8190>.
Acknowledgments π«Ά
Fernando Gont was the sole author of this document (a revision of RFC 4941). He would like to thank (in alphabetical order) Fred Baker, Brian Carpenter, Tim Chown, Lorenzo Colitti, Roman Danyliw, David Farmer, Tom Herbert, Bob Hinden, Christian Huitema, Benjamin Kaduk, Erik Kline, Gyan Mishra, Dave Plonka, Alvaro Retana, Michael Richardson, Mark Smith, Dave Thaler, Pascal Thubert, Ole Troan, Johanna Ullrich, Eric Vyncke, Timothy Winters, and Christopher Wood for providing valuable comments on earlier draft versions of this document. π
This document incorporates errata submitted for RFC 4941 by Jiri Bohac and Alfred Hoenes (at the time of writing). β¨
Suresh Krishnan was the sole author of RFC 4941 (a revision of RFC 3041). He would like to acknowledge the contributions of the IPv6 Working Group and, in particular, Jari Arkko, Pekka Nikander, Pekka Savola, Francis Dupont, Brian Haberman, Tatuya Jinmei, and Margaret Wasserman for their detailed comments. π·
Rich Draves and Thomas Narten were the authors of RFC 3041. They would like to acknowledge the contributions of the IPv6 Working Group and, in particular, Ran Atkinson, Matt Crawford, Steve Deering, Allison Mankin, and Peter Bieringer. π
Authors' Addresses π
Fernando Gont SI6 Networks Segurola y Habana 4310, 7mo Piso Villa Devoto Ciudad Autonoma de Buenos Aires Argentina
Email: fgont@si6networks.com URI: https://www.si6networks.com
Suresh Krishnan Kaloom
Email: suresh@kaloom.com
Thomas Narten
Email: narten@cs.duke.edu
Richard Draves Microsoft Research One Microsoft Way Redmond, WA United States of America
Email: richdr@microsoft.com
π¦ where this page comes from
- ietf: rfc8981 2021-02
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms