Tag Archives: dhcp

DNSMasq as a DHCP Relay Target

DNS Masq is a great little DNS and DHCP combo server built into most DDWRT images, and available in most Linux distributions.

With it you can define custom DNS A records:

address=/owncloud/owncloud.somedomain.org/192.168.10.12
address=/unifi/unifi.somedomain.org/192.168.10.12

You can also define multiple DHCP scopes. This comes in handy if you want to configure the DNSMasq server as the DHCP Helper (or DHCP Relay) on your switch:

dhcp-range=devices,192.168.10.100,192.168.10.200,255.255.255.0,1m
dhcp-range=guest,192.168.20.100,192.168.20.200,255.255.255.0,1m

If you specify multiple ranges, you’ll also need to configure the default gateway for each of these networks:

dhcp-option=devices,3,192.168.10.1
dhcp-option=guest,3,192.168.20.1

You can also create DHCP reservations for specific hosts by MAC address:

dhcp-host=00:1e:c9:4a:d7:fe,owncloud,192.168.10.12,1h
dhcp-host=04:18:d6:52:77:88,AP,192.168.1.4,1h
dhcp-host=70:77:81:B6:03:71,Printer,192.168.20.58,5m

Resources: