[Kea-users] legal-log
Darren Ankney
darren.ankney at gmail.com
Fri Jul 10 09:32:20 UTC 2026
Hi Anders,
Have a look in the pcap to see if the giaddr field was filled on the
renewals. I suspect that something other than the relay agent (FTTH
equipment?) is filling the option 82 as is typical at a FTTH ISP.
Normally the renewals would not be forwarded by the relay agent except
in the case of some sort of DHCP proxy (such as that found on the
Cisco ASR9k series routers). However, the fiber equipment often is
tasked with adding the circuit ID and other details in option 82
because it is the device that knows them. Adding stash-agent options
may be causing Kea to set giaddr which will trigger legal_log to look
for option 82 where it wouldn't normally. You can actually set custom
*-parser-format settings (see here:
https://kea.readthedocs.io/en/kea-3.2.0/arm/hooks.html#dhcpv4-log-entries)
that better match your packet content if you don't want to use
stash-agent-options.
Thank you,
Darren Ankney
On Thu, Jul 9, 2026 at 6:05 AM Anders Rosendal <anders at rosendal.nu> wrote:
>
> Hi
> Thanks, with those two options it indeed started logging on all entries. Still finds it a bit strange that it does not do this automatically. I have double checked with tcpdump and all requests includes option82 information, regardless if the request is broadcast (via relay) or unicast directly to the server.
>
> /Anders
>
> On Wed, 8 Jul 2026 at 22:11, Darren Ankney <darren.ankney at gmail.com> wrote:
>>
>> Hi Anders,
>>
>> This is most likely because the client is renewing directly to the
>> DHCP server. You can force Kea to retain the relay-agent information
>> option data using '"stash-agent-options": true' (see here:
>> https://kea.readthedocs.io/en/kea-3.2.0/arm/dhcp4-srv.html#stash-agent-options).
>> This should make the cid and rid available during the REQUEST. Note
>> that '"store-extended-info": true,' is required to make the former
>> work (see: https://kea.readthedocs.io/en/kea-3.2.0/arm/dhcp4-srv.html#storing-extended-lease-information).
>>
>> Thank you,
>> Darren Ankney
>>
>> On Wed, Jul 8, 2026 at 3:47 PM Anders Rosendal <anders at rosendal.nu> wrote:
>> >
>> > Hi
>> > I'm on my way of migrating from isc-dhcp to isc-kea for a village network with 400 ftth-consumers, and is now looking at the logging to track which customer gets which IP.
>> > I have enabled the libdhcp_legal_log-hook with the most basic configuration:
>> >
>> > {
>> > "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_legal_log.so",
>> > "parameters": {
>> > "base-name": "kea-legal4",
>> > }
>> > }
>> >
>> > The problem I have is that only on the initial DISCOVER/REQUEST the server logs the cid and rid, on subsequent renews it only logs IP, mac and extended time.
>> >
>> > How do I get it to log all parameters on all request/ack events?
>> >
>> > 2026-07-07 16:11:04 CEST Address: 213.21.95.157 has been assigned for 2 hrs 0 mins 0 secs to a device with hardware address: hwtype=1 00:0a:59:02:0c:39 connected via relay at address: 213.21.95.129, identified by circuit-id: 65:74:68:20:30:2f:30:2f:33:36:3a:31:30:31:2e:30:20:61:73:31:30:30:2e:6d:6a:6f:6c:65:2e:63:6f:6d:2f:30:2f:30:2f:30:2f:30:2f:30 (eth 0/0/36:101.0 as100.mjole.com/0/0/0/0/0) and remote-id: 61:73:31:30:30:2e:6d:6a:6f:6c:65:2e:63:6f:6d (as100.mjole.com)
>> > 2026-07-07 17:11:03 CEST Address: 213.21.95.157 has been assigned for 2 hrs 0 mins 0 secs to a device with hardware address: hwtype=1 00:0a:59:02:0c:39
>> > 2026-07-07 18:11:03 CEST Address: 213.21.95.157 has been assigned for 2 hrs 0 mins 0 secs to a device with hardware address: hwtype=1 00:0a:59:02:0c:39
>> >
>> > /Anders R
>> > --
>> > 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 at lists.isc.org
>> --
>> 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 at lists.isc.org
>
> --
> 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 at lists.isc.org
More information about the Kea-users
mailing list