[Kea-users] Non working relay when using raw socket / config-control config-databases

Kevin Olbrich ko at sv01.de
Fri Jul 31 09:10:20 UTC 2020


Can someone help me with this issue?

kind regards
Kevin Olbrich

Am Mo., 20. Juli 2020 um 19:36 Uhr schrieb Kevin Olbrich <ko at sv01.de>:
>
> I found this thread:
> http://kea-users.7364.n8.nabble.com/Kea-users-Configure-a-subnet-in-Kea-configuration-backend-td1574.html#a1577
>
> I've run this query and it returns many rows but Kea still logs
> DHCP4_SUBNET_SELECTION_FAILED / DHCP4_PACKET_NAK_0001.
>
> There is also this video:
> https://www.youtube.com/watch?v=gnVEO4ThE10
>
> My config looks very similar:
> https://bitbucket.org/code-orange/django-cdstack-tpl-keadhcp/src/38e0d788fce48b4f356ba8ee44baaaa474bd19c6/django_cdstack_tpl_keadhcp/templates/config-fs/dynamic/etc/kea/kea-dhcp4.conf.json?at=master
> (hooks only contains libdhcp_mysql_cb).
>
> I really need help here :-(
>
> According to the video, I should not need to define the subnets...
>
> Kind regards
> Kevin
>
> Am So., 19. Juli 2020 um 22:35 Uhr schrieb Kevin Olbrich <ko at sv01.de>:
> >
> > Hi!
> >
> > Currently I'm struggling with two features of Kea.
> >
> > First issue is, that relayed requests are not answered when Kea runs
> > with a raw-socket (because the server also assigns IPs in it's own
> > network).
> > If I change raw to udp, relayed requests work flawlessly. I always had
> > this issue with Kea but the docs state, raw should also work with
> > relayed requests:
> > "When using raw sockets, both the traffic from the directly connected
> > clients and the relayed traffic are handled."
> > (https://kea.readthedocs.io/en/kea-1.6.2/arm/dhcp4-srv.html)
> > At least for me, that's not the case.
> >
> > My second issue is about the config-control config-databases:
> > https://kb.isc.org/docs/using-the-kea-configuration-backend
> >
> > I've defined my subnets via the mysql schema but to make it work, I
> > have to add this code for every subnet:
> >     "subnet4": [
> >         {
> >             "id": 1,
> >             "subnet": "192.168.0.0/24",
> >             "pools": []
> >         } ...
> >
> > Host reservations from the DB are also loaded / applied when this
> > snippet is available.
> >
> > These hooks are loaded:
> >         "hooks-libraries": [
> >             {
> >                 "library":
> > "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_lease_cmds.so"
> >             },
> >             {
> >                 "library":
> > "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_mysql_cb.so"
> >             },
> >             {
> >                 "library":
> > "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_stat_cmds.so"
> >             }
> >         ],
> >
> >
> > Is this the only way to make Kea serve these subnets? Do I need
> > premium hooks (cb_cmds) if I want to avoid the subnet declaration in
> > local config?
> > The subnets are attached to a server-tag but Kea always complains with
> > "DHCP4_PACKET_NAK_0001 - failed to select a subnet for incoming
> > packet" if I remove the subnet4 block.
> > According to the docs, this module is needed to have Change-APIs
> > available (rest, etc.) but I don't need them - the database is handled
> > by me directly.
> >
> > Kind regards
> > Kevin


More information about the Kea-users mailing list