[Kea-users] Kea-users Digest, Vol 112, Issue 24

JT ISC jtisc88 at gmail.com
Mon Oct 23 03:40:38 UTC 2023


I apologize in advance as I know this is probably not the ideal way to
respond to answers to questions someone receives in the Digest.


Message: 2
Date: Sat, 21 Oct 2023 14:09:40 -0400
From: Darren Ankney <darren.ankney at gmail.com>
To: kea-users at lists.isc.org
Subject: Re: [Kea-users] Migration Questions
Message-ID:
        <CAKabWHgKV_6kq-Hcs=0TPCTRvzitGk+1EwEeVHaFMUT3rkLyMw at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8
Hi,

> Does the Kea Lease Migration support ISC DHCP Failover Lease Files?

The only difference between a non-failover lease file and failover
lease file in ISC DHCP, AFAIK, was that there were some extra entries
about peers and status.  I don't think there was anything in the
actual leases themselves, so I imagine the answer would be yes.

— Going to test this out soon and see what the migration tool does.

>
> I might have overlooked this in the document for the Lease Migration.
Would it be possible to upload the output of the Kea Lease Migration to
MySQL Database Backend when Kea is configured to store Leases in a database
rather than memfile?  Or is the output intended to be used in the memfile?

I don't think the migration assistant itself is capable of that, but
the kea-admin tool can transport leases between memfile csv format and
database (postgres or mysql):
https://kea.readthedocs.io/en/kea-2.4.0/arm/admin.html#the-kea-admin-tool

— Thanks for pointing me in the right direction on this.  There is a lot of
things to learn about Kea and how it works.  ISC DHCP was simple but we
learned it and lives with it for many many years, so it is nice to see the
amount of work put into Kea and how things have evolved.

>
> Also, I used the Kea Lease Migration and the converted lease file shows
all the leases just fine.  I followed the example to load the output csv
file into Kea DHCP4 and when I test the configuration file everything shows
to be fine.  However, when I go to start the Kea DHCP4 Service, I get the
error "unable to open database: unable to open "filename" regardless if the
csv file is in the /etc/kea directory or the /var/lib/kea/ directory.
>
> Here is the lease database configuration snippet with the lease file in
the /etc/kea directory -
>
>     "sanity-checks": {
>         "lease-checks": "fix-del"
>     },
>     "lease-database": {
>         // Memfile is the simplest and easiest backend to use. It's an
in-memory
>         // C++ database that stores its state in CSV file.
>         "type": "memfile",
>         "persist": true,
>         "name": "/etc/kea/dhcpd-leases-kea.csv",
>         "lfc-interval": 3600
>     },


Perhaps there is a permission issue?  Depending how you installed, Kea
may be running as an unprivileged user (such as _kea) who may not have
access to the .csv file to read on startup.

Thank you,

Darren Ankney

— Darren, you were correct on this.  However, you won’t figure the
permissions issue out on CentOS 7.  I spent at least a day trying to figure
this out as well as several other issues and/or possibly bugs on CentOS 7
and then finally created an Ubuntu 20.04 VM and started trying to use Kea
on Ubuntu like I was attempting to do on CentOS.  Now we are working and I
have a lot more questions to ask the mailing list

Thanks,
JTISC

On Sat, Oct 21, 2023 at 1:29 PM <kea-users-request at lists.isc.org> wrote:

