[Kea-users] DHCPv6 allocations (IA_NA and IA_PD) based on interface-id (relay Option 18) [update: solution provided]

Tomek Mrugalski tomasz at isc.org
Mon Apr 3 14:29:29 UTC 2017


W dniu 31.03.2017 o 19:21, Joelson Vendramin pisze:
> Just to update you that I found a (possible) solution for the
> configuration I posted yesterday. Maybe it's not the "best" or most
> "elegant" solution, but it worked as I expected. Basically I'm using
> "/128 IPv6 subnets" and the "interface-id" parameter to read option
> 18 inserted by relay.
> 
> The DHCPv6 piece of kea.conf is in the sequence.
Thanks for sharing. Yes, this should work. However, there will be a
performance degradation if you scale this up to many thousands or more.

I'm working on a solution to this problem. It's called Flexible
identifier. With this approach, you can define an expression, e.g.
"relay6[*].option[18].hex" which will take option 18 (interface
identifier) from the relay encapsulation and will use its content as
value. That value could then be used for host reservation selection.

So you could do the following:

// First you defined what your flexible identifier is.
// This is done only once in your config.
"identifier-expression": "relay6[*].option[18].hex",


// and then for each of your devices, you'd add a host reservation
// entry simialr to the following
"reservations": [
    {
        "flex-id": "'routername eth 0/6:333'",
        "ip-addresses": [ "2001:db8:bd00::119:2" ],
        "prefixes": [ "2001:db8:bd01::/48" ]
    },
    // more reservations here
]

This should perform better and probably is easier to manage.

In the next couple days it will also be possible to store this
information in MySQL and/or PostgreSQL, so it would scale well even if
you had millions of entries.

Tomek



More information about the Kea-users mailing list