draft-ietf-ipv6-ipaddressassign-03.txt   draft-ietf-ipv6-ipaddressassign-04.txt 
Internet M. Blanchet Internet M. Blanchet
Internet-Draft Viagenie inc. Internet-Draft Viagenie inc.
Expires: February 28, 2003 August 30, 2002 Expires: January 30, 2003 August 2002
A flexible method for managing the assignment of bits of an IPv6 A Flexible Method for Managing the Assignment of Bits of an IPv6
address block Address Block
draft-ietf-ipv6-ipaddressassign-03 draft-ietf-ipv6-ipaddressassign-04
Status of this Memo Status of this Memo
This document is an Internet-Draft and is in full conformance with This document is an Internet-Draft and is in full conformance with
all provisions of Section 10 of RFC2026. all provisions of Section 10 of RFC2026.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet- other groups may also distribute working documents as Internet-
Drafts. Drafts.
skipping to change at page 1, line 32 skipping to change at page 1, line 32
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
The list of current Internet-Drafts can be accessed at http:// The list of current Internet-Drafts can be accessed at http://
www.ietf.org/ietf/1id-abstracts.txt. www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on February 28, 2003. This Internet-Draft will expire on January 30, 2003.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2002). All Rights Reserved. Copyright (C) The Internet Society (2002). All Rights Reserved.
Abstract Abstract
This document proposes a method to manage the assignment of bits of 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 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 an address plan for its subnets or when an ISP needs to make an
skipping to change at page 2, line 16 skipping to change at page 2, line 16
1. Rationale . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Rationale . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2. Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3. Description of the Algorithm . . . . . . . . . . . . . . . . . 4 3. Description of the Algorithm . . . . . . . . . . . . . . . . . 4
3.1 Leftmost . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.1 Leftmost . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.2 Rightmost . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3.2 Rightmost . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.3 Centermost . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.3 Centermost . . . . . . . . . . . . . . . . . . . . . . . . . . 5
4. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4. Example . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
5. Implementation . . . . . . . . . . . . . . . . . . . . . . . . 6 5. Implementation . . . . . . . . . . . . . . . . . . . . . . . . 6
6. Security Considerations . . . . . . . . . . . . . . . . . . . 8 6. Security Considerations . . . . . . . . . . . . . . . . . . . 8
7. References . . . . . . . . . . . . . . . . . . . . . . . . . . 8 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 8
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 8 References . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Author's Address . . . . . . . . . . . . . . . . . . . . . . . 8 Author's Address . . . . . . . . . . . . . . . . . . . . . . . 8
Full Copyright Statement . . . . . . . . . . . . . . . . . . . 9 Full Copyright Statement . . . . . . . . . . . . . . . . . . . 9
1. Rationale 1. Rationale
IPv6 addresses have a flexible structure for address assignments. It IPv6 addresses have a flexible structure for address assignments.
enables registries, internet service providers, network designers and This enables registries, internet service providers, network
others to assign address ranges to organizations and networks based designers and others to assign address ranges to organizations and
on different criteria, like size of networks, estimated growth rate, networks based on different criteria, like size of networks,
etc. Often, the initial assignment doesn't scale well because a estimated growth rate, etc. Often, the initial assignment doesn't
small network becomes larger than expected, needing more addresses. scale well because a small network becomes larger than expected,
But then, the assignment authority cannot allocate contiguous needing more addresses. But then, the assignment authority cannot
addresses because they were already assigned to another network. allocate contiguous addresses because they were already assigned to
another network.
RFC1219 describes an allocation scheme for IPv4 where address space RFC1219 [1] describes an allocation scheme for IPv4 where address
is kept unallocated between the leftmost bits of the subnet part and space is kept unallocated between the leftmost bits of the subnet
the rightmost bits of the host part of the address. This enables the part and the rightmost bits of the host part of the address. This
network designer to change the subnet mask without renumbering, for enables the network designer to change the subnet mask without
the central bits that were not allocated. renumbering, for the central bits not allocated.
This work generalizes the previous scheme by extending the algorithm 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 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, by any assignment authority level (registries, ISPs of any level,
organizations, ...). It can be used for both IPv4 and IPv6. organizations, ...). It can be used for both IPv4 and IPv6.
This document does not provide any recommendation to registries on This document does not provide any recommendation to registries on
how to assign address ranges to their customers. how to assign address ranges to their customers.
2. Scheme 2. Scheme
skipping to change at page 6, line 43 skipping to change at page 6, line 43
5. Implementation 5. Implementation
The following Perl code was written by Jocelyn Picard The following Perl code was written by Jocelyn Picard
(Jocelyn.Picard@viagenie.qc.ca) and implements this draft. This code (Jocelyn.Picard@viagenie.qc.ca) and implements this draft. This code
is free and without any warranty. is free and without any warranty.
#!/sur/bin/perl -w #!/sur/bin/perl -w
use strict; use strict;
#=============================================================================== #=========================================================
# allocation(Last Prefix,Number of bits,Method) # allocation(Last Prefix,Number of bits,Method)
# #
# Last Prefix = last prefix allocated, ex: 3ffe:b00::/48 # Last Prefix = last prefix allocated, ex: 3ffe:b00::/48
# Number of bits = range we want to allocate # Number of bits = range we want to allocate
# Method = method to use: l,c or r (left,center,right) # Method = method to use: l,c or r (left,center,right)
# #
# Returns next prefix using selected method # Returns next prefix using selected method
# #
# Note: no validation is made # Note: no validation is made
# #
#--------------------------------------------------------------------- #-------------------------------------------------------
sub allocation { sub allocation {
my ($ip,$pl)=split('/',shift); my ($ip,$pl)=split('/',shift);
my ($nbits,$method) = @_ ; my ($nbits,$method) = @_ ;
my ($w,@Abits,$abits); my ($w,@Abits,$abits);
my $i = $ip =~ s/:/:/g; my $i = $ip =~ s/:/:/g;
my $repl= ':0' x (9 - $i); my $repl= ':0' x (9 - $i);
$ip =~ s/::/$repl/; $ip =~ s/::/$repl/;
$ip =~ s/^:/0:/; $ip =~ s/^:/0:/;
skipping to change at page 8, line 6 skipping to change at page 8, line 6
} }
$abits = join("",@Abits); $abits = join("",@Abits);
$ip = ""; $ip = "";
for($i=0;$i<8;$i++) { for($i=0;$i<8;$i++) {
$ip .= sprintf("%lx", unpack("n", pack("B16", substr($abits, $i * 16,16)))) . ":"; $ip .= sprintf("%lx", unpack("n", pack("B16", substr($abits, $i * 16,16)))) . ":";
} }
chop $ip; chop $ip;
$ip =~ s/(:0){2,}$/::/; $ip =~ s/(:0){2,}$/::/;
return($ip . "/$pl"); return($ip . "/$pl");
} }
#=============================================================================== #===============================================================
# #
#Usage example: allocation of 100 /48 using "centermost" method #Usage example: allocation of 100 /48 using "centermost" method
# #
my $Prefix = '3ffe:b00::/48'; my $Prefix = '3ffe:b00::/48';
for(my $i=0;$i<100;$i++) { for(my $i=0;$i<100;$i++) {
print $Prefix = allocation($Prefix,16,'c'),"\n"; print $Prefix = allocation($Prefix,16,'c'),"\n";
} }
6. Security Considerations 6. Security Considerations
Address assignment doesn't seem to have any specific security Address assignment doesn't seem to have any specific security
consideration. consideration.
7. References 7. Acknowledgements
RFC1219 On the assignment of subnet numbers. P.F. Tsuchiya. Apr-01-1991.
8. Acknowledgements
Thanks to Steve Deering, Bob Hinden, Thomas Narten, Erik Nordmark, Thanks to Steve Deering, Bob Hinden, Thomas Narten, Erik Nordmark,
Florent Parent and Jocelyn Picard for their very useful comments on Florent Parent and Jocelyn Picard for their very useful comments on
this work. this work.
References
[1] Tsuchiya, P., "On the assignment of subnet numbers", RFC 1219,
April 1991.
Author's Address Author's Address
Marc Blanchet Marc Blanchet
Viagenie inc. Viagenie inc.
2875 boul. Laurier, bureau 300 2875 boul. Laurier, bureau 300
Sainte-Foy, QC G1V 2M2 Sainte-Foy, QC G1V 2M2
Canada Canada
Phone: +1 418 656 9254 Phone: +1 418 656 9254
 End of changes. 

This html diff was produced by rfcdiff 1.23, available from http://www.levkowetz.com/ietf/tools/rfcdiff/