draft-ietf-ipv6-ipaddressassign-04.txt   draft-ietf-ipv6-ipaddressassign-05.txt 
Internet M. Blanchet Internet M. Blanchet
Internet-Draft Viagenie inc. Internet-Draft Viagenie inc.
Expires: January 30, 2003 August 2002 Expires: May 19, 2003 November 18, 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-04 draft-ietf-ipv6-ipaddressassign-05
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 January 30, 2003. This Internet-Draft will expire on May 19, 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
address plan for its customers, this method enables the organisation address plan for its customers, this method enables the organisation
to postpone the final decision on the number of bits to partition in 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 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 the borders of the partition to be free as long as possible. This
scheme is applicable to any bits addressing scheme using bits with scheme is applicable to any bits addressing scheme using bits with
partitions in the space, but its first intended use is for IPv6. It partitions in the space, but its first intended use is for IPv6. It
is a generalization of RFC1219 and can be used for IPv6 assignments. is a generalization of RFC1219 [1] and can be used for IPv6
assignments.
Table of Contents Table of Contents
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
skipping to change at page 7, line 48 skipping to change at page 7, line 48
last; last;
} }
else { else {
return 0 if ($i == $nbits-1); return 0 if ($i == $nbits-1);
$Abits[$w] = 0; $Abits[$w] = 0;
} }
} }
$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';
skipping to change at page 8, line 30 skipping to change at page 8, line 31
7. Acknowledgements 7. 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 References
[1] Tsuchiya, P., "On the assignment of subnet numbers", RFC 1219, [1] Tsuchiya, P., "On the assignment of subnet numbers", RFC 1219,
April 1991. April 1991.
[2] Bradner, S., "The Internet Standards Process -- Revision 3", BCP
9, RFC 2026, October 1996.
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/