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

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

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

Kevin Olbrich
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
_______________________________________________
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
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

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

Kevin Olbrich
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 <[hidden email]>:

>
> 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
_______________________________________________
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
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|

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

Kevin Olbrich
Can someone help me with this issue?

kind regards
Kevin Olbrich

Am Mo., 20. Juli 2020 um 19:36 Uhr schrieb Kevin Olbrich <[hidden email]>:

>
> 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 <[hidden email]>:
> >
> > 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
_______________________________________________
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
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users