Skip to content

Commit 7189f3d

Browse files
authored
add configuration example for Kea DHCPv4 server (#562)
Signed-off-by: Chris Chiu <[email protected]>
1 parent ba7e04b commit 7189f3d

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

docs/install/pxe-boot-install.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,82 @@ group {
259259
260260
The config file declares a subnet and two groups. The first group is for hosts to boot using `CREATE` mode and the other one is for `JOIN` mode. By default, the iPXE path is chosen, but if it sees a PXE client it offers the iPXE image according to the client architecture. Please prepare those images and a TFTP server first.
261261
262+
The Internet Systems Consortium (ISC) announced the final [end-of-life (EOL) for ISC DHCP](https://www.isc.org/blogs/isc-dhcp-eol/) in 2022. ISC DHCP users are encouraged to migrate to the newer, feature-rich [Kea DHCP](https://www.isc.org/kea/), which the ISC designed for more modern network environments. If you are already using the Kea DHCPv4 server, check the following configuration example. For more information, see [Kea DHCPv4 Configuration](https://kea.readthedocs.io/en/kea-1.6.2/arm/dhcp4-srv.html#dhcpv4-server-configuration).
263+
```json
264+
"client-classes": [
265+
{
266+
"name": "iPXE UEFI/CREATE",
267+
"test": "option[user-class].exists and substring(option[user-class].hex,0,4) == 'iPXE' and option[client-system].hex == 0x0007",
268+
"boot-file-name": "http://10.100.0.10/harvester/ipxe-create-efi",
269+
"only-if-required": true
270+
},
271+
{
272+
"name": "iPXE non-UEFI/CREATE",
273+
"test": "option[user-class].exists and substring(option[user-class].hex,0,4) == 'iPXE' and not option[client-system].hex == 0x0007",
274+
"boot-file-name": "http://10.100.0.10/harvester/ipxe-create",
275+
"only-if-required": true
276+
},
277+
{
278+
"name": "iPXE UEFI/JOIN",
279+
"test": "option[user-class].exists and substring(option[user-class].hex,0,4) == 'iPXE' and option[client-system].hex == 0x0007",
280+
"boot-file-name": "http://10.100.0.10/harvester/ipxe-join-efi",
281+
"only-if-required": true
282+
},
283+
{
284+
"name": "iPXE non-UEFI/JOIN",
285+
"test": "option[user-class].exists and substring(option[user-class].hex,0,4) == 'iPXE' and not option[client-system].hex == 0x0007",
286+
"boot-file-name": "http://10.100.0.10/harvester/ipxe-join",
287+
"only-if-required": true
288+
},
289+
{
290+
"name": "PXE UEFI",
291+
"test": "option[user-class].exists and not substring(option[user-class].hex,0,4) == 'iPXE' and option[client-system].hex == 0x0007",
292+
"next-server": "10.100.0.20",
293+
"boot-file-name": "ipxe.efi"
294+
},
295+
{
296+
"name": "PXE non-UEFI",
297+
"test": "option[user-class].exists and not substring(option[user-class].hex,0,4) == 'iPXE' and option[client-system].hex == 0x0007",
298+
"next-server": "10.100.0.20",
299+
"boot-file-name": "undionly.kpxe"
300+
}
301+
]
302+
303+
"subnet4": [
304+
{
305+
"subnet": "10.100.0.0/24",
306+
"pools": [
307+
{
308+
"pool": "10.100.0.100 - 10.100.0.199",
309+
"require-client-classes" : [ "iPXE UEFI/CREATE", "iPXE non-UEFI/CREATE" ]
310+
}.
311+
{
312+
"pool": "10.100.0.200 - 10.100.0.253",
313+
"require-client-classes" : [ "iPXE UEFI/JOIN", "iPXE non-UEFI/JOIN" ]
314+
}
315+
],
316+
"option-data": [
317+
{
318+
"name": "routers",
319+
"data": "10.100.0.10"
320+
}
321+
],
322+
"reservations": [
323+
// assign ip address to the host for booting in CREATE mode
324+
{
325+
"hw-address": "52:54:00:6b:13:e2",
326+
"ip-address": "10.100.0.101"
327+
},
328+
// assign ip address to the host for booting in JOIN mode
329+
{
330+
"hw-address": "52:54:00:69:d5:92",
331+
"ip-address": "10.100.0.201"
332+
}
333+
]
334+
}
335+
]
336+
```
337+
262338
## Harvester Configuration
263339
264340
For more information about Harvester configuration, please refer to the [Harvester configuration](./harvester-configuration.md) page.
@@ -319,6 +395,23 @@ group {
319395
320396
The `elsif substring` statement is new, and it offers `http://10.100.0.10/harvester/ipxe.efi` when it sees a UEFI HTTP boot DHCP request. After the client fetches the iPXE program and runs it, the iPXE program will send a DHCP request again and load the iPXE script from the URL `http://10.100.0.10/harvester/ipxe-create-efi`.
321397
398+
If you want to enable UEFI HTTP boot on the Kea DHCPv4 server, you must add a new `client-class` at the end of the `client-classes`.
399+
400+
Example:
401+
```json
402+
{
403+
"name": "HTTP",
404+
"test": "substring(option[vendor-class-identifier].hex,0,10) == 'HTTPClient'",
405+
"option-data": [
406+
{
407+
"name": "vendor-class-identifier",
408+
"data": "HTTPClient"
409+
}
410+
],
411+
"boot-file-name": "http://10.100.0.10/harvester/ipxe.efi"
412+
}
413+
```
414+
322415
### The iPXE Script for UEFI Boot
323416
324417
It's mandatory to specify the initrd image for UEFI boot in the kernel parameters. The following is an updated version of iPXE script for `CREATE` mode.

0 commit comments

Comments
 (0)