What's new

Update Broke 'nvram set dhcp_staticlist'

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

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?
 
Hostnames are separated into their own variable now (dhcp_hostnames). Been like that for a few versions.
 
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.
 
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 :)
 
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!
 
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:
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?
 
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.
 
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
 
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!
 
@JGrana, when is your useful script going to be included in amtm? :D

Or, at least menu driven? ;)
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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