AdGuardHome
AdGuardHome copied to clipboard
Add PXE Support to the DHCP Server
Prerequisites
-
[X] I have checked the Wiki and Discussions and found no answer
-
[X] I have searched other issues and found no duplicates
-
[x] I want to request a feature or enhancement and not ask a question
The problem
PXE boot is a very useful feature but requires an expensive managed switch.
Proposed solution
Adding PXE support to the DHCP server of Adguard Home would be a valuable feature. This way I would see an advantage to use the DHCP server in Adguard and not in my home router, that despite being an expensive model, supporting mesh and wifi6, does not have PXE support.
Alternatives considered and additional information
I believe that's a simple feature which would bring a lot of value to the user.
I think maybe you can do it by yourself manually, follow The dhcp.dhcpv4.options array field part.
That's nice @fernvenue, but I believe that's a good candidate for the GUI, isn't it? Going through the RFCs documentations pointed at the link you sent above, the only DHCP options I found were siaddr
and file
. I'd need to test to see if it works...
That's nice @fernvenue, but I believe that's a good candidate for the GUI, isn't it?
Yea, that's true, hope we can have more DHCP options on Web UI :)
I would love to see this flexibility added, as it would allow me to migrate DHCP and DNS to the same place .
Supporting "PXE" is a can of worms. Options have different meanings for different host types, and different boot stages (I use iPXE for iSCSI boot, and the first state expects 'ipxe.efi' in the 'boot-file' option, while the second stage requires an iPXE configuration file in the 'boot-file' option.
I previously used bind9 for its flexibility, but needed to consolidate and my router only supports dnsmasq..
My environment consists of BIOS and UEFI booting via PXE: (physical and virtual machines)
- detected via vendor class
- gets specific iPXE build
- gets same boot.cfg for 2nd stage
Also raspberry PI's are boot loaded which requires different options..
Finally, VPN clients (using openvpn in bridged mode) get different DNS servers than regular clients.
As far as I can tell, support for condition options based on 'vendor class'. for example, is impossible with the existing ADGuard DHCP configuration options.
The dnsmasq configuration is a mess, but it looks somewhat like this:
dhcp-vendorclass=BIOS,PXEClient:Arch:00000
dhcp-vendorclass=UEFI32,PXEClient:Arch:00006
dhcp-vendorclass=UEFI,PXEClient:Arch:00007
dhcp-vendorclass=UEFI64,PXEClient:Arch:00009
# Default boot file
dhcp-boot=tag:ipxe,boot.cfg,,10.0.0.10
dhcp-boot=net:UEFI32, tag:!ipxe,i386-efi/ipxe.efi, ,10.0.0.10
dhcp-boot=net:UEFI, tag:!ipxe, ipxe.efi.0, ,10.0.0.10
dhcp-boot=net:UEFI64, tag:!ipxe, ipxe64.efi, ,10.0.0.10
# Custom DNS includes adguard, router, google, but is disabled
# on OpenVPN clients.
dhcp-host=00:FF:*:*:*:*,set:openvpn
dhcp-option=openvpn,option:dns-server # No dns for vpn clients - they use local dns only
dhcp-option=!openvpn,option:dns-server,<adguard ip>
dhcp-option=tag:ipxe,encap:175, 1, 5b # priority code
dhcp-option=tag:ipxe,encap:175, 176, 1b # no-proxydhcp
# Tag when netbooting Raspberry PI-400
dhcp-host=e4:5f:01:f9:07:4a,set:pi400
# Raspberry PI-400 requires only the boot-server option. Filename messes up boot
dhcp-boot=tag:pi400,,10.0.0.10
Edit: formatting
So, is there any news on this issue? Perhaps an easy-to-implement solution?
Hi, to have pxe boot compatibility would be a giantic plus to the already wonderful adguard ! Please consider adding this support in the near future. Thank you.