Posted: Wed Dec 29, 2021 8:49 Post subject: dhcpd vs dnsmasq - some general questions
Hi,
I have been using dnsmasq as DHCP server for years but I'm thinking about switching to using dhcpd instead.
I would like to get clarification on some of the points that are not completely clear to me.
1. The dhcpd in DD-WRT is udhcpd (busybox), right?
2. Is the use of dhcpd instead of dnsmasq recommended? I came across a few older articles mentioning that dhcpd was/will be dropped in favor of dnsmasq.
So if that was the case, I wouldn't bother switching.
3. I had temporarily enabled dhcpd and noticed that it always announced the device's IP address as gateway/router to clients. I need to change that (the DD-WRT device is dhcp server in my network, but not the gateway).
I added a line "option router xxx.xxx.xxx.xxx" to the "additional dhcpd options" section on the services tab, but that did not change anything.
Can the router not be changed or did I have an error somewhere?
4. Am I correct that the static leases table under services/dhcp server is only used by udhcpd and not by dnsmasq?
One of the main reasons for me wanting to switch is, that I'm not really fond of having to add static leases via all those "dhcp-host=MAC,IP,time" lines under "additional dnsmasq options".
5. Can I use udhcpd to assign IPv6 addresses as well?
With dnsmasq I can use a "dhcp-host=MAC,IPv4,[IPv6],time" syntax to achieve that.
6. Can udhcpd announce additional static routes (DHCP option 121)?
Joined: 08 May 2018 Posts: 14125 Location: Texas, USA
Posted: Wed Dec 29, 2021 12:30 Post subject:
Busybox udhcpd is not in any current releases, only dnsmasq is. Do a search for "udchpd removed" in the forum search function, search for all terms. It was never officially noted in build release thread OPs, unfortunately.
Thanks for your reply!
I'm running a Linksys WRT1900ACSv2 with the current BrainSlayer build (r47925).
The wiki page was very useful, thanks!
I was under the wrong impression that enabling the dhcp server on the setup page would enable the udhcpd server (I'm still a little confused about the "additional dhcpd options" field on the services page, but I'll ignore that for now).
I think I was able to figure out the rest of my questions using the wiki page - at least everything looks good at the moment.
With 44048 this used to be enough to assign both addresses, IPv4 and IPv6, to the specified client.
Currently, I'm not getting any IPv6 addresses from the DD-WRT router (IPv4 works, though).
I have not enabled any IPv6-specific options for dnsmasq
(like "enable-ra") since this was not necessary before.
What am I missing?
I have attached a screenshot of my Setup/IPv6 page.
to my dnsmasq option, the router finally is handing out IPv6 addresses as well.
Not sure if the dhcp-authoritative is required, but it can't hurt.
Appearently the dhcp-range option is now required for IPv6 as well; I definitely didn't specify this explicitely when running r44048.
slaac tells dnsmasq to offer Router Advertisement on this subnet and to set the A bit in the router advertisement, so that the client will use SLAAC addresses. When used with a DHCP range or static DHCP address this results in the client having both a DHCP-assigned and a SLAAC address.
I don't care about the SLAAC address, but if I understood it correctly, this is the only mode where I could provide a static IPv6 lease to a client.
As far as I can see, ra-names option only enables DNS lookups for the IPv6 addresses, right?
I don't need that as I don't use any of the DNS features of dnsmasq.
I have a pair of BIND servers running on other systems locally.
Sebastian
EDIT: had another look at the documentation and discovered another option that seems to be exactly what I was looking for: