[Kea-users] Suggestions requested

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

[Kea-users] Suggestions requested

Tom Gillman

Howdy folks,

 

I’m trying to implement something with kea and I was hoping to pick the hive brain.

 

What I’m trying to do is, on a request for DHCP, format a JSON query to a network service that will return a hostname and IP address. Then, generate a lease (using memfile) which then gets returned to the requesting client. I can do all that in a shell, which I was using the kea-hook-runscript hook library to do. The first part all works well. The problem comes in trying to update the memfile. The kea-hook-runscript calls an external shell to do the work, and blocks waiting on that shell to exit. Because it’s blocked, I can’t issue any lease commands through the control channel to do the updates I desire.

 

I’m not sure how to get around this, I feel like making the external callout non-blocking would introduce race conditions that would bite me later on. The only real solution I see is use a 3rd-party DB like mysql and handle the updates within the script, but that introduces overhead that I’m unwilling to do.

 

I’m not much of a programmer, so saying “Build your own hook library” really isn’t an option given the time constraints I’m under. I feel like I might eventually be able to it, but I simply don’t have the time.

 

Does anyone have any suggestions? Any constructive criticism is appreciated.

 

Thanks,

 

-Tom


_______________________________________________
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] Suggestions requested

Joseph Bernard
I believe the Host Commands Library premium hook does this.

Thanks,
Joseph B.


On Aug 14, 2018, at 5:05 PM, Tom Gillman <[hidden email]> wrote:

Howdy folks,

 

I’m trying to implement something with kea and I was hoping to pick the hive brain.

 

What I’m trying to do is, on a request for DHCP, format a JSON query to a network service that will return a hostname and IP address. Then, generate a lease (using memfile) which then gets returned to the requesting client. I can do all that in a shell, which I was using the kea-hook-runscript hook library to do. The first part all works well. The problem comes in trying to update the memfile. The kea-hook-runscript calls an external shell to do the work, and blocks waiting on that shell to exit. Because it’s blocked, I can’t issue any lease commands through the control channel to do the updates I desire.

 

I’m not sure how to get around this, I feel like making the external callout non-blocking would introduce race conditions that would bite me later on. The only real solution I see is use a 3rd-party DB like mysql and handle the updates within the script, but that introduces overhead that I’m unwilling to do.

 

I’m not much of a programmer, so saying “Build your own hook library” really isn’t an option given the time constraints I’m under. I feel like I might eventually be able to it, but I simply don’t have the time.

 

Does anyone have any suggestions? Any constructive criticism is appreciated.

 

Thanks,

 

-Tom

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

_______________________________________________
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] Suggestions requested

Tom Gillman

It doesn’t, at least not according to my interpretation of the documentation in the Kea Administrator’s Guide, Section 14.4.4

 

I very specifically need to query an external service (*NOT* a database), and then generate a lease (or reservation) based on the information returned from that query.

My conundrum is that I can call an external script, but because the DHCP server blocks waiting on the script to complete, I cannot update the lease information until the script exits.

 

Thanks,

 

-T

 

From: Kea-users [mailto:[hidden email]] On Behalf Of Joseph Bernard
Sent: Tuesday, August 14, 2018 7:34 PM
To: [hidden email]
Subject: Re: [Kea-users] Suggestions requested

 

I believe the Host Commands Library premium hook does this.

 

Thanks,

Joseph B.


On Aug 14, 2018, at 5:05 PM, Tom Gillman <[hidden email]> wrote:

Howdy folks,

 

I’m trying to implement something with kea and I was hoping to pick the hive brain.

 

What I’m trying to do is, on a request for DHCP, format a JSON query to a network service that will return a hostname and IP address. Then, generate a lease (using memfile) which then gets returned to the requesting client. I can do all that in a shell, which I was using the kea-hook-runscript hook library to do. The first part all works well. The problem comes in trying to update the memfile. The kea-hook-runscript calls an external shell to do the work, and blocks waiting on that shell to exit. Because it’s blocked, I can’t issue any lease commands through the control channel to do the updates I desire.

 

I’m not sure how to get around this, I feel like making the external callout non-blocking would introduce race conditions that would bite me later on. The only real solution I see is use a 3rd-party DB like mysql and handle the updates within the script, but that introduces overhead that I’m unwilling to do.

 

I’m not much of a programmer, so saying “Build your own hook library” really isn’t an option given the time constraints I’m under. I feel like I might eventually be able to it, but I simply don’t have the time.

 

Does anyone have any suggestions? Any constructive criticism is appreciated.

 

Thanks,

 

-Tom

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


_______________________________________________
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] Suggestions requested

Francis Dupont
To add a host reservation is not a silly idea: it is the way the RADIUS
hook works: it adds a host cache entry at the select subnet hook point
so when the host reservation is looked for the required information can
be returned. Of course this requires to code a bit...

Regards

Francis Dupont <[hidden email]>

PS: even if it is not yet available at this hook point Kea >= 1.4 has
a "park" feature which allows to process next packets waiting for
the hook to return. And it is safe because allocation is done later,
i.e. it is equivalent to a network reordering UDP packets.

