[Kea-users] keama mistranslating dhcp-client-identified
John Lind
steinhelten at gmail.com
Sat Feb 8 20:33:48 UTC 2025
I apologize - there's a typo in the subject line. It should be
dhcp-client-identifier (with an "r" at the end, not a "d').
Anyway, I tried running "kea-dhcp4 -t" on one of these files and got this
back:
2025-02-08 14:18:27.503 ERROR [kea-dhcp4.dhcp4/94820.0x50554e412000]
DHCP4_PARSER_FAIL failed to create or run parser for configuration element
reservations: one of the supported identifiers must be specified for host
reservation: circuit-id, client-id, duid, flex-id, hw-address
(kea-head.conf:135:7)
Error encountered: one of the supported identifiers must be specified for
host reservation: circuit-id, client-id, duid, flex-id, hw-address
(kea-head.conf:135:7)
So - I don't see anything in that list that would correspond to what I've
been doing with ISC-dhcp. I tried making up the syntax for client ID, and
it didn't like that, either...
{
"hostname": "bringebaer",
"ip-address": "192.168.1.57",
"client-id": "twister"
},
And the parser said:
2025-02-08 14:32:29.031 ERROR [kea-dhcp4.dhcp4/94837.0x5775ffa12000]
DHCP4_PARSER_FAIL failed to create or run parser for configuration element
reservations: invalid host identifier value 'twister' (kea-head.conf:135:7)
Error encountered: invalid host identifier value 'twister'
(kea-head.conf:135:7)
On Sat, Feb 8, 2025 at 12:50 PM John Lind <steinhelten at gmail.com> wrote:
> Hey, all. I've spent hours watching recorded webinars, reading
> documentation, and doing web searches in vain to try to figure out how to
> get these reservations to work in kea.
>
> For some of my devices / systems I like to use a value sent by the client
> rather than the hardware address to match them to a reservation. This is
> especially useful in two cases
> 1) when I don't know the MAC address
> 2) when a device has different ways of connecting to my network (WiFi
> versus hardwired, and maybe different ethernet ports) but I want it to get
> the same IP address regardless of how it connects.
>
> For reference, here's how the values appear in the ISC dhcp leases file
> when there's not a reservation (yet).
>
> client-hostname "MyQ-5C9";
> client-hostname "casper";
> client-hostname "StreamingStick4K-ET5";
> client-hostname "Pixel-6a";
> client-hostname "Paige-s-S23-Ultra";
> client-hostname "Milea-s-S20-FE";
> client-hostname "DESKTOP-7424SLE";
> client-hostname "Pixel-8-Pro";
> client-hostname "Pixel-7a";
>
> Here's an example of how I represent that in the dhcpd.conf file:
> host bringebaer { fixed-address bringebaer.starfire.mn.org;
> option dhcp-client-identifier "bringebaer";
> }
> So, of course, keama is going to translate the FQDN to an IP address, but
> the rest of what it does doesn't seem like what I want:
>
> {
> "hostname": "bringebaer",
> "ip-address": "192.168.1.57",
> "option-data": [
> {
> "space": "dhcp4",
> "name": "dhcp-client-identifier",
> "code": 61,
> // "original-data": "\"bringebaer\"",
> "csv-format": false,
> "data": "6272696e676562616572"
> }
> ]
> },
> Note - the "data" in the option is actually a string of hex digits which
> truly does spell out "bringebaer" but I really think that keama is mapping
> dhcp-client-identifier to completely the wrong thing.
>
> If anyone can set me on the right course, I sure would appreciate it.
>
> --
> John Lind
> steinhelten at gmail.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20250208/f8342fb3/attachment.htm>
More information about the Kea-users
mailing list