New Build - 06/16/2022 - r49212

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Goto page Previous  1, 2, 3, 4
Author Message
ArjenR49
DD-WRT Guru


Joined: 05 Oct 2008
Posts: 666
Location: Helsinki, Finland / nr. Alkmaar, Netherlands

PostPosted: Tue Jun 21, 2022 0:12    Post subject: Reply with quote
As far as reserved IP's are concerned I am back where I started a day ago ...

Using the dhcp-hostsfile option resulted in several cases of multiple IP's in the Active Clients list. The corresponding hostnames never appeared.
Several hosts were apparently quick enough to pick up an IP from the pool defined in Basic Setup, and then later getting the IP reserved for them as well.
A messy Active Clients list was the result.

Pasting dhcp-host= options into the additional options window is all fine and good, but I got into a nasty situation with that, because in a dhcp-host= option you apparently cannot use trailing comments, nor multiple MACs, whereas in the conf-file you can. I have both and the router became inaccessable. I had to hard reset it and restore from a backup.

In the conf-file you can do all that, multiple MACs for one host (WiFi and Ethernet), and trailing comments.
I don't get multiple IPs in the Active clients list on the LAN page either like with the dhcp-hostsfile alternative. The active clients list is clean.
It can take some time before all hosts get their hostname listed next to their IP address in the Active Clients list.

The syslog didn't show where the f/w actually manages to read the conf-file. It does say somewhere that it is not available. Obviously it does read it eventually.
My vote goes to the conf-file arrangement. I've used it for a long time and I find it convenient.
Sponsor
wenzhuo
DD-WRT User


Joined: 22 Apr 2011
Posts: 191

PostPosted: Tue Jun 21, 2022 3:46    Post subject: Reply with quote
ArjenR49 wrote:
As far as reserved IP's are concerned I am back where I started a day ago ...

Using the dhcp-hostsfile option resulted in several cases of multiple IP's in the Active Clients list. The corresponding hostnames never appeared.
Several hosts were apparently quick enough to pick up an IP from the pool defined in Basic Setup, and then later getting the IP reserved for them as well.
A messy Active Clients list was the result.


dhcp-hostsfile has the advantage of being reread on HUP signal; otherwise it is equivalent to dhcp-host in conf file.

dnsmasq.conf man page wrote:
--dhcp-hostsfile=<path>
Read DHCP host information from the specified file. If a directory is given, then read all the files contained in that directory in alphabetical order. The file contains information about one host per line. The format of a line is the same as text to the right of '=' in --dhcp-host. The advantage of storing DHCP host information in this file is that it can be changed without re-starting dnsmasq: the file will be re-read when dnsmasq receives SIGHUP.


ArjenR49 wrote:
Pasting dhcp-host= options into the additional options window is all fine and good, but I got into a nasty situation with that, because in a dhcp-host= option you apparently cannot use trailing comments, nor multiple MACs, whereas in the conf-file you can. I have both and the router became inaccessable. I had to hard reset it and restore from a backup.


Apparently dd-wrt doesn't allow trailing comments in dnsmasq_options (Additional Options) and does some sanitation on the input.
wenzhuo
DD-WRT User


Joined: 22 Apr 2011
Posts: 191

PostPosted: Tue Jun 21, 2022 3:56    Post subject: Reply with quote
actually, i have two options for static leases in Addtional Options:


    addn-hosts=/jffs/etc/hosts
    dhcp-hostsfile=/jffs/etc/dhcp-hosts


addn-hosts is for creating dns records for static leases and more. E.g. when I want to create a static lease for a container, I do this:

Code:
root@DD-WRT:~# echo "nanopineo3,172.16.10.30" >> /jffs/etc/dhcp-hosts
root@DD-WRT:~# echo "172.16.10.30 nanopineo3.lan" >> /jffs/etc/hosts
root@DD-WRT:~# killall -HUP dnsmasq
Goto page Previous  1, 2, 3, 4 Display posts from previous:    Page 4 of 4
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware 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 cannot attach files in this forum
You cannot download files in this forum