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

Joelson Vendramin jtvendramin at yahoo.com.br
Mon Apr 3 16:49:26 UTC 2017


Hi Tomek,

Thank you for your reply!

For an ISP, instead of reserving addresses based on MAC addresses (IPv4) or DUID (IPv6), it's much better to have a common identifier. Option 82 for IPv4 and Option 18 for IPv6 are, in my case, the "Rosetta Stone" to both address families when deploying a dual stack scenario.


Please let me know when you have this "flex-id" implemented!


Great job!

Regards,

--
Joelson Vendramin


________________________________
De: Tomek Mrugalski <tomasz at isc.org>
Para: kea-users at lists.isc.org 
Enviadas: Segunda-feira, 3 de Abril de 2017 11:29
Assunto: Re: [Kea-users] DHCPv6 allocations (IA_NA and IA_PD) based on interface-id (relay Option 18) [update: solution provided]



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
_______________________________________________
Kea-users mailing list
Kea-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users



More information about the Kea-users mailing list