<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Cambria;
panose-1:2 4 5 3 5 4 6 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.apple-style-span
{mso-style-name:apple-style-span;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>Ok, here we go regarding the scenarios:<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>Scenario 1: <o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>Home network with Internet router without DHCP server.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> /--------\<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> |Internet| PD:2001:1111:2222:3300/56<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> \--------/<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> |<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> |2001:1111:2222:3300:4444:5555:6666:7777/64<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> +-----+ +-----+<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> | IR | |DHCP |<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> +-----+ +-----+<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> |2001:1111:2222:3301:aaaa:bbbb:cccc:dddd/64 |eth0<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> | |<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> | 2001:1111:2222:3301:1234:5678:9abc:def0/64|<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> | |<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> -----+--------------+-------+-------------+----------+------<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> | |<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> +-------+ +-------+<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> |Server1| |Server2|<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New";color:#1F497D'> +-------+ +-------+<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>In this scenario the internet router (IR) has a DHCP client to get a prefix delegation from the ISP. However it has no DHCP server or th eDHCP server is limitted to prefix delegation (PD) which is not used in this use case. Mostly DHCP will probably be used in IPv6 for the reason of DDNS updates thus the scenario shows 3 Servers. One server is the DHCP server which is of course not limited to this functionality and two other servers (Server 1&2).<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>The scenario starts with the ISP delegating a 56 bit prefix (2001:1111:2222:3300/56) to us (the IR) which generates two subnets 0(external) & 1(internal) and configures an external address (2001:1111:2222:3300:4444:5555:6666:7777/64 (:3300:==subnet 0)) and an internal address (2001:1111:2222:3301:aaaa:bbbb:cccc:dddd/64 (:3301:==subnet 1)).<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>Since IR has no DHCP the server running the DHCP server has to configure the IPv6 address of its eth0 interface via the stateless autoconfiguration. Let's say it gets address 2001:1111:2222:3301:1234:5678:9abc:def0/64.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>Let's take the example from my previous post of the DHCP server config:<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>******************************<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>prefix6 home-net {<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'> interface eth0<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'> allow fe80::/16<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'> prefer 2001::/16<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'> allow-delegation /56<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>}<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>subnet6 {home-net}/64 {…<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>*****************************<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>This will direct the DHCP server to monitor eth0 for prefix changes (f.ex via rtnetlink on Linux). At the time of the internet connection the server gets it address auto-configured as stated above which sets the deprecated bit on any previously auto-configured address. These deprecated addresses are to be ignored by the DHCP server at least as long as a non-deprecated exists. The DHCP server will get its notification of the change and scan the interface for ipv6 addresses. All addresses are loaded into an internal structure having a "new" and a "deprecated" flag. Prior to the loading all existing addresses in the structure get its "new" flag cleared. During the scan any address already present in the structure gets it's deprecated flag set according to what it is on the interface. Any new address gets added to the structure with the "new" flag ("new" flag only to be set if the deprecated flag is not already set which could be the case in the initial scan at startup). Any existing address where the deprecated flag is 0 on the interface and is 1 in the structure will get its "new" flag set as well. Addresses in the structure no longer on the interface will be removed from the structure.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>Now that the structure is updated the DHCP server will go through the new prefix selection process:<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'> 1. If the current prefix is still present and not deprecated keep it and exit the selection process (this behavior may be changed by the "dynamic-reconfig" option.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'> 2. Scan the addresses for the best match in the following order:<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'> a- All "new" addresses matching "prefer" mask (2001::/16 in the example above) by priority<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'> b- All non-deprecated addresses matching "prefer" mask by priority<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'> c- All "new" addresses matching "allow" mask (fe80::/16 in the example above) by priority<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'> d- All non-deprecated addresses matching "allow" mask (fe80::/16 in the example above) by priority<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'> 3. If the selection process of 2 did not find any address keep using the current prefix if it is still present (deprecated) on the interface. However in this state most probably best practice would be just to renew existing leases not to lease any new lease.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'> 4. If the current prefix is not present (or there is none (=startup)) DHCP server components using this named prefix should be disabled. However even in this case if a prefix was previously active (not startup) one may want to keep existing leases to be renewed.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>Notes: Additional options may be introduced to steer the behavior of pointe 3 & 4.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>In our scenario the scan will come across address 2001:1111:2222:3301:1234:5678:9abc:def0/64 which will be discovered in step 2a. Prior to the internet connection being up, step 2b will find the link-local address (fe80:..). The definition above will extract the 64 bit prefix 2001:1111:2222:3301::/64 and pass it to {home-net} references. Any subnet6 definition using {home-net} needs to reconfigure to the new prefix as if the config file would contain "subnet6 2001:1111:2222:3301::/64".<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>From this point on any of the other servers will receive addresses from this subnet, and any previous leases will be invalidated.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>So far for the first scenario. In the next scenario I will introduce additional networks and thus prefix delegation.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Cambria","serif";color:#1F497D'>Gaston</span><span style='font-family:"Cambria","serif"'><o:p></o:p></span></p></div></body></html>