[Kea-users] Set domain-search option for dhcp4

Olivier Clavel olivier.clavel at gmail.com
Tue Feb 21 07:09:26 UTC 2017


In case someone comes other this thread with the same problem...

After reading the RFC (https://tools.ietf.org/search/rfc3397) and
struggling a bit, here is how to work around the problem until the future
enhancement is developed (see ticket below). Please read the rfc if you
need more than one domain. Example below for a single one.

1 - convert string to hex (conversion tool here:
http://www.swingnote.com/tools/texttohex.php)

e  x  a  m  p  l  e  .  c  o  m
65 78 61 6d 70 6c 65 2e 63 6f 6d

2 - drop the dots, prepend each element with number of chars and finish
with null
7) e  x  a  m  p  l  e  3) c  o  m  (null)
07 65 78 61 6d 70 6c 65 03 63 6f 6d 00

3- copy result to config file
"option-data" : [{
    "name": "domain-search",
    "data": "076578616d706c6503636f6d00",
    "csv-format": false
}]


On Mon, 20 Feb 2017 at 18:42 James Sumners <JamesSumners at clayton.edu> wrote:

> I can tell you that it *does* have to be in encoded binary format —
> http://kea.isc.org/ticket/5087
>
>
>
>
> On February 20, 2017 at 12:32:33 PM, Olivier Clavel (
> olivier.clavel at gmail.com) wrote:
>
> Hello everyone.
>
> Sorry to come here with a question that seems so basic. Unfortunately, I
> can't find the way to set the domain-search option correctly sent back to
> the dhcp4 client. This is what I've tried so far with the result.
>
> 1)
> "option-data": [ {"name": "domain-search", "data": "clavel.loc"} ]
>
> Kea refuses to start with following errors.
>
> 2017-02-18 15:25:53.899 ERROR [kea-dhcp4.dhcp4/3379] DHCP4_PARSER_FAIL
> failed to create or run parser for configuration element subnet4: option
> data does not match option definition (space: dhcp4, code: 119): unable to
> cast clavel.loc to binary data type: attempt to decode a value not in
> base16 char set (/etc/kea/kea-dhcp4.conf:337:51)
> 2017-02-18 15:25:53.899 ERROR [kea-dhcp4.dhcp4/3379]
> DHCP4_CONFIG_LOAD_FAIL configuration error using file:
> /etc/kea/kea-dhcp4.conf, reason: option data does not match option
> definition (space: dhcp4, code: 119): unable to cast clavel.loc to binary
> data type: attempt to decode a value not in base16 char set
> (/etc/kea/kea-dhcp4.conf:337:51)
> 2017-02-18 15:25:53.900 ERROR [kea-dhcp4.dhcp4/3379] DHCP4_INIT_FAIL
> failed to initialize Kea server: configuration error using file
> '/etc/kea/kea-dhcp4.conf': option data does not match option definition
> (space: dhcp4, code: 119): unable to cast clavel.loc to binary data type:
> attempt to decode a value not in base16 char set
> (/etc/kea/kea-dhcp4.conf:337:51)
>
>
> 2)
> "option-data": [ {"name": "domain-search", "data": "636C6176656C2E6C6F63"}
> ]
> "option-data": [ {"name": "domain-search", "data":
> "636C6176656C2E6C6F63"}, "csv-format": false ]
>
> In both cases, the server starts correctly but then the following error
> appears in dhcp client:
>
> Invalid domain list.
> suspect value in domain_search option - discarded
>
>
> Is there some part of the doc I missed ? Thanks in advance for your
> answers.
>
> _______________________________________________
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20170221/ac3dd3ab/attachment.htm>


More information about the Kea-users mailing list