Tom Gillman writes:

> --===============7402642548948267019==
> Content-Language: en-US
> Content-Type: multipart/alternative;
> boundary="_000_10C1B5EE2EE8C845858FF3FE51AEB42002490F87MX307CL03corpem_
> "
>
> --_000_10C1B5EE2EE8C845858FF3FE51AEB42002490F87MX307CL03corpem_
> Content-Type: text/plain; charset="utf-8"
> Content-Transfer-Encoding: base64
>
> SXQgZG9lc27igJl0LCBhdCBsZWFzdCBub3QgYWNjb3JkaW5nIHRvIG15IGludGVycHJldGF0aW9u
> IG9mIHRoZSBkb2N1bWVudGF0aW9uIGluIHRoZSBLZWEgQWRtaW5pc3RyYXRvcuKAmXMgR3VpZGUs
> IFNlY3Rpb24gMTQuNC40DQoNCkkgdmVyeSBzcGVjaWZpY2FsbHkgbmVlZCB0byBxdWVyeSBhbiBl
> eHRlcm5hbCBzZXJ2aWNlICgqTk9UKiBhIGRhdGFiYXNlKSwgYW5kIHRoZW4gZ2VuZXJhdGUgYSBs
> ZWFzZSAob3IgcmVzZXJ2YXRpb24pIGJhc2VkIG9uIHRoZSBpbmZvcm1hdGlvbiByZXR1cm5lZCBm
> cm9tIHRoYXQgcXVlcnkuDQpNeSBjb251bmRydW0gaXMgdGhhdCBJIGNhbiBjYWxsIGFuIGV4dGVy
> bmFsIHNjcmlwdCwgYnV0IGJlY2F1c2UgdGhlIERIQ1Agc2VydmVyIGJ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oYXQgSeKAmW0gdW53
> aWxsaW5nIHRvIGRvLg0KDQpJ4oCZbSBub3QgbXVjaCBvZiBhIHByb2dyYW1tZXIsIHNvIHNheWlu
> ZyDigJxCdWlsZCB5b3VyIG93biBob29rIGxpYnJhcnnigJ0gcmVhbGx5IGlzbuKAmXQgYW4gb3B0
> aW9uIGdpdmVuIHRoZSB0aW1lIGNvbnN0cmFpbnRzIEnigJltIHVuZGVyLiBJIGZlZWwgbGlrZSBJ
> IG1pZ2h0IGV2ZW50dWFsbHkgYmUgYWJsZSB0byBpdCwgYnV0IEkgc2ltcGx5IGRvbuKAmXQgaGF2
> ZSB0aGUgdGltZS4NCg0KRG9lcyBhbnlvbmUgaGF2ZSBhbnkgc3VnZ2VzdGlvbnM/IEFueSBjb25z
> dHJ1Y3RpdmUgY3JpdGljaXNtIGlzIGFwcHJlY2lhdGVkLg0KDQpUaGFua3MsDQoNCi1Ub20NCl9f
> X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fDQpLZWEtdXNlcnMg
> bWFpbGluZyBsaXN0DQpLZWEtdXNlcnNAbGlzdHMuaXNjLm9yZzxtYWlsdG86S2VhLXVzZXJzQGxp
> c3RzLmlzYy5vcmc+DQpodHRwczovL2xpc3RzLmlzYy5vcmcvbWFpbG1hbi9saXN0aW5mby9rZWEt
> dXNlcnMNCg==
>
> --_000_10C1B5EE2EE8C845858FF3FE51AEB42002490F87MX307CL03corpem_
> Content-Type: text/html; charset="utf-8"
> Content-Transfer-Encoding: base64
>
> PGh0bWwgeG1sbnM6dj0idXJuOnNjaGVtYXMtbWljcm9zb2Z0LWNvbTp2bWwiIHhtbG5zOm89InVy
> bjpzY2hlbWFzLW1pY3Jvc29mdC1jb206b2ZmaWNlOm9mZmljZSIgeG1sbnM6dz0idXJuOnNjaGVt
> YXMtbWljcm9zb2Z0LWNvbTpvZmZpY2U6d29yZCIgeG1sbnM6bT0iaHR0cDovL3NjaGVtYXMubWlj
> cm9zb2Z0L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Lm9yZyI+
> S2VhLXVzZXJzQGxpc3RzLmlzYy5vcmc8L2E+PGJyPg0KPGEgaHJlZj0iaHR0cHM6Ly9saXN0cy5p
> c2Mub3JnL21haWxtYW4vbGlzdGluZm8va2VhLXVzZXJzIj5odHRwczovL2xpc3RzLmlzYy5vcmcv
> bWFpbG1hbi9saXN0aW5mby9rZWEtdXNlcnM8L2E+PG86cD48L286cD48L3NwYW4+PC9wPg0KPC9k
> aXY+DQo8L2Jsb2NrcXVvdGU+DQo8L2Rpdj4NCjwvZGl2Pg0KPC9ib2R5Pg0KPC9odG1sPg0K
>
> --_000_10C1B5EE2EE8C845858FF3FE51AEB42002490F87MX307CL03corpem_--
>
> --===============7402642548948267019==
> Content-Type: text/plain; charset="us-ascii"
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> _______________________________________________
> Kea-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/kea-users
>
> --===============7402642548948267019==--
>
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

