|
| 1 | +# Only used if DHCP_RANGE_START is set, requires ENV vars changed via envsubst |
| 2 | +# DHCP Proxy range and enable verbose DHCP logging |
| 3 | +dhcp-range=${DHCP_RANGE_START},proxy |
| 4 | +log-dhcp |
| 5 | +leasefile-ro |
| 6 | + |
| 7 | +# Prevents reusing servername and filename fields to avoid confusing old clients |
| 8 | +dhcp-no-override |
| 9 | + |
| 10 | +# Disable multicast/broadcast discovery, and instruct client to download the boot file immediately |
| 11 | +dhcp-option=vendor:PXEClient,6,2b |
| 12 | + |
| 13 | +# Based on logic in https://gist.github.com/robinsmidsrod/4008017 |
| 14 | +# iPXE sends a 175 option, checking suboptions |
| 15 | +dhcp-match=set:ipxe-http,175,19 |
| 16 | +dhcp-match=set:ipxe-https,175,20 |
| 17 | +dhcp-match=set:ipxe-menu,175,39 |
| 18 | +# pcbios specific |
| 19 | +dhcp-match=set:ipxe-pxe,175,33 |
| 20 | +dhcp-match=set:ipxe-bzimage,175,24 |
| 21 | +dhcp-match=set:ipxe-iscsi,175,17 |
| 22 | +# efi specific |
| 23 | +dhcp-match=set:ipxe-efi,175,36 |
| 24 | +# combination |
| 25 | +# set ipxe-ok tag if we have correct combination |
| 26 | +# http && menu && iscsi ((pxe && bzimage) || efi) |
| 27 | +tag-if=set:ipxe-ok,tag:ipxe-http,tag:ipxe-menu,tag:ipxe-iscsi,tag:ipxe-pxe,tag:ipxe-bzimage |
| 28 | +tag-if=set:ipxe-ok,tag:ipxe-http,tag:ipxe-menu,tag:ipxe-iscsi,tag:ipxe-efi |
| 29 | + |
| 30 | +# Match BIOS PXE clients |
| 31 | +dhcp-match=set:bios,60,PXEClient:Arch:00000 |
| 32 | +# Match UEFI 32-bit PXE clients |
| 33 | +dhcp-match=set:efi32,60,PXEClient:Arch:00002 |
| 34 | +# Match UEFI 32-bit (variant 1) PXE clients |
| 35 | +dhcp-match=set:efi32-1,60,PXEClient:Arch:00006 |
| 36 | +# Match UEFI 64-bit PXE clients |
| 37 | +dhcp-match=set:efi64,60,PXEClient:Arch:00007 |
| 38 | +# Match UEFI 64-bit (variant 1) PXE clients |
| 39 | +dhcp-match=set:efi64-1,60,PXEClient:Arch:00008 |
| 40 | +# Match UEFI 64-bit (BC variant) PXE clients |
| 41 | +dhcp-match=set:efi64-2,60,PXEClient:Arch:00009 |
| 42 | +# Match ARM64 UEFI clients |
| 43 | +dhcp-match=set:arm64-efi,60,PXEClient:Arch:0000A |
| 44 | +# Match Raspberry Pi 4 (aarch64) architecture based on Option 60 (PXEClient vendor class) |
| 45 | +dhcp-match=set:rpi4,60,PXEClient:Arch:00011:UNDI:003000 |
| 46 | + |
| 47 | +# Serve appropriate bootloaders for non-iPXE clients (initial PXE boot) |
| 48 | +# Legacy BIOS (not iPXE) |
| 49 | +pxe-service=tag:bios,tag:!ipxe-ok,X86PC,"Legacy BIOS",netboot.xyz-undionly.kpxe |
| 50 | +# UEFI 32-bit (not iPXE) |
| 51 | +pxe-service=tag:efi32,tag:!ipxe-ok,BC_EFI,"UEFI 32-bit",netboot.xyz.efi |
| 52 | +# UEFI 64-bit (not iPXE) |
| 53 | +pxe-service=tag:efi64,tag:!ipxe-ok,X86-64_EFI,"UEFI 64-bit",netboot.xyz.efi |
| 54 | +# ARM64 UEFI (not iPXE) |
| 55 | +pxe-service=tag:arm64-efi,tag:!ipxe-ok,ARM64_EFI,"ARM64 UEFI",netboot.xyz-arm64.efi |
| 56 | +# Raspberry Pi Boot (using rpi4 tag, not iPXE) |
| 57 | +pxe-service=tag:rpi4,tag:!ipxe-ok,0,"Raspberry Pi Boot",netboot.xyz-rpi4-snp.efi |
| 58 | + |
| 59 | +# DHCP Boot options for non-iPXE clients using envsubst for dynamic IP handling |
| 60 | +dhcp-boot=tag:bios,netboot.xyz.kpxe,,${CONTAINER_IP} |
| 61 | +dhcp-boot=tag:efi32,netboot.xyz.efi,,${CONTAINER_IP} |
| 62 | +dhcp-boot=tag:efi32-1,netboot.xyz.efi,,${CONTAINER_IP} |
| 63 | +dhcp-boot=tag:efi64,netboot.xyz.efi,,${CONTAINER_IP} |
| 64 | +dhcp-boot=tag:efi64-1,netboot.xyz.efi,,${CONTAINER_IP} |
| 65 | +dhcp-boot=tag:efi64-2,netboot.xyz.efi,,${CONTAINER_IP} |
| 66 | +dhcp-boot=tag:rpi4,netboot.xyz-rpi4-snp.efi,,${CONTAINER_IP} |
0 commit comments