From jan-philipp.snizek at business.uzh.ch Fri Apr 26 08:51:45 2024 From: jan-philipp.snizek at business.uzh.ch (Jan-Philipp Snizek) Date: Fri, 26 Apr 2024 08:51:45 +0000 Subject: option 67 boot-file-name FF00 at the end of the data string Message-ID: Hi In isc-dhcpd I use as option 67 option bootfile-name "SMSBoot\\x64\\wdsmgfw.efi\000"; This works with any uefi bios, older or new. How do I do the end of string sequence \000 in kea-dhcp4? There seem to be older uefi BIOSes that upon receiving the option 67 string, they attach FF00 at the end of the string and then try to load the efi file. This ends with the ftfp server returning 'file not found'. How do I have to do this end-of-file sequence in Kea-dhcp4? Is that even the correct name for this? I'm not sure, I usually don't play with these lower level things. For reference, here's the relevant part of the kea-dhcp4 config file that works with recent uefi bioses: "client-classes": [ { "name": "pxeclientx64", "test": "option[60].text == 'PXEClient:Arch:00007:UNDI:003016'", "option-data": [ { "name": "boot-file-name", "data": "SMSBoot\\x64\\wdsmgfw.efi" }, { "name": "tftp-server-name", "code": 66, "data": "tftp-server.mydomain.local" } ] } ], Thanks, -- Philipp From jan-philipp.snizek at business.uzh.ch Fri Apr 26 09:05:22 2024 From: jan-philipp.snizek at business.uzh.ch (Jan-Philipp Snizek) Date: Fri, 26 Apr 2024 09:05:22 +0000 Subject: kea-dhcp4 behaviour question client-class vs reservations Message-ID: Hi I would like to ask a question regarding precedence behavior of kea-dhcp4. Let's take this working config: "client-classes": [ { "name": "pxeclientx64", "test": "option[60].text == 'PXEClient:Arch:00007:UNDI:003016'", "option-data": [ { "name": "vendor-encapsulated-options", "always-send": false }, { "name": "boot-file-name", "data": "SMSBoot\\x64\\wdsmgfw.efi" }, { "name": "tftp-server-name", "code": 66, "data": "my-tftp-server.domain.local" } ] } ], "subnet4": [ { "id": 1, "subnet": "172.20.19.0/24", "next-server": "172.20.19.1", "pools": [ { "pool": "172.20.19.120 - 172.20.19.129" }, { "pool": "172.20.19.130 - 172.20.19.139", "client-class": "pxeclientx64" } ], "reservation-mode": "out-of-pool", "reservations": [ { "hostname": "pxeboot1", "hw-address": "00:e0:4c:68:0a:f1", "ip-address": "172.20.19.150" } ], "option-data": [ { "name": "routers", "data": "172.20.19.1" } ] } ], If the client with the reservation executes a PXE boot it gets the reserved IP .19.150 and successfully boots PXE. The kea-dhcp4 log looks like this: Apr 25 13:53:17 hellbox kea-dhcp4[16858]: INFO EVAL_RESULT Expression pxeclientx64 evaluated to 1 Apr 25 13:53:17 hellbox kea-dhcp4[16858]: INFO DHCP4_LEASE_ADVERT [hwtype=1 00:e0:4c:68:0a:c1], cid=[no info], tid=0x2223e0e3: lease 172.20.19.150 will be advertised Apr 25 13:53:20 hellbox kea-dhcp4[16858]: INFO EVAL_RESULT Expression pxeclientx64 evaluated to 1 Apr 25 13:53:20 hellbox kea-dhcp4[16858]: INFO DHCP4_LEASE_ALLOC [hwtype=1 00:e0:4c:68:0a:c1], cid=[no info], tid=0x2223e0e3: lease 172.20.19.150 has been allocated for 3600 seconds As we can see both matches: pxeclientx64 and the reservation. The client successfully boots pxe. I don't understand why the client successfully pxe boots. The client-class "pxeclientx64" is assigned to a pool. It is neither assigned to the subnet4 { id: 1 } subnet declaration nor to the reservation. What has precedence over what? How does inheritance work in kea? Thanks, -- Philipp From darren.ankney at gmail.com Sat Apr 27 15:29:06 2024 From: darren.ankney at gmail.com (Darren Ankney) Date: Sat, 27 Apr 2024 11:29:06 -0400 Subject: option 67 boot-file-name FF00 at the end of the data string In-Reply-To: References: Message-ID: Hi Philipp, You would need to specify the entire string in hex instead as noted in the ARM: https://kea.readthedocs.io/en/kea-2.4.1/arm/dhcp4-srv.html#standard-dhcpv4-options --- Kea supports the following formats when specifying hexadecimal data: Delimited octets - one or more octets separated by either colons or spaces (":" or " "). While each octet may contain one or two digits, we strongly recommend always using two digits. Valid examples are "ab:cd:ef" and "ab cd ef". String of digits - a continuous string of hexadecimal digits with or without a "0x" prefix. Valid examples are "0xabcdef" and "abcdef". --- There is also an example of doing this there: --- "Dhcp4": { "option-data": [ { "name": "domain-name-servers", "code": 6, "space": "dhcp4", "csv-format": false, "data": "C0 00 03 01 C0 00 03 02" }, ... ], ... } --- Thank you, Darren Ankney On Fri, Apr 26, 2024 at 4:52?AM Jan-Philipp Snizek wrote: > > Hi > > In isc-dhcpd I use as option 67 option bootfile-name "SMSBoot\\x64\\wdsmgfw.efi\000"; > This works with any uefi bios, older or new. > > How do I do the end of string sequence \000 in kea-dhcp4? > > There seem to be older uefi BIOSes that upon receiving the option 67 string, they attach FF00 at the end of the string and then try to load the efi file. This ends with the ftfp server returning 'file not found'. > How do I have to do this end-of-file sequence in Kea-dhcp4? Is that even the correct name for this? I'm not sure, I usually don't play with these lower level things. > > For reference, here's the relevant part of the kea-dhcp4 config file that works with recent uefi bioses: > > "client-classes": [ > { > "name": "pxeclientx64", > "test": "option[60].text == 'PXEClient:Arch:00007:UNDI:003016'", > "option-data": [ > { "name": "boot-file-name", "data": "SMSBoot\\x64\\wdsmgfw.efi" }, > { "name": "tftp-server-name", "code": 66, "data": "tftp-server.mydomain.local" } > ] > } > ], > > Thanks, > > -- > > Philipp > -- > ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. > > dhcp-users mailing list > dhcp-users at lists.isc.org > https://lists.isc.org/mailman/listinfo/dhcp-users From darren.ankney at gmail.com Sat Apr 27 15:35:10 2024 From: darren.ankney at gmail.com (Darren Ankney) Date: Sat, 27 Apr 2024 11:35:10 -0400 Subject: kea-dhcp4 behaviour question client-class vs reservations In-Reply-To: References: Message-ID: Hi Philipp, The keyword "client-class" restricts access to the pool to members of the class. It does not assign members of a class to a pool. See here: https://kea.readthedocs.io/en/kea-2.4.1/arm/classify.html#configuring-pools-with-class-information where it says "Similar to subnets, in certain cases access to certain address or prefix pools must be restricted to only clients that belong to a given class, using the client-class when defining the pool.". Thank you, Darren Ankney On Fri, Apr 26, 2024 at 5:05?AM Jan-Philipp Snizek wrote: > > Hi > > I would like to ask a question regarding precedence behavior of kea-dhcp4. > > Let's take this working config: > > "client-classes": [ > { > "name": "pxeclientx64", > "test": "option[60].text == 'PXEClient:Arch:00007:UNDI:003016'", > "option-data": [ > { "name": "vendor-encapsulated-options", "always-send": false }, > { "name": "boot-file-name", "data": "SMSBoot\\x64\\wdsmgfw.efi" }, > { "name": "tftp-server-name", "code": 66, "data": "my-tftp-server.domain.local" } > ] > } > ], > "subnet4": [ > { > "id": 1, > "subnet": "172.20.19.0/24", > "next-server": "172.20.19.1", > "pools": [ > { "pool": "172.20.19.120 - 172.20.19.129" }, > { "pool": "172.20.19.130 - 172.20.19.139", "client-class": "pxeclientx64" } > ], > "reservation-mode": "out-of-pool", > "reservations": [ > { "hostname": "pxeboot1", "hw-address": "00:e0:4c:68:0a:f1", "ip-address": "172.20.19.150" } > ], > "option-data": [ > { "name": "routers", "data": "172.20.19.1" } > ] > } > ], > > If the client with the reservation executes a PXE boot it gets the reserved IP .19.150 and successfully boots PXE. > The kea-dhcp4 log looks like this: > Apr 25 13:53:17 hellbox kea-dhcp4[16858]: INFO EVAL_RESULT Expression pxeclientx64 evaluated to 1 > Apr 25 13:53:17 hellbox kea-dhcp4[16858]: INFO DHCP4_LEASE_ADVERT [hwtype=1 00:e0:4c:68:0a:c1], cid=[no info], tid=0x2223e0e3: lease 172.20.19.150 will be advertised > Apr 25 13:53:20 hellbox kea-dhcp4[16858]: INFO EVAL_RESULT Expression pxeclientx64 evaluated to 1 > Apr 25 13:53:20 hellbox kea-dhcp4[16858]: INFO DHCP4_LEASE_ALLOC [hwtype=1 00:e0:4c:68:0a:c1], cid=[no info], tid=0x2223e0e3: lease 172.20.19.150 has been allocated for 3600 seconds > As we can see both matches: pxeclientx64 and the reservation. The client successfully boots pxe. > I don't understand why the client successfully pxe boots. The client-class "pxeclientx64" is assigned to a pool. It is neither assigned to the subnet4 { id: 1 } subnet declaration nor to the reservation. > What has precedence over what? How does inheritance work in kea? > > Thanks, > > -- > > Philipp > > -- > ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. > > dhcp-users mailing list > dhcp-users at lists.isc.org > https://lists.isc.org/mailman/listinfo/dhcp-users