[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
Fri Mar 31 17:21:18 UTC 2017
Hello all,
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.
Regards,
--
Joelson Vendramin
==================
kea.conf
==================
# DHCPv6 configuration starts here.
"Dhcp6":
{
# Add names of interfaces to listen on.
"interfaces-config": {
"interfaces": [ "eth0/2001:db8:bdff::2" ]
},
# (...) standard options (...)
# subnets (one for each "interface id")
"subnet6": [
# client that comes from vlan 333
{ "subnet": "2001:db8:bd00::119:2/128",
"interface-id": "routername eth 0/6:333",
"pools": [ { "pool": "2001:db8:bd00::119:2/128" } ],
"pd-pools": [ { "prefix": "2001:db8:bd01::", "prefix-len": 48, "delegated-len": 48 } ]
},
# client that comes from vlan 334
{ "subnet": "2001:db8:bd00::119:3/128",
"interface-id": "routername eth 0/6:334",
"pools": [ { "pool": "2001:db8:bd00::119:3/128" } ],
"pd-pools": [ { "prefix": "2001:db8:bd02::", "prefix-len": 48, "delegated-len": 48 } ]
}
]
}
# (...) rest of config file (...)
________________________________
De: Joelson Vendramin <jtvendramin at yahoo.com.br>
Para: "kea-users at lists.isc.org" <kea-users at lists.isc.org>
Enviadas: Quinta-feira, 30 de Março de 2017 16:33
Assunto: DHCPv6 allocations (IA_NA and IA_PD) based on interface-id (relay Option 18)
Hello,
I'm trying to use KEA 1.1.0 to allocate IPv6 addresses (IA_NA) and IPv6 prefixes (IA_PD) based on interface-id -- option 18 inserted by an DHCPv6 relay agent.
I know it's a kind of "reservation", but I'm trying to do it based on DHCPv6 relay option 18 (interface-id) rather than client's DUID or MAC address.
I tryied the following config but it failed to start the server. The problem is that "client-class" is an unsupported parameter inside a "pd-pool" entry. Note that if I remove "pd-pools", the configuration is working fine to allocate fixed IA_NA addresses ("pools" entry).
Any trick to add the same behavior to "pd-pools" in order to assign always the same IA_PD to "cliA" and "cliB" client-classes?
Thank you in advance!
--
Joelson Vendramin
==================
kea.conf
==================
# DHCPv6 configuration starts here.
"Dhcp6":
{
# Add names of interfaces to listen on.
"interfaces-config": {
"interfaces": [ "eth0/2001:db8:bdff::2" ]
},
# (...) standard options (...)
# classes to identify customers
"client-classes": [
{ "name": "cliA",
"test": "substring(relay6[0].option[18].hex,0,all) == 'routername eth 0/6:333'"
},
{ "name": "cliB",
"test": "substring(relay6[0].option[18].hex,0,all) == 'routername eth 0/6:334'"
}
],
# subnets (just one with many pools and pd-pools inside)
"subnet6": [
{ "subnet": "2001:db8:bd00::/64",
"pools": [
{ "pool": "2001:db8:bd00::119:2/128",
"client-class": "cliA"
},
{ "pool": "2001:db8:bd00::119:3/128",
"client-class": "cliB"
}
],
"pd-pools": [
{ "prefix": "2001:db8:bd01::",
"prefix-len": 48,
"delegated-len": 48,
"client-class": "cliA"
},
{ "prefix": "2001:db8:bd02::",
"prefix-len": 48,
"delegated-len": 48,
"client-class": "cliB"
}
],
}
]
}
# (...) rest of config file (...)
More information about the Kea-users
mailing list