Hi

  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 ?




{
    "command": "subnet6-add",
    "arguments": {
        "subnet6": [ {
            "subnet": "2001:db8:1::/64",
            ...
        } ]
    }
}

Notes

It is recommended, but not mandatory, to specify the subnet ID. If not 
specified, Kea will try to assign the next subnet-id value.

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.

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.

-- 
ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.

To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.

Kea-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to