Using dnsmasq as dhcpd server

dnsmasq provides an integrated DHCP server for your local network. At least two steps are required to enable the dhcp daemon and make it available to your LAN.

Configure dnsmasq dhcpd

The integrated DHCP server dhcpd is disabled by default.

To enable it supply the range of addresses available for lease, and optionally a lease time:

# Uncomment this to enable the integrated DHCP server, you need
# to supply the range of addresses available for lease and optionally
# a lease time. If you have more than one network, you will need to
# repeat this for each network on which you want to supply DHCP
# service.
dhcp-range=192.168.1.1,192.168.1.199,12h

Additionally dnsmasq supports various methods setting fixed ip's in your LAN, e.g. by name, MAC adress - please have a look for examples in dnsmasq conf.

dnsmasq integrated DHCP server also supports sending options to the hosts asking for a lease as described in RFC2132. For the common setting (subnet mask, default router, DNS server and broadcast address) dnsmasq sets sane defaults.

Configure shorewall for dhcpd

You need to open the ports 67 and 68 on your LEAF Bering-uClibc router for your LAN to get access to your dnsmasq dhcpd server:

Therefor change /etc/shorewall/rules as shown below:

# uncomment to use dnsmasq's dhcpd in your LAN
ACCEPT          loc       fw            udp     67,68