Update Broke 'nvram set dhcp_staticlist'

  • ATTENTION! As of November 1, 2020, you are not able to reply to threads 6 months after the thread is opened if there are more than 500 posts in the thread.
    Threads will not be locked, so posts may still be edited by their authors.
    Just start a new thread on the topic to post if you get an error message when trying to reply to a thread.

Kevin K

Regular Contributor
How do I define a large number of dynamic DHCP addresses and host names like dhcp_staticlist used to do?

Somewhere along the way, it looks like an update made 'nvram set dhcp_staticlist="<MAC>IP>HOSTNAME<MAC>IP>HOSTNAME<MAC>IP>HOSTNAME"' obsolete. As near as I can tell, I'm supposed to put SOMETHING in /jffs/configs/hosts.add and maybe another file in /jffs/configs.

Is there a "How to Migrate from dhcp_staticlist to /jffs/configs" document somewhere?
 

dave14305

Part of the Furniture
Hostnames are separated into their own variable now (dhcp_hostnames). Been like that for a few versions.
 

ColinTaylor

Part of the Furniture
This was changed in July last year.
Code:
384.13 (31-July-2019)
  - CHANGED: dhcp_staticlist no longer contains hostnames, these
             have been moved to dhcp_hostnames for better
             compatibility with upstream and closed source
             components, also allows more static leases to be
             defined before reaching the size limit.
 

LimJK

Very Senior Member
How do I define a large number of dynamic DHCP addresses and host names like dhcp_staticlist used to do?

Somewhere along the way, it looks like an update made 'nvram set dhcp_staticlist="<MAC>IP>HOSTNAME<MAC>IP>HOSTNAME<MAC>IP>HOSTNAME"' obsolete. As near as I can tell, I'm supposed to put SOMETHING in /jffs/configs/hosts.add and maybe another file in /jffs/configs.

Is there a "How to Migrate from dhcp_staticlist to /jffs/configs" document somewhere?
Hope you find this relevant :)
 

Kevin K

Regular Contributor
OK. I've seen hints to that effect. I can't tell what I am supposed to *do* in order to convert from the old dhcp_staticlist to the new dhcp_staticlist and dhcp_hostnames.
  • Do I just set both of them the string: <MAC>IP>HOSTNAME<MAC>IP>HOSTNAME<MAC>IP>HOSTNAME
  • Do I set staticlist to: <MAC>IP><MAC>IP><MAC>IP>
  • Do I set hostames to <MAC>HOSTNAME<MAC>HOSTNAME
I get that it changed. What I need help with is finding TFM (so I can RTFM) on what to set staticlist and hostnames to in order to have the same effect -- or what files to put in /jffs and what layout they should have.
Thanks!
 

Kevin K

Regular Contributor
OK. I think I've got it. If I delete dhcp_staticlist="<11:22:33:44:55:66>192.168.1.60>fred<22:33:44:55:66:77>192.168.1.61>mary"
I think I can replace it with putting the following lines in /jffs/configs/dnsmasq.conf.add
Code:
dhcp-host=11:22:33:44:55:66,fred,192.168.0.60,1440m
dhcp-host=22:33:44:55:66:77,mary,192.168.0.61,1440m

Hmmm... I added those lines and set dnsmasq.conf.add executable. They are getting appended to /etc/dnsmasq.conf. But when I ping fred or mary, I get "ping: bad address". I don't see any errors it /tmp/syslog.log
 
Last edited:

Kevin K

Regular Contributor
Arg! I see why nothing DNS is working. The router is doing name resolution using only DNS from the upstream DNS server. It isn't using its own DNS entries. How do I tell the router that when I'm logged in via SSH, it should check its own DNS/nslookup before going to the upstream router?
 

dave14305

Part of the Furniture
Tools / Other Settings page “Wan: Use local caching DNS server as system resolver (default: No)”. Set to yes if you really want it to use its own dnsmasq.
 

KevTech

Very Senior Member
I use Winscp to save the files then I can just upload again when needed like after a reset.
Just have to make sure you put them in the correct areas.

Screenshot 2020-12-19 063832.jpg
 

JGrana

Senior Member
Since you are going the dnsmasq.conf.add route (my preferred), you should also consider creating a hosts.add file as well.

Here is a thread where you will find a script towards the end that will create the hosts.add file based on your already existing dnsmasq.conf.add file:


I prefer dnsmasq.conf.add and hosts.add over saving the Asus /jffs/nvram relevant files. Easier to manage and much more portable!
 

L&LD

Part of the Furniture
@JGrana, when is your useful script going to be included in amtm? :D

Or, at least menu driven? ;)
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top