[Kea-users] Custom option 191 - string
chris at slater-walker.net
chris at slater-walker.net
Wed Nov 27 12:37:40 UTC 2019
Thanks, I've sorted it out.
First of all you need an option-def entry in the config to make the option "available for use" if that makes sense:
"Dhcp4": {
"option-def": [
{
"name": "AP-option",
"code": 191,
"type": "string",
"space": "dhcp4",
"array": false,
"encapsulate": ""
}
],.....
Then within the subnet section you use the option:
"subnet4": [
{
"subnet": "192.168.*.*/24",
"pools": [
{
"pool": "192.168.*.* - 192.168.*.*"
}
],
"option-data": [
{
"name": "AP-option",
"data": "pool1=192.168.x.y;level=1"
},
On Wed, Nov 27, 2019 at 11:24, Brian Candler wrote:
On 27/11/2019 10:09, chris at slater-walker.net (mailto:chris at slater-walker.net) wrote:
That's it; I need to give this to DHCP clients as a simple ascii text string but I can't find a piece of documentation which tells me how to do this. My attempts at configuring it always end up with an error.
What kind of error - does KEA itself report an error? If so, what does the error message actually say?
Or does KEA accept it, but your client device doesn't receive the attribute, or not in the format it expects? In that case, what does tcpdump show?
This is what I currently have:
"subnet4": [
{
"subnet": "192.168.2.0/24",
"option-data": [
{
"name": "AP-option",
"code": 191,
"data": "pool1=192.168.2.249;level=1"
}
],...
}
https://kea.readthedocs.io/en/v1_6_0/arm/dhcp4-srv.html#custom-dhcpv4-options (https://kea.readthedocs.io/en/v1_6_0/arm/dhcp4-srv.html#custom-dhcpv4-options)
Try:
"Dhcp4": { "option-def": [ { "name": "AP-option", "code": 191, "type": "string", "array": false, "space": "dhcp4", }, ...
Then under the subnet:
"option-data": [ { "name": "AP-option", "code": 191, "space": "dhcp4", "data": "pool1=192.168.2.249;level=1" }, ... (Aside: I don't know why the code and space are duplicated in option-data, even though they've already been defined in option-def, but that's what the examples show)
HTH,
Brian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20191127/69181ddd/attachment.htm>
More information about the Kea-users
mailing list