Re: [Kea-users] Where to put data for kea.
Hello Albert, I am not a real expert on kea, but I can add my 2 cents. We have been using dhcpd, which config was generated by shell script. So we only modified it to generate kea config. The main advantage of kea compared to dhcpd is that kea enables you to include another config file using statement. This enabled us to slightly simplify the script compared to the one used with dhcpd. I agree with Darren it is not recommended to use global reservations with kea. I am not 100% sure, but if I remember correctly, when I used global reservations and had a computer to assigned to 2 different vlans (one for lan, one for wifi), I was not able to create reservation for IPv6 addresses, since DUID was common in both vlans. This was not a problem in dhcpd, since it offered reservations only from the subnet, but it I remember correctly, kea offered the IPv6 address not belonging to subnet without a shame. So we modified the script not to generate global reservations, but seperated reservations into subnets. So fragments of our current configuration reads: { "id": 100, "subnet": "192.168.1.0/24", "interface": "bond0.100", "pools": [ { "pool": "192.168.1.200 - 192.168.1.220" } ], ... "reservations": [ ] }, { "id": 200, "subnet": "192.168.2.0/24", "interface": "bond0.200", "pools": [ { "pool": "192.168.2.200 - 192.168.2.220" } ], ... "reservations": [ ] }, and we generate those included files by the script. The script converts the csv like table file into the json configuration file for each subnet separately. I do not like editing json because I am afraid of errors. The generated json looks like: { "hostname": "client1", "hw-address": "81:01:01:01:01:01", "ip-address": "192.168.1.21" }, { "hostname": "client2", "hw-address": "81:01:01:01:01:02", "ip-address": "192.168.1.22" }, ... If you are interested I can send you the script. It is not perfect, but it does its job. Marek Sent with Proton Mail secure email. On Wednesday, January 10th, 2024 at 9:13, Albert Shih wrote: > Hi, > > We using isc for long time. 99% of the address give by isc-dhcp are «host > reservation by mac address». > > So we manage a > > root@dhcp:/etc/dhcp# egrep "^\s+host" dhcpd.conf|wc > 5821 17463 194735 > root@dhcp:/etc/dhcp# > > Currently we are working to migrate to Kea. But after reading lot of > documentation I didn't find if I can use files to store the data. Or it's > mandatory to use database to store those data. > > I find > > https://kea.readthedocs.io/en/kea-2.4.1/arm/admin.html#supported-backends > > where they say it's not supported for host reservation to use memfile and > as I understand the doc the data should be in the database > > But in > > https://kb.isc.org/docs/what-are-host-reservations-how-to-use-them > > they seem to have json format file for host reservation. > > I understand it's not very efficient to use file, much better to use > database but currently we have lot of script to generate those file, it > would be easier for us to adapt them to generated json. > > So my question are : Can I put host reservation in file on the filesystem > of the server ? > > Regards > -- > Albert SHIH 嶺 > France > Heure locale/Local time: > mer. 10 janv. 2024 09:02:07 CET > -- > 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@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@lists.isc.org https://lists.isc.org/mailman/listinfo/kea-users
Re: [Kea-users] insert into dhcp4_subnet
Hi, We have a service that uses Kea on the backend behind an internal REST API that performs CRUD operations against the lease and reservation tables. We're still using v1.8, but it uses bog standard INSERT/UPDATE/DELETE statements. IMO, you should know why want to do it this way. In our case, the application was written a few years before hook libraries were available, and it's one aspect of a larger server provisioning toolchain. You can do it like we did, but you can quickly end up in the weeds if you're not careful about how writes are handled. cheers, Klaus On Wed, Jan 10, 2024 at 12:31 AM Nicolò Borghi wrote: > Hi, > > I believe you are asking here how to handle the DB directly, therefore > bypassing the paid hook libraries specific for this task. > > I'm not sure this sort of guidance will be offered here... > > Best, > Nicolò. > > > -- > 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@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@lists.isc.org https://lists.isc.org/mailman/listinfo/kea-users
Re: [Kea-users] Is Kea-DHCP able to support a /30 network?
FWIW we've used Kea with /31s in our environment successfully (although _why_ we used /31s is itself dumb and I can't recommend it) cheers, Klaus On Thu, Jan 11, 2024 at 12:01 PM Scott Rakow wrote: > Thanks! > > On Thu, Jan 11, 2024 at 7:47 PM Darren Ankney > wrote: > >> Hi Scott, >> >> This would be the correct way: >> >> "subnet": "10.10.1.0/30", >> "pools": [ { "pool": 10.10.1.2 - 10.10.1.2 } ], >> >> Thank you, >> >> Darren Ankney >> >> On Thu, Jan 11, 2024 at 1:50 PM Scott Rakow wrote: >> > >> > In one of my subnets I am having to deploy, I have a /30 network which >> has only one IP. Will Kea-DHCP be able to support this, as I have not seen >> anything in the documentation for this. >> > >> > If so, would I have to set up the Pool to look like... >> > >> > "subnet": "10.10.1.0/30", >> > "pools": [ { "pool": 10.10.1.2 } ], >> > >> > Or would it have to look like... >> > >> > "subnet": "10.10.1.0/30", >> > "pools": [ { "pool": 10.10.1.2 - 10.10.1.2 } ], >> > >> > Thanks, >> > Scott >> > -- >> > 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@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@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@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@lists.isc.org https://lists.isc.org/mailman/listinfo/kea-users
Re: [Kea-users] Is Kea-DHCP able to support a /30 network?
Thanks! On Thu, Jan 11, 2024 at 7:47 PM Darren Ankney wrote: > Hi Scott, > > This would be the correct way: > > "subnet": "10.10.1.0/30", > "pools": [ { "pool": 10.10.1.2 - 10.10.1.2 } ], > > Thank you, > > Darren Ankney > > On Thu, Jan 11, 2024 at 1:50 PM Scott Rakow wrote: > > > > In one of my subnets I am having to deploy, I have a /30 network which > has only one IP. Will Kea-DHCP be able to support this, as I have not seen > anything in the documentation for this. > > > > If so, would I have to set up the Pool to look like... > > > > "subnet": "10.10.1.0/30", > > "pools": [ { "pool": 10.10.1.2 } ], > > > > Or would it have to look like... > > > > "subnet": "10.10.1.0/30", > > "pools": [ { "pool": 10.10.1.2 - 10.10.1.2 } ], > > > > Thanks, > > Scott > > -- > > 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@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@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@lists.isc.org https://lists.isc.org/mailman/listinfo/kea-users
Re: [Kea-users] Is Kea-DHCP able to support a /30 network?
Hi Scott, This would be the correct way: "subnet": "10.10.1.0/30", "pools": [ { "pool": 10.10.1.2 - 10.10.1.2 } ], Thank you, Darren Ankney On Thu, Jan 11, 2024 at 1:50 PM Scott Rakow wrote: > > In one of my subnets I am having to deploy, I have a /30 network which has > only one IP. Will Kea-DHCP be able to support this, as I have not seen > anything in the documentation for this. > > If so, would I have to set up the Pool to look like... > > "subnet": "10.10.1.0/30", > "pools": [ { "pool": 10.10.1.2 } ], > > Or would it have to look like... > > "subnet": "10.10.1.0/30", > "pools": [ { "pool": 10.10.1.2 - 10.10.1.2 } ], > > Thanks, > Scott > -- > 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@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@lists.isc.org https://lists.isc.org/mailman/listinfo/kea-users
[Kea-users] Is Kea-DHCP able to support a /30 network?
In one of my subnets I am having to deploy, I have a /30 network which has only one IP. Will Kea-DHCP be able to support this, as I have not seen anything in the documentation for this. If so, would I have to set up the Pool to look like... "subnet": "10.10.1.0/30", "pools": [ { "pool": 10.10.1.2 } ], Or would it have to look like... "subnet": "10.10.1.0/30", "pools": [ { "pool": 10.10.1.2 - 10.10.1.2 } ], Thanks, Scott -- 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@lists.isc.org https://lists.isc.org/mailman/listinfo/kea-users