> Send Kea-users mailing list submissions to
>         kea-users at lists.isc.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.isc.org/mailman/listinfo/kea-users
> or, via email, send a message with subject or body 'help' to
>         kea-users-request at lists.isc.org
>
> You can reach the person managing the list at
>         kea-users-owner at lists.isc.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Kea-users digest..."
>
>
> Today's Topics:
>
>    1. Re: DDNS limitations - ddns-qualifying-suffix vs domain-name
>       (Darren Ankney)
>    2. Re: Migration Questions (Darren Ankney)
>    3. Re: Issue installing Kea DHCP4 on Ubuntu 22 with Postgresql
>       16 (Darren Ankney)
>    4. Re: dhcp | KEA DHCPv6 server not assigning ip addresses to
>       clients (Darren Ankney)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 21 Oct 2023 13:54:27 -0400
> From: Darren Ankney <darren.ankney at gmail.com>
> To: Vladimir Nikoli? <vladimir at nikolic.si>
> Cc: Kea-users at lists.isc.org
> Subject: Re: [Kea-users] DDNS limitations - ddns-qualifying-suffix vs
>         domain-name
> Message-ID:
>         <CAKabWHhPnUQWz=
> rsPSgDx2jsMRUaGmztTzmitr8WfcJzaNr2-Q at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi Vladimir,
>
> You can set it "ddns-qualifying-suffix": "", which resets it to empty
> in the block in which you do that.  You could also only specify inside
> subnets where you need it specified and not specify at global level.
> There would have to be some way to flag hostnames that you wanted to
> ignore a ddns-qualifying-suffix setting somehow to have it
> simultaneously set to some value and not apply to all hostnames in
> that block.
>
> Thank you,
>
> Darren Ankney
>
> On Tue, Oct 17, 2023 at 2:50?AM Vladimir Nikoli? <vladimir at nikolic.si>
> wrote:
> >
> > Thanks Darren.
> >
> > If ?ddns-qualifying-subnet? is being set on any level, it?s then
> appended to the ?hostname? value from the host reservation. ?hostname? is
> the FQDN, only if ?ddns-qualifying-subnet? is empty.
> > So it?s either one or another.
> > Which is really inflexible.
> >
> > Regards
> >
> >
> > > On 17 Oct 2023, at 12:26 am, Darren Ankney <darren.ankney at gmail.com>
> wrote:
> > >
> > > ?Hi Vladimir,
> > >
> > > The DHCPv4 domain-name option (15) isn't meant for use with ddns.  It
> > > is a search domain that the client should use when performing name
> > > resolution.  See: https://www.rfc-editor.org/rfc/rfc2132#section-3.17
> > >
> > > You can set ddns-qualifying-suffix at the global, shared-network and
> > > subnet level.  In a host reservation, you can use the "hostname"
> > > parameter to specify a FQDN to send to the client and for use in DDNS.
> > > See here:
> https://kea.readthedocs.io/en/kea-2.4.0/arm/dhcp4-srv.html#reserving-a-hostname
> > >
> > >> On Mon, Oct 16, 2023 at 3:23?PM Vladimir Nikolic via Kea-users
> > >> <kea-users at lists.isc.org> wrote:
> > >>
> > >> Hi,
> > >>
> > >> While trying to migrate DHCP service from ISC DHCP to ISC KEA, we are
> > >> hitting following KEA limitations:
> > >>
> > >> - option domain-name has no part in DDNS names construction, it's only
> > >> ddns-qualifying-suffix that's being honoured
> > >> - ddns-qualifying-suffix can't be specified in the class definition
> (we
> > >> have dedicated zone for our OOB devices)
> > >> - there can be only one DDNS zone for all the clients in a subnet
> > >> (ddns-qualifying-suffix), with ISC DHCP you can have one default
> > >> domain-name for a subnet and every single host reservation with a
> > >> different domain-name (DDNS zone)
> > >>
> > >> Regards,
> > >> Vladimir
> > >> --
> > >> 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
>
>
> ------------------------------
>
> Message: 2
> Date: Sat, 21 Oct 2023 14:09:40 -0400
> From: Darren Ankney <darren.ankney at gmail.com>
> To: kea-users at lists.isc.org
> Subject: Re: [Kea-users] Migration Questions
> Message-ID:
>         <CAKabWHgKV_6kq-Hcs=
> 0TPCTRvzitGk+1EwEeVHaFMUT3rkLyMw at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi,
>
> > Does the Kea Lease Migration support ISC DHCP Failover Lease Files?
>
> The only difference between a non-failover lease file and failover
> lease file in ISC DHCP, AFAIK, was that there were some extra entries
> about peers and status.  I don't think there was anything in the
> actual leases themselves, so I imagine the answer would be yes.
>
> >
> > I might have overlooked this in the document for the Lease Migration.
> Would it be possible to upload the output of the Kea Lease Migration to
> MySQL Database Backend when Kea is configured to store Leases in a database
> rather than memfile?  Or is the output intended to be used in the memfile?
>
> I don't think the migration assistant itself is capable of that, but
> the kea-admin tool can transport leases between memfile csv format and
> database (postgres or mysql):
> https://kea.readthedocs.io/en/kea-2.4.0/arm/admin.html#the-kea-admin-tool
>
> >
> > Also, I used the Kea Lease Migration and the converted lease file shows
> all the leases just fine.  I followed the example to load the output csv
> file into Kea DHCP4 and when I test the configuration file everything shows
> to be fine.  However, when I go to start the Kea DHCP4 Service, I get the
> error "unable to open database: unable to open "filename" regardless if the
> csv file is in the /etc/kea directory or the /var/lib/kea/ directory.
> >
> > Here is the lease database configuration snippet with the lease file in
> the /etc/kea directory -
> >
> >     "sanity-checks": {
> >         "lease-checks": "fix-del"
> >     },
> >     "lease-database": {
> >         // Memfile is the simplest and easiest backend to use. It's an
> in-memory
> >         // C++ database that stores its state in CSV file.
> >         "type": "memfile",
> >         "persist": true,
> >         "name": "/etc/kea/dhcpd-leases-kea.csv",
> >         "lfc-interval": 3600
> >     },
>
>
> Perhaps there is a permission issue?  Depending how you installed, Kea
> may be running as an unprivileged user (such as _kea) who may not have
> access to the .csv file to read on startup.
>
> Thank you,
>
> Darren Ankney
>
>
> ------------------------------
>
> Message: 3
> Date: Sat, 21 Oct 2023 14:21:49 -0400
> From: Darren Ankney <darren.ankney at gmail.com>
> To: "kea-users at lists.isc.org" <kea-users at lists.isc.org>
> Subject: Re: [Kea-users] Issue installing Kea DHCP4 on Ubuntu 22 with
>         Postgresql 16
> Message-ID:
>         <CAKabWHi=E5KVYRPHe4Wy+3UfaC5aXg8uHx8Ed2LBf9k=
> 0+bfMA at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi Ben,
>
> I'm not sure what to make of those errors.  It does appear that
> changing database ownership is the correct course of action:
> https://gitlab.isc.org/isc-projects/kea/-/issues/2773
>
> I'd say perform some tests and make sure that leases are successfully
> stored in the database (perhaps use the API to retrieve some leases).
> Keep an eye on logs for any error messages.
>
> Thank you,
>
> Darren Ankney
>
> On Tue, Oct 17, 2023 at 2:35?PM Ben Bridges <bbridges at springnet.net>
> wrote:
> >
> > Hi,
> >
> >
> >
> > I am trying to install the Kea DHCP4 server on Ubuntu 22.04 with
> PostgreSQL v16.  When I try to create the database tables with kea-admin, I
> get the following error:
> >
> >
> >
> > psql:/usr/share/kea/scripts/pgsql/dhcpdb_create.pgsql:36: ERROR:
> permission denied for schema public
> >
> > LINE 1: CREATE TABLE lease4 (
> >
> >
> >
> > I had granted all privileges on the public schema (as well as all
> privileges to the kea database) to the kea user.  I read that in postgresql
> v16 only the owner of a database can create objects in it, so I changed the
> owner of the kea database to be the kea user and re-ran ?kea-admin db-init?
> to initialize the kea database.  I did not get the above error, and the
> ?kea-admin db-version ?? command now returns ?18.0?, but the ?kea-admin
> db-init? command did output the following NOTICEs:
> >
> >
> >
> > psql:/usr/share/kea/scripts/pgsql/dhcpdb_create.pgsql:140: NOTICE:
> function lease4dumpheader() does not exist, skipping
> >
> > psql:/usr/share/kea/scripts/pgsql/dhcpdb_create.pgsql:148: NOTICE:
> function lease4dumpdata() does not exist, skipping
> >
> > psql:/usr/share/kea/scripts/pgsql/dhcpdb_create.pgsql:178: NOTICE:
> function lease6dumpheader() does not exist, skipping
> >
> > psql:/usr/share/kea/scripts/pgsql/dhcpdb_create.pgsql:186: NOTICE:
> function lease6dumpdata() does not exist, skipping
> >
> >
> >
> > Are those message ok?  Did I do the correct thing by changing the owner
> of the kea database to be the kea user?  Will that cause problems later
> when Kea is upgraded to a newer version?  Should the owner of the kea
> database be changed back to the root user after it is initialized?  Should
> the kea user be granted all privileges on the public schema as I did?
> >
> >
> >
> > Thanks,
> >
> > .Ben Bridges.
> >
> >
> >
> > --
> > 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
>
>
> ------------------------------
>
> Message: 4
> Date: Sat, 21 Oct 2023 14:28:46 -0400
> From: Darren Ankney <darren.ankney at gmail.com>
> To: "kea-users at lists.isc.org" <kea-users at lists.isc.org>
> Subject: Re: [Kea-users] dhcp | KEA DHCPv6 server not assigning ip
>         addresses to clients
> Message-ID:
>         <CAKabWHguFVp=
> 2A6_87z2coemULNZmiorSJxWE4WLQchbQM3iTQ at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi Jody,
>
> You may want to have a look at:
> https://kb.isc.org/docs/kea-logging-configuration about logging so that
> you
> can capture what is happening.  There is more about this in the ARM:
> https://kea.readthedocs.io/en/kea-2.4.0/arm/logging.html
>
> Thank you,
>
> Darren Ankney
>
> On Wed, Oct 18, 2023 at 1:47?PM Jordy Benavides Vargas via Kea-users <
> kea-users at lists.isc.org> wrote:
>
> > Hello Friends,
> >
> >
> >
> > I installed kea in to UBUNTU SERVER 22 LTS  and I already configured kea,
> > right now kea process is running, but is not assigning ip address to
> > clients.
> >
> >
> >
> > I?m running a status command and I am seeing request from clients as
> > follows:
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > But addresses aren?t being assigned. This is my kea-dhcp6.conf
> >
> >
> >
> > {
> >
> > # DHCPv6 configuration starts on the next line
> >
> > "Dhcp6": {
> >
> >
> >
> > # First we set up global values
> >
> >     "valid-lifetime": 4000,
> >
> >     "renew-timer": 1000,
> >
> >     "rebind-timer": 2000,
> >
> >     "preferred-lifetime": 3000,
> >
> >
> >
> > # Next we set up the interfaces to be used by the server.
> >
> >     "interfaces-config": {
> >
> >         "interfaces": [ "eno1/2003:1200:2400:4000::3" ],
> >
> >         "service-sockets-max-retries": 5,
> >
> >         "service-sockets-retry-wait-time": 5000,
> >
> >         "service-sockets-require-all": false
> >
> >
> >
> >     },
> >
> >
> >
> > # And we specify the type of lease database
> >
> >     "lease-database": {
> >
> >         "type": "memfile",
> >
> >         "persist": true,
> >
> >         "name": "/var/lib/kea/dhcp6.leases"
> >
> >     },
> >
> >
> >
> > # Finally, we list the subnets from which we will be leasing addresses.
> >
> >     "subnet6": [
> >
> >         {
> >
> >             "subnet": "2001:1400:2404::/48",
> >
> >             "pd-pools": [
> >
> >                 {
> >
> >                     "prefix": "2001:1400:2404::",
> >
> >                     "prefix-len": 48,
> >
> >                     "delegated-len": 56
> >
> >                 }
> >
> >             ]
> >
> >         }
> >
> >     ]
> >
> > # DHCPv6 configuration ends with the next line
> >
> > }
> >
> >
> >
> > }
> >
> >
> >
> >
> >
> >
> >
> > network:
> >
> >   ethernets:
> >
> >     eno1:
> >
> >       addresses:
> >
> >       - 10.137.255.254/30
> >
> >       - 2003:1200:2400:4000::3/50
> >
> >       nameservers:
> >
> >         addresses:
> >
> >         - 8.8.8.8
> >
> >         - 2001:4860:4860::8888
> >
> >       accept-ra: true
> >
> >       routes:
> >
> >      - to: 192.168.8.0/24
> >
> >         via: 10.137.255.253
> >
> >       - to: ::/0
> >
> >         via: 2003:1300:2400:4000::1
> >
> >       - to: 10.0.0.0/8
> >
> >         via: 10.137.255.253
> >
> >     eno2:
> >
> >      dhcp4: true
> >
> >      dhcp6: false
> >
> >
> >
> >
> >
> > Cualquier consulta con gusto
> >
> >
> >
> >
> >
> > [image: Logotipo Descripci?n generada autom?ticamente]
> >
> >
> >
> > *Jordy Benavides Vargas* *|* Voz y datos N2 Lider T?cnico FTTH
> >
> >
> >
> > Tel: (506) 4080-0061/ Ext. 4506
> >
> > Cel: (506) 71369148
> >
> > E-mail: jordy.benavides at telecablecr.com
> >
> > Website: telecablecr.com <http://www.telecablecr.com>
> >
> >
> >
> >
> > <
> https://telecablecr.com/wp-content/uploads/2020/09/Poli%CC%81tica-de-Privacidad.pdf
> >
> >
> > [image: Recycle con relleno s?lido]
> >
> >
> >
> >
> >
> >
> > --
> > 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/20231021/e963fa93/attachment.htm
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: image001.png
> Type: image/png
> Size: 13460 bytes
> Desc: not available
> URL: <
> https://lists.isc.org/pipermail/kea-users/attachments/20231021/e963fa93/attachment.png
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: image002.png
> Type: image/png
> Size: 199485 bytes
> Desc: not available
> URL: <
> https://lists.isc.org/pipermail/kea-users/attachments/20231021/e963fa93/attachment-0001.png
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: image003.png
> Type: image/png
> Size: 420 bytes
> Desc: not available
> URL: <
> https://lists.isc.org/pipermail/kea-users/attachments/20231021/e963fa93/attachment-0002.png
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: image005.png
> Type: image/png
> Size: 78979 bytes
> Desc: not available
> URL: <
> https://lists.isc.org/pipermail/kea-users/attachments/20231021/e963fa93/attachment-0003.png
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: image007.png
> Type: image/png
> Size: 1922 bytes
> Desc: not available
> URL: <
> https://lists.isc.org/pipermail/kea-users/attachments/20231021/e963fa93/attachment-0004.png
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
>
> ISC funds the development of this software with paid support
> subscriptions. Contact us at https://www.isc.org/contact/ for more
> information.
>
> Kea-users mailing list
> Kea-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/kea-users
>
>
> ------------------------------
>
> End of Kea-users Digest, Vol 112, Issue 24
> ******************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20231022/922d3106/attachment-0001.htm>


More information about the Kea-users mailing list