Skip to content

Dnsmasq Configuration

Example configuration that will serve IP Addresses to pre-known MAC Addresses

interface=eth0,lo
#-- On RaspPi eth0 appears sometime after dnsmasq starts
#   despite waiting on network target.
#   On RaspPi it is necessary to disable bind-interfaces.
#   https://forums.raspberrypi.com/viewtopic.php?t=250168
# bind-interfaces
dhcp-range=eth0,192.168.57.31,192.168.57.51
enable-tftp
tftp-root=/srv/tftp

#-- Set gateway option
dhcp-option=3,192.168.57.30

#-- Set DNS server option
dhcp-option=6,192.168.57.30

#-- dns Forwarder info
server=8.8.8.8

#--location of the pxeboot file
dhcp-boot=/bios/pxelinux.0,pxeserver,192.168.57.30

#--Detect architecture and send the correct bootloader file
dhcp-match=set:efi-x86_64,option:client-arch,7 
dhcp-boot=tag:efi-x86_64,grub/bootx64.efi

#-- deny any unknown hosts that dont appear in the /etc/dnsmasq.d/allowed.conf file
dhcp-ignore=tag:!known

#-- use /etc/hosts for local network hostname resolution
expand-hosts
domain=cluster.home

(auto-generated file)