[Kea-users] KEA DHCP - BOOTP config

Darren Ankney darren.ankney at gmail.com
Wed Apr 17 09:53:13 UTC 2024


Hi Philippe,

You could probably do this in two ways.  The first way would be to define
everything using VIVSO option 125 This portion of the ARM describes how:
https://kea.readthedocs.io/en/kea-2.4.1/arm/dhcp4-srv.html#dhcpv4-vendor-specific-options
though it also describes how to set option 43 so it can be a little
confusing.

The other way, if  you just want to be done with it and specify the hex as
you did before in ISC DHCP would be to use flex-option:
https://kea.readthedocs.io/en/kea-2.4.1/arm/hooks.html#libdhcp-flex-option-so-flexible-option-actions-for-option-value-settings
which allows you to arbitrarily add option data to some or all outbound
DHCP packets in whatever format you see fit.

Thank you,
Darren Ankney

On Mon, Apr 8, 2024 at 8:56 AM Philippe EA <pea at perle.com> wrote:

> Hi Darren and all,
>
>
>
> Thanks for your feedback, I’ve checked the link and would like to go
> deeper on my config, hope you guys can help me.
>
>
>
> I got two questions,:
>
>
>
> 1st question :
>
> Here is my current config for bootfile name :
>
> {
>
>     "subnet4": [ {
>
>         "reservations": [
>
>         {
>
>             "hw-address": "aa:bb:cc:dd:ee:ff",
>
>             "next-server": "10.171.20.254",
>
>             "server-hostname": "10.171.20.72",
>
>             "boot-file-name": " dhcp-ztp.txt"
>
>         } ]
>
>     } ]
>
> }
>
>
>
> With this config, the boot file is downloaded from a TFTP server,
>
> How to switch from TFTP to HTTP server? what am I missing on the config?
>
>
>
> 2nd question : the config below is adapted from an existing vivso config
>
> {
>
>     "option-def": [
>
>     {
>
>         "name": "tftp",
>
>         "code": 2,
>
>         "space": "vendor-1966",
>
>         "type": "string"
>
>     } ],
>
>
>
>     "client-classes": [
>
>     {
>
>         "name": "Perle",
>
>         "test": "substring(option[60].hex,0,4) == '1966'",
>
>         "option-data": [
>
>             {
>
>                 "name": "vivso-suboptions",
>
>                 "data": "1966",
>
>                 "encapsulate": "vendor-1966"
>
>             },
>
>             {
>
>                 "name": "tftp",
>
>                 "space": "vendor-1966",
>
>                 "data": "URL file name",
>
>                 "always-send": true
>
>             }
>
>         ]
>
>     } ]
>
> }
>
>
>
> And below the details of the option 125 with suboption from the vendor :
>
> [image: Une image contenant texte, capture d’écran, Police, ligne
> Description générée automatiquement]
>
> [image: Une image contenant texte, capture d’écran, Police, nombre
> Description générée automatiquement]
>
> [image: Une image contenant texte, capture d’écran, Police, nombre
> Description générée automatiquement]
>
>
>
> So in HEX format it looks like this:
>
> 00:00:07:AE:14:10:01:01:05:0F:73:63:67:2D:36:2E:31:2E:54:32:35:2E:65:6D:67
>
>
>
> 00:00:07:AE : vendor id
>
> 14 : data length in total until the end (HEX format)
>
> Suboption 10 à define which protocol to use for bootfile/software
>
> 01: Data lenght
>
> 01: HTTP protocol
>
> Suboption 05 à define software file name
>
> 0F : Data length
>
> 73:63:67:2D:36:2E:31:2E:54:32:35:2E:65:6D:67 : File name in HEX format
>
>
>
> So my question is :
>
>
>
> This format was working with ISC DHCP, however is it possible to adapt
> this vivso option and suboption vendor into KEA config ?
>
>
>
> it doesn’t need to be in HEX format, as long as it works the same that’s
> fine.
>
>
>
> If yes, how to define in my current config vivso config, the suboption 10
> and suboption 5 with their data ?
>
>
>
> Thank you.
>
>
>
> Philippe EA
>
>
>
> -----Message d'origine-----
> De : Kea-users <kea-users-bounces at lists.isc.org> De la part de Darren
> Ankney
> Envoyé : vendredi 29 mars 2024 12:28
> À : Kea user's list <kea-users at lists.isc.org>
> Objet : Re: [Kea-users] KEA DHCP - BOOTP config
>
>
>
> Hi Philippe,
>
>
>
> There is no other way to configure option 125  (vivso) other than detailed
> here:
> https://kea.readthedocs.io/en/kea-2.4.1/arm/dhcp4-srv.html#dhcpv4-vendor-specific-options
>
>
>
> Thank you,
>
> Darren Ankney
>
>
>
> On Thu, Mar 28, 2024 at 3:19 PM Philippe EA <pea at perle.com> wrote:
>
> >
>
> > Hi all,
>
> >
>
> >
>
> >
>
> > I’m quite new on KEA DHCP, and I’m trying to setup a proper config using
> BOOTP, here is my current config for boot-file from an HTTP server
> (10.171.20.72) :
>
> >
>
> >
>
> >
>
> > {
>
> >
>
> >     "subnet4": [ {
>
> >
>
> >         "reservations": [
>
> >
>
> >         {
>
> >
>
> >             "hostname": "SCG",
>
> >
>
> >             "hw-address": "00:80:d4:0c:30:76",
>
> >
>
> >             "ip-address": "10.171.20.22",
>
> >
>
> >             "next-server": "10.171.20.254",
>
> >
>
> >             "server-hostname": "10.171.20.72”,
>
> >
>
> >             "boot-file-name": "dhcp-ztp-txt”
>
> >
>
> >         } ]
>
> >
>
> >     } ]
>
> >
>
> > }
>
> >
>
> >
>
> >
>
> > For this part I think that should work.
>
> >
>
> >
>
> >
>
> > My main concern is about option 125 to transfer a firmware image, I’m
> not sure about the way to setup that, I’ve seen a way with vivso but I need
> to understand how it works.
>
> >
>
> >
>
> >
>
> > Is there a different way for this option ?  Maybe an easier way ?
>
> >
>
> >
>
> >
>
> > Thank you for support.
>
> >
>
> >
>
> >
>
> > Regards.
>
> >
>
> >
>
> >
>
> > Philippe
>
> >
>
> > --
>
> > 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 --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240417/b4f55baf/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 11305 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240417/b4f55baf/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 56628 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240417/b4f55baf/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 28932 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240417/b4f55baf/attachment-0005.png>


More information about the Kea-users mailing list