Due to the scarce information in the internet for how to setup ISC DHCP6
configs to manage UEFI pxe/http boot from various client, here is an example
config to accomplish that by means of the vendor class id. The config is also
used to identify and verify the fix in the patch.
Hopefully it helps other people scratching his head trying to figure out the
config (like me) to manage various NBP clients in DHCP server.
Thanks. :)
#dhcpd6.conf
default-lease-time 2592000;
preferred-lifetime 604800;
option dhcp-renewal-time 3600;
option dhcp-rebinding-time 7200;
allow leasequery;
option dhcp6.domain-search "pxetest.org";
option dhcp6.bootfile-url code 59 = string;
option dhcp6.vendor-class code 16 = {unsigned integer 32, unsigned integer 16,
string};
subnet6 fc00:ba49:1625:fb0f::/64 {
range6 fc00:ba49:1625:fb0f:1::aaaa fc00:ba49:1625:fb0f:1::ffff;
class "HTTPClient" {
match substring (option dhcp6.vendor-class, 6, 21);
}
class "PXEClient" {
match substring (option dhcp6.vendor-class, 6, 20);
}
subclass "HTTPClient" "HTTPClient:Arch:00015" {
option dhcp6.vendor-class 0 10 "HTTPClient";
option dhcp6.name-servers fc00:ba49:1625:fb0f::137;
option dhcp6.bootfile-url
"http://linux-o1y1.example.com/boot/grub/i386-efi/core.efi";
}
subclass "HTTPClient" "HTTPClient:Arch:00016" {
option dhcp6.vendor-class 0 10 "HTTPClient";
option dhcp6.name-servers fc00:ba49:1625:fb0f::137;
option dhcp6.bootfile-url
"http://linux-o1y1.example.com/boot/grub/x86_64-efi/core.efi";
}
subclass "PXEClient" "PXEClient:Arch:00006" {
option dhcp6.bootfile-url
"tftp://[fc00:ba49:1625:fb0f::137]/boot/grub/i386-efi/core.efi";
}
subclass "PXEClient" "PXEClient:Arch:00007" {
option dhcp6.bootfile-url
"tftp://[fc00:ba49:1625:fb0f::137]/boot/grub/x86_64-efi/core.efi";
}
subclass "HTTPClient" "HTTPClient:Arch:00023" {
option dhcp6.vendor-class 0 10 "HTTPClient";
option dhcp6.name-servers fc00:ba49:1625:fb0f::137;
option dhcp6.bootfile-url
"http://linux-o1y1.example.com/boot/grub/arm-efi/core.efi";
}
subclass "HTTPClient" "HTTPClient:Arch:00024" {
option dhcp6.vendor-class 0 10 "HTTPClient";
option dhcp6.name-servers fc00:ba49:1625:fb0f::137;
option dhcp6.bootfile-url
"http://linux-o1y1.example.com/boot/grub/arm64-efi/core.efi";
}
subclass "PXEClient" "PXEClient:Arch:00021" {
option dhcp6.bootfile-url
"tftp://[fc00:ba49:1625:fb0f::137]/boot/grub/arm-efi/core.efi";
}
subclass "PXEClient" "PXEClient:Arch:00022" {
option dhcp6.bootfile-url
"tftp://[fc00:ba49:1625:fb0f::137]/boot/grub/arm64-efi/core.efi";
}
subclass "PXEClient" "PXEClient:Arch:00000" {
option dhcp6.bootfile-url
"tftp://[fc00:ba49:1625:fb0f::137]/boot/grub/i386-pc/core.0";
}
}
On Thu, Jul 21, 2016 at 09:58:44AM +0800, Michael Chang wrote:
> The size of the ClassIdentifier is apparently wrong in the structure. In my
> testing it caused the vendor class data to be displayed as bogus
> "HTTPClient:Arch00016x:UNDI00300". After correcting the size the vendor class
> data is "HTTPClient:Arch00016:UNDI003000" which looks good to me.
>
> ---
> NetworkPkg/HttpBootDxe/HttpBootDhcp6.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h
> b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h
> index f9eec9d..14d6db0 100644
> --- a/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h
> +++ b/NetworkPkg/HttpBootDxe/HttpBootDhcp6.h
> @@ -50,7 +50,7 @@ typedef struct {
> } HTTP_BOOT_DHCP6_OPTION_ARCH;
>
> typedef struct {
> - UINT8 ClassIdentifier[10];
> + UINT8 ClassIdentifier[11];
> UINT8 ArchitecturePrefix[5];
> UINT8 ArchitectureType[5];
> UINT8 Lit3[1];
> --
> 2.6.6
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel