dhcpd vs dnsmasq - some general questions

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
seb666
DD-WRT Novice


Joined: 01 Mar 2017
Posts: 33

PostPosted: Wed Dec 29, 2021 8:49    Post subject: dhcpd vs dnsmasq - some general questions Reply with quote
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)?

I think that's all for now Wink

Thanks in advance!

Sebastian
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12836
Location: Netherlands

PostPosted: Wed Dec 29, 2021 9:46    Post subject: Reply with quote
What router and what build are you using?

To get the best out of DDWRT and the forum read the forum guidelines full of helpful pointers:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087

Have a look at the wiki: https://wiki.dd-wrt.com/wiki/index.php/DNSMasq_as_DHCP_server

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14125
Location: Texas, USA

PostPosted: Wed Dec 29, 2021 12:30    Post subject: Reply with quote
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.

https://svn.dd-wrt.com/changeset/39356
https://svn.dd-wrt.com/changeset/39355
https://svn.dd-wrt.com/changeset/39354
https://svn.dd-wrt.com/changeset/39353
https://svn.dd-wrt.com/changeset/39352
https://svn.dd-wrt.com/changeset/39351
https://svn.dd-wrt.com/changeset/39350

And that wiki still needs further updating.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
seb666
DD-WRT Novice


Joined: 01 Mar 2017
Posts: 33

PostPosted: Wed Dec 29, 2021 13:05    Post subject: Reply with quote
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.

Again, thanks a lot!

Sebastian
seb666
DD-WRT Novice


Joined: 01 Mar 2017
Posts: 33

PostPosted: Fri Jan 07, 2022 9:59    Post subject: Reply with quote
I still seem to have a little trouble with assigning IPv6 addresses to specific clients.
In my additional dnsmasq options, I have
Quote:

dhcp-host=8c:85:90:xx:xx:xx,192.168.10.10,[fda7:42a0:7138:1::10],infinite


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.



Screen Shot 2022-01-07 at 10.54.56.png
 Description:
 Filesize:  123.3 KB
 Viewed:  2177 Time(s)

Screen Shot 2022-01-07 at 10.54.56.png


seb666
DD-WRT Novice


Joined: 01 Mar 2017
Posts: 33

PostPosted: Sun Jan 09, 2022 13:00    Post subject: Reply with quote
Ok, I think I figured it out.
After adding
Quote:

dhcp-authoritative
dhcp-range=::200,::210,constructor:br0,slaac

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.

Anyway, I'm glad it all works now Smile

Sebastian
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6856
Location: Romerike, Norway

PostPosted: Sun Jan 09, 2022 17:29    Post subject: Reply with quote
slaac is where the client uses it's mac address in the host portion of the IPv6 address. Some clients does not support DHCP6C, among them Android.
seb666
DD-WRT Novice


Joined: 01 Mar 2017
Posts: 33

PostPosted: Sun Jan 09, 2022 17:55    Post subject: Reply with quote
According to the dnsmasq manpage:
Quote:
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.

Sebastian
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6856
Location: Romerike, Norway

PostPosted: Sun Jan 09, 2022 18:22    Post subject: Reply with quote
You can use both.

dhcp-range=::10,::1ff,constructor:br0,ra-names,slaac,64,24h
seb666
DD-WRT Novice


Joined: 01 Mar 2017
Posts: 33

PostPosted: Sun Jan 09, 2022 20:51    Post subject: Reply with quote
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:
Quote:
dhcp-range=::,static
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum