[Kea-users] Set boot-file-name option based on DHCP client mac-address

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] Set boot-file-name option based on DHCP client mac-address

Kristian Pedersen
Hi KEA list,

I'm attempting to mirror this ISC DHCP construct, where the
bootfile-name is set based on the DHCP client mac-address:

subnet x.y.z.0 netmask 255.255.255.0 {
     ..
     pool {
         ..
         option bootfile-name = concat(
             suffix (concat ("0", binary-to-ascii (16, 8, "",
substring(hardware, 1, 1))),2),
             suffix (concat ("0", binary-to-ascii (16, 8, "",
substring(hardware, 2, 1))),2),
             suffix (concat ("0", binary-to-ascii (16, 8, "",
substring(hardware, 3, 1))),2),
             suffix (concat ("0", binary-to-ascii (16, 8, "",
substring(hardware, 4, 1))),2),
             suffix (concat ("0", binary-to-ascii (16, 8, "",
substring(hardware, 5, 1))),2),
             suffix (concat ("0", binary-to-ascii (16, 8, "",
substring(hardware, 6, 1))),2)
         );
         }
}

How can I achieve something similar using KEA? We use this for per
modem/cpe configuration-files for docsis and other types of devices.
Defining a host entry for every modem/cpe is not really feasible.

I tried a construct similar to this, but could not get it working:

"subnet4": [
     ..
     "option-data": [ {
         "name": "boot-file-name",
         "data": concat('foo', 'bar')
     } ]
]

Kind regards,

--
Kristian Pedersen

_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] Set boot-file-name option based on DHCP client mac-address

Juan Settecase - Interlink S.R.L.

Hi Kristian,

You can write and use a custom hook to personalize options for each client (mac-address). Probably, there another way too.

Juan







El 23/1/19 a las 11:26, Kristian Pedersen escribió:
Hi KEA list,

I'm attempting to mirror this ISC DHCP construct, where the 
bootfile-name is set based on the DHCP client mac-address:

subnet x.y.z.0 netmask 255.255.255.0 {
     ..
     pool {
         ..
         option bootfile-name = concat(
             suffix (concat ("0", binary-to-ascii (16, 8, "", 
substring(hardware, 1, 1))),2),
             suffix (concat ("0", binary-to-ascii (16, 8, "", 
substring(hardware, 2, 1))),2),
             suffix (concat ("0", binary-to-ascii (16, 8, "", 
substring(hardware, 3, 1))),2),
             suffix (concat ("0", binary-to-ascii (16, 8, "", 
substring(hardware, 4, 1))),2),
             suffix (concat ("0", binary-to-ascii (16, 8, "", 
substring(hardware, 5, 1))),2),
             suffix (concat ("0", binary-to-ascii (16, 8, "", 
substring(hardware, 6, 1))),2)
         );
         }
}

How can I achieve something similar using KEA? We use this for per 
modem/cpe configuration-files for docsis and other types of devices. 
Defining a host entry for every modem/cpe is not really feasible.

I tried a construct similar to this, but could not get it working:

"subnet4": [
     ..
     "option-data": [ {
         "name": "boot-file-name",
         "data": concat('foo', 'bar')
     } ]
]

Kind regards,


_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] Set boot-file-name option based on DHCP client mac-address

Francis Dupont
In reply to this post by Kristian Pedersen
> How can I achieve something similar using KEA?

=> not yet (this feature is on the TODO list) or only with a hook.

Regards

Francis Dupont <[hidden email]>

PS: the missing feature is to compute an option value from an expression.
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

Re: [Kea-users] Set boot-file-name option based on DHCP client mac-address

Kristian Pedersen
Hi Francis,

On 23/01/2019 18.13, Francis Dupont wrote:
>> How can I achieve something similar using KEA?
> => not yet (this feature is on the TODO list) or only with a hook.
>
> Regards

Thank you for getting back to me so fast. We will probably implement
this using a hook.

Sorry for initial reply directly to you instead of to the list


Regards,

--
Kristian Pedersen

_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users