dnsmasq: make DHCPv6 viable for standalone dnsmasq install
authorEric Luehrsen <ericluehrsen@hotmail.com>
Thu, 22 Dec 2016 18:20:25 +0000 (13:20 -0500)
committerJo-Philipp Wich <jo@mein.io>
Wed, 1 Feb 2017 23:13:49 +0000 (00:13 +0100)
commit9525743c076393336cd2129539c974f8a01c7894
tree1ca6614f547f6ea36ee79b2612d9473e013cadb8
parent1b4e3eda1b4b9c60d979744faed4935538d8f75f
dnsmasq: make DHCPv6 viable for standalone dnsmasq install

dnsmasq has sufficient services to meet the needs of DHCP
and RA with IP6 for single router router users. This is
the most common use for consumer routers. Its reenforced
as most ISP tend to only DHCP-PD /64. dnsmasq has year
over year demonstrated great flexibility in its option
set, and support for off-standard DHCP clients.

odhcpd has enhanced capabilities focused on IP6 such
as DHCP/RA relay and NDP proxy. However, it is not as
flexible in its option set. odhcpd is not as forgiving
with off-standard DHCP clients. Some points may represent
a long term TODO list, but it is the state currently.

These changes make any such combination possible. Already
odhcpd can be set as the main dhcp server. Now odhcpd
can be removed or disabled and dnsmasq will take over
if DHCPv6 compiled in. The existing DHCPv6 and RA UCI
are translated into dnsmasq.conf. The changes focus on
'--dhcp-range', '--dhcp-host', and '--dhcp-options'.

DHCP host ID is least 16 bits [::1000-::FFFF], but
leaves low range for typical infrastructure assignments.
dnsmasq accepts DHCPv6 options in the tranditional
'--dhcp-option' put they must be prefixed 'option6:'.
dnsmasq will also discover SLAAC DNS entries from DHCPv4
clients MAC, and confirm with a ping at least renew.

Long term TODO include improving use of dnsmasq relay
options for DHCPv4 and DHCPv6 in parallel. It would also
be possible to preconfigure DHCP-PD in host-with-options
records for fixed infrastructure.

Signed-off-by: Eric Luehrsen <ericluehrsen@hotmail.com>
[Jo-Philipp Wich: emit proper IPv6 hostid format in dhcp-host directive]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
package/network/services/dnsmasq/Makefile
package/network/services/dnsmasq/files/dnsmasq.init