idnits 2.17.1 draft-ietf-homenet-prefix-assignment-02.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 (January 5, 2015) is 3400 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: July 9, 2015 J. Arkko 6 Ericsson 7 January 5, 2015 9 Distributed Prefix Assignment Algorithm 10 draft-ietf-homenet-prefix-assignment-02 12 Abstract 14 This document specifies a distributed algorithm for automatic prefix 15 assignment. Given a set of delegated prefixes, it ensures at most 16 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 July 9, 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 . . . . . . . . . . . . . . . 11 65 6. Implementation Capabilities and Node Behavior . . . . . . . . 13 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 . . . . . . . . . . . . . . . . . . . . . . . 17 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 "RECOMMENDED", "SHOULD", and "SHOULD NOT", are to be interpreted as 117 described in [RFC2119]. 119 This document makes use of the following terminology: 121 Link: An object the distributed algorithm will assign prefixes to. 122 A Node may only assign prefixes to Links it is directly connected 123 to. A Link is either Shared or Private. 125 Private Link: A Private Link is an abstract concept defined for the 126 sake of this document. It allows nodes to make assignments for 127 their private use or delegation. For instance, every DHCPv6-PD 128 [RFC3633] client MAY be considered as a different Private Link. 130 Shared Link: A Link multiple nodes are connected to. Most of the 131 time, a Shared Link would consist in a multi-access link or point- 132 to-point link, virtual or physical, requiring prefixes to be 133 assigned to. 135 Delegated Prefix: A prefix provided to the algorithm and used as a 136 prefix pool for Assigned Prefixes. 138 Node ID: A value identifying a given participating node. The set 139 of identifiers MUST be strictly and totally ordered (e.g., 140 alphanumeric order). 142 Flooding Mechanism: A mechanism implementing reliable broadcast and 143 used to advertise published Assigned Prefixes. 145 Flooding Delay: Optional value provided by the Flooding Mechanism 146 indicating a deterministic or likely upper bound of the 147 information propagation delay. When the Flooding Mechanism does 148 not provide a value, it is set to DEFAULT_FLOODING_DELAY 149 (Section 7). 151 Advertised Prefix: A prefix advertised by another node and 152 delivered to the local node by the Flooding Mechanism. It has an 153 Advertised Prefix Priority and, when assigned to a directly 154 connected Shared Link, is associated with a Shared Link. 156 Advertised Prefix Priority: A value that defines the priority of an 157 Advertised Prefix received from the Flooding Mechanism or a 158 published Assigned Prefix. Whenever multiple Advertised Prefixes 159 are conflicting, all Advertised Prefixes but the one with the 160 greatest priority will eventually be removed. In case of tie, the 161 assignment advertised by the node with the greatest Node ID is 162 kept and others are removed. In order to ensure convergence, the 163 range of priority values MUST have an upper bound. 165 Assigned Prefix: A prefix included in a Delegated Prefix and 166 assigned to a Shared or Private Link. It represents a local 167 decision to assign a given prefix from a given Delegated Prefix to 168 a given Link. The algorithm ensures that there never is more than 169 one Assigned Prefix per Delegated Prefix and Link pair. When 170 destroyed, an Assigned Prefix is set as not applied, ceases to be 171 advertised, and is removed from the set of Assigned Prefixes. 173 Applied (Assigned Prefix): When an Assigned Prefix is applied, it 174 MAY be used (e.g., for host configuration, routing protocol 175 configuration, prefix delegation). When not applied, it MUST NOT 176 be used for any other purposes than the prefix assignment 177 algorithm. Each Assigned Prefix is associated with a timer (Apply 178 Timer) used to apply the Assigned Prefix. An Assigned Prefix is 179 unapplied when destroyed. 181 Published (Assigned Prefix): The Assigned Prefix is advertised 182 through the Flooding Mechanism as assigned to its associated Link. 183 A published Assigned Prefix MUST have an Advertised Prefix 184 Priority. It will appear as an Advertised Prefix to other nodes, 185 once received through the Flooding Mechanism. 187 Backoff Timer: Every Delegated Prefix and Link pair is associated 188 with a timer counting down to zero. It is used to avoid multiple 189 nodes from making colliding assignments by delaying the creation 190 of new Assigned Prefixes or the advertisement of adopted Assigned 191 Prefixes by a random amount of time. 193 Renumbering: Event occuring when an Assigned Prefix which was 194 applied is destroyed. It is undesirable as it usually implies 195 reconfiguring routers or hosts. 197 3. Applicability statement 199 Each node MUST have a set of disjoint Delegated Prefixes. It MAY 200 change over time and be different from one node to another at some 201 point, but nodes MUST eventually agree on the same set of disjoint 202 Delegated Prefixes. 204 Given this set of disjoint Delegated Prefixes, nodes may assign 205 available prefixes from each Delegated Prefix to the Links they are 206 directly connected to. The algorithm ensures that at most one prefix 207 from a given Delegated Prefix is assigned to a given Link. 209 The algorithm can be applied to any address space and can be used to 210 manage multiple address spaces simultaneously. For instance, an 211 implementation can make use of IPv4-mapped IPv6 addresses [RFC4291] 212 in order to manage both IPv4 and IPv6 prefix assignment 213 simultaneously. 215 The algorithm supports dynamically changing topologies: 217 o Nodes may join or leave the set of participating nodes. 219 o Nodes may join or leave Links. 221 o Links may be joined or split. 223 All nodes MUST run a common Flooding Mechanism in order to share 224 published Assigned Prefixes. The set of participating nodes is 225 defined as the set of nodes participating in the Flooding Mechanism. 227 The Flooding Mechanism MUST: 229 o Provide a way to flood Assigned Prefixes assigned to a directly 230 connected Link along with their respective Advertised Prefix 231 Priority and the Node ID of the node which advertises it. 233 o Specify whether an Advertised Prefix was assigned to a directly 234 connected Shared Link, and if so, on which one. 236 In addition, a Flooding Delay SHOULD be specified and respected in 237 order to avoid undesired renumbering. If not specified, or whenever 238 the Flooding Mechanism is unable to respect the provided delay, 239 renumbering may happen. As such delay often depends on the size of 240 the network, it MAY change over time and MAY be different from one 241 node to another. 243 The algorithm ensures that whenever the Flooding Delay is provided 244 and respected, and in the absence of topology change or delegated 245 prefix removal, renumbering never happens. 247 Each node MUST have a Node ID. Node IDs MAY change over time and be 248 the same on multiple nodes at some point, but each node MUST 249 eventually have a Node ID which is unique among the set of 250 participating nodes. 252 4. Algorithm Specification 254 This section specifies the behavior of nodes implementing the prefix 255 assignment algorithm. 257 4.1. Algorithm Terminology 259 The algorithm makes use of the following terms: 261 Current Assignment: For a given Delegated Prefix and Link, the 262 Current Assignment is the Assigned Prefix (if any) included in the 263 Delegated Prefix and assigned to the given Link. 265 Best Assignment: For a given Delegated Prefix and Link, the Best 266 Assignment is (if any) the Advertised Prefix: 268 * Including or included in the Delegated Prefix. 270 * Assigned on the given Link. 272 * Having the greatest Advertised Prefix Priority among Advertised 273 Prefixes (and, in case of tie, the prefix advertised by the 274 node with the greatest Node ID among all prefixes with greatest 275 priority). 277 * Taking precedence over the Current Assignment (if any) 278 associated with the same Link and Delegated Prefix. 280 Precedence: An Advertised Prefix takes precedence over an Assigned 281 Prefix if and only if: 283 * The Assigned Prefix is not published. 285 * The Assigned Prefix is published and the Advertised Prefix 286 Priority from the Advertised Prefix is strictly greater than 287 the Advertised Prefix Priority from the Assigned Prefix. 289 * The Assigned Prefix is published, the priorities are equal, and 290 the Node ID from the node advertising the Advertised Prefix is 291 strictly greater than the local Node ID. 293 Valid (Assigned Prefix) An Assigned Prefix is valid if and only if 294 the two following conditions are met: 296 * No Advertised Prefix including or included in the Assigned 297 Prefix takes precedence over the Assigned Prefix. 299 * No Advertised Prefix including or included in the same 300 Delegated Prefix as the Assigned Prefix and assigned to the 301 same Link takes precedence over the considered Assigned Prefix. 303 4.2. Prefix Assignment Algorithm Routine 305 This section specifies the prefix assignment algorithm routine. It 306 is defined for a given Delegated Prefix/Link pair and may be run 307 either as triggered by the Backoff Timer, or not. 309 For a given Delegated Prefix and Link pair, the routine MUST be run 310 as not triggered by the Backoff Timer whenever: 312 o An Advertised Prefix including or included in the considered 313 Delegated Prefix is added or removed. 315 o An Assigned Prefix included in the considered Delegated Prefix and 316 associated with a different Link than the considered Link was 317 destroyed, while there is no Current Assignment associated with 318 the given pair. This case MAY be ignored if the creation of a new 319 Assigned Prefix associated with the considered pair is not 320 desired. 322 o The considered Delegated Prefix is added. 324 o The considered Link is added. 326 o The Node ID is modified. 328 Additionaly, for a given Delegated Prefix and Link pair, the routine 329 MUST be run as triggered by the Backoff Timer whenever: 331 o The Backoff Timer associated with the considered Delegated Prefix/ 332 Link pair fires while there is no Current Assignment associated 333 with the given pair. 335 When such an event occurs, a node MAY delay the execution of the 336 routine instead of executing it immediately, e.g. while receiving an 337 update from the Flooding Mechanism, or for security reasons (see 338 Section 8). Even though other events occur in the meantime, the 339 routine MUST be run only once. It is also assumed that, whenever one 340 of these events is the Backoff Timer firing, the routine is executed 341 as triggered by the Backoff Timer. 343 In order to execute the routine for a given Delegated Prefix/Link 344 pair, first look for the Best Assignment and Current Assignment 345 associated with the Delegated Prefix/Link pair, then execute the 346 corresponding case: 348 1. If there is no Best Assignment and no Current Assignment: Decide 349 whether the creation of a new assignment for the given Delegated 350 Prefix/Link pair is desired (As any result would be valid, the 351 way the decision is taken is out of the scope of this document) 352 and do the following: 354 * If it is not desired, stop the execution of the routine. 356 * Else if the Backoff Timer is running, stop the execution of 357 the routine. 359 * Else if the routine was not executed as triggered by the 360 Backoff Timer, set the Backoff Timer to some random delay 361 between ADOPT_MAX_DELAY and BACKOFF_MAX_DELAY (see Section 7) 362 and stop the execution of the routine. 364 * Else, continue the execution of the routine. 366 Select a prefix for the new assignment (see Section 5 for 367 guidance regarding prefix selection). This prefix MUST be 368 included in or be equal to the considered Delegated Prefix and 369 MUST NOT include or be included in any Advertised Prefix. If a 370 suitable prefix is found, use it to create a new Assigned Prefix: 372 * Assigned to the considered Link. 374 * Not applied. 376 * The Apply Timer set to '2 * Flooding Delay'. 378 * Published with some selected Advertised Prefix Priority. 380 2. If there is a Best Assignment but no Current Assignment: Cancel 381 the Backoff Timer and use the prefix from the Best Assignment to 382 create a new Assigned Prefix: 384 * Assigned to the considered Link. 386 * Not applied. 388 * The Apply Timer set to '2 * Flooding Delay'. 390 * Not published. 392 3. If there is a Current Assignment but no Best Assignment: 394 * If the Current Assignment is not valid, destroy it, and 395 execute the routine again, as not triggered by the Backoff 396 Timer. 398 * If the Current Assignment is valid and published, stop the 399 execution of the routine. 401 * If the Current Assignment is valid and not published, the node 402 MAY either: 404 + Adopt the prefix by cancelling the Apply Timer and set the 405 Backoff Timer to some random delay between 0 and 406 ADOPT_MAX_DELAY (see Section 7). This procedure is used to 407 avoid renumbering when the node advertising the prefix left 408 the Shared Link. 410 + Destroy it and execute case 1 in order to create a 411 different assignment. 413 4. If there is a Current Assignment and a Best Assignment: 415 * Cancel the Backoff Timer. 417 * If the two prefixes are identical, set the Current Assignment 418 as not published. If the Current Assignment is not applied 419 and the Apply Timer is not set, set the Apply Timer to '2 * 420 Flooding Delay'. 422 * If the two prefixes are not identical, destroy the Current 423 Assignment and go to case 2. 425 When the prefix assignment algorithm routine requires an assignment 426 to be created or adopted, any Advertised Prefix Priority value can be 427 used. Other documents MAY provide restrictions over this value 428 depending on the context the algorithm is operating in, or leave it 429 as implementation-specific. 431 When the prefix assignment algorithm routine requires an assignment 432 to be created or adopted, the chosen Advertised Prefix Priority is 433 unspecified (any value would be valid). The values to be used in 434 such situations MAY be specified by other documents making use of the 435 prefix assignment algorithm or be left as an implementation specific 436 choice. 438 4.3. Overriding and Destroying Existing Assignments 440 In addition to the behavior specified in Section 4.2, the following 441 procedures MAY be used in order to provide more advanced behavior 442 (Section 6): 444 Overriding Existing Assignments: For any given Link and Delegated 445 Prefix, a node MAY create a new Assigned Prefix using a chosen 446 prefix and Advertised Prefix Priority such that: 448 * The chosen prefix is included in or is equal to the considered 449 Delegated Prefix. 451 * The Current Assignment, if any, as well as all existing 452 Assigned Prefixes which include or are included inside the 453 chosen prefix are destroyed. 455 * It is not applied. 457 * The Apply Timer set to '2 * Flooding Delay'. 459 * It is published. 461 * The Advertised Prefix Priority is greater than the Advertised 462 Prefix Priority from all Advertised Prefixes which include or 463 are included in the chosen prefix. 465 In order to ensure algorithm convergence: 467 * Such overriding assignments MUST NOT be created unless there 468 was a change in the node configuration, a Link was added, or an 469 Advertised Prefix was added or removed. 471 * The chosen Advertised Prefix Priority for the new Assigned 472 Prefix SHOULD be greater than all priorities from the destroyed 473 Assigned Prefixes. If not, simple topologies with only two 474 nodes may not converge. Nodes which do not respect this rule 475 MUST implement a mechanism which detects whether the 476 distributed algorithm do not converge and, whenever this would 477 happen, stop creating overriding Assigned Prefixes causing the 478 destruction of other Assigned Prefixes. The specifications for 479 such safety procedures are out of the scope of this document. 481 Removing an Assigned Prefix: A node MAY destroy any Assigned Prefix 482 which is published. Such an event reflects the desire from a node 483 to not assign a prefix from a given Delegated Prefix to a given 484 Link anymore. In order to ensure algorithm convergence, such 485 procedure MUST NOT be executed unless there was a change in the 486 node configuration. Additionally, whenever an Assigned Prefix is 487 destroyed this way, the prefix assignment algorithm routine MUST 488 be run for the Delegated Prefix/Link pair associated with the 489 deleted Assigned Prefix. 491 These procedures are optional. They could be used for diverse 492 purposes, e.g., for providing custom prefix assignment configuration 493 or reacting to prefix space exhaustion (by overriding short Assigned 494 Prefixes and assigning longer ones). 496 4.4. Other Events 498 When the Apply Timer fires, the associated prefix MUST be applied. 500 When the Backoff Timer associated with a given Delegated Prefix/Link 501 pair fires while there is a Current Assignment associated with the 502 same pair, the Current Assignment MUST be published with some 503 associated Advertised Prefix Priority and, if the prefix is not 504 applied, the Apply Timer MUST be set to '2 * Flooding Delay'. 506 When a Delegated Prefix is removed from the set of Delegated 507 Prefixes, all Assigned Prefixes included in the removed Delegated 508 Prefix MUST be destroyed. 510 When one Delegated Prefix is replaced by another one that includes or 511 is included in the deleted Delegated Prefix, all Assigned Prefixes 512 which were included in the deleted Delegated Prefix but are not 513 included in the added Delegated Prefix MUST be destroyed. Others MAY 514 be kept. 516 When a Link is removed, all Assigned Prefixes assigned to that Link 517 MUST be destroyed. 519 5. Prefix Selection Considerations 521 When the prefix assignment algorithm routine specified in Section 4.2 522 requires a new prefix to be selected, the prefix MUST be selected 523 either: 525 o Among prefixes which were previously assigned and applied on the 526 considered Link. 528 o Randomly, picked in a set of at least RANDOM_SET_SIZE (see 529 Section 7) candidate prefixes. If less than RANDOM_SET_SIZE 530 candidates can be found, the prefix MUST be picked among all 531 candidates. 533 o Based on some custom selection process specified in the 534 configuration. 536 A simple implementation MAY randomly pick the prefix among all 537 available prefixes, but this strategy is inefficient in terms of 538 address space use as a few long prefixes may exhaust the pool of 539 available short prefixes. 541 The rest of this section describes a more efficient approach which 542 MAY be applied any time a node needs to pick a prefix for a new 543 assignment. The two following definitions are used: 545 Available prefix: The prefix A/N is available if and only if A/N 546 does not include and is not included in any Assigned or Advertised 547 Prefix but A/(N-1) does include or is included in an Assigned or 548 Advertised Prefix (or N equals 0 and there is no Assigned or 549 Advertised Prefixes at all). 551 Candidate prefix: A prefix which is included in or is equal to an 552 available prefix. 554 The procedure described in this section takes the three following 555 criteria into account: 557 Stability: In some cases, it is desirable that the selected prefix 558 remains the same across executions and reboots. For this purpose, 559 prefixes previously applied on the Link or pseudo-random prefixes 560 generated based on node and Link specific values may be 561 considered. 563 Randomness: When no stored or pseudo-random prefix is chosen, a 564 prefix may be randomly picked among RANDOM_SET_SIZE candidates of 565 desired length. If less than RANDOM_SET_SIZE candidates can be 566 found, the prefix is picked among all candidates. 568 Addressing-space usage efficiency: In the process of assigning 569 prefixes, a small set of badly chosen long prefixes may easily 570 prevent any shorter prefix from being assigned. For this reason, 571 the set of RANDOM_SET_SIZE candidates is created from the set of 572 available prefixes with longest prefix lengths and, in case of 573 tie, prefer small prefix values. 575 When executing the procedure, do as follows: 577 1. For each prefix stored in stable-storage, check if the prefix is 578 included in or equal to an available prefix. If so, pick that 579 prefix and stop. 581 2. For each prefix length, count the number of available prefixes of 582 the given length. 584 3. If the desired prefix length was not specified, select one. The 585 available prefixes count computed previously may be used to help 586 picking a prefix length such that: 588 * There is at least one candidate prefix. 590 * The prefix length is chosen great enough to not exhaust the 591 address space. 593 Let N be the chosen prefix length. 595 4. Iterate over available prefixes starting with prefixes of length 596 N down to length 0 and create a set of RANDOM_SET_SIZE candidate 597 prefixes of length exactly N included in or equal to available 598 prefixes. The end goal here is to create a set of 599 RANDOM_SET_SIZE candidate prefixes of length N included in a set 600 of available prefixes of maximized prefix length. In case of a 601 tie, smaller prefix values (as defined by the bit-wise 602 lexicographical order) are preferred. 604 5. For each pseudo-random prefix, check if the prefix is equal to a 605 candidate prefix. If so, pick that prefix and stop. 607 6. Choose a random prefix from the set of selected candidates. 609 The complexity of this procedure is equivalent to the complexity of 610 iterating over available prefixes. Such operation may be 611 accomplished in linear time, e.g., by storing Advertised and Assigned 612 Prefixes in a binary trie. 614 6. Implementation Capabilities and Node Behavior 616 Implementations of the prefix assignment algorithm may vary from very 617 basic to highly customisable, enabling different types of fully 618 interoperable behaviors. The three following behaviors are given as 619 examples: 621 Listener: The node only acts upon assignments made by other nodes, 622 i.e, it never creates new assignments nor adopt existing ones. 623 Such behavior does not require the implementation of the 624 considerations specified in Section 5 or Section 4.3. The node 625 never checks existing assignments validity, which makes this 626 behavior particularly suited to lightweight devices which can rely 627 on more capable neighbors to make assignments on directly 628 connected Shared Links. 630 Basic: The node is capable of assigning new prefixes or adopting 631 prefixes which do not conflict with any other existing assignment. 632 Such behavior does not require the implementation of the 633 considerations specified in Section 4.3. It is suited to 634 situations where there is no preference over which prefix should 635 be assigned to which Link, and there is no priority between 636 different Links. 638 Advanced: The node is capable of assigning new prefixes, adopting 639 existing ones, making overriding assignments and destroying 640 existing ones. Such behavior requires the implementation of the 641 considerations specified in Section 5 and Section 4.3. It is 642 suited when the administrator desires some particular prefix to be 643 assigned on a given Link, or some Links to be assigned prefixes 644 with a higher priority. 646 7. Algorithm Parameters 648 This document does not provide values for ADOPT_MAX_DELAY, 649 BACKOFF_MAX_DELAY and RANDOM_SET_SIZE. The algorithm ensures 650 convergence and correctness for any chosen values, even when these 651 are different from node to node. They MAY be adjusted depending on 652 the context, providing a tradeoff between convergence time, efficient 653 addressing, low verbosity (less traffic is generated by the Flooding 654 Mechanism), and low collision probability. 656 ADOPT_MAX_DELAY (respectively BACKOFF_MAX_DELAY) represents the 657 maximum backoff time a node may wait before adopting an assignment 658 (respectively making a new assignment). BACKOFF_MAX_DELAY MUST be 659 greater than or equal to ADOPT_MAX_DELAY. The greater 660 ADOPT_MAX_DELAY and (BACKOFF_MAX_DELAY - ADOPT_MAX_DELAY), the lower 661 the collision probability and the verbosity, but the longer the 662 convergence time. 664 RANDOM_SET_SIZE represents the desired size of the set a random 665 prefix will be picked from. The greater RANDOM_SET_SIZE, the better 666 the convergence time and the lower the collision probability, but the 667 worse the addressing-space usage efficiency. 669 When the Flooding Mechanism does not provide a Flooding Delay, it is 670 set to DEFAULT_FLOODING_DELAY. As participating nodes do not need to 671 agree on a common Flooding Delay value, this default value MAY be 672 different from one node to another. If the context in which the 673 algorithm is used does not suffer from renumbering, the value 0 MAY 674 be used. Otherwise it depends on the Flooding Mechanism properties 675 and the desired renumbering probability, and is therefore out of 676 scope of this document. 678 8. Security Considerations 680 The prefix assignment algorithm functions on top of two distinct 681 mechanisms, the Flooding Mechanism and the Node ID assignment 682 mechanism. In order to operate securely: 684 An attacker able to publish Advertised Prefixes through the 685 flooding mechanism may perform the following attacks: 687 * Publish a single overriding assignment for a whole Delegated 688 Prefix or for the whole address space, thus preventing any node 689 from assigning prefixes to Links. 691 * Quickly publish and remove Advertised Prefixes, generating 692 traffic at the Flooding Mechanism layer and causing multiple 693 executions of the prefix assignment algorithm in all 694 participating nodes. 696 * Publish and remove Advertised Prefixes in order to prevent the 697 convergence of the execution. 699 An attacker able to prevent other nodes from accessing a portion 700 or the whole set of Advertised Prefixes may compromise the 701 correctness of the execution. 703 An attacker able to cause repetitive Node ID changes may induce 704 traffic generation from the Flooding Mechanism and multiple 705 executions of the prefix assignment algorithm in all participating 706 nodes. 708 An attacker able to publish Advertised Prefixes using a Node ID 709 used by another node may prevent the correctness and convergence 710 of the execution. 712 Whenever the security of the Flooding Mechanism and Node ID 713 assignment mechanism could not be ensured, the convergence of the 714 execution may be prevented. In environments where such attacks may 715 be performed, the execution of the prefix assignment algorithm 716 routine SHOULD be rate limited, as specified in Section 4.2. 718 9. IANA Considerations 720 This document has no actions for IANA. 722 10. Acknowledgments 724 The authors would like to thank those who participated in the 725 previous document's version development as well as the present one. 726 In particular, the authors would like to thank Tim Chown, Fred Baker, 727 Mark Townsley, Lorenzo Colitti, Ole Troan, Ray Bellis, Markus 728 Stenberg, Wassim Haddad, Joel Halpern, Samita Chakrabarti, Michael 729 Richardson, Anders Brandt, Erik Nordmark, Laurent Toutain, Ralph 730 Droms, Acee Lindem and Steven Barth for interesting discussions and 731 document review. 733 11. References 735 11.1. Normative References 737 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 738 Requirement Levels", BCP 14, RFC 2119, March 1997. 740 11.2. Informative References 742 [RFC4291] Hinden, R. and S. Deering, "IP Version 6 Addressing 743 Architecture", RFC 4291, February 2006. 745 [RFC3633] Troan, O. and R. Droms, "IPv6 Prefix Options for Dynamic 746 Host Configuration Protocol (DHCP) version 6", RFC 3633, 747 December 2003. 749 Appendix A. Static Configuration Example 751 This section describes an example of how custom configuration of the 752 prefix assignment algorithm may be implemented. 754 The node configuration is specified as a finite set of rules. A rule 755 is defined as: 757 o A prefix to be used. 759 o A Link on which the prefix may be assigned. 761 o An Assigned Prefix Priority (smallest possible Assigned Prefix 762 Priority if the rule may not override other Assigned Prefixes). 764 o A rule priority (0 if the rule may not override existing 765 Advertised Prefixes). 767 In order to ensure the convergence of the execution, the Assigned 768 Prefix Priority MUST be an increasing function (not necessarily 769 strictly) of the configuration rule priority (i.e. the greater is the 770 configuration rule priority, the greater the Assigned Prefix Priority 771 must be). 773 Each Assigned Prefix is associated with a rule priority. Assigned 774 Prefixes which are created as specified in Section 4.2 are given a 775 rule priority of 0. 777 Whenever the configuration is changed or the prefix assignment 778 algorithm routine is run: For each Link/Delegated Prefix pair, look 779 for the configuration rule with the highest configuration rule 780 priority such that: 782 o The prefix specified in the configuration rule is included in the 783 considered Delegated Prefix. 785 o The Link specified in the configuration rule is the considered 786 Link. 788 o All the Assigned Prefixes which would need to be destroyed in case 789 a new Assigned Prefix is created from that configuration rule (as 790 specified in Section 4.3) have an associated rule priority which 791 is strictly lower than the one of the considered configuration 792 rule. 794 o The assignment would be valid when published with an Advertised 795 Prefix Priority equal to the one specified in the configuration 796 rule. 798 If a rule is found, a new Assigned Prefix is created based on that 799 rule in conformance with Section 4.3. The new Assigned Prefix is 800 associated with the Advertised Prefix Priority and the rule priority 801 specified in the considered configuration rule. 803 Note that the use of rule priorities ensures the convergence of the 804 execution. 806 Authors' Addresses 808 Pierre Pfister 809 Cisco Systems 810 Paris 811 France 813 Email: pierre.pfister@darou.fr 814 Benjamin Paterson 815 Cisco Systems 816 Paris 817 France 819 Email: benjamin@paterson.fr 821 Jari Arkko 822 Ericsson 823 Jorvas 02420 824 Finland 826 Email: jari.arkko@piuha.net