RFC 3531

A Flexible Method for Managing the Assignment of Bits of an IPv6 Address Block

πŸ“… published April 2003, from ietf

Network Working Group ✨

Request for Comments: 3531 πŸŽ€ Category: Informational πŸ“š Author: M. Blanchet (Marc Blanchet), Viagenie πŸ’– Date: April 2003 🌸

The title block doesn't list anything this RFC obsoletes or updates. πŸ™ˆ

A Flexible Method for Managing the Assignment of Bits of an IPv6 Address Block 🌈

Status of This Memo πŸ“

Okay so this memo is just giving information to the Internet community. It is NOT a standard of any kind πŸ™…β€β™€οΈ. Distribution is unlimited, so share it with whoever. πŸ’…

Copyright (C) The Internet Society (2003). All Rights Reserved. 🫢

Abstract πŸ¦‹

Bestie, this doc proposes a way to manage how bits of an IPv6 address block or range get assigned. 🧚 Picture an organisation that needs an address plan for its subnets, or an ISP that needs one for its customers. This method lets them postpone the final decision on how many bits to partition off, because it keeps the bits around the partition borders free for as long as possible. πŸ”₯ It works for any bits addressing scheme that uses partitions, but IPv6 is the first intended use. It's a generalization of RFC 1219, and it can be used for IPv6 assignments. πŸ’œ

Table of Contents πŸ—‚οΈ

1.  Rationale  . . . . . . . . . . . . . . . . . . . . . . . . . .  2
2.  Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . .  2
3.  Description of the Algorithm . . . . . . . . . . . . . . . . .  3
  3.1 Leftmost . . . . . . . . . . . . . . . . . . . . . . . . . .  3
  3.2 Rightmost  . . . . . . . . . . . . . . . . . . . . . . . . .  3
  3.3 Centermost . . . . . . . . . . . . . . . . . . . . . . . . .  4
4.  Example  . . . . . . . . . . . . . . . . . . . . . . . . . . .  4
5.  Security Considerations  . . . . . . . . . . . . . . . . . . .  5
6.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . .  5
    References . . . . . . . . . . . . . . . . . . . . . . . . . .  6
    Author's Address . . . . . . . . . . . . . . . . . . . . . . .  6
    Full Copyright Statement . . . . . . . . . . . . . . . . . . .  7

1. Rationale 🌸

IPv6 addresses have a really flexible structure for assignments, which is so cute. πŸŽ€ That lets registries, ISPs, network designers and others hand out address ranges to organizations and networks based on different criteria, like network size or estimated growth rate. πŸ“ˆ But the first assignment often doesn't scale well, because a small network ends up bigger than anyone expected and needs more addresses. πŸ’€ Then the assignment authority can't allocate contiguous addresses, since they've already been given to another network. 😭

RFC 1219 [1] is the IPv4 scheme that keeps address space unallocated between the leftmost bits of the subnet part and the rightmost bits of the host part. ✨ That lets the network designer change the subnet mask without renumbering, as long as the central bits stay unallocated. πŸ¦‹

This work generalizes that earlier scheme by extending the algorithm so it can be applied to any part of an IP address, assigned by any assignment authority level (registries, ISPs of any level, organizations, and so on). 🧚 It can be used for both IPv4 and IPv6. πŸ’–

This document doesn't give registries any recommendation on how to assign address ranges to their customers. πŸ™…β€β™€οΈ

2. Scheme 🧩

We define the parts of the IP address as p1, p2, p3, ... pN, in order, so an IP address is made of these parts laid out contiguously. πŸ’œ The boundaries between parts are based on the prefix assigned by the next level authority. Part p1 is the leftmost part, probably assigned to a registry. Part p2 can go to a large internet service provider or a national registry. Part p3 can go to a large customer or a smaller provider, and so on. 🌈 Each part can be a different length, and we define l(pX) as the length of part X.

+------+------+------+------+------+------+
| p1   | p2   | p3   | p4   | ...  | pN   |
+------+------+------+------+------+------+
<------- ipv6 or ipv4 address ------------>

The algorithm for allocating addresses goes like this:

  • a) for the leftmost part (p1), assign addresses using the leftmost bits first
  • b) for the rightmost part (pN), assign addresses using the rightmost bits first
  • c) for all other parts (center parts), predefine an arbitrary boundary (prefix), then assign addresses using the center bits first of the part being assigned

This algorithm grows the assigned bits so that the unassigned bits stay near the boundary of the parts. πŸ”₯ That means the prefix between any two parts can be moved forward or backward later on, up to the assigned bits. πŸ‘‘

3. Description of the Algorithm 🧠

This section covers the assignment of leftmost bits, rightmost bits and centermost bits. πŸŽ€

3.1 Leftmost 🌷

p1 gets assigned in this order:

 Order   Assignment
 1 00000000
 2 10000000
 3 01000000
 4 11000000
 5 00100000
 6 10100000
 7 01100000
 8 11100000
 9 00010000
 ...

It's basically a mirror of binary counting. πŸͺž

3.2 Rightmost πŸ“

pN (the last part) gets assigned in this order:

 Order   Assignment
 1 00000000
 2 00000001
 3 00000010
 4 00000011
 5 00000100
 6 00000101
 7 00000110
 8 00000111
 9 00001000
 ...

3.3 Centermost πŸ¦‹

pX (where 1 < X < N) gets assigned in this order (for example, with a 8 bit predefined length l(pX)=8)):

 Order   Assignment
 1 00000000
 2 00001000
 3 00010000
 4 00011000
 5 00000100
 6 00001100
 7 00010100
 8 00011100
 9 00100000
 ...

Here's how the bits get assigned:

  1. The first round selects only the middle bit (and if there's an even number of bits, pick the bit following the center).
  2. Create all combinations using the selected bits that haven't been created yet.
  3. Start a new round by adding one more bit to the set. In even rounds, add the preceding bit to the set. In odd rounds, add the subsequent bit to the set.
  4. Repeat 2 and 3 until there are no more bits to consider.

4. Example 🌸

Let's say a provider P1 has been assigned the 3ffe:0b00/24 prefix and wants to assign prefixes to its connected networks. πŸ’… It expects a maximum of 256 customers in the foreseeable future, consuming 8 bits. One of those customers, C2, expects a maximum of 1024 customer assignments under it, consuming 10 other bits. 😭

The assignment goes like this. We're not showing the first 24 leftmost bits (3ffe:0b00/24: 00111111 11111110 00001011):

P1 assigns address space to its customers using leftmost bits:

 10000000  : assigned to C1
 01000000  : assigned to C2
 11000000  : assigned to C3
 00100000  : assigned to C4
 ...

C2 assigns address space to its customers (C2C1, C2C2, ...) using centermost bits:

 0000010000 : assigned to C2C1
 0000100000 : assigned to C2C2
 0000110000 : assigned to C2C3
 ...

Customers of C2 can use centermost bits for maximum flexibility, and then the last aggregators (which should be a network in a site) get assigned using rightmost bits. 🧚

Putting all the bits together for C2C3:

P1                        |C2      |C2C3
00111111 11111110 00001011 01000000 00001100 00
                              <------->    <------>
                                  growing bits

With this method, P1 can expand its number of customers, and the customers can change their first assumptions about how big their own customers will be, until the "reserved" bits get assigned. 🫢🌈

5. Security Considerations πŸ”

Address assignment doesn't seem to have any specific security considerations. 🧐 That said, the security stakes of address planning are not something to skip past, so don't treat this section as a gimme. πŸ’€

6. Acknowledgements πŸ’–

Huge thanks to Steve Deering, Bob Hinden, Thomas Narten, Erik Nordmark, Florent Parent and Jocelyn Picard for their very useful comments on this work. πŸ‘‘

References πŸ“š

[1] Tsuchiya, P., "On the assignment of subnet numbers", RFC 1219, April 1991.

[2] Bradner, S., "The Internet Standards Process -- Revision 3", BCP 9, RFC 2026, October 1996.

Author's Address πŸŽ€

Marc Blanchet Viagenie 2875 boul. Laurier, bureau 300 Sainte-Foy, QC G1V 2M2 Canada

Phone: +1 418 656 9254 EMail: Marc.Blanchet@viagenie.qc.ca URI: http://www.viagenie.qc.ca/

Copyright (C) The Internet Society (2003). All Rights Reserved.

This document and translations of it may be copied and furnished to others. Derivative works that comment on or explain it, or help with its implementation, may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, as long as the above copyright notice and this paragraph are included on all such copies and derivative works. πŸ¦‹ However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations. The one exception is when needed to develop Internet standards, in which case the procedures for copyrights defined in the Internet Standards process must be followed. Translating it into languages other than English is also allowed.

The limited permissions above are perpetual and will not be revoked by the Internet Society or its successors or assigns. πŸ’œ

This document and the information in it are provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. πŸ™

Acknowledgement 🌸

Funding for the RFC Editor function is currently provided by the Internet Society. πŸ’…βœ¨

πŸ“¦ where this page comes from