<div dir="ltr"><div><div>Hi,</div><div><br></div><div>We're a charity that supports education in sub-Saharan Africa by refurbishing IT equipment for use in schools.  At our distribution hubs in Malawi, customised OS images are installed using bootable USBs but we'd like to do this using PXE boot for performance reasons.  </div><div><br></div><div>Our goal is to create a bunch of PXE boot appliances to be sent to sites where we don't necessarily know the subnets in advance.  We'd want these servers to be 'plug-and-play' capable of serving images via PXE loading on whatever network they're connected to, and which already have a DHCP server (e.g. on their broadband router).</div><div><br></div><div>We've attempted this using Samba, Nginx, grub, pxelinux and ipxe, all of which have no fixed IP addresses in any of the configs so it can get its address from DHCP.  It will boot clients into PXE or WinPE for OS installation. The appliance can be attached to any subnet and provide network boot services with no reconfiguration nor interference with existing network facilities (DHCP). It uses <next-server> and netbios naming instead. The only place where there is an IP address is DNSmasq's config. Could the dhcp-range use the computer’s IP address or subnet as a default?  In other words, could we just specify the network interface(s) and have it detect the subnet automatically?<br><br># DNSmasq config for proxy PXE boot<br># Disable DNS<br>port=0<br>log-dhcp<br># dhcp-range=interface:eno1,,proxy        # default to interface's subnet - doesn't work<br>dhcp-range=interface:eno1,192.168.10.0,proxy        # currently necessary to specify the subnet<br>dhcp-range=interface:wlp3s0,192.168.20.0,proxy<br>no-dhcpv6-interface=eno1<br>dhcp-no-override<br>enable-tftp<br>tftp-root=/srv/boot<br><br>dhcp-userclass=set:IPXE,iPXE<br>pxe-service=tag:IPXE,X86-64_EFI,"ipxe",ipxe/bootuefi.ipxe<br>pxe-service=tag:!IPXE,X86-64_EFI,"UEFI",grub/grubnetx64.efi<br>pxe-service=X86PC,"Legacy",pxelinux/lpxelinux.0<br></div><div><br></div><div><br></div><div>Alternatively we could script something that detects the subnet(s) at boot time and configures DNSmasq before starting it, but it seems neater to incorporate this feature into DNSmasq itself.</div><div><br></div><div>Any guidance or advice on how best to achieve this, is much appreciated!</div></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div>Steve Cook</div><div>Head of IT </div></div><div><img src="https://ci3.googleusercontent.com/mail-sig/AIorK4w56wnhYV7K5f-xEz9Pgb7xtEhXoUvHkkgfqjcn-LnvtcmKeGMVz4BLMveV7lqmTOSwRGH5ykw" width="420" height="64"><br></div></div></div></div>