<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Hi </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted3">
  I am using  subnet6-add command from subnet6 hook library  for adding subnets . And i am not  assigning  subnet id and let the system maintain auto generated value based on the notes below . it works well until we restart the service , on restart subnet-id
 gets reset and starts from 1 again which fails due to duplicate ID . i am using version 2.1.6.  can you shed some light ?</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted3">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<pre style="box-sizing:border-box;font-family:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace;font-size:12px;line-height:1.4;margin:0px;padding:12px;display:block;overflow:auto;color:rgb(64, 64, 64)" class="ContentPasted0 elementToProof"><span class="p ContentPasted0" style="box-sizing:border-box">{</span>
    <span class="s2 ContentPasted0" style="box-sizing:border-box;color:rgb(186, 33, 33)">"command"</span><span class="p ContentPasted0" style="box-sizing:border-box">:</span> <span class="s2 ContentPasted0" style="box-sizing:border-box;color:rgb(186, 33, 33)">"subnet6-add"</span><span class="p ContentPasted0" style="box-sizing:border-box">,</span>
    <span class="s2 ContentPasted0" style="box-sizing:border-box;color:rgb(186, 33, 33)">"arguments"</span><span class="p ContentPasted0" style="box-sizing:border-box">:</span> <span class="p ContentPasted0" style="box-sizing:border-box">{</span>
        <span class="s2 ContentPasted0" style="box-sizing:border-box;color:rgb(186, 33, 33)">"subnet6"</span><span class="p ContentPasted0" style="box-sizing:border-box">:</span> <span class="p ContentPasted0" style="box-sizing:border-box">[</span> <span class="p ContentPasted0" style="box-sizing:border-box">{</span>
            <span class="s2 ContentPasted0" style="box-sizing:border-box;color:rgb(186, 33, 33)">"subnet"</span><span class="p ContentPasted0" style="box-sizing:border-box">:</span> <span class="s2 ContentPasted0" style="box-sizing:border-box;color:rgb(186, 33, 33)">"2001:db8:1::/64"</span><span class="p ContentPasted0" style="box-sizing:border-box">,</span>
            <span class="o ContentPasted0" style="box-sizing:border-box;color:rgb(102, 102, 102)">...</span>
        <span class="p ContentPasted0" style="box-sizing:border-box">}</span> <span class="p ContentPasted0" style="box-sizing:border-box">]</span>
    <span class="p ContentPasted0" style="box-sizing:border-box">}</span>
<span class="p ContentPasted0" style="box-sizing:border-box">}</span></pre>
Notes</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<pre style="box-sizing:border-box;font-family:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", Courier, monospace;font-size:12px;line-height:1.4;margin:0px;padding:12px;display:block;overflow:auto;color:rgb(64, 64, 64)" class="ContentPasted1 elementToProof"><p style="box-sizing:border-box;line-height:24px;margin:0px 0px 24px;font-size:16px;font-family:Lato, proxima-nova, "Helvetica Neue", Arial, sans-serif;background-color:rgb(252, 252, 252)" class="ContentPasted2 elementToProof">It is recommended, but not mandatory, to specify the subnet ID. If not specified, Kea will try to assign the next subnet-id value. </p><p style="box-sizing:border-box;line-height:24px;margin:0px 0px 24px;font-size:16px;font-family:Lato, proxima-nova, "Helvetica Neue", Arial, sans-serif;background-color:rgb(252, 252, 252)" class="ContentPasted2 elementToProof">This automatic ID value generator is simple; it returns a previously automatically assigned value, increased by 1. This works well, unless a subnet is manually created with a value bigger than one previously used. For example, if subnet4-add is called five times, each without an ID, Kea will assign IDs 1, 2, 3, 4, and 5 and it will work just fine. However, if subnet4-add is called five times, with the first subnet having the subnet-id of value 3 and the remaining ones having no subnet-id, the operation will fail. The first command (with the explicit value) will use subnet-id 3; the second command will create a subnet with id of 1; the third will use a value of 2; and finally the fourth will have the subnet-id value auto-generated as 3. However, since there is already a subnet with that ID, the process will fail.</p><p style="box-sizing:border-box;line-height:24px;margin:0px 0px 24px;font-size:16px;font-family:Lato, proxima-nova, "Helvetica Neue", Arial, sans-serif;background-color:rgb(252, 252, 252)" class="ContentPasted2">The general recommendation is either never use explicit values, so the auto-generated values will always work; or always use explicit values, so the auto-generation is never used. The two approaches can be mixed only if the administrator understands how internal automatic subnet-id generation works in Kea.</p><br></pre>
</div>
</body>
</html>