[Kea-users] Host reservation with pool dhcpv4

norujames
Hello

I would like to know if it is possible to use host reservation on
database, and provide an ip address from a pool ?
The idea is to check if client_id and/or circuit_id match, and then
provide ip address from a pool.
Thanks for answer.

Noruni
_______________________________________________
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] Host reservation with pool dhcpv4

Francis Dupont
norujames writes:
> I would like to know if it is possible to use host reservation on
> database, and provide an ip address from a pool ?
> The idea is to check if client_id and/or circuit_id match, and then
> provide ip address from a pool.

=> it is possible: the fixed address in host reservation is optional.
Note that without a fixed address a resource (usually a hostname
but it can be option or next server or ...) is required, i.e.,
empty host reservations are not allowed.

Regards

Francis Dupont <[hidden email]>
_______________________________________________
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] Host reservation with pool dhcpv4

Joe Botha
Hi Francis                                    >@2018.08.17_09:08:21_GMT+0100

> norujames writes:
> > I would like to know if it is possible to use host reservation on
> > database, and provide an ip address from a pool ?
> > The idea is to check if client_id and/or circuit_id match, and then
> > provide ip address from a pool.
>
> => it is possible: the fixed address in host reservation is optional.
> Note that without a fixed address a resource (usually a hostname
> but it can be option or next server or ...) is required, i.e.,
> empty host reservations are not allowed.

Thanks for this tip.

I have a need to create host resvervations based on MAC
address, but I don't want to give a fixed IP or hostname.
I just want to tag them with something so I can figure out
which pool they should get IPs from. How would I do this
best?

I'm using kea 1.4.

Some MACs get a static IP:

{ "hw-address": "64:d1:54:2c:54:61", "ip-address": "102.135.nnn.64" },

Some MACs should get an IP from a special dynamic pool...

{ "hw-address": "fe:ec:da:27:ae:92", "client-classes": [ "dynamic-public" ] },

Is the Kea currently ignoring this reservation?

I want to use the class to make it get an IP from a pool...

  { "pool":
                                 "102.135.nnn.1-102.135.nnn.126",
                 "client-class": "dynamic-public"
  }

--
Swimmingly,
 Joe
 
 www.swimgeek.com/blog  +27 82 562 6167  instagram.com/joe.swimgeek
        "...all progress depends on the unreasonable man."

_______________________________________________
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] Host reservation with pool dhcpv4

Francis Dupont
Joe Botha writes:
> I have a need to create host resvervations based on MAC
> address, but I don't want to give a fixed IP or hostname.
> I just want to tag them with something so I can figure out
> which pool they should get IPs from. How would I do this
> best?

=> if you want to control which pool(s) a client can get an address from
you need a client-class matching its MAC. Note even when you can assign
a class from a host reservation it is performed after address allocation
so it can't be used to select a pool. Of course this can be overruled
using a hook and some programming.

Regards

Francis Dupont <[hidden email]>
_______________________________________________
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] Host reservation with pool dhcpv4

Joe Botha
Hi Francis                                    >@2018.08.17_12:51:32_GMT+0100

> => if you want to control which pool(s) a client can get an address from
> you need a client-class matching its MAC.

Could you point me at an example or part of the manual?

Based on MAC I want to:

- Put some customers in a public subnet, in a special pool
with dynamic IP

- Put some customers in a different public subnet

- Put some customers in a RFC1918 subnet

...so, based on MAC how do I select subnet and pool?

--
Swimmingly,
 Joe
 
 www.swimgeek.com/blog  +27 82 562 6167  instagram.com/joe.swimgeek
        "...all progress depends on the unreasonable man."

_______________________________________________
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] Host reservation with pool dhcpv4

norujames
In reply to this post by Francis Dupont
even if kea use freeradius to provide a pool name?

can you provide some sample configuration ?

Thanks

Noruni


Le 17/08/2018 à 13:51, Francis Dupont a écrit :

> Joe Botha writes:
>> I have a need to create host resvervations based on MAC
>> address, but I don't want to give a fixed IP or hostname.
>> I just want to tag them with something so I can figure out
>> which pool they should get IPs from. How would I do this
>> best?
> => if you want to control which pool(s) a client can get an address from
> you need a client-class matching its MAC. Note even when you can assign
> a class from a host reservation it is performed after address allocation
> so it can't be used to select a pool. Of course this can be overruled
> using a hook and some programming.
>
> Regards
>
> Francis Dupont <[hidden email]>
> _______________________________________________
> Kea-users mailing list
> [hidden email]
> https://lists.isc.org/mailman/listinfo/kea-users

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