[Kea-users] KEA Option 17 structure (example)

Darren Ankney darren.ankney at gmail.com
Thu Mar 14 13:18:01 UTC 2024


Hi Marek,

Using Kea 2.4.0 with the attached configuration in my test lab with
perfdhcp (two virtual servers ... one for Kea and one for perfdhcp):

`perfdhcp -6 -r 1 -p 10 -l ens256 -R 1`

resulted in the attached .pcap file which shows both option 17
versions being attached to the packet.  I used "always-send": true to
avoid the need to hand modify the ORO in perfdhcp.  If your client is
requesting option 17, you may not need that in the configuration.

Thank you,
Darren Ankney

On Wed, Mar 13, 2024 at 4:17 PM Marek Hajduczenia
<mxhajduczenia at gmail.com> wrote:
>
> Thanks, Darren
>
> The config snippet you shared matches my config pretty closely and it does result in a single Option 17 instance with vendor ID 16666 only. If I change the order of vendor ID options, I will get 14810 only, and no trace 16666. I wonder whether the support for multiple Option 17 / multiple sub-options per Option 17 instance is there. If it is not, do I just log it as a bug / feature request with the Kea development team?
>
> Regards
>
> Marek
>
> -----Original Message-----
> From: Kea-users <kea-users-bounces at lists.isc.org> On Behalf Of Darren Ankney
> Sent: Wednesday, March 13, 2024 3:39 AM
> To: Kea user's list <kea-users at lists.isc.org>
> Subject: Re: [Kea-users] KEA Option 17 structure (example)
>
> Hello,
>
> I don't think you need to encapsulate the vendor options ... I believe Kea knows to do that in this case.  An example is shown at the ARM link I posted previously.  Something like the below might work.  You may want to send some other value for the second option while testing as it might be confusing in the packet capture.
>
> {
>   "Dhcp6": {
>     "option-def": [
>       {
>         "name": "worldbox_adb_bmc",
>         "code": 1,
>         "type": "string",
>         "space": "vendor-14810",
>         "encapsulate": ""
>       },
>       {
>         "name": "vendor-16666-test",
>         "code": 111,
>         "type": "string",
>         "space": "vendor-16666",
>         "encapsulate": ""
>       }
>     ],
>     "option-data": [
>       {
>         "name": "worldbox_adb_bmc",
>         "space": "vendor-14810",
>         "data": "'tmpwh2.cvs.adbglobal.com'",
>         "always-send": true
>       },
>       {
>         "name": "vendor-16666-test",
>         "space": "vendor-16666",
>         "data": "'tmpwh2.cvs.adbglobal.com'",
>         "always-send": true
>       },
>       {
>         "name": "vendor-opts",
>         "data": "14810"
>       },
>       {
>         "name": "vendor-opts",
>         "data": "16666"
>       }
>     ]
>   }
> }
>
> Thank you,
> Darren Ankney
>
> On Sat, Mar 9, 2024 at 11:24 PM <mxhajduczenia at gmail.com> wrote:
> >
> > Thanks, again 😊
> >
> >
> >
> > Drilling a bit on the multiple entries in Option 17, I created two entries, one for vendor 14810 and one for vendor 16666. I was hoping for two Option 17 instances to be added *or* one instance with two vendor-specific entries. A single entry is added and just for vendor 16666, i.e., the latter one in the option stack is created. Is that the expected behavior?
> >
> >
> >
> >                 "option-data": [
> >
> >                                 {
> >
> >                                         "name": "dns-servers",
> >
> >                                         "data": "2001:db8:2::dead:beef, 2001:db8:2::cafe:babe"
> >
> >                                 }, {
> >
> >                                         "space": "vendor-14810",
> >
> >                                         "name": "bmc",
> >
> >                                         "data":
> > "tmpwh2.cvs.adbglobal.com",
> >
> >                                         "always-send": true
> >
> >                                 }, {
> >
> >                                         "name": "vendor-opts",
> >
> >                                         "data": "14810"
> >
> >                                 }, {
> >
> >                                         "space": "vendor-16666",
> >
> >                                         "name": "test",
> >
> >                                         "data":
> > "tmpwh2.cvs.adbglobal.com",
> >
> >                                         "always-send": true
> >
> >                                 }, {
> >
> >                                         "name": "vendor-opts",
> >
> >                                         "data": "16666"
> >
> >                                 //}, {
> >
> >                                 //        "name": "ntp",
> >
> >                                 //        "csv-format": true,
> >
> >                                 //        "data": "2001:db8:2::dead:beef, 2001:db8:2::cafe:babe"
> >
> >                                 } ]
> >
> >                 } ],
> >
> >
> >
> >                 "option-def":
> >
> >                 [ {
> >
> >                         "name": "bmc",
> >
> >                         "code": 1,
> >
> >                         "space": "vendor-14810",
> >
> >                         "type": "string",
> >
> >                         "array": false,
> >
> >                         "encapsulate": ""
> >
> >                 }, {
> >
> >                         "name": "vendor-14810-bmc",
> >
> >                         "code": 14810,
> >
> >                         "type": "empty",
> >
> >                         "space": "dhcp6",
> >
> >                         "record-types": "",
> >
> >                         "encapsulate": "vendor-14810"
> >
> >                 }, {
> >
> >                         "name": "test",
> >
> >                         "code": 111,
> >
> >                         "space": "vendor-16666",
> >
> >                         "type": "string",
> >
> >                         "array": false,
> >
> >                         "encapsulate": ""
> >
> >                 }, {
> >
> >                         "name": "vendor-16666-test",
> >
> >                         "code": 16666,
> >
> >                         "type": "empty",
> >
> >                         "space": "dhcp6",
> >
> >                         "record-types": "",
> >
> >                         "encapsulate": "vendor-16666"
> >
> >                 }, {
> >
> >                         "name": "ntp",
> >
> >                         "code": 56,
> >
> >                         "space": "dhcp6",
> >
> >                         "array": true,
> >
> >                         "type": "ipv6-address"
> >
> >                 } ],
> >
> >
> >
> > -----Original Message-----
> > From: Kea-users <kea-users-bounces at lists.isc.org> On Behalf Of Darren
> > Ankney
> > Sent: Saturday, March 9, 2024 3:25 PM
> > To: Kea user's list <kea-users at lists.isc.org>
> > Subject: Re: [Kea-users] KEA Option 17 structure (example)
> >
> >
> >
> > Hi Marek,
> >
> >
> >
> > That is my understanding. However, I've never tried any of the option 17 setup.
> >
> >
> >
> > Thank you,
> >
> > Darren Ankney
> >
> >
> >
> > On Sat, Mar 9, 2024 at 8:55 AM <mxhajduczenia at gmail.com> wrote:
> >
> > >
> >
> > > Thank you, Darren
> >
> > >
> >
> > > So essentially the magic glue is the vendor ID (14810) used as data under "vendor-ops" (option 17). That's neat.
> >
> > >
> >
> > > Is it possible to have multiple vendor-specific options inserted into a single Option 17 instance this way?
> >
> > >
> >
> > > Marek
> >
> > >
> >
> > > -----Original Message-----
> >
> > > From: Kea-users <kea-users-bounces at lists.isc.org> On Behalf Of
> > > Darren
> >
> > > Ankney
> >
> > > Sent: Saturday, March 9, 2024 4:38 AM
> >
> > > To: Kea user's list <kea-users at lists.isc.org>
> >
> > > Subject: Re: [Kea-users] KEA Option 17 structure (example)
> >
> > >
> >
> > > Hi Marek,
> >
> > >
> >
> > > I was able to find in the correct section of the documentation by first looking at this chart of options in Kea:
> >
> > > https://kea.readthedocs.io/en/kea-2.4.1/arm/dhcp6-srv.html#id3 and following the link there for option 17:
> >
> > > https://kea.readthedocs.io/en/kea-2.4.1/arm/dhcp6-srv.html#dhcp6-ven
> > > do
> >
> > > r-opts
> >
> > >
> >
> > > Something like this MIGHT work:
> >
> > >
> >
> > > {
> >
> > >   "Dhcp6": {
> >
> > >     "option-def": [
> >
> > >       {
> >
> > >         "name": "worldbox_adb_bmc",
> >
> > >         "code": 1,
> >
> > >         "type": "string",
> >
> > >         "space": "vendor-14810",
> >
> > >         "encapsulate": ""
> >
> > >       }
> >
> > >     ],
> >
> > >     "option-data": [
> >
> > >       {
> >
> > >         "name": "worldbox_adb_bmc",
> >
> > >         "space": "vendor-14810",
> >
> > >         "data": "'tmpwh2.cvs.adbglobal.com'",
> >
> > >         "always-send": true
> >
> > >       },
> >
> > >       {
> >
> > >         "name": "vendor-opts",
> >
> > >         "data": "14810"
> >
> > >       }
> >
> > >     ]
> >
> > >   }
> >
> > > }
> >
> > >
> >
> > > Thank you,
> >
> > > Darren Ankney
> >
> > >
> >
> > > On Fri, Mar 8, 2024 at 9:50 AM Marek Hajduczenia <mxhajduczenia at gmail.com> wrote:
> >
> > > >
> >
> > > > Yeah, I forgot to mentioned that indeed - Option 17 is specific to IPv6. I was able to get that done for DHCPv4 without any problems, but v6 side seems to be using slightly different configuration logic, which does not seem to be documented anywhere, at least that I can find.
> >
> > > >
> >
> > > > Thanks !
> >
> > > >
> >
> > > > Marek
> >
> > > >
> >
> > > > On Fri, Mar 8, 2024 at 3:42 AM Darren Ankney <darren.ankney at gmail.com> wrote:
> >
> > > >>
> >
> > > >> Hi Marek,
> >
> > > >>
> >
> > > >> It is unclear to me.  Is this for DHCPv6?
> >
> > > >>
> >
> > > >> Thank you,
> >
> > > >> Darren Ankney
> >
> > > >>
> >
> > > >> On Thu, Mar 7, 2024 at 10:51 PM Marek Hajduczenia
> >
> > > >> <mxhajduczenia at gmail.com> wrote:
> >
> > > >> >
> >
> > > >> > Dear mailing list users,
> >
> > > >> >
> >
> > > >> > I have been trying to create an Option 17 with a specific structure for a vendor with the ID of 14810, where all I have is a sub-option 1, containing a string with an arbitrary FQDN. I have a working code for ISC DHCP, but I have not been able to locate a working example of an implementation for Kea.
> >
> > > >> >
> >
> > > >> > # ADB VSIO
> >
> > > >> > option space worldbox_adb code width 2 length width 2 hash size
> >
> > > >> > 1; option worldbox_adb.bmc code 1 = text; option
> >
> > > >> > vsio.worldbox_adb code 14810 = encapsulate worldbox_adb;
> >
> > > >> >
> >
> > > >> > # use the option within a subnet
> >
> > > >> > ...
> >
> > > >> > option worldbox_adb.bmc "tmpwh2.cvs.adbglobal.com"; ...
> >
> > > >> >
> >
> > > >> > My failed attempt to translate looks like the following, but it does not produce any particular output as confirmed with the packet capture. DNS servers are present, so I am sure the config is parsed correctly.
> >
> > > >> >
> >
> > > >> >                 "option-data": [
> >
> > > >> >                                 {
> >
> > > >> >                                         "name": "dns-servers",
> >
> > > >> >                                         "data": "2001:db8:2::dead:beef, 2001:db8:2::cafe:babe"
> >
> > > >> >                                 }, {
> >
> > > >> >                                         "space":
> > > >> > "vendor-14810",
> >
> > > >> >                                         "name": "bmc",
> >
> > > >> >                                         "data": "tmpwh2.cvs.adbglobal.com"
> >
> > > >> >                                 }, {
> >
> > > >> >                                         "name": "vendor-14810-bmc"
> >
> > > >> >                                 } ]
> >
> > > >> >                 } ],
> >
> > > >> >
> >
> > > >> >                 "option-def": [ {
> >
> > > >> >                         // We define a short name, so the option can be referenced by name.
> >
> > > >> >                         // The option has code 2 and resides within vendor space 25167.
> >
> > > >> >                         // Its data is a plain string.
> >
> > > >> >                         "name": "bmc",
> >
> > > >> >                         "code": 1,
> >
> > > >> >                         "space": "vendor-14810",
> >
> > > >> >                         "type": "string",
> >
> > > >> >                         "array": false,
> >
> > > >> >                         "encapsulate": ""
> >
> > > >> >                 }, {
> >
> > > >> >                         "name": "vendor-14810-bmc",
> >
> > > >> >                         "code": 14810,
> >
> > > >> >                         "type": "empty",
> >
> > > >> >                         "space": "dhcp6",
> >
> > > >> >                         "encapsulate": "bmc"
> >
> > > >> >                 } ],
> >
> > > >> >
> >
> > > >> > I did not see any example showing how to build Option 17 anywhere. Any pointers / examples would be really appreciated.
> >
> > > >> >
> >
> > > >> > Marek
> >
> > > >> > --
> >
> > > >> > ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
> >
> > > >> >
> >
> > > >> > To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
> >
> > > >> >
> >
> > > >> > Kea-users mailing list
> >
> > > >> > Kea-users at lists.isc.org
> >
> > > >> > https://lists.isc.org/mailman/listinfo/kea-users
> >
> > > >> --
> >
> > > >> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
> >
> > > >>
> >
> > > >> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
> >
> > > >>
> >
> > > >> Kea-users mailing list
> >
> > > >> Kea-users at lists.isc.org
> >
> > > >> https://lists.isc.org/mailman/listinfo/kea-users
> >
> > > >
> >
> > > > --
> >
> > > > ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
> >
> > > >
> >
> > > > To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
> >
> > > >
> >
> > > > Kea-users mailing list
> >
> > > > Kea-users at lists.isc.org
> >
> > > > https://lists.isc.org/mailman/listinfo/kea-users
> >
> > > --
> >
> > > ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
> >
> > >
> >
> > > To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
> >
> > >
> >
> > > Kea-users mailing list
> >
> > > Kea-users at lists.isc.org
> >
> > > https://lists.isc.org/mailman/listinfo/kea-users
> >
> > >
> >
> > > --
> >
> > > ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
> >
> > >
> >
> > > To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
> >
> > >
> >
> > > Kea-users mailing list
> >
> > > Kea-users at lists.isc.org
> >
> > > https://lists.isc.org/mailman/listinfo/kea-users
> >
> > --
> >
> > ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
> >
> >
> >
> > To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
> >
> >
> >
> > Kea-users mailing list
> >
> > Kea-users at lists.isc.org
> >
> > https://lists.isc.org/mailman/listinfo/kea-users
> >
> > --
> > ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
> >
> > To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
> >
> > Kea-users mailing list
> > Kea-users at lists.isc.org
> > https://lists.isc.org/mailman/listinfo/kea-users
> --
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
>
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
>
> --
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
>
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vendor-specific-options-v6-test.json
Type: application/json
Size: 1500 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240314/f1c466e3/attachment-0001.json>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vendor-specific-options-v6-test.pcap
Type: application/octet-stream
Size: 7224 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240314/f1c466e3/attachment-0001.obj>


More information about the Kea-users mailing list