diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 14:53:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 14:53:22 +0000 |
commit | 52c021ee0b0c6ad2128ed550c694aad0d11d4c3f (patch) | |
tree | 83cf8627b94336cf4bee7479b9749263bbfd3a06 /doc/examples/kea6/iPXE.json | |
parent | Initial commit. (diff) | |
download | isc-kea-52c021ee0b0c6ad2128ed550c694aad0d11d4c3f.tar.xz isc-kea-52c021ee0b0c6ad2128ed550c694aad0d11d4c3f.zip |
Adding upstream version 2.5.7.upstream/2.5.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/examples/kea6/iPXE.json')
-rw-r--r-- | doc/examples/kea6/iPXE.json | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/doc/examples/kea6/iPXE.json b/doc/examples/kea6/iPXE.json new file mode 100644 index 0000000..108233b --- /dev/null +++ b/doc/examples/kea6/iPXE.json @@ -0,0 +1,68 @@ +// This is an example configuration for iPXE boot in Kea6. + +{ + "Dhcp6": { + // Mandatory part of the config that list interfaces on which + // Kea will listen for incoming traffic. + "interfaces-config": { + "interfaces": [ "eth0" ] + }, + +// Two classes are migrated form ISC-DHCP example: +// if exists dhcp6.client-arch-type and +// option dhcp6.client-arch-type = 00:07 { +// option dhcp6.bootfile-url "http://[2001:db8::1]/ipxe.efi"; +// } else if exists dhcp6.user-class and +// substring(option dhcp6.user-class, 2, 4) = "iPXE" { +// option dhcp6.bootfile-url "http://[2001:db8::1]/ubuntu.cfg"; +// } + +// In example shown below incoming packet will receive value +// http://[2001:db8::1]/ubuntu.cfg if incoming packet will include user +// class option with "iPXE" in it and value http://[2001:db8::1]/ipxe.efi +// if option client architecture type will be 7. +// If incoming packet will include both of those options with matching +// values it will be assigned to class "a-ipxe" because it was first +// matching class. If you want to change that order names of the classes +// have to have different alphabetical order. In Kea 1.3.0 (and previous +// versions) alphabetical order is used in classification. Note this +// should change in next versions, for instance to keep the definition +// order. + "client-classes": [ + { + "name": "a-ipxe", + // user-class option (code 15) is a tuple array + // so we need to skip the length (tuple first element) + "test": "substring(option[15].hex, 2, 4) == 'iPXE'", + "option-data": [ + { + "space": "dhcp6", + "name": "bootfile-url", + "code": 59, + "data": "http://[2001:db8::1]/ubuntu.cfg" + } + ] + }, + { + "name": "b-efi", + // please consider to add a not a-ipxe here to enforce + // the "else"? + "test": "option[61].hex == 0x0007", + "option-data": [ + { + "space": "dhcp6", + "name": "bootfile-url", + "code": 59, + "data": "http://[2001:db8::1]/ipxe.efi" + } + ] + } + ], + "subnet6": [ + { + "id": 1, + "subnet": "2001:db8::/64" + } + ] + } +} |