A Flexible Method for Managing the Assignment of Bits of an IPv6 Address Block
How to split an address block into parts while keeping the boundaries movable later
Blanchet, M., "A Flexible Method for Managing the Assignment of Bits of an IPv6 Address Block", RFC 3531, DOI 10.17487/RFC3531, April 2003, <https://www.rfc-editor.org/info/rfc3531>.
@misc{rfc3531,
series = {Request for Comments},
number = 3531,
howpublished = {RFC 3531},
publisher = {RFC Editor},
doi = {10.17487/RFC3531},
url = {https://www.rfc-editor.org/info/rfc3531},
author = {M. Blanchet},
title = {{A Flexible Method for Managing the Assignment of Bits of an IPv6 Address Block}},
pagetotal = 7,
year = 2003,
month = apr,
} RFC text
Contents
Network Working Group M. Blanchet
Request for Comments: 3531 Viagenie
Category:Informational April 2003
A Flexible Method for Managing the Assignment of Bits
of an IPv6 Address Block
Status of this Memo
This memo provides information for the Internet community. It does
not specify an Internet standard of any kind. Distribution of this
memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2003). All Rights Reserved.
Abstract
This document proposes a method to manage the assignment of bits of
an IPv6 address block or range. When an organisation needs to make
an address plan for its subnets or when an ISP needs to make an
address plan for its customers, this method enables the organisation
to postpone the final decision on the number of bits to partition in
the address space they have. It does it by keeping the bits around
the borders of the partition to be free as long as possible. This
scheme is applicable to any bits addressing scheme using bits with
partitions in the space, but its first intended use is for IPv6. It
is a generalization of RFC 1219 and 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 flexible structure for address assignments.
This enables registries, internet service providers, network
designers and others to assign address ranges to organizations and
networks based on different criteria, like size of networks,
estimated growth rate, etc. Often, the initial assignment doesn't
scale well because a small network becomes larger than expected,
needing more addresses. But then, the assignment authority cannot
allocate contiguous addresses because they were already assigned to
another network.
RFC 1219 [1] describes an allocation scheme for IPv4 where address
space is kept unallocated between the leftmost bits of the subnet
part and the rightmost bits of the host part of the address. This
enables the network designer to change the subnet mask without
renumbering, for the central bits not allocated.
This work generalizes the previous scheme by extending the algorithm
so it can be applied on any part of an IP address, which are assigned
by any assignment authority level (registries, ISPs of any level,
organizations, ...). It can be used for both IPv4 and IPv6.
This document does not provide any recommendation to registries on
how to assign address ranges to their customers.
2. Scheme
We define parts of the IP address as p1, p2 , p3, ... pN in order,
so that an IP address is composed of these parts contiguously.
Boundaries between each part 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 be allocated to a large internet service
provider or to a national registry. Part p3 can be allocated to a
large customer or a smaller provider, etc. Each part can be of
different length. We define l(pX) the length of part X.
+------+------+------+------+------+------+
| p1 | p2 | p3 | p4 | ... | pN |
+------+------+------+------+------+------+
<------- ipv6 or ipv4 address ------------>
The algorithm for allocating addresses is as follows: 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) and then assign addresses using the
center bits first of the part being assigned.
This algorithm grows assigned bits in such way that it keeps
unassigned bits near the boundary of the parts. This means that the
prefix between any two parts can be changed forward or backward,
later on, up to the assigned bits.
3. Description of the Algorithm
This section describes the assignment of leftmost bits, rightmost
bits and centermost bits.
3.1 Leftmost
p1 will be assigned in order as follows:
Order Assignment
1 00000000
2 10000000
3 01000000
4 11000000
5 00100000
6 10100000
7 01100000
8 11100000
9 00010000
...
This is actually a mirror of binary counting.
3.2 Rightmost
pN (the last part) will be assigned in order as follows:
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) will be assigned in order as follows: (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
...
The bits are assigned using the following algorithm:
1. The first round is to select only the middle bit (and if there is
an even number of bits pick the bit following the center)
2. Create all combinations using the selected bits that haven't yet
been created.
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
As an example, a provider P1 has been assigned the 3ffe:0b00/24
prefix and wants to assign prefixes to its connected networks. It
anticipates in the foreseeable future a maximum of 256 customers
consuming 8 bits. One of these customers, named C2, anticipates a
maximum of 1024 customer's assignments under it, consuming 10 other
bits.
The assignment will be as follows, 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 (should be a network in a site) will be
assigned using rightmost bits.
Putting all bits together for C2C3:
P1 |C2 |C2C3
00111111 11111110 00001011 01000000 00001100 00
<-------> <------>
growing bits
By using this method, P1 will be able to expand the number of
customers and the customers will be able to modify their first
assumptions about the size of their own customers, until the
"reserved" bits are assigned.
5. Security Considerations
Address assignment doesn't seem to have any specific security
consideration.
6. Acknowledgements
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/
Full Copyright Statement
Copyright (C) The Internet Society (2003). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it
or assist in its implementation may be prepared, copied, published
and distributed, in whole or in part, without restriction of any
kind, provided that 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, except as needed for the purpose of
developing Internet standards in which case the procedures for
copyrights defined in the Internet Standards process must be
followed, or as required to translate it into languages other than
English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is 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.
ISO Plain Language
On this page
§1Why the Bit Boundaries Matter
IPv6 addresses have a flexible structure for address assignments. This lets registries, internet service providers, network designers and others assign address ranges to organisations and networks on different criteria, such as the size of networks and the estimated growth rate. Often the initial assignment does not scale well, because a small network becomes larger than expected and needs more addresses, while the assignment authority cannot allocate contiguous addresses because they were already assigned to another network.
RFC 1219 describes an allocation scheme for IPv4 where address space is kept unallocated between the leftmost bits of the subnet part and the rightmost bits of the host part of the address. This enables the network designer to change the subnet mask without renumbering, for the central bits that are not allocated.
This document generalises that scheme by extending the algorithm so it can be applied to any part of an IP address, assigned by any level of authority such as registries, internet service providers of any level, or organisations. It can be used for both IPv4 and IPv6. The document does not provide any recommendation to registries on how to assign address ranges to their customers.
An address block is usually cut into pieces, one per customer or subnet. The trouble is that the sizes guessed at the start often turn out wrong, and a cut that is already made is hard to move. This scheme keeps the bits near each cut free for as long as possible, so the cuts can still be moved later.
§2The Scheme
The scheme defines the parts of an IP address as p1, p2, p3, ... pN in order, so that an IP address is composed of these parts contiguously. The boundary between each part is based on the prefix assigned by the next level of authority. Part p1 is the leftmost part and is probably assigned to a registry. Part p2 can be allocated to a large internet service provider or to a national registry. Part p3 can be allocated to a large customer or a smaller provider. Each part can be of a different length, and l(pX) is the length of part X.
The algorithm for allocating addresses is as follows. For the leftmost part p1, addresses are assigned using the leftmost bits first. For the rightmost part pN, addresses are assigned using the rightmost bits first. For all the other parts, the centre parts, an arbitrary boundary is predefined as a prefix and addresses are assigned using the centre bits first of the part being assigned.
This algorithm grows the assigned bits in such a way that it keeps the unassigned bits near the boundary of the parts. The prefix between any two parts can therefore be changed forward or backward later on, up to the assigned bits.
The address is split into contiguous parts, one for each level of authority. The leftmost part is handed out from the left, the rightmost part from the right, and the parts in between from the middle outwards. The bits closest to each boundary are the ones used last, so a boundary can still be moved while there are free bits next to it.
- p1The leftmost part, probably assigned to a registry.
- p2Can be allocated to a large internet service provider or to a national registry.
- p3Can be allocated to a large customer or a smaller provider.
- pNThe rightmost part, assigned using the rightmost bits first. Each part can have a different length.
§3Leftmost, Rightmost and Centermost
Leftmost assignment mirrors binary counting. The order runs 00000000, 10000000, 01000000, 11000000, 00100000, 10100000, 01100000, 11100000, 00010000, and so on, so the first bit to vary is the leftmost one.
Rightmost assignment is plain binary counting from the right. The order runs 00000000, 00000001, 00000010, 00000011, 00000100, 00000101, 00000110, 00000111, 00001000, and so on.
Centermost assignment, used for a part between the first and the last, starts in the middle. The first round is to select only the middle bit, picking the bit following the centre when there is an even number of bits. All combinations using the selected bits that have not yet been created are then created. A new round begins by adding one more bit to the set, adding the preceding bit in even rounds and the subsequent bit in odd rounds, and the process repeats until there are no more bits to consider. For an eight-bit part the order runs 00000000, 00001000, 00010000, 00011000, 00000100, 00001100, 00010100, 00011100, 00100000, and so on.
There are three orders. The first part is filled from the left, the last part from the right, and the parts in between start in the middle and spread outwards one bit at a time, alternating between the bit above and the bit below the middle.
leftmost: 00000000, 10000000, 01000000, 11000000, 00100000, ...
rightmost: 00000000, 00000001, 00000010, 00000011, 00000100, ...
centermost: 00000000, 00001000, 00010000, 00011000,
00000100, 00001100, 00010100, 00011100, 00100000, ...§4A Worked Example
The example starts with a provider that has been assigned the 3ffe:0b00/24 prefix and wants to assign prefixes to its connected networks. It anticipates in the foreseeable future a maximum of 256 customers consuming 8 bits. One of those customers, named C2, anticipates a maximum of 1024 customer assignments under it, consuming 10 other bits.
P1 assigns address space to its customers using leftmost bits, so C1 is assigned 10000000, C2 is assigned 01000000 and C3 is assigned 11000000. C2 then assigns address space to its own customers, C2C1, C2C2 and so on, using centermost bits, so C2C1 is assigned 0000010000, C2C2 is assigned 0000100000 and C2C3 is assigned 0000110000. Customers of C2 can use centermost bits for maximum flexibility, and the last aggregators, which should be a network in a site, are assigned using rightmost bits.
Putting all the bits together for C2C3 gives 00111111 11111110 00001011 01000000 00001100 00, where the two rightmost groups are the growing bits. By using this method P1 is able to expand the number of customers, and the customers are able to modify their first assumptions about the size of their own customers, until the reserved bits are assigned.
The worked example shows a provider handing out 8 bits to its customers from the left, one of those customers handing out 10 bits to its own customers from the middle, and the site at the end using bits from the right. Each level can grow until the bits reserved for growth run out.
§5Security Considerations
The document has one sentence on the subject: address assignment does not seem to have any specific security consideration.
That is the whole of the section. Nothing else in the RFC treats security, and the document says nothing about the trust relationships between the parties that assign and use the addresses.
The document says that address assignment raises no security question of its own, and nothing further.