[Kea-users] Where to put data for kea.

Marek Greško marek.gresko at protonmail.com
Mon Jan 15 20:28:38 UTC 2024


Hello,

I attached the script. It is not very mature, but does its job.

It reads the file /etc/sysconfig/kea-conf/subnets/${name-of-subnet} and generates /etc/kea/kea-dhcp4-reservations-${name-of-subnet}.conf and /etc/kea/kea-dhcp6-reservations-${name-of-subnet}.conf.

The source file looks like:

windows fd0f:xxxx::1000 192.168.1.20 81:11:11:11:11:11 00:xx:...:11 - hostname1
linux fd0f:xxxx::1001 192.168.1.21 81:11:11:11:11:12 00:xx:...:10 - hostname2
linux fd0f:xxxx::1002 192.168.1.22 81:11:11:11:11:13 MAC - hostname3

... where the columns mean:

group - additional config parameter added from /etc/sysconfig/kea-conf/dhcp4/groups/${name-of-group}

ipv6 address

ipv4 address

MAC address

DUID (if set to keyword MAC, MAC part of the DUID is matched against MAC address)

IAID

Hostname

Description (not mandatory)



Marek




Sent with Proton Mail secure email.

On Monday, January 15th, 2024 at 15:23, Albert Shih <Albert.Shih at obspm.fr> wrote:


> Le 12/01/2024 à 06:34:22+0000, Marek Greško via Kea-users a écrit
> 
> Hi,
> 
> > 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
> > <?include "/path/to/config-file.conf"?> 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
> 
> 
> Well that not would be a big problem because we doesn't use global
> reservation currently.
> 
> All our reservations are inside a subnet
> 
> subnet 10.15.2.0 netmask 255.255.254.0 {
> option routers 10.15.2.1;
> group { #
> option domain-search "OUR_DN";
> option domain-name-servers x.y.z.t;
> option ntp-servers ntp-m.OUR_DN, ntp-p.OUR_DN;
> option domain-name "OUR_DN";
> host ondul-m-b15b-baie1-3.private.OUR_DN {
> stash-agent-options true;
> hardware ethernet 28:29:86:09:90:d2;
> fixed-address 10.15.2.6;
> option host-name "ondul-m-b15b-baie1-3.private.OUR_DN";
> }
> host dos-apc-b15-306-apc1.private.OUR_DN {
> stash-agent-options true;
> hardware ethernet 28:29:86:03:8f:a3;
> fixed-address 10.15.2.7;
> option host-name "dos-apc-b15-306-apc1.private.OUR_DN";
> }
> host apc-b15-306-apc2.private.OUR_DN {
> stash-agent-options true;
> hardware ethernet 28:29:86:03:96:3e;
> fixed-address 10.15.2.8;
> option host-name "apc-b15-306-apc2.private.OUR_DN";
> }
> host apc-b15-306b-apc3.private.OUR_DN {
> stash-agent-options true;
> hardware ethernet 00:c0:b7:9d:dd:63;
> fixed-address 10.15.2.9;
> option host-name "apc-b15-306b-apc3.private.OUR_DN";
> }
> 
> > reservations and had a computer to assigned to 2 different vlans (one for
> > 
> > If you are interested I can send you the script. It is not perfect, but it does its job.
> 
> 
> Thanks you very much. I'm not sure I will use it but why not. At least that
> give me some idea of the result.
> 
> We are using ruby to extract the data from a postgresql database.
> 
> Regards.
> 
> --
> Albert SHIH 🦫 🐸
> France
> Heure locale/Local time:
> lun. 15 janv. 2024 11:35:22 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 at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: redhcp-kea.sh
Type: application/x-shellscript
Size: 1970 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240115/ce3ddb9e/attachment.bin>


More information about the Kea-users mailing list