What's new

Backup Manual DHCP List?

  • 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!

I just find it mind boggling that you have ~80 reserved IP's.
My home automation system is happier making connections to devices by IP address.... Alarm system, cameras, Sonos X8, stereo amps, TVs (to turn them off at night), ceiling fans x4 etc.

And then the 8 alexa devices with static IPs makes debugging log files in the HA platform easier.

It just makes things more organized and easier to see what is going on when I add a new device with having ranges for device types.
 
My home automation system is happier making connections to devices by IP address.... Alarm system, cameras, Sonos X8, stereo amps, TVs (to turn them off at night), ceiling fans x4 etc.

And then the 8 alexa devices with static IPs makes debugging log files in the HA platform easier.

It just makes things more organized and easier to see what is going on when I add a new device with having ranges for device types.
Oh I completely get why. Its the same reason I reserve IP's for basically everything in my place. Just amazed someone has 80 devices that need IP's.

I am just wondering now if I will have to move them to dynmasq config file when my 86 comes in next week.
 
Getting that script to work reliably for people moving from 380 to 384 will be tricky. Asus now enforces size limitations on each nvram setting. It means that if you are importing settings from a version that didn't have such validation and now some of these settings are too large to fit on the new firmware, you will end up with either truncated/corrupted settings, unless the script can somehow validate the size of each and every setting.
 
Use John's NVRAM Save/Restore utility to make your life easier: https://www.snbforums.com/threads/user-nvram-save-restore-utility-r26-2.19521/
Not supported with 382/384 firmwares
The big problem with using the tool to migrate from 380 up to 382/384 is the new length limits imposed on the nvram vars (there's a separate allowed length parameter specified for each variable). If you have a variable that exceeds the limits, dhcp_staticlist for example for someone with a lot of manual assignments) it will silently fail the restore.
 
@RMerlin beat me to it :)

Can you run a quick test for me to see if when running 'nvram set' from the command line and attempt to exceed the byte limit on a variable.....does it truncate or does the command line tie into the validation code and post a fail?
 
@RMerlin beat me to it :)

Can you run a quick test for me to see if when running 'nvram set' from the command line and attempt to exceed the byte limit on a variable.....does it truncate or does the command line tie into the validation code and post a fail?

I've run into this via SSH when you hit the limit it simply stops allowing any more characters. You can type/paste all you want and the cursor won't move. (this is with Putty)
 
I've run into this via SSH when you hit the limit it simply stops allowing any more characters. You can type/paste all you want and the cursor won't move. (this is with Putty)
That's a different issue with the shell....if the command is run from a script, the line length limit no longer applies.
 
Code:
nvram get dhcp_staticlist

Ideally, save the whole nvram to a text file, so you can cherry-pick various settings. Assuming USB disk is mounted as sda1:

Code:
nvram show > /mnt/sda1/settings.txt

To re-enter a setting:
Code:
nvram set dhcp_staticlist="values_previously_saved"
nvram commit

Wow, that totally saved me a day's work reloading all those reservations. I've been putting off changing my IP schema because I thought it was going to be a complete PITA but you've made light work of it with that little nugget. Cheers bro :)
 
Wow, that totally saved me a day's work reloading all those reservations. I've been putting off changing my IP schema because I thought it was going to be a complete PITA but you've made light work of it with that little nugget. Cheers bro :)

That is a big time saver. I am worried about how slow you are typing though and how huge your reserved list is to have saved you a day though. :) :) :)
 
Code:
nvram get dhcp_staticlist

Ideally, save the whole nvram to a text file, so you can cherry-pick various settings. Assuming USB disk is mounted as sda1:

Code:
nvram show > /mnt/sda1/settings.txt

To re-enter a setting:
Code:
nvram set dhcp_staticlist="values_previously_saved"
nvram commit

I am struggling to restore the saved DCHP settings back after I factory reset my router.

I saved the DCHP list as a text file on my attached USB stick. Only the DCHP details are contained within the file.

I just don’t understand how to restore.
 
Code:
nvram set dhcp_staticlist=

Paste the contents of the saved value. Be careful not to paste any line breaks. It may be too long, too. If you have problems you may want to move to using dnsmasq config for static leases.

In that case you can edit /jffs/dnsmasq.config.add and add a line like the following for each static host:

Code:
dhcp-host=[MAC],[hostname],[ip address],12h

Example:
Code:
dhcp-host=DE:AD:DE:AD:FA:CE,laptop,192.168.1.2,12h
 
I am struggling to restore the saved DCHP settings back after I factory reset my router.

I saved the DCHP list as a text file on my attached USB stick. Only the DCHP details are contained within the file.

I just don’t understand how to restore.
Backup
Code:
nvram get dhcp_staticlist > dhcp_staticlist
nvram get custom_clientlist > custom_clientlist
Restore
Code:
nvram set dhcp_staticlist="`cat dhcp_staticlist`"
nvram set custom_clientlist="`cat custom_clientlist`"
 
Last edited:
Restore
Code:
nvram set dhcp_staticlist="`cat dhcp_staticlist`"
nvram set custom_clientlist="`cat custom_clientlist`"
Alternatively:
Code:
nvram set dhcp_staticlist="$(cat dhcp_staticlist)"
nvram set custom_clientlist="$(cat custom_clientlist)"
Just because the use of back ticks (`) is depreciated and some people mistype them, or they get translated when cut and paste from web pages.
 
Thanks all, I will have a play.
Much appreciated.
 
nvram set dhcp_staticlist="`cat dhcp_staticlist`"
nvram set custom_clientlist="`cat custom_clientlist`"

How does one get the wireless log entries to reflect the same dhcp list as present in Network Map - view List -
Ive restored using the above commands but my wireless log entries are still not aligned to this list
 
nvram set dhcp_staticlist="`cat dhcp_staticlist`"
nvram set custom_clientlist="`cat custom_clientlist`"

How does one get the wireless log entries to reflect the same dhcp list as present in Network Map - view List -
Ive restored using the above commands but my wireless log entries are still not aligned to this list
  • Ultimately these must work because there is nothing else outside of dnsmasq entries which may not show in the GUI
  • If a device has a current DHCP reservation different from your static list, then the reservation must expire before the new one takes effect
  • It can be frustrating to edit these files. Just one character wrong and the entry will not work.
  • EDIT: Network Map > Network List will be consistent with System Log > Wireless Log. If that is actually your question, then I have no idea
 
Last edited:
  • Ultimately these must work because there is nothing else outside of dnsmasq entries which may not show in the GUI
  • If a device has a current DHCP reservation different from your static list, then the reservation must expire before the new one takes effect
  • It can be frustrating to edit these files. Just one character wrong and the entry will not work.
  • EDIT: Network Map > Network List will be consistent with System Log > Wireless Log. If that is actually your question, then I have no idea
therestore command worked fine for the network map - view list AND for DHCP manual assignments. BUT not for Wireless Log. Obviously there is another nvram command to restore the wireless log assignments since it defaults to original and not customised as per above. Im just missing the nvram command to backup and restore wireless log - Anyone know what that is please?
 
Obviously there is another nvram command to restore the wireless log assignments since it defaults to original and not customised as per above.
No there isn't another variable. It's meant to get that information from the network map, but (AFAICT) only if the device doesn't have a hostname. This feature was only introduced in 384.7-beta1.
Code:
hostname = client[2];    // Name
if (nmapentry && (hostname == "*" || hostname == "<unknown>")) {
    if (clientList[mac].nickName != "")
        hostname = clientList[mac].nickName;
    else if (clientList[mac].name != "")
        hostname = clientList[mac].name;
}
 

Similar threads

Latest 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