idnits 2.17.1 draft-ietf-homenet-prefix-assignment-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) == There are 1 instance of lines with private range IPv4 addresses in the document. If these are generic example addresses, they should be changed to use any of the ranges defined in RFC 6890 (or successor): 192.0.2.x, 198.51.100.x or 203.0.113.x. == There are 4 instances of lines with non-RFC3849-compliant IPv6 addresses in the document. If these are example addresses, they should be changed. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords. (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: If some host or non-Homenet router asks for Delegated Prefixes, a router MAY assign a set of prefixes and give them to the client. Such assignments MUST be advertised as either not assigned on any link, or assigned on a stub virtual link connected to the router, depending on the Flooding Protocol capabilities. By default assignments priorities MUST be between PRIORITY_AUTO_MIN and PRIORITY_AUTO_MAX, SHOULD be lower than PRIORITY_DEFAULT, and the authoritative bit MUST not be set. Whenever such an assignment becomes invalid, DHCPv6 Reconfigure SHOULD be used in order to remove the prefix from DHCPv6 DP client's lease. If DHCPv6 Reconfigure is not supported, leases lifetimes SHOULD be significantly small. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: In the case of IPv4 prefixes, the network address (first address of the address pool) MUST not be used. -- The document date (September 19, 2014) is 3478 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 3315 (Obsoleted by RFC 8415) ** Obsolete normative reference: RFC 3633 (Obsoleted by RFC 8415) ** Obsolete normative reference: RFC 6106 (Obsoleted by RFC 8106) == Outdated reference: A later version (-17) exists of draft-ietf-homenet-arch-11 == Outdated reference: A later version (-10) exists of draft-ietf-homenet-hncp-00 == Outdated reference: A later version (-15) exists of draft-ietf-ospf-ospfv3-autoconfig-06 Summary: 4 errors (**), 0 flaws (~~), 9 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group P. Pfister 3 Internet-Draft B. Paterson 4 Intended status: Standards Track Cisco Systems 5 Expires: March 23, 2015 J. Arkko 6 Ericsson 7 September 19, 2014 9 Prefix and Address Assignment in a Home Network 10 draft-ietf-homenet-prefix-assignment-00 12 Abstract 14 This memo describes a home network prefix and address assignment 15 algorithm running on top of any 'flooding protocol' that fulfills the 16 specified requirements. It is expected that home border routers are 17 allocated one or multiple IPv6 prefixes through DHCPv6 Prefix 18 Delegation (PD) or that prefixes are made available through other 19 means. An IPv4 address can also be assigned and private addresses be 20 used with NAT to provide IPv4 connectivity. In both cases, provided 21 prefixes need to be efficiently divided among the multiple links, and 22 routers need to obtain addresses. This document describes a 23 distributed algorithm for IPv4 and IPv6 prefixes division, assignment 24 and router's address assignment, and specifies how hosts can be given 25 addresses and configuration options using DHCP or SLAAC. 27 Status of This Memo 29 This Internet-Draft is submitted in full conformance with the 30 provisions of BCP 78 and BCP 79. 32 Internet-Drafts are working documents of the Internet Engineering 33 Task Force (IETF). Note that other groups may also distribute 34 working documents as Internet-Drafts. The list of current Internet- 35 Drafts is at http://datatracker.ietf.org/drafts/current/. 37 Internet-Drafts are draft documents valid for a maximum of six months 38 and may be updated, replaced, or obsoleted by other documents at any 39 time. It is inappropriate to use Internet-Drafts as reference 40 material or to cite them other than as "work in progress." 42 This Internet-Draft will expire on March 23, 2015. 44 Copyright Notice 46 Copyright (c) 2014 IETF Trust and the persons identified as the 47 document authors. All rights reserved. 49 This document is subject to BCP 78 and the IETF Trust's Legal 50 Provisions Relating to IETF Documents 51 (http://trustee.ietf.org/license-info) in effect on the date of 52 publication of this document. Please review these documents 53 carefully, as they describe your rights and restrictions with respect 54 to this document. Code Components extracted from this document must 55 include Simplified BSD License text as described in Section 4.e of 56 the Trust Legal Provisions and are provided without warranty as 57 described in the Simplified BSD License. 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 62 2. Requirements language . . . . . . . . . . . . . . . . . . . . 4 63 3. Prefix and Address Assignment Algorithms' Outline . . . . . . 4 64 4. Router Behavior . . . . . . . . . . . . . . . . . . . . . . . 5 65 4.1. Data structures . . . . . . . . . . . . . . . . . . . . . 6 66 4.2. Routers' Interfaces . . . . . . . . . . . . . . . . . . . 7 67 4.3. Obtaining a Delegated Prefix . . . . . . . . . . . . . . 7 68 4.4. Network Leader . . . . . . . . . . . . . . . . . . . . . 8 69 4.5. Designated Router . . . . . . . . . . . . . . . . . . . . 8 70 4.5.1. Sending Router Advertisement . . . . . . . . . . . . 9 71 4.5.2. DHCP Server Operations . . . . . . . . . . . . . . . 9 72 4.6. Applying an Assignment on an Interface . . . . . . . . . 9 73 4.7. DNS Support . . . . . . . . . . . . . . . . . . . . . . . 10 74 5. Flooding Protocol Requirements . . . . . . . . . . . . . . . 10 75 5.1. Router ID . . . . . . . . . . . . . . . . . . . . . . . . 11 76 5.2. Propagation Delay . . . . . . . . . . . . . . . . . . . . 11 77 5.3. Flooding Assigned Prefixes . . . . . . . . . . . . . . . 11 78 5.4. Flooding Delegated Prefixes . . . . . . . . . . . . . . . 12 79 5.5. Flooding Routers' Address Assignments . . . . . . . . . . 12 80 6. Prefix Assignment Algorithm . . . . . . . . . . . . . . . . . 12 81 6.1. When to execute the Prefix Assignment Algorithm . . . . . 13 82 6.2. Assignment Precedence . . . . . . . . . . . . . . . . . . 13 83 6.3. Testing Assignment's validity . . . . . . . . . . . . . . 14 84 6.4. Testing Assignment's availability . . . . . . . . . . . . 14 85 6.5. Accepting an Assigned Prefix . . . . . . . . . . . . . . 14 86 6.6. Making a New Assignment . . . . . . . . . . . . . . . . . 14 87 6.7. Using Authoritative Prefix Assignments . . . . . . . . . 16 88 6.8. Choosing the Assignment's Priority . . . . . . . . . . . 16 89 6.9. Prefix Assignment Algorithm steps . . . . . . . . . . . . 17 90 6.10. Downstream DHCPv6 Prefix Delegation support . . . . . . . 18 91 7. Address Assignment Algorithm . . . . . . . . . . . . . . . . 18 92 7.1. Router's address pools . . . . . . . . . . . . . . . . . 19 93 7.2. Address Assignment Algorithm . . . . . . . . . . . . . . 19 94 8. Hysteresis Principle . . . . . . . . . . . . . . . . . . . . 20 95 8.1. Prefix and Address assignments . . . . . . . . . . . . . 20 96 8.2. Delegated Prefixes . . . . . . . . . . . . . . . . . . . 20 98 9. ULA and IPv4 Prefixes Generation . . . . . . . . . . . . . . 21 99 9.1. ULA Prefix Generation . . . . . . . . . . . . . . . . . . 21 100 9.2. IPv4 Private Prefix Generation . . . . . . . . . . . . . 21 101 10. Manageability Considerations . . . . . . . . . . . . . . . . 22 102 11. Documents Constants . . . . . . . . . . . . . . . . . . . . . 22 103 12. Security Considerations . . . . . . . . . . . . . . . . . . . 22 104 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 23 105 13.1. Normative References . . . . . . . . . . . . . . . . . . 23 106 13.2. Informative References . . . . . . . . . . . . . . . . . 24 107 Appendix A. Scarcity Avoidance Mechanism . . . . . . . . . . . . 25 108 A.1. Prefix Wasts Avoidance . . . . . . . . . . . . . . . . . 25 109 A.2. Increasing Assigned Prefix Length . . . . . . . . . . . . 27 110 A.3. Foreseeing Prefixes Exaustion . . . . . . . . . . . . . . 27 111 A.4. Cutting an Existing Assignment . . . . . . . . . . . . . 28 112 Appendix B. Acknowledgments . . . . . . . . . . . . . . . . . . 28 113 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 28 115 1. Introduction 117 This memo describes a fully distributed prefix and address assignment 118 algorithm for home networks, running on top of any 'flooding 119 protocol' that fulfills the specified requirements. It is expected 120 that home border routers are allocated one or multiple IPv6 prefixes 121 through DHCPv6 Prefix Delegation (PD) [RFC3633] or that prefixes are 122 made available through other means. When an IPv4 address is 123 assigned, a home private IPv4 prefix may be used with NAT to provide 124 IPv4 connectivity to the whole home, as well as Unique Local Address 125 prefixes [RFC4193] may be used in order to provide internal 126 connectivity whenever global IPv6 connectivity is not available. 128 Obtained IPv6 or IPv4 prefixes need to be efficiently divided among 129 the multiple links. For the purposes of this document, we refer to 130 this process as prefix assignment. This memo describes an algorithm 131 for such prefix division, assignment and router's address assignment, 132 as well as the way hosts can be given addresses and configuration 133 options using DHCPv4 [RFC2131], DHCPv6 [RFC3315] or SLAAC [RFC4862]. 134 In the rest of this document DHCP refers to both DHCPv4 and DHCPv6. 136 Although this document recommends the use of 64 bits long prefixes, 137 the algorithm do not require routers to assign prefixes of particular 138 lengths. When a delegated prefix is too small considered the number 139 of links in the home network, higher priority links may be privileged 140 or smaller prefixes can be assigned in order to avoid prefix 141 scarcity. 143 The rest of this memo is organized as follows. Section 2 defines the 144 usual keywords, Section 3 outlines the algorithms functioning and 145 features, Section 4 describes how a home router behaves when running 146 the prefix and address assignment algorithm. Requirements for the 147 underlying flooding protocol are detailed in Section 5. The prefix 148 assignment algorithm is detailed in Section 6 and Section 7 focuses 149 on the address assignment algorithm. Section 8 explains the 150 hysteresis principles applied to both prefix and address assignments, 151 Section 9 specifies the procedures for automatic generation of ULA 152 and IPv4 prefixes, Section 10 explains what administrative interfaces 153 are useful for advanced users that wish to manually interact with the 154 mechanisms, Section 11 gives values for the constants used in this 155 document, Section 12 discusses the security aspects and finally, 156 Appendix A provides implementation guidelines for the optional 157 scarcity avoidance mechanism. 159 The Prefix Assignment Algorithm was first detailed in 160 [I-D.arkko-homenet-prefix-assignment]. This document is a 161 continuation and generalization of that draft to any underlying 162 flooding protocol. It also adds support for arbitrary prefix length, 163 IPv4, scarcity avoidance mechanism or manual configuration. 165 2. Requirements language 167 In this document, the key words "MAY", "MUST, "MUST NOT", "OPTIONAL", 168 "RECOMMENDED", "SHOULD", and "SHOULD NOT", are to be interpreted as 169 described in [RFC2119]. 171 3. Prefix and Address Assignment Algorithms' Outline 173 Given one or multiple prefixes for the entire network, each prefix is 174 subdivided by the prefix assignment algorithm so that every link is 175 given one assignment per available prefix. Assignments are 176 advertised through the whole network using the underlying flooding 177 protocol, collisions are detected and valid assignments are chosen 178 and applied on every link. Once a prefix is applied, hosts and 179 routers may be given addresses. In summary, the algorithm works in 180 four steps: 182 1. The home is given IPv6 or IPv4 prefixes called Delegated Prefixes 183 (DPs). 185 2. Each link is provided an Assigned Prefix (AP) from each available 186 Delegated Prefix. 188 3. Routers internally check for AP's validity and select Chosen 189 Prefixes (CPs). 191 4. Once a link is given an assignment, routers may get addresses 192 from specified address pools and hosts may be configured using 193 SLAAC or by the per-link elected DHCP server. 195 This algorithm, which intends to fulfill requirements specified in 196 [I-D.ietf-homenet-arch], has the following features: 198 o Each delegated prefix is effectively divided so that each link is 199 assigned a reasonable part. If the delegated prefix is too small 200 given the size of the network, prefixes of arbitrary lengths may 201 be used. 203 o The algorithm is completely distributed. Routers may join or 204 leave and DPs may be added or removed at any time. 206 o IPv4 connectivity is provided when a home router acquires an IPv4 207 address and default route from an external source. In this case a 208 private IPv4 delegated prefix is generated and prefixes are 209 assigned similarly to IPv6. 211 o The network may spontaneously generate and use a Unique Local 212 Address (ULA) prefix. 214 o Assignments are stable across reboots and some network changes 215 (e.g. adding or removing routers). 217 o DHCP options like DNS servers, prefix colors 218 [I-D.bhandari-dhc-class-based-prefix], or any upcoming options may 219 be attached to each prefix and may be relayed down to the host 220 when it is given addresses. 222 o The user can manually assign prefixes to links. Such assignments 223 will take precedence over automatically assigned prefixes. 225 o Assignments and interfaces can be given priorities. When a 226 delegated prefix is too small, such values may be used to 227 prioritize prefix assignment to certain links. 229 4. Router Behavior 231 All home routers participating in the prefix assignment algorithm 232 MUST fulfill the requirements defined in this document and use a 233 common flooding protocol and routing protocol. Classic CPE routers 234 [RFC7084] are supported as downstream routers and dowstream DHCPv6-PD 235 enabled routers are supported as both downstream and uplink routers, 236 but problems may occur when such router is connected to the home 237 network on both WAN and LAN side. In the later case, finer external 238 interface detection algorithm or static configuration can be used to 239 solve the issue, but these are out of the scope of this document. 241 4.1. Data structures 243 Each router MUST maintain a list of all the Delegated Prefixes. 244 These prefixes may be locally generated, as described in Section 4.3, 245 or come from other routers as described in Section 5.4. 247 Each router MUST maintain a list of all the Assigned Prefixes 248 advertised by other routers. Each AP is learnt through the 249 mechanisms described in Section 5.3 and is defined as a tuple of: 251 Prefix: The assigned prefix. 253 Router ID: The identifier of the advertising router. 255 Link ID: If the assignment is made on a connected link, an interface 256 identifier of the interface connected to that link. 258 Authoritative bit: A boolean that tells whether the assignment comes 259 from a network authority (DHCPv6 PD, manual configuration, 260 etc...). 262 Assignment's Priority: A value between PRIORITY_MIN and 263 PRIORITY_MAX, specifying the assignment's priority. 265 The AP list is the result of the information provided by the flooding 266 protocol, as specified in Section 5.3. 268 The router MUST maintain a list of all prefixes currently chosen to 269 be applied on connected links. They are Chosen Prefixes (CPs) and 270 described by a tuple of: 272 Prefix: The assigned prefix. 274 Link ID: An interface identifier of the interface connected to the 275 link on which the assignment is made. 277 Authoritative bit: A boolean that tells whether the assignment comes 278 from a network authority (DHCPv6 PD, manual configuration, 279 etc...). 281 Assignment's Priority: A value between PRIORITY_MIN and 282 PRIORITY_MAX, specifying the assignment's priority. 284 Advertised: Whether that assignment is being advertised by the 285 flooding protocol (see Section 5.3). 287 Applied: Whether that assignment is applied on link's configuration 288 (see Section 4.6). 290 Chosen Prefixes that are marked as 'Advertised' are distributed to 291 other routers using the flooding protocol and are therefore 292 considered as Assigned Prefixes by other routers. The goal of the 293 Prefix Assignment Algorithm is to ensure that all routers have a 294 consistent view of Assigned Prefixes on each link. 296 The router MUST maintain a database of its own address assignments, 297 and address assignments made by other routers on connected links as 298 learnt through means described in Section 5.5. 300 4.2. Routers' Interfaces 302 Each interface MUST either be considered as internal or external. 303 Prefixes and addresses are only assigned to internal interfaces. The 304 criteria to make this distinction are out of the scope of this 305 document. 307 If an internal interface becomes external, all prefixes and addresses 308 assigned on the considered interface MUST be deleted and no longer 309 announced, and the prefix assignment algorithm MUST be run. 311 If an external interface becomes internal, the prefix assignment 312 algorithm MUST be run (see Section 6.1). 314 Whenever two or more interfaces are connected to the same link, all 315 but one of them SHOULD be ignored by the prefix assignment algorithm. 316 A mechanism to detect such situation SHOULD be provided by the 317 flooding algorithm. 319 4.3. Obtaining a Delegated Prefix 321 A Delegated Prefix can be obtained or generated through different 322 means: 324 o It can be dynamically delegated, for instance using DHCPv6 PD. 326 o It can be created statically, specified in router's configuration. 328 o A ULA prefix may be spontaneously generated as defined in 329 Section 9.1. 331 o An IPv4 private prefix may be spontaneously generated as defined 332 in Section 9.2. 334 DHCP options MAY be attached to a delegated prefix by the router that 335 either generated the prefix or received it through DHCPv6 PD. IPv6 336 delegated prefix options MUST be encoded as DHCPv6 options. IPv4 337 delegated prefix options MUST be encoded as DHCPv4 options. 339 As DHCP options are numerous and new ones may be defined, specifying 340 routers' behavior regarding each option is out of the scope of this 341 document. In order to avoid misconfiguration, routers must follow 342 the two following general rules: 344 o A router MUST NOT advertise a prefix obtained through DHCPv6 PD if 345 it doesn't understand the all of the provided options. 347 o A router MUST NOT make or accept any assignment associated to a 348 delegated prefix if it doesn't understand the all of the DHCP 349 options advertised with the delegated prefix. 351 The mif working group may provide useful inputs concerning the way 352 the home network should handle different prefixes associated with 353 heterogeneous uplinks. 355 4.4. Network Leader 357 A router considers itself as the Network Leader if and only if its 358 router ID is greater than all other router IDs in received Prefix 359 Assignments and Delegated Prefixes. 361 4.5. Designated Router 363 On a link where custom host configuration must be provided, or 364 whenever SLAAC cannot be used, a DHCP server must be elected. That 365 router is called designated router and is dynamically chosen by the 366 prefix assignment algorithm. 368 A router MUST consider itself designated router on a given link if 369 either one of the following conditions holds: 371 o The link's Assigned Prefixes list is empty. i.e. no other router 372 is advertising assignments on the considered link. And, if such 373 information is provided by the flooding protocol, the router has 374 the highest id on the link. 376 o Considering all APs and advertised CPs on the given link, the 377 router is advertising the one with: 379 1. The lowest authoritative bit. 381 2. In case of tie, the lowest priority. 383 3. In case of tie, the highest router ID. 385 Note: That particular order (inverted compared to assignments' 386 priority) is motivated by the few cases where a router may 387 override an existing assignment by advertising an assignment of 388 higher priority. In such a case, the designated router should 389 remain the same. 391 Example: A new router is powered on and connected to another 392 router that was already there (doing DHCP). It sees the 393 assigned prefix for their common link, but also has, in its own 394 configuration, an authoritative assignment for the link. It 395 starts advertising the authoritative assignment, which causes 396 the second router to remove its previous assignment. Thanks to 397 the inverted order, the DHCP server will remain the same. 399 4.5.1. Sending Router Advertisement 401 On a given link, the designated router MUST send router 402 advertisements including Prefix Information Options for all the 403 Chosen Prefixes associated to that link. SLAAC SHOULD be enabled 404 when possible, unless the configuration states otherwise. The valid 405 and preferred lifetimes MUST be set to values lower or equal to the 406 associated Delegated Prefix's valid and preferred lifetimes. 408 4.5.2. DHCP Server Operations 410 On a given link, whenever SLAAC can't be used for all assignments, or 411 DHCP configuration options must be provided to hosts, the designated 412 router MUST act as a DHCP server and serve addresses on the given 413 link. A router MUST stop behaving as a DHCP server whenever it is 414 not the link's designated router anymore. 416 Routers's addresses pool, specified in Section 7, MUST be excluded 417 from DHCP hosts pools. 419 The valid and preferred lifetimes MUST be set to values lower or 420 equal to the associated Delegated Prefix's valid and preferred 421 lifetimes. 423 4.6. Applying an Assignment on an Interface 425 Once a Chosen Prefix is created, a router first waits some time in 426 order to detect possible collisions (Section 8). Afterwards and if 427 no collision is detected, the prefix is applied as follows: 429 o The router updates its interface configuration so that the prefix 430 is assigned to the considered link. 432 o The router updates the routing protocol configuration so that it 433 starts advertising the prefix. Depending on the implementation, 434 this step may not be needed as the routing protocol directly gets 435 its configuration information from the interfaces configuration. 437 o If necessary, the router starts selecting an address for itself as 438 defined in Section 7. 440 o If the router is the designated router on the considered link, it 441 starts sending the Prefix Information Option with the considered 442 prefix, as specified in Section 4.5.1. 444 o If the router is the designated router on the considered link and 445 if the prefix requires DHCP configuration, it starts behaving as a 446 DHCP server, as defined in Section 4.5.2, for the considered 447 assigned prefix. 449 When a prefix assignment is removed, the previous steps MUST be 450 undone. The router MUST also deprecate the prefix, if it had been 451 advertised in Router Advertisements on an interface. The prefix is 452 deprecated by sending Router Advertisements with the PIO's preferred 453 lifetime set to 0 [RFC4861]. Hosts that support DHCP reconfigure 454 extension ([RFC3203], [RFC3315]) and that have been given leases MUST 455 be reconfigured as well. 457 4.7. DNS Support 459 DHCP options attached to each delegated prefixes and propagated 460 through the flooding protocol SHOULD contain the DHCP DNS options 461 provided by the ISP (when provided). 463 Whenever the router knows which DNS server to use, or is acting as a 464 DNS relay, it SHOULD include DNS DHCP options ([RFC3646]) within 465 host's configuration messages and include the Router Advertisement 466 DNS options ([RFC6106]) when sending RAs. 468 DNS server selection in multi-homed networks is a complex issue that 469 this document doesn't intend to solve. One should look at IETF's mif 470 working-group documents in order to obtain guidelines concerning DNS 471 server selection. It is RECOMMENDED that designated routers turns on 472 a local DNS relay that fetches information from provided DNS servers. 474 5. Flooding Protocol Requirements 476 In this document, the Flooding Protocol (FP) refers to a protocol 477 enabling information propagation to the whole network. It was not 478 specified in order to allow the working group to independently decide 479 which routing protocol, configuration protocol, and prefix assignment 480 method to use within the home network. Routing protocol, like OSPFv3 481 [RFC5340] (With its autoconf extension 483 [I-D.ietf-ospf-ospfv3-autoconfig]) or IS-IS [RFC5308], could be 484 extended in order to fulfill the requirements. An independent 485 protocol, for instance HNCP [I-D.ietf-homenet-hncp], could be used as 486 well. 488 The specified algorithm can use any protocol that fulfills the 489 requirements specified in this section. 491 5.1. Router ID 493 The FP MUST provide a router ID. ID collisions within the network 494 MUST be rare and any conflicts MUST be resolved by the flooding 495 protocol. When the router ID is changed, the FP MUST immediately 496 provide the new ID to the Prefix Assignment Algorithm, which will in 497 turn be run again, without requiring the current state to be flushed. 499 In the absence of collisions, the router ID MUST NOT be changed, and 500 it SHOULD be stable across reboots, power cycling and router software 501 updates. 503 5.2. Propagation Delay 505 The FP MUST provide an approximate upper bound of the time it takes 506 for an update to be propagated to the whole network. This value is 507 referred to as the FLOODING_DELAY. The algorithm ensures that, as 508 long as the upper bound is respected, two identical prefixes will 509 never be applied to different links, and two different prefixes will 510 never be applied to the same link. The algorithm and the network 511 will recover when the upper bound is exceeded, but collisions may 512 appear in the routing protocol and errors may be propagated to upper 513 layers. 515 If the FP supports link-local flooding, which is used for router's 516 address assignments, it SHOULD provide an approximate upper bound of 517 the time it takes for an update to be propagated to a single link. 518 This value is referred to as the FLOODING_DELAY_LL. If link-local 519 flooding is not available, or the value is not provided, the 520 assignment algorithm MUST use the FLOODING_DELAY value instead. 522 5.3. Flooding Assigned Prefixes 524 The FP MUST provide a way to flood Chosen Prefixes marked as 525 advertised and retrieve prefixes assigned by other routers (APs). 526 Retrieved APs MUST contain all the information specified in 527 Section 4.1. 529 5.4. Flooding Delegated Prefixes 531 The FP must provide a way to flood Delegated Prefixes and retrieve 532 prefixes delegated to other routers. Retrieved entries must contain 533 the following information. 535 Prefix: The delegated prefix. 537 Router ID: The router ID of the router that is advertising the 538 delegated prefix. 540 Valid until: A time value, in absolute local time, specifying the 541 prefix validity time. 543 Preferred until: A time value, in absolute local time, specifying 544 the prefix preferred time. 546 DHCP information: DHCP options attached to the delegated prefix. 548 The FP MUST make sure time values are consistent throughout the 549 network (i.e. differences are small compared to Delegated Prefixes 550 lifetimes). If no time synchronization protocol is used, the FP MUST 551 keep track of prefix age across the network and within its database. 553 5.5. Flooding Routers' Address Assignments 555 Routers addresses are dynamically allocated, picked from a defined 556 pool, and collisions must be detected using the FP. The FP MUST 557 provide a way to flood routers' addresses. The flooding scope of 558 those values SHOULD be link-local, but as addresses are unique within 559 the home network, this is not mandatory. For each address 560 assignment, the FP SHOULD provide the identifier of the interface 561 connected to the link the address assignment was advertised on. 563 6. Prefix Assignment Algorithm 565 The Prefix Assignment Algorithm is a distributed algorithm that 566 assigns one prefix from each available Delegated Prefix on every link 567 that is considered to be internal by at least one connected router. 568 The algorithm itself does not distinguish between global IPv6, ULA or 569 IPv4 prefixes. IPv4 prefixes are encoded as their IPv4-mapped IPv6 570 form, as defined in [RFC4291] (i.e. ::ffff:A.B.C.D/X with X >= 96). 572 When the Prefix Assignment Algorithm is executed, combinations of 573 Delegated Prefixes and internal interfaces are being considered. For 574 the purpose of this discussion, the Delegated Prefix will be referred 575 to as the current Delegated Prefix, and the interface will be 576 referred to as the current Interface. If a delegated prefix is 577 included inside another delegated prefix, it is ignored. This rule 578 intends to ignore prefixes delegated from non-Homenet routers that 579 previously obtained their larger prefix from one of Homenet's 580 routers. 582 The algorithm is specified here for the sake of clarity. It can be 583 optimized in some cases. For instance Prefix Assignment deletion 584 might not need to trigger algorithm's execution if all internal 585 interfaces already have assignements associated to the same Delegated 586 Prefix. Similarly, when an ignored Delegated Prefix is deleted, it 587 is not necessary to run the algorithm. An implementation may work 588 differently than specified here as long as the resulting behavior is 589 identical to the behavior a router implementing this exact algorithm 590 would have. 592 6.1. When to execute the Prefix Assignment Algorithm 594 The algorithm MUST be run whenever one of the following event occurs: 596 o A Delegated Prefix is created or deleted (A DP must be deleted 597 when its lifetime is exceeded). 599 o A Prefix Assignment is created, deleted or modified. 601 o The router ID is modified. 603 o An external link becomes internal, or an internal link becomes 604 external. 606 It is not required that the algorithm is synchronously run each time 607 such an event occurs. But the delay between the event and the 608 algorithm execution MUST be small compared to FLOODING_DELAY. 610 6.2. Assignment Precedence 612 An assignment is said to take precedence over another assignment 613 when: 615 o The authoritative bit value is higher. 617 o In case of tie, the priority value is higher. 619 o In case of tie, the advertising router's ID is higher. 621 6.3. Testing Assignment's validity 623 An Assigned Prefix or a Chosen Prefix is said to be valid if all the 624 following conditions are met: 626 1. Its prefix is included in an advertised Delegated Prefix. 628 2. The prefix is not included or does not include any other Assigned 629 Prefix with a higher precedence. 631 3. No other assignment which prefix is included in the same 632 Delegated Prefix, and with a higher precedence, is being 633 advertised on the same link. 635 6.4. Testing Assignment's availability 637 A prefix is said to be available if it does not overlap with any 638 other assignment by any other router in the network. 640 6.5. Accepting an Assigned Prefix 642 An AP is said to be accepted when the AP is currently being 643 advertised by a different router on a directly connected link, and 644 will be used by the accepting router as a new Chosen Prefix. When a 645 router accepts a neighbor's assignment, it starts a timer as 646 specified in Section 8. A new CP is created from the AP, with: 648 o The same prefix. 650 o The same link ID. 652 o The authoritative bit set to false. 654 o The same priority. 656 o The advertised bit value set as specified by the algorithm. 658 o The applied bit is unset. It is set when the timer elapsed if the 659 entry still exists. 661 6.6. Making a New Assignment 663 When the algorithm decides to make a new assignment, it first needs 664 to specify the desired size of the assigned prefix. Although that 665 choice is completely implementation specific, prefixes of size 64 are 666 RECOMMENDED. The following table MAY be used as default values, 667 where X is the length of the delegated prefix. 669 If X < 64: Prefix length = 64 671 If X >= 64 and X < 104: Prefix length = X + 16 (up to 2^16 links) 673 If X >= 104 and X < 112: Prefix length = 120 (2^8 addresses per link 674 and more than 2^8 links) 676 If X >= 112 and X <= 128: Prefix length = 120 + (X - 112)/2 (Link Vs 677 Addresses tradeoff) 679 When the algorithm decides to make a new assignment, it SHOULD first 680 checks its stable storage for an available assignment that was 681 previously applied on the current interface and is part of the 682 current delegated prefix. If no available assignment can be found 683 that way, the new prefix MUST be randomly selected among a subset of 684 available prefixes (if possible, large enough to avoid collisions). 685 Hardware specific identifiers may be used to seed a pseudo-random 686 generator. 688 If no available prefix is found, the assignment fails. 690 The algorithm leaves much room for implementation specific policies. 691 For instance, static prefixes may be configured as specified in 692 Section 10. If implemented, the router MAY also decide to execute 693 the Prefix Scarcity Avoidance mechanisms, as proposed in Appendix A. 695 If an available prefix is found, a new assignment is made and a new 696 Chosen Prefix entry is created. 698 o The prefix value is set to the chosen prefix. 700 o The link ID is the ID of the link on which the assignment is made. 702 o The authoritative bit is set to false. 704 o The priority is set to a value between PRIORITY_AUTO_MIN and 705 PRIORITY_AUTO_MAX (Section 6.8). 707 o The advertised bit is set. 709 o The applied bit is unset. It is set when the timer elapsed if the 710 entry still exists. 712 A new assignment is always marked as advertised when created and 713 therefore immediately provided to the flooding protocol. 715 6.7. Using Authoritative Prefix Assignments 717 When some authority (Delegating router, system admin, etc...) wants 718 to manually enforce some behavior, it may ask some router to make an 719 Authoritative Prefix Assignment. Such assignments have their 720 Authoritative bit set, CAN NOT be overridden, and will appear in 721 other router's database as Assigned Prefixes with the Authoritative 722 bit set. 724 There are two kinds of Authoritative Prefix Assignments. 726 o When an authority wants to assign some particular prefix to some 727 interface, an Authoritative Prefix Assignment CAN be created and 728 consists in a Chosen Prefix which have its Authoritative bit set 729 and which is advertised. Just like normal assignments, it MUST 730 NOT be applied before the delay specified in Section 8 elapsed. 732 o When an authority wants to prevent some prefix from being used, an 733 Authoritative Assignment CAN be advertised. Such assignments MUST 734 NOT be applied and MUST be advertised through the flooding 735 protocol as assigned to either no-interface, or a fake interface 736 (Depending on the flooding protocol's capabilities). 738 When a delegated prefix is obtained through DHCPv6 PD with a non- 739 empty excluded prefix, as specified in [RFC6603], an Authoritative 740 Prefix Assignment MUST be created with the excluded prefix. 742 Note: If the router doesn't understand the excluded prefix DHCPv6 743 option, the delegated prefix is ignored, as specified in 744 Section 4.3. 746 6.8. Choosing the Assignment's Priority 748 When either a new Prefix Assignment is made, or an Authoritative 749 Prefix Assignment is created, the creating router needs to choose 750 which priority value to use. The assignment priority is kept by the 751 designated router when it starts advertising the assignment, and is 752 useful when not enough prefixes are available. 754 o PRIORITY_DEFAULT SHOULD be used as default. 756 o Other values between PRIORITY_AUTO_MIN and PRIORITY_AUTO_MAX MAY 757 be dynamically chosen by the implementation. 759 o Other values between PRIORITY_AUTHORITY_MIN and 760 PRIORITY_AUTHORITY_MAX MUST NOT be used if not specified by an 761 authority (by static or dynamic configuration). 763 o Other values are reserved. 765 6.9. Prefix Assignment Algorithm steps 767 At the beginning of the algorithm, all assignments that do not have 768 their Authoritative bit set are marked as 'invalid', and the router 769 computes for each connected link whether it is the designated router, 770 as specified in Section 4.5. 772 The following steps are then executed for every combination of 773 delegated prefixes and interfaces. 775 o If the current interface is external, ignore that interface. 777 o If the Delegated Prefix is strictly included in another Delegated 778 Prefix, ignore that delegated prefix. 780 o If the Delegated Prefix is equal to another Delegated Prefix, 781 advertised by some router with an higher router ID than the 782 considered delegated prefix, ignore that delegated prefix. 784 o Look for a valid Assigned Prefix, advertised by another router on 785 the current interface and included in the current Delegated 786 Prefix. 788 o Look for a Chosen Prefix associated to the current interface and 789 included in the current Delegated Prefix. 791 o There are four possibilities at this stage. 793 1. If no AP is found, and no CP is found, a new assignment MUST 794 be made if and only if the router considers itself as the 795 designated router. See Section 6.6. 797 2. If an AP is found, and no CP is found, the AP MUST be 798 accepted. The new CP's advertised bit MUST be set if and only 799 if the router considers itself as the designated router. 801 3. If no AP is found, and a CP is found, the router MUST check if 802 the CP's assignment is valid. If it is, the local assignment 803 is marked as valid and advertised. If it isn't, it is 804 destroyed and the algorithm applies case 1. 806 4. If both an AP and a CP are found, the router must check if the 807 prefixes are the same. If they are different and if the CP's 808 Authoritative bit is not set, the CP MUST be deleted and the 809 algorithm applies case 2. If the prefixes are the same, the 810 CP must be updated with the AP's priority value, marked as 811 valid, and advertised if and only if the router considers 812 itself as designated on the link. 814 In the end all the assignments that are marked as invalid are 815 deleted. 817 6.10. Downstream DHCPv6 Prefix Delegation support 819 If some host or non-Homenet router asks for Delegated Prefixes, a 820 router MAY assign a set of prefixes and give them to the client. 821 Such assignments MUST be advertised as either not assigned on any 822 link, or assigned on a stub virtual link connected to the router, 823 depending on the Flooding Protocol capabilities. By default 824 assignments priorities MUST be between PRIORITY_AUTO_MIN and 825 PRIORITY_AUTO_MAX, SHOULD be lower than PRIORITY_DEFAULT, and the 826 authoritative bit MUST not be set. Whenever such an assignment 827 becomes invalid, DHCPv6 Reconfigure SHOULD be used in order to remove 828 the prefix from DHCPv6 DP client's lease. If DHCPv6 Reconfigure is 829 not supported, leases lifetimes SHOULD be significantly small. 831 Provided DPs' valid and preferred lifetimes MUST be lower or equal to 832 their associated Delegated Prefix's lifetimes, and associated DHCPv6 833 data SHOULD be provided to the DHCPv6 PD client. 835 By default, an assigned prefix SHOULD NOT be provided to a DHCPv6 PD 836 client before the apply timeout has elapsed. But in order to allow 837 faster response delay, a lease MAY first be provided with a lifetime 838 of 2*FLOODING_DELAY seconds, even if the private assignments' apply 839 timeout has not elapsed yet. 841 7. Address Assignment Algorithm 843 IPv6 routers always get at least one link-local address per link. 844 Routing protocols and link DHCP servers are able to run with these 845 addresses. In some cases though, a router may need to take one or 846 multiple addresses among one or multiple available Delegated 847 Prefixes. For example: 849 o The router needs connectivity to the internet (For management, NTP 850 synchronization, etc...). 852 o The router needs connectivity within the home network (For 853 management, DNS communications, etc...). 855 o IPv4 addresses are needed (DHCPv4, v4 link-local connectivity, 856 etc...). 858 When possible, SLAAC MUST be used. In other cases a different 859 mechanism is necessary for routers to get addresses. This document 860 proposes an Address Assignment Algorithm that extends the Prefix 861 Assignment Algorithm and works as follows. Each prefix assignment is 862 associated with a fixed address pool, reserved for router's addresses 863 assignment. The address pool is a prefix which value is 864 deterministically function of the assigned prefix. A router CAN, at 865 any time, decide to assign itself an address from any of its Chosen 866 Prefixes. Just like prefix assignments, address assignments are 867 advertised to other routers and collisions are detected. Routers 868 MUST keep track of Address Assignments made by other routers on 869 connected links by using information provided by the flooding 870 algorithm, as defined in Section 5.5. 872 7.1. Router's address pools 874 Given an assigned prefix A/X (where all A's latest '128 - X'th bits 875 are set to 0), the routers reserved address pool is defined as 876 follows: 878 If X <= 64: SLAAC MUST be used 880 If X > 64 and X <= 110: The pool is A/112 (2^16 addresses) 882 If X >= 110 and X <= 126: The pool is A/(X + 2) (One quarter of the 883 available addresses) 885 If X >= 126: Only the designated router CAN use A/128. Other 886 routers MUST NOT get an address. 888 In the case of IPv4 prefixes, the network address (first address of 889 the address pool) MUST not be used. 891 7.2. Address Assignment Algorithm 893 In this section, we say an address assignment is made by some router 894 when it intends to use, or is using the address specified by this 895 assignment. An assignment, made by some router, MUST be advertised 896 on the link on which the assignment is made. Similarly, an address 897 assignment is said to be applied when the address is pushed to the 898 router's interface configuration. It is unapplied otherwise. 900 Routers MUST store applied address assignments in their stable 901 storage and reuse the same addresses whenever possible. At least the 902 five previously applied addresses SHOULD be stored for each 903 interface. 905 For a given prefix assignment, an address is said to be available if 906 it is within the router's address pool associated to the prefix 907 assignment, and it is not being advertised by any other router. If 908 the flooding protocol provides interface identifier in the address 909 assignments, looking for collisions on considered link is enough. 911 A new address assignment MUST be chosen randomly among available 912 addresses. An address assignment MUST NOT be applied when one of the 913 following condition is true. 915 o The associated Chosen Prefix is not applied. 917 o The timer specified in Section 8 has not elapsed yet. 919 An address assignment must be deleted whenever one of the following 920 condition becomes true. 922 o The associated Chosen Prefix is deleted or moved to another link. 924 o Some other router with a higher router ID is advertising the same 925 address on the same link. 927 8. Hysteresis Principle 929 8.1. Prefix and Address assignments 931 When the flooding protocol is started, the router MUST wait 932 FLOODING_DELAY before executing the prefix assignment algorithm for 933 the first time. 935 Prefix and address assignment algorithms are distributed. Collisions 936 may occur, but network configuration, routing protocols or upper 937 layers should not suffer from these collisions. For this reason, all 938 assignments that could imply collisions are not immediately applied. 940 o A router MUST NOT apply a Chosen Prefix before it has waited 941 2*FLOODING_DELAY. If the entry is valid during the whole waiting 942 time, it MUST be applied to the link it is assigned. 944 o A router MUST NOT apply an Assigned Address before it has waited 945 2*FLOODING_DELAY_LL. If the assignment is valid during the whole 946 waiting time, it MUST be applied to the interface it is assigned. 948 8.2. Delegated Prefixes 950 When a router stops advertising a Delegated Prefix, it MUST first 951 deprecate that Delegated Prefix by advertising it for 952 DP_DEPRECATE_FACTOR*FLOODING_DELAY seconds with zero valid and 953 preferred lifetimes. 955 When a router receives a deprecated Delegated Prefix advertisement, 956 it must remove the Delegated Prefix from its Delegated Prefixes list. 958 When a router stops receiving a Delegated Prefix from the Flooding 959 Protocol, it SHOULD keep using that delegating prefix up to a period 960 of min(remaining lifetime, DP_KEEP_ALIVE_TIME) seconds. 962 9. ULA and IPv4 Prefixes Generation 964 Although DHCPv6 PD and static configuration are regular means of 965 obtaining IPv6 prefixes, routers MAY, in some cases, autonomously 966 decide to generate a delegated prefix. In this section are specified 967 when and how IPv6 ULA prefixes and IPv4 private prefixes may be 968 autonomously generated. 970 9.1. ULA Prefix Generation 972 A router MAY generate a ULA prefix when the two following conditions 973 are met. 975 o It is the Network Leader (Section 4.4). 977 o No other ULA delegated prefix is advertised by any other router. 979 A router MUST stop advertising a spontaneously generated ULA prefix 980 whenever another router is advertising a ULA delegated prefix. 982 The most recently used ULA prefix SHOULD be stored in stable storage 983 by all routers and reused whenever choosing a new ULA delegated 984 prefix. If no ULA prefix can be found in stable storage, it MUST be 985 randomly generated, or generated from hardware specific values. 987 9.2. IPv4 Private Prefix Generation 989 A router MAY generate an IPv4 prefix when the two following 990 conditions are met. 992 o It has an IPv4 address with global connectivity. 994 o No other IPv4 delegated prefix is advertised by any other router. 996 A router MUST stop advertising an IPv4 prefix whenever another router 997 with an higher router ID is advertising an IPv4 Delegated Prefix. 999 The IPv4 private prefix must be included in one of the private 1000 prefixes defined in [RFC1918]. The prefix 10/8 SHOULD be used by 1001 default but it SHOULD be configurable. In the case the address 1002 provided by the ISP is already a private address, a different private 1003 prefix SHOULD be used. For instance, if the ISP is giving the 1004 address 10.1.2.3, 10/8 or any sub-prefix included in 10/8 SHOULD NOT 1005 be used. (For instance, 172.16/12 or 192.168/16 can be selected). 1007 10. Manageability Considerations 1009 The algorithm leaves much room for implementation specific features. 1010 For instance, ULA prefix as well IPv4 prefix generation may be 1011 disabled whenever a global IPv6 is made available. This section 1012 details a few other possible configuration options. 1014 The implementation MAY allow each internal interface to be configured 1015 with a custom priority value. The specified priority SHOULD then be 1016 used when creating new assignments on the given interface. If not 1017 specified, the default priority SHOULD be used. 1019 The implementation SHOULD allow manual assignments on given links. 1020 When specified, and whenever such an assignment is valid, it MUST be 1021 advertised as Authoritative Assignments on the given interface. 1023 11. Documents Constants 1025 PRIORITY_MIN 0 1026 PRIORITY_AUTHORITY_MIN 4 1027 PRIORITY_AUTO_MIN 6 1028 PRIORITY_DEFAULT 8 1029 PRIORITY_AUTO_MAX 10 1030 PRIORITY_AUTHORITY_MAX 12 1031 PRIORITY_MAX 15 1033 DP_DEPRECATE_FACTOR 3 1034 DP_KEEP_ALIVE_TIME 60 seconds 1036 12. Security Considerations 1038 Prefix assignment algorithm security entirely relies on flooding 1039 protocol security features. The flooding protocol SHOULD therefore 1040 check for the authenticity of advertised information. Security modes 1041 may be classified in three categories. 1043 1. The flooding protocol is not protected. 1045 2. The flooding protocol's protection is binary: An allowed router 1046 may send any type of packets in the name of other routers. 1048 3. All advertised messages are individually signed by the sender. 1050 Whenever a malicious router attacks an unprotected network, or 1051 whenever a malicious router is able to authenticate itself to a 1052 network as stated in the second case, it may for example: 1054 o Prevent other routers to get a stable router ID. 1056 o Prevent other routers from making assignments by claiming the 1057 whole available address space. 1059 o Redirect traffic to some router on the network. 1061 If a malicious router is able to authenticate itself in a network 1062 protected as in the third case, most of the previously listed attacks 1063 may still be performed, but traffic could only be redirected toward 1064 the origination of the attack, and the source of the attack could be 1065 identified. 1067 In any case, in order to protect the network, the routing protocol as 1068 well as the way hosts are configured also needs to be protected, 1069 hence requiring other link (e.g. WPA) or IP layer (e.g. IPSec-Auth 1070 [RFC4302] or SeND [RFC3971]) security solutions. 1072 13. References 1074 13.1. Normative References 1076 [RFC1918] Rekhter, Y., Moskowitz, R., Karrenberg, D., Groot, G., and 1077 E. Lear, "Address Allocation for Private Internets", BCP 1078 5, RFC 1918, February 1996. 1080 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1081 Requirement Levels", BCP 14, RFC 2119, March 1997. 1083 [RFC2131] Droms, R., "Dynamic Host Configuration Protocol", RFC 1084 2131, March 1997. 1086 [RFC3203] T'Joens, Y., Hublet, C., and P. De Schrijver, "DHCP 1087 reconfigure extension", RFC 3203, December 2001. 1089 [RFC3315] Droms, R., Bound, J., Volz, B., Lemon, T., Perkins, C., 1090 and M. Carney, "Dynamic Host Configuration Protocol for 1091 IPv6 (DHCPv6)", RFC 3315, July 2003. 1093 [RFC3633] Troan, O. and R. Droms, "IPv6 Prefix Options for Dynamic 1094 Host Configuration Protocol (DHCP) version 6", RFC 3633, 1095 December 2003. 1097 [RFC3646] Droms, R., "DNS Configuration options for Dynamic Host 1098 Configuration Protocol for IPv6 (DHCPv6)", RFC 3646, 1099 December 2003. 1101 [RFC4193] Hinden, R. and B. Haberman, "Unique Local IPv6 Unicast 1102 Addresses", RFC 4193, October 2005. 1104 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing 1105 Architecture", RFC 4291, February 2006. 1107 [RFC4861] Narten, T., Nordmark, E., Simpson, W., and H. Soliman, 1108 "Neighbor Discovery for IP version 6 (IPv6)", RFC 4861, 1109 September 2007. 1111 [RFC4862] Thomson, S., Narten, T., and T. Jinmei, "IPv6 Stateless 1112 Address Autoconfiguration", RFC 4862, September 2007. 1114 [RFC6106] Jeong, J., Park, S., Beloeil, L., and S. Madanapalli, 1115 "IPv6 Router Advertisement Options for DNS Configuration", 1116 RFC 6106, November 2010. 1118 [RFC6603] Korhonen, J., Savolainen, T., Krishnan, S., and O. Troan, 1119 "Prefix Exclude Option for DHCPv6-based Prefix 1120 Delegation", RFC 6603, May 2012. 1122 13.2. Informative References 1124 [RFC3971] Arkko, J., Kempf, J., Zill, B., and P. Nikander, "SEcure 1125 Neighbor Discovery (SEND)", RFC 3971, March 2005. 1127 [RFC4302] Kent, S., "IP Authentication Header", RFC 4302, December 1128 2005. 1130 [RFC5308] Hopps, C., "Routing IPv6 with IS-IS", RFC 5308, October 1131 2008. 1133 [RFC5340] Coltun, R., Ferguson, D., Moy, J., and A. Lindem, "OSPF 1134 for IPv6", RFC 5340, July 2008. 1136 [RFC7084] Singh, H., Beebee, W., Donley, C., and B. Stark, "Basic 1137 Requirements for IPv6 Customer Edge Routers", RFC 7084, 1138 November 2013. 1140 [I-D.ietf-homenet-arch] 1141 Chown, T., Arkko, J., Brandt, A., Troan, O., and J. Weil, 1142 "IPv6 Home Networking Architecture Principles", draft- 1143 ietf-homenet-arch-11 (work in progress), October 2013. 1145 [I-D.ietf-homenet-hncp] 1146 Stenberg, M. and S. Barth, "Home Networking Control 1147 Protocol", draft-ietf-homenet-hncp-00 (work in progress), 1148 April 2014. 1150 [I-D.ietf-ospf-ospfv3-autoconfig] 1151 Lindem, A. and J. Arkko, "OSPFv3 Auto-Configuration", 1152 draft-ietf-ospf-ospfv3-autoconfig-06 (work in progress), 1153 February 2014. 1155 [I-D.arkko-homenet-prefix-assignment] 1156 Arkko, J., Lindem, A., and B. Paterson, "Prefix Assignment 1157 in a Home Network", draft-arkko-homenet-prefix- 1158 assignment-04 (work in progress), May 2013. 1160 [I-D.bhandari-dhc-class-based-prefix] 1161 Systems, C., Halwasia, G., Gundavelli, S., Deng, H., 1162 Thiebaut, L., Korhonen, J., and I. Farrer, "DHCPv6 class 1163 based prefix", draft-bhandari-dhc-class-based-prefix-05 1164 (work in progress), July 2013. 1166 [I-D.chelius-router-autoconf] 1167 Chelius, G., Fleury, E., and L. Toutain, "Using OSPFv3 for 1168 IPv6 router autoconfiguration", draft-chelius-router- 1169 autoconf-00 (work in progress), June 2002. 1171 [I-D.dimitri-zospf] 1172 Dimitrelis, A. and A. Williams, "Autoconfiguration of 1173 routers using a link state routing protocol", draft- 1174 dimitri-zospf-00 (work in progress), October 2002. 1176 Appendix A. Scarcity Avoidance Mechanism 1178 Although an ISP should provide enough addresses, an implementation 1179 must carefully manage the provided address space. First, when a new 1180 assignment is made, the prefix should be selected amongst a set of 1181 prefixes so that prefix waste is minimized. Then, a router may 1182 decide to execute procedures intended to avoid prefix scarcity. 1183 Different approaches are possible. This section intends to provide 1184 guidelines for such procedures. They are optional and are compatible 1185 with routers that only support basic requirements defined in this 1186 document. 1188 A.1. Prefix Wasts Avoidance 1190 Given a Delegated Prefix, different routers may try to assign 1191 prefixes of different lengths. Particularly, a non-homenet 1192 downstream router may ask for a delegated prefix of significant size, 1193 as specified in Section 8.2. Some other routers, like sensors, may 1194 also require small prefixes. When randomly selected, a few /80s may 1195 easily prevent the assignment of bigger prefixes. Small prefixes 1196 should therefore be selected in neighboring areas. 1198 For instance, given a delegated prefix 2001::/56 and an assigned 1199 prefix 2001::/64, the best prefix choice in order to reduce prefix 1200 space waste is 2001:0:0:1::/64. Other choices are then to be taken 1201 in 2001:0:0:2::/63, 2001:0:0:4::/62, 2001:0:0:8::/61, etc... 1203 Creating an efficient prefix selection algorithm may be challenging 1204 as it needs to fullfill somehow contradictory requirements: 1206 1. The prefix MUST be chosen amongst available prefixes, which 1207 implies that other routers may interfere with the process. 1209 2. The prefix MUST be chosen randomly in a subset of available 1210 prefixes. When possible, the subset must be big enough to avoid 1211 collisions. 1213 3. The prefix SHOULD be selected amongst prefixes that reduces the 1214 prefix space waste. 1216 4. The prefix SHOULD be selected pseudo-randomly. 1218 The following algorithm offers a satisfying tradeoff. Given a 1219 Delegated Prefix and the desired prefix length: 1221 1. Compute the minimal subset of available prefixes included in the 1222 Delegated Prefix. In the example given previously, the minimal 1223 subset was {2001:0:0:1::/64, 2001:0:0:2::/63, ..., 2001:0:0:80::/ 1224 57}. 1226 2. Compute the set of prefixes of desired length so that: 1228 * It contains exactly RANDOM_SUBSET_SIZE prefixes, or all the 1229 available prefixes if there are less than RANDOM_SUBSET_SIZE 1230 available prefixes. 1232 * Prefixes are picked in the prefixes from the minimal subset of 1233 available prefixes which lengths are the highest. 1235 * When multiple subsets are possible, privelege lexicographicaly 1236 lowest prefixes. 1238 If RANDOM_SUBSET_SIZE equals 10, the subset would be 1239 {2001:0:0:1::/64, 2 /64s in 2001:0:0:2::/63, 4 /64s in 1240 2001:0:0:4::/62, the 3 first /64s in 2001:0:0:8::/61}. 1242 3. First try PSEUDO_RANDOM_TENTATIVE pseudo-random prefixes, 1243 computed from the DP, with the given length, based on interface 1244 specific hardware values (For instance using values generated 1245 like HASH(MAC Address : Counter). The hash function doesn't need 1246 to be cryptographic). The first prefix amongst this set that 1247 also is in the set computed at step 2 is chosen. If no prefix is 1248 found, try next step. 1250 4. Choose a prefix randomly among prefixes in the subset computed at 1251 step 2. 1253 This algorithm, defined as a sequence of prefix sets computation, may 1254 seem algorithmicaly complex, but it can be efficiently implemented. 1255 The key element in order to do so is the ability to iterate 1256 efficiently over all the available prefixes. 1258 RANDOM_SUBSET_SIZE should provide sufficiently low collision 1259 probability. A value of 256 should be enough in most cases. 1260 PSEUDO_RANDOM_TENTATIVE is purely implementation dependent, but 1261 shouldn't be too high as the probability of finding an available 1262 prefix that way quickly decreases with the number of used prefixes. 1263 A value of 10 should be sufficient. 1265 A.2. Increasing Assigned Prefix Length 1267 When a new assignment can't be created, and if not forbidden by the 1268 router's configuration, the router MAY increase the size of the 1269 desired prefix. For instance, if an available /64 can't be found, 1270 the router may look for a /80. Nevertheless, this implies using 1271 DHCPv6 instead of SLAAC, which SHOULD be avoided. 1273 A.3. Foreseeing Prefixes Exaustion 1275 The previously proposed solution may be useful in some particular 1276 cases, but won't work when no more prefixes are available. A router 1277 MAY try to detect when default length prefixes are becoming rare. In 1278 such a situation, it MAY decide to allocate a longer prefix, part of 1279 an available shorter prefix. For instance, if A/64 is available, but 1280 there are not many other available /64, the router can try to 1281 allocate A/80. If the allocation doesn't raise any collision, this 1282 procedure will prevent A/64 from being used by other hosts, hence 1283 creating a large set of smaller available prefixes to be used. 1285 Such an allocation is considered dynamic. The Authoritative bit MUST 1286 NOT be set and the priority MUST be among values authorized as 1287 dynamically chosen in Section 6.8. 1289 When different prefixes lengths are being used, the random prefix 1290 selection MUST NOT be uniform among all possibilities. Instead, it 1291 SHOULD privilege prefixes contained in bigger prefixes that cannot be 1292 allocated. For instance, if 2001::/56 is the DP, and 2001:0:0:0:1::/ 1293 80 is an assigned prefix, other /80 should be randomly chosen in 1294 2001:0:0:0:1::/64 before being chosen in other /64s. 1296 A.4. Cutting an Existing Assignment 1298 When specifically required by an authority (configuration or DHCP), a 1299 router MAY decide to un-assign one of its own assignment, in order to 1300 cut it in smaller prefixes, or to send an overriding assignment in 1301 order to force the network to stop using a particular prefix. 1302 Because such a procedure may imply links reconfiguration, it SHOULD 1303 be avoided whenever possible. 1305 Such allocation are considered as required by an authority. The 1306 Authoritative bit MAY be set and the priority MUST be among values 1307 authorized as specified by an authority in Section 6.8. 1309 As an example, if a router can't find a /64 for a link that, with a 1310 high priority, must be given a /64, it chooses a prefix assigned by 1311 some other router, to another link, with a lower priority, and 1312 creates a new Chosen Prefix with a higher priority. The other router 1313 will be forced to remove its own assignment, hence making the new 1314 assignment valid. 1316 Appendix B. Acknowledgments 1318 This document is the continuation of the work being done in 1319 [I-D.arkko-homenet-prefix-assignment]. The authors would like to 1320 thank all the people that participated in the previous document's 1321 development as well as the present one. In particular, the authors 1322 would like to thank to Tim Chown, Fred Baker, Mark Townsley, Lorenzo 1323 Colitti, Ole Troan, Ray Bellis, Markus Stenberg, Wassim Haddad, Joel 1324 Halpern, Samita Chakrabarti, Michael Richardson, Anders Brandt, Erik 1325 Nordmark, Laurent Toutain, Ralph Droms, Acee Lindem and Steven Barth 1326 for interesting discussions in this problem space. The authors would 1327 also like to point out some past work in this space, such as those in 1328 [I-D.chelius-router-autoconf] or [I-D.dimitri-zospf]. 1330 Authors' Addresses 1331 Pierre Pfister 1332 Cisco Systems 1333 Paris 1334 France 1336 Email: pierre.pfister@darou.fr 1338 Benjamin Paterson 1339 Cisco Systems 1340 Paris 1341 France 1343 Email: benjamin@paterson.fr 1345 Jari Arkko 1346 Ericsson 1347 Jorvas 02420 1348 Finland 1350 Email: jari.arkko@piuha.net