dnsmasq as pxe server

What do I need to add to my dnsmasq to enable to it as a pxe server?

In the process of my research I came across one of my first posts on this forum:-


which contains a number of links to http://www.wonkity.com/~wblock/docs/html/pxe.html which I can no longer access. Is it still around?
 
While the configuration is a little different, the DHCP options you need to set are not. Those are dictated by the DHCP protocol, not the service that handles the protocol. Just like TCP/IP is the same regardless of the OS, or HTTP regardless of the web server software (IIS, Apache, nginx, lighttpd)

 

Code:
pkg install -y dnsmasq
cat >/usr/local/etc/dnsmasq.conf <<EOF
# Range of IP to distribute (mandatory to enable DHCP server)
dhcp-range=1.1.1.1,1.1.1.10,3h
# TFTP server name
dhcp-option=66,"1.1.1.254"
# Filename to download
dhcp-boot=pxeboot
# Magic trick to detect FreeBSD's pxeboot and avoid iPXE conflict
# Add tag 'fbsd' to clients using userclass 'FreeBSD':
dhcp-userclass=set:fbsd,FreeBSD
# Reply with root-path only to 'fbsd' tagged clients:
dhcp-option=tag:fbsd,option:root-path,tftp://1.1.1.254
EOF
sysrc dnsmasq_enable=YES
service dnsmasq start

 
The two links use different tftp servers. One uses the one built in to dnsmasq and the other uses inetd.

In the example above it is not clear which is being used.
 
Back
Top