idnits 2.17.1 draft-ietf-homenet-prefix-assignment-03.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 : ---------------------------------------------------------------------------- No issues found here. 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). -- The document date (February 8, 2015) is 3358 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 informational reference (is this intentional?): RFC 3633 (Obsoleted by RFC 8415) Summary: 0 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). 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: August 12, 2015 J. Arkko 6 Ericsson 7 February 8, 2015 9 Distributed Prefix Assignment Algorithm 10 draft-ietf-homenet-prefix-assignment-03 12 Abstract 14 This document specifies a distributed algorithm for automatic prefix 15 assignment. Given a set of delegated prefixes, it ensures that at 16 most one prefix is assigned from each delegated prefix to each link. 17 Nodes may assign available prefixes to the links they are directly 18 connected to, or for other private purposes. The algorithm 19 eventually converges and ensures that all assigned prefixes do not 20 overlap. 22 Status of This Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on August 12, 2015. 39 Copyright Notice 41 Copyright (c) 2015 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 Table of Contents 56 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 57 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 58 3. Applicability statement . . . . . . . . . . . . . . . . . . . 5 59 4. Algorithm Specification . . . . . . . . . . . . . . . . . . . 6 60 4.1. Algorithm Terminology . . . . . . . . . . . . . . . . . . 6 61 4.2. Prefix Assignment Algorithm Routine . . . . . . . . . . . 7 62 4.3. Overriding and Destroying Existing Assignments . . . . . 10 63 4.4. Other Events . . . . . . . . . . . . . . . . . . . . . . 11 64 5. Prefix Selection Considerations . . . . . . . . . . . . . . . 12 65 6. Implementation Capabilities and Node Behavior . . . . . . . . 14 66 7. Algorithm Parameters . . . . . . . . . . . . . . . . . . . . 14 67 8. Security Considerations . . . . . . . . . . . . . . . . . . . 15 68 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 16 69 10. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 16 70 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 16 71 11.1. Normative References . . . . . . . . . . . . . . . . . . 16 72 11.2. Informative References . . . . . . . . . . . . . . . . . 16 73 Appendix A. Static Configuration Example . . . . . . . . . . . . 16 74 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 18 76 1. Introduction 78 This document specifies a distributed algorithm for automatic prefix 79 assignment. Given a set of delegated prefixes, nodes may assign 80 available prefixes to links they are directly connected to, or for 81 their private use. The algorithm ensures that the following 82 assertions are eventually true: 84 1. At most one prefix from each delegated prefix is assigned to each 85 link. 87 2. Assigned prefixes are not included in and do not include other 88 assigned prefixes. 90 3. Assigned prefixes do not change in the absence of topology or 91 configuration changes. 93 In the rest of this document the two first conditions are referred to 94 as the correctness conditions of the algorithm while the third 95 condition is referred to as its convergence condition. 97 Each assignment has a priority specified by the node making the 98 assignment, allowing for more advanced assignment policies. When 99 multiple nodes assign different prefixes from the same delegated 100 prefix to the same link, or when multiple nodes assign overlapping 101 prefixes, the assignment with the highest priority is kept and other 102 assignments are removed. 104 The prefix assignment algorithm requires that participating nodes 105 share information through a flooding mechanism. If the flooding 106 mechanism ensures that all messages are propagated to all nodes 107 faster than a given timing upper bound, the algorithm also ensures 108 that all assigned prefixes used for networking operations (e.g., host 109 configuration) remain unchanged, unless another node assigns an 110 overlapping prefix with a higher assignment priority, or the topology 111 changes and renumbering cannot be avoided. 113 2. Terminology 115 In this document, the key words "MAY", "MUST, "MUST NOT", "OPTIONAL", 116 and "SHOULD", are to be interpreted as described in [RFC2119]. 118 This document makes use of the following terminology: 120 Link: An object the distributed algorithm will assign prefixes to. 121 A Node may only assign prefixes to Links it is directly connected 122 to. A Link is either Shared or Private. 124 Private Link: A Private Link is an abstract concept defined for the 125 sake of this document. It allows nodes to make assignments for 126 their private use or delegation. For instance, every DHCPv6-PD 127 [RFC3633] client MAY be considered as a different Private Link. 129 Shared Link: A Link multiple nodes may be connected to. Most of 130 the time, a Shared Link would consist in a multi-access link or 131 point-to-point link, virtual or physical, requiring prefixes to be 132 assigned to. 134 Delegated Prefix: A prefix provided to the algorithm and used as a 135 prefix pool for Assigned Prefixes. 137 Node ID: A value identifying a given participating node. The set 138 of identifiers MUST be strictly and totally ordered (e.g., using 139 the alphanumeric order). 141 Flooding Mechanism: A mechanism implementing reliable broadcast and 142 used to advertise published Assigned Prefixes. 144 Flooding Delay: Value which SHOULD be provided by the Flooding 145 Mechanism indicating a deterministic or likely upper bound of the 146 information propagation delay. When the Flooding Mechanism does 147 not provide a value, it is set to DEFAULT_FLOODING_DELAY 148 (Section 7). 150 Advertised Prefix: A prefix advertised by another node and 151 delivered to the local node by the Flooding Mechanism. It has an 152 Advertised Prefix Priority and, when assigned to a directly 153 connected Shared Link, is associated with a Shared Link. 155 Advertised Prefix Priority: A value that defines the priority of an 156 Advertised Prefix received from the Flooding Mechanism or a 157 published Assigned Prefix. Whenever multiple Advertised Prefixes 158 are conflicting, all Advertised Prefixes but the one with the 159 greatest priority will eventually be removed. In case of tie, the 160 assignment advertised by the node with the greatest Node ID is 161 kept and others are removed. In order to ensure convergence, the 162 range of priority values MUST have an upper bound. 164 Assigned Prefix: A prefix included in a Delegated Prefix and 165 assigned to a Shared or Private Link. It represents a local 166 decision to assign a given prefix from a given Delegated Prefix to 167 a given Link. The algorithm ensures that there never is more than 168 one Assigned Prefix per Delegated Prefix and Link pair. When 169 destroyed, an Assigned Prefix is set as not applied, ceases to be 170 advertised, and is removed from the set of Assigned Prefixes. 172 Applied (Assigned Prefix): When an Assigned Prefix is applied, it 173 MAY be used (e.g., for host configuration, routing protocol 174 configuration, prefix delegation). When not applied, it MUST NOT 175 be used for any other purposes than the prefix assignment 176 algorithm. Each Assigned Prefix is associated with a timer (Apply 177 Timer) used to apply the Assigned Prefix. An Assigned Prefix is 178 unapplied when destroyed. 180 Published (Assigned Prefix): The Assigned Prefix is advertised 181 through the Flooding Mechanism as assigned to its associated Link. 182 A published Assigned Prefix MUST have an Advertised Prefix 183 Priority. It will appear as an Advertised Prefix to other nodes, 184 once received through the Flooding Mechanism. 186 Prefix Adoption: When an Advertised Prefix which does not conflict 187 with any other Advertised Prefix or published Assigned Prefix 188 stops being advertised, any other node connected to the same Link 189 MAY, after some random delay, start advertising the same prefix. 190 This procedure is called adoption and provides seamless assignment 191 transfer from a node to another, e.g., in case of node failure. 193 Backoff Timer: Every Delegated Prefix and Link pair is associated 194 with a timer counting down to zero. It is used to avoid multiple 195 nodes from making colliding assignments by delaying the creation 196 of new Assigned Prefixes or the advertisement of adopted Assigned 197 Prefixes by a random amount of time. 199 Renumbering: Event occurring when an Assigned Prefix which was 200 applied is destroyed. It is undesirable as it usually implies 201 reconfiguring routers or hosts. 203 3. Applicability statement 205 Each node MUST have a set of disjoint Delegated Prefixes. This set 206 MAY change over time and be different from one node to another at 207 some point, but nodes MUST eventually have the same set of disjoint 208 Delegated Prefixes. 210 Given this set of disjoint Delegated Prefixes, nodes may assign 211 available prefixes from each Delegated Prefix to the Links they are 212 directly connected to. The algorithm ensures that at most one prefix 213 from a given Delegated Prefix is assigned to a given Link. 215 The algorithm can be applied to any address space and can be used to 216 manage multiple address spaces simultaneously. For instance, an 217 implementation can make use of IPv4-mapped IPv6 addresses [RFC4291] 218 in order to manage both IPv4 and IPv6 prefix assignment using a 219 single prefix space. 221 The algorithm supports dynamically changing topologies: 223 o Nodes may join or leave the set of participating nodes. 225 o Nodes may join or leave Links. 227 o Links may be joined or split. 229 All nodes MUST run a common Flooding Mechanism in order to share 230 published Assigned Prefixes. The set of participating nodes is 231 defined as the set of nodes participating in the Flooding Mechanism. 233 The Flooding Mechanism MUST: 235 o Provide a way to flood Assigned Prefixes assigned to a directly 236 connected Link along with their respective Advertised Prefix 237 Priority and the Node ID of the node which advertises it. 239 o Specify whether an Advertised Prefix was assigned to a directly 240 connected Shared Link, and if so, on which one. 242 In addition, a Flooding Delay SHOULD be specified and respected in 243 order to avoid renumbering. If not specified, or whenever the 244 Flooding Mechanism is unable to respect the provided delay, 245 renumbering may happen. As such delay often depends on the size of 246 the network, it MAY change over time and MAY be different from one 247 node to another. 249 The algorithm ensures that whenever the Flooding Delay is provided 250 and respected, and in the absence of topology change or delegated 251 prefix removal, renumbering never happens. 253 Each node MUST have a Node ID. Node IDs MAY change over time and be 254 the same on multiple nodes at some point, but each node MUST 255 eventually have a Node ID which is unique among the set of 256 participating nodes. 258 4. Algorithm Specification 260 This section specifies the behavior of nodes implementing the prefix 261 assignment algorithm. 263 4.1. Algorithm Terminology 265 The algorithm makes use of the following terms: 267 Current Assignment: For a given Delegated Prefix and Link, the 268 Current Assignment is the Assigned Prefix (if any) included in the 269 Delegated Prefix and assigned to the given Link. 271 Precedence: An Advertised Prefix takes precedence over an Assigned 272 Prefix if and only if: 274 * The Assigned Prefix is not published. 276 * The Assigned Prefix is published and the Advertised Prefix 277 Priority from the Advertised Prefix is strictly greater than 278 the Advertised Prefix Priority from the Assigned Prefix. 280 * The Assigned Prefix is published, the priorities are identical, 281 and the Node ID from the node advertising the Advertised Prefix 282 is strictly greater than the local Node ID. 284 Best Assignment: For a given Delegated Prefix and Link, the Best 285 Assignment is (if any) the Advertised Prefix: 287 * Including or included in the Delegated Prefix. 289 * Assigned on the given Link. 291 * Having the greatest Advertised Prefix Priority among Advertised 292 Prefixes assigned on the given Link (and, in case of tie, the 293 prefix advertised by the node with the greatest Node ID among 294 all prefixes with greatest priority). 296 * Taking precedence over the Current Assignment associated with 297 the same Link and Delegated Prefix (if any). 299 Valid (Assigned Prefix) An Assigned Prefix is valid if and only if 300 the two following conditions are met: 302 * No Advertised Prefix including or included in the Assigned 303 Prefix takes precedence over the Assigned Prefix. 305 * No Advertised Prefix including or included in the same 306 Delegated Prefix as the Assigned Prefix and assigned to the 307 same Link takes precedence over the Assigned Prefix. 309 4.2. Prefix Assignment Algorithm Routine 311 This section specifies the prefix assignment algorithm routine. It 312 is defined for a given Delegated Prefix/Link pair and may be run 313 either as triggered by the Backoff Timer, or not. 315 For a given Delegated Prefix and Link pair, the routine MUST be run 316 as not triggered by the Backoff Timer whenever: 318 o An Advertised Prefix including or included in the considered 319 Delegated Prefix is added or removed. 321 o An Assigned Prefix included in the considered Delegated Prefix and 322 associated with a different Link than the considered Link was 323 destroyed, while there is no Current Assignment associated with 324 the given pair. This case MAY be ignored if the creation of a new 325 Assigned Prefix associated with the considered pair is not 326 desired. 328 o The considered Delegated Prefix is added. 330 o The considered Link is added. 332 o The Node ID is modified. 334 Additionally, for a given Delegated Prefix and Link pair, the routine 335 MUST be run as triggered by the Backoff Timer whenever: 337 o The Backoff Timer associated with the considered Delegated Prefix/ 338 Link pair fires while there is no Current Assignment associated 339 with the given pair. 341 When such an event occurs, a node MAY delay the execution of the 342 routine instead of executing it immediately, e.g. while receiving an 343 update from the Flooding Mechanism, or for security reasons (see 344 Section 8). Even though other events occur in the meantime, the 345 routine MUST be run only once. It is also assumed that, whenever one 346 of these events is the Backoff Timer firing, the routine is executed 347 as triggered by the Backoff Timer. 349 In order to execute the routine for a given Delegated Prefix/Link 350 pair, first look for the Best Assignment and Current Assignment 351 associated with the Delegated Prefix/Link pair, then execute the 352 corresponding case: 354 1. If there is no Best Assignment and no Current Assignment: Decide 355 whether the creation of a new assignment for the given Delegated 356 Prefix/Link pair is desired (As any result would be valid, the 357 way the decision is taken is out of the scope of this document) 358 and do the following: 360 * If it is not desired, stop the execution of the routine. 362 * Else if the Backoff Timer is running, stop the execution of 363 the routine. 365 * Else if the routine was not executed as triggered by the 366 Backoff Timer, set the Backoff Timer to some random delay 367 between ADOPT_MAX_DELAY and BACKOFF_MAX_DELAY (see Section 7) 368 and stop the execution of the routine. 370 * Else, continue the execution of the routine. 372 Select a prefix for the new assignment (see Section 5 for 373 guidance regarding prefix selection). This prefix MUST be 374 included in or be equal to the considered Delegated Prefix and 375 MUST NOT include or be included in any Advertised Prefix. If a 376 suitable prefix is found, use it to create a new Assigned Prefix: 378 * Assigned to the considered Link. 380 * Not applied. 382 * The Apply Timer set to '2 * Flooding Delay'. 384 * Published with some selected Advertised Prefix Priority. 386 2. If there is a Best Assignment but no Current Assignment: Cancel 387 the Backoff Timer and use the prefix from the Best Assignment to 388 create a new Assigned Prefix: 390 * Assigned to the considered Link. 392 * Not applied. 394 * The Apply Timer set to '2 * Flooding Delay'. 396 * Not published. 398 3. If there is a Current Assignment but no Best Assignment: 400 * If the Current Assignment is not valid, destroy it, and 401 execute the routine again, as not triggered by the Backoff 402 Timer. 404 * If the Current Assignment is valid and published, stop the 405 execution of the routine. 407 * If the Current Assignment is valid and not published, the node 408 MAY either: 410 + Adopt the prefix by cancelling the Apply Timer and set the 411 Backoff Timer to some random delay between 0 and 412 ADOPT_MAX_DELAY (see Section 7). This procedure is used to 413 avoid renumbering when the node advertising the prefix left 414 the Shared Link. 416 + Destroy it and execute case 1 in order to create a 417 different assignment. 419 4. If there is a Current Assignment and a Best Assignment: 421 * Cancel the Backoff Timer. 423 * If the two prefixes are identical, set the Current Assignment 424 as not published. If the Current Assignment is not applied 425 and the Apply Timer is not set, set the Apply Timer to '2 * 426 Flooding Delay'. 428 * If the two prefixes are not identical, destroy the Current 429 Assignment and go to case 2. 431 When the prefix assignment algorithm routine requires an assignment 432 to be created or adopted, any Advertised Prefix Priority value can be 433 used. Other documents MAY provide restrictions over this value 434 depending on the context the algorithm is operating in, or leave it 435 as implementation-specific. 437 When the prefix assignment algorithm routine requires an assignment 438 to be created or adopted, the chosen Advertised Prefix Priority is 439 unspecified (any value would be valid). The values to be used in 440 such situations MAY be specified by other documents making use of the 441 prefix assignment algorithm or be left as an implementation specific 442 choice. 444 4.3. Overriding and Destroying Existing Assignments 446 In addition to the behaviors specified in Section 4.2, the following 447 procedures MAY be used in order to provide more advanced behavior 448 (Section 6): 450 Overriding Existing Assignments: For any given Link and Delegated 451 Prefix, a node MAY create a new Assigned Prefix using a chosen 452 prefix and Advertised Prefix Priority such that: 454 * The chosen prefix is included in or is equal to the considered 455 Delegated Prefix. 457 * The Current Assignment, if any, as well as all existing 458 Assigned Prefixes which include or are included inside the 459 chosen prefix, are destroyed. 461 * It is not applied. 463 * The Apply Timer set to '2 * Flooding Delay'. 465 * It is published. 467 * The Advertised Prefix Priority is greater than the Advertised 468 Prefix Priority from all Advertised Prefixes which include or 469 are included in the chosen prefix. 471 In order to ensure algorithm convergence: 473 * Such overriding assignments MUST NOT be created unless there 474 was a change in the node configuration, a Link was added, or an 475 Advertised Prefix was added or removed. 477 * The chosen Advertised Prefix Priority for the new Assigned 478 Prefix SHOULD be greater than all priorities from the destroyed 479 Assigned Prefixes. If not, simple topologies with only two 480 nodes may not converge. Nodes which do not respect this rule 481 MUST implement a mechanism which detects whether the 482 distributed algorithm do not converge and, whenever this would 483 happen, stop creating overriding Assigned Prefixes which do not 484 hold this rule. The specifications for such safety procedures 485 are out of the scope of this document. 487 Removing an Assigned Prefix: A node MAY destroy any Assigned Prefix 488 which is published. Such an event reflects the desire from a node 489 to not assign a prefix from a given Delegated Prefix to a given 490 Link anymore. In order to ensure algorithm convergence, such 491 procedure MUST NOT be executed unless there was a change in the 492 node configuration. Additionally, whenever an Assigned Prefix is 493 destroyed this way, the prefix assignment algorithm routine MUST 494 be run for the Delegated Prefix/Link pair associated with the 495 deleted Assigned Prefix. 497 These procedures are OPTIONAL. They could be used for diverse 498 purposes, e.g., for providing custom prefix assignment configuration 499 or reacting to prefix space exhaustion (by overriding short Assigned 500 Prefixes and assigning longer ones). 502 4.4. Other Events 504 When the Apply Timer fires, the associated Assigned Prefix MUST be 505 applied. 507 When the Backoff Timer associated with a given Delegated Prefix/Link 508 pair fires while there is a Current Assignment associated with the 509 same pair, the Current Assignment MUST be published with some 510 associated Advertised Prefix Priority and, if the prefix is not 511 applied, the Apply Timer MUST be set to '2 * Flooding Delay'. 513 When a Delegated Prefix is removed from the set of Delegated 514 Prefixes, all Assigned Prefixes included in the removed Delegated 515 Prefix MUST be destroyed. 517 When one Delegated Prefix is replaced by another one that includes or 518 is included in the deleted Delegated Prefix, all Assigned Prefixes 519 which were included in the deleted Delegated Prefix but are not 520 included in the added Delegated Prefix MUST be destroyed. Others MAY 521 be kept. 523 When a Link is removed, all Assigned Prefixes assigned to that Link 524 MUST be destroyed. 526 5. Prefix Selection Considerations 528 When the prefix assignment algorithm routine specified in Section 4.2 529 requires a new prefix to be selected, the prefix MUST be selected 530 either: 532 o Among prefixes which were previously assigned and applied on the 533 considered Link. For that purpose, Applied Prefixes may be stored 534 in stable storage along with their associated Link. 536 o Randomly, picked in a set of at least RANDOM_SET_SIZE (see 537 Section 7) candidate prefixes. If less than RANDOM_SET_SIZE 538 candidates can be found, the prefix MUST be picked among all 539 candidates. 541 o Based on some custom selection process specified in the 542 configuration. 544 A simple implementation MAY randomly pick the prefix among all 545 available prefixes, but this strategy is inefficient in terms of 546 address space use as a few long prefixes may exhaust the pool of 547 available short prefixes. 549 The rest of this section describes a more efficient approach which 550 MAY be applied any time a node needs to pick a prefix for a new 551 assignment. The two following definitions are used: 553 Available prefix: The prefix A/N is available if and only if A/N 554 does not include and is not included in any Assigned or Advertised 555 Prefix but A/(N-1) does include an Assigned or Advertised Prefix 556 (or N equals 0 and there is no Assigned or Advertised Prefixes at 557 all). 559 Candidate prefix: A prefix which is included in or is equal to an 560 available prefix. 562 The procedure described in this section takes the three following 563 criteria into account: 565 Stability: In some cases, it is desirable that the selected prefix 566 remains the same across executions and reboots. For this purpose, 567 prefixes previously applied on the Link or pseudo-random prefixes 568 generated based on node and Link specific values may be 569 considered. 571 Randomness: When no stored or pseudo-random prefix is chosen, a 572 prefix may be randomly picked among RANDOM_SET_SIZE candidates of 573 desired length. If less than RANDOM_SET_SIZE candidates can be 574 found, the prefix is picked among all candidates. 576 Addressing-space usage efficiency: In the process of assigning 577 prefixes, a small set of badly chosen long prefixes may prevent 578 any shorter prefix from being assigned. For this reason, the set 579 of RANDOM_SET_SIZE candidates is created from the set of available 580 prefixes with longest prefix lengths and, in case of tie, 581 preferring small prefix values. 583 When executing the procedure, do as follows: 585 1. For each prefix stored in stable-storage, check if the prefix is 586 included in or equal to an available prefix. If so, pick that 587 prefix and stop. 589 2. For each prefix length, count the number of available prefixes of 590 the given length. 592 3. If the desired prefix length was not specified, select one. The 593 available prefixes count computed previously may be used to help 594 picking a prefix length such that: 596 * There is at least one candidate prefix. 598 * The prefix length is chosen great enough to not exhaust the 599 address space. 601 Let N be the chosen prefix length. 603 4. Iterate over available prefixes starting with prefixes of length 604 N down to length 0 and create a set of RANDOM_SET_SIZE candidate 605 prefixes of length exactly N included in or equal to available 606 prefixes. The end goal here is to create a set of 607 RANDOM_SET_SIZE candidate prefixes of length N included in a set 608 of available prefixes of maximized prefix length. In case of a 609 tie, smaller prefix values (as defined by the bit-wise 610 lexicographical order) are preferred. 612 5. For each pseudo-random prefix, check if the prefix is equal to a 613 candidate prefix. If so, pick that prefix and stop. 615 6. Choose a random prefix from the set of selected candidates. 617 The complexity of this procedure is equivalent to the complexity of 618 iterating over available prefixes. Such operation may be 619 accomplished in linear time, e.g., by storing Advertised and Assigned 620 Prefixes in a binary trie. 622 6. Implementation Capabilities and Node Behavior 624 Implementations of the prefix assignment algorithm may vary from very 625 basic to highly customizable, enabling different types of fully 626 interoperable behaviors. The three following behaviors are given as 627 examples: 629 Listener: The node only acts upon assignments made by other nodes, 630 i.e, it never creates new assignments nor adopt existing ones. 631 Such behavior does not require the implementation of the 632 considerations specified in Section 5 or Section 4.3. The node 633 never checks existing assignments validity, which makes this 634 behavior particularly suited to lightweight devices which can rely 635 on more capable neighbors to make assignments on directly 636 connected Shared Links. 638 Basic: The node is capable of assigning new prefixes or adopting 639 prefixes which do not conflict with any other existing assignment. 640 Such behavior does not require the implementation of the 641 considerations specified in Section 4.3. It is suited to 642 situations where there is no preference over which prefix should 643 be assigned to which Link, and there is no priority between 644 different Links. 646 Advanced: The node is capable of assigning new prefixes, adopting 647 existing ones, making overriding assignments and destroying 648 existing ones. Such behavior requires the implementation of the 649 considerations specified in Section 5 and Section 4.3. It is 650 suited when the administrator desires some particular prefix to be 651 assigned on a given Link, or some Links to be assigned prefixes 652 with a greater priority. 654 7. Algorithm Parameters 656 This document does not provide values for ADOPT_MAX_DELAY, 657 BACKOFF_MAX_DELAY and RANDOM_SET_SIZE. The algorithm ensures 658 convergence and correctness for any chosen values, even when these 659 are different from node to node. They MAY be adjusted depending on 660 the context, providing a tradeoff between convergence time, efficient 661 addressing, low verbosity (less traffic is generated by the Flooding 662 Mechanism), and low collision probability. 664 ADOPT_MAX_DELAY (respectively BACKOFF_MAX_DELAY) represents the 665 maximum backoff time a node may wait before adopting an assignment 666 (respectively making a new assignment). BACKOFF_MAX_DELAY MUST be 667 greater than or equal to ADOPT_MAX_DELAY. The greater 668 ADOPT_MAX_DELAY and (BACKOFF_MAX_DELAY - ADOPT_MAX_DELAY), the lower 669 the collision probability and the verbosity, but the greater the 670 convergence time. 672 RANDOM_SET_SIZE represents the desired size of the set a random 673 prefix will be picked from. The greater RANDOM_SET_SIZE, the better 674 the convergence time and the lower the collision probability, but the 675 worse the addressing-space usage efficiency. 677 When the Flooding Mechanism does not provide a Flooding Delay, it is 678 set to DEFAULT_FLOODING_DELAY. As participating nodes do not need to 679 agree on a common Flooding Delay value, this default value MAY be 680 different from one node to another. If the context in which the 681 algorithm is used does not suffer from renumbering, the value 0 MAY 682 be used. Otherwise it depends on the Flooding Mechanism properties 683 and the desired renumbering probability, and is therefore out of 684 scope of this document. 686 8. Security Considerations 688 The prefix assignment algorithm functions on top of two distinct 689 mechanisms, the Flooding Mechanism and the Node ID assignment 690 mechanism. 692 An attacker able to publish Advertised Prefixes through the 693 flooding mechanism may perform the following attacks: 695 * Publish a single overriding assignment for a whole Delegated 696 Prefix or for the whole address space, thus preventing any node 697 from assigning prefixes to Links. 699 * Quickly publish and remove Advertised Prefixes, generating 700 traffic at the Flooding Mechanism layer and causing multiple 701 executions of the prefix assignment algorithm in all 702 participating nodes. 704 * Publish and remove Advertised Prefixes in order to prevent the 705 convergence of the execution. 707 An attacker able to prevent other nodes from accessing a portion 708 or the whole set of Advertised Prefixes may compromise the 709 correctness of the execution. 711 An attacker able to cause repetitive Node ID changes may induce 712 traffic generation from the Flooding Mechanism and multiple 713 executions of the prefix assignment algorithm in all participating 714 nodes. 716 An attacker able to publish Advertised Prefixes using a Node ID 717 used by another node may prevent the correctness and convergence 718 of the execution. 720 Whenever the security of the Flooding Mechanism and Node ID 721 assignment mechanism could not be ensured, the convergence of the 722 execution may be prevented. In environments where such attacks may 723 be performed, the execution of the prefix assignment algorithm 724 routine SHOULD be rate limited, as specified in Section 4.2. 726 9. IANA Considerations 728 This document has no actions for IANA. 730 10. Acknowledgments 732 The authors would like to thank those who participated in the 733 previous document's version development as well as the present one. 734 In particular, the authors would like to thank Tim Chown, Fred Baker, 735 Mark Townsley, Lorenzo Colitti, Ole Troan, Ray Bellis, Markus 736 Stenberg, Wassim Haddad, Joel Halpern, Samita Chakrabarti, Michael 737 Richardson, Anders Brandt, Erik Nordmark, Laurent Toutain, Ralph 738 Droms, Acee Lindem and Steven Barth for interesting discussions and 739 document review. 741 11. References 743 11.1. Normative References 745 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 746 Requirement Levels", BCP 14, RFC 2119, March 1997. 748 11.2. Informative References 750 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing 751 Architecture", RFC 4291, February 2006. 753 [RFC3633] Troan, O. and R. Droms, "IPv6 Prefix Options for Dynamic 754 Host Configuration Protocol (DHCP) version 6", RFC 3633, 755 December 2003. 757 Appendix A. Static Configuration Example 759 This section describes an example of how custom configuration of the 760 prefix assignment algorithm may be implemented. 762 The node configuration is specified as a finite set of rules. A rule 763 is defined as: 765 o A prefix to be used. 767 o A Link on which the prefix may be assigned. 769 o An Assigned Prefix Priority (smallest possible Assigned Prefix 770 Priority if the rule may not override other Assigned Prefixes). 772 o A rule priority (0 if the rule may not override existing 773 Advertised Prefixes). 775 In order to ensure the convergence of the execution, the Assigned 776 Prefix Priority MUST be an increasing function (not necessarily 777 strictly) of the configuration rule priority (i.e. the greater is the 778 configuration rule priority, the greater the Assigned Prefix Priority 779 must be). 781 Each Assigned Prefix is associated with a rule priority. Assigned 782 Prefixes which are created as specified in Section 4.2 are given a 783 rule priority of 0. 785 Whenever the configuration is changed or the prefix assignment 786 algorithm routine is run: For each Link/Delegated Prefix pair, look 787 for the configuration rule with the highest configuration rule 788 priority such that: 790 o The prefix specified in the configuration rule is included in the 791 considered Delegated Prefix. 793 o The Link specified in the configuration rule is the considered 794 Link. 796 o All the Assigned Prefixes which would need to be destroyed in case 797 a new Assigned Prefix is created from that configuration rule (as 798 specified in Section 4.3) have an associated rule priority which 799 is strictly lower than the one of the considered configuration 800 rule. 802 o The assignment would be valid when published with an Advertised 803 Prefix Priority equal to the one specified in the configuration 804 rule. 806 If a rule is found, a new Assigned Prefix is created based on that 807 rule in conformance with Section 4.3. The new Assigned Prefix is 808 associated with the Advertised Prefix Priority and the rule priority 809 specified in the considered configuration rule. 811 Note that the use of rule priorities ensures the convergence of the 812 execution. 814 Authors' Addresses 816 Pierre Pfister 817 Cisco Systems 818 Paris 819 France 821 Email: pierre.pfister@darou.fr 823 Benjamin Paterson 824 Cisco Systems 825 Paris 826 France 828 Email: benjamin@paterson.fr 830 Jari Arkko 831 Ericsson 832 Jorvas 02420 833 Finland 835 Email: jari.arkko@piuha.net