Save/ Restore DHCP assignments & icons (LAN -> DHCP Server -> Manually Assigned IP)

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

gspannu

Regular Contributor
I have a ASUS RT-AX88U router that I need to factory reset (for various reasons).

On the LAN -> DHCP Server...
I have around 20 manually assigned IP addresses and with assigned icons

I will lose all these entries as soon as I do a factory reset and will then have to type these in manually later. I would like to avoid having to retype in all these entries, client names and select appropriate icons.

Is there any way to save these DHCP entries and reload them, once I rebuild the route from scratch?
 

bbunge

Part of the Furniture
I have a ASUS RT-AX88U router that I need to factory reset (for various reasons).

On the LAN -> DHCP Server...
I have around 20 manually assigned IP addresses and with assigned icons

I will lose all these entries as soon as I do a factory reset and will then have to type these in manually later. I would like to avoid having to retype in all these entries, client names and select appropriate icons.

Is there any way to save these DHCP entries and reload them, once I rebuild the route from scratch?
With Asus Factory firmware, no. You can save the system settings and restore them but it restores all the settings and you will be right back to where you are now. I have all my custom icons in a directory and it only takes a few minutes to restore them.
 

gspannu

Regular Contributor
With Asus Factory firmware, no. You can save the system settings and restore them but it restores all the settings and you will be right back to where you are now. I have all my custom icons in a directory and it only takes a few minutes to restore them.
There must be a way to execute some script (after ssh into the router) which captures the DHCP table from nvram... and them some way of restoring this.

My issue is more of the typing of MAC addresses and doing so without making a mistake.
 

OzarkEdge

Part of the Furniture

ColinTaylor

Part of the Furniture
There must be a way to execute some script (after ssh into the router) which captures the DHCP table from nvram... and them some way of restoring this.

My issue is more of the typing of MAC addresses and doing so without making a mistake.
You might be able to save the contents of dhcp_staticlist and then reload it. I'm not sure exactly what variables stock firmware uses nowadays.

Code:
nvram get dhcp_staticlist > /jffs/mystaticlist.txt
Code:
nvram set dhcp_staticlist="$(cat /jffs/mystaticlist.txt)"
This doesn't restore the host names (I'm not sure stock firmware even supports that), but it's a start.
 
Last edited:

gspannu

Regular Contributor
May I ask, what for?

OE
I am running some (experimental) software on an attached RPi (that tracks and filters some of the outgoing messages from some of our IoT devices - temp sensors, electricity, gas, water and heat measurement instruments, etc.) and the easiest way for the RPi to detect various clients is to assign them static IPs in the router.
 

VANT

Very Senior Member

OzarkEdge

Part of the Furniture
In order to have access to some devices, to be in control and order?

Select access can be useful. Control and order when chaos serves just as well may not be worth the overhead... icons? meh! :)

I record key computing hardware details including MACs upon receipt. I have noticed that Asus DHCP seems to assign the same IP to the same client no matter what, so I save shortcut links to certain IPs (and everything else) for regular access.

OE
 

bbunge

Part of the Furniture
I am running some (experimental) software on an attached RPi (that tracks and filters some of the outgoing messages from some of our IoT devices - temp sensors, electricity, gas, water and heat measurement instruments, etc.) and the easiest way for the RPi to detect various clients is to assign them static IPs in the router.
The router does not assign "static IP addresses." Static IP addresses are assigned at the client. The router does manually assigned addresses. There is a difference.

May I suggest a different approach for you. Change the DHCP Pool Starting/Ending Address to leave a group of sequential addresses for your static address pool. Then assign static addresses to your clients. That way you will not have to mess with adding Manually Assigned addresses in case you have to reset the router. I set my IP Pool Starting Address to 192.168.50.11 which leaves me 10 addresses to assign to my NAS, Cams, Pi-Hole and video recorder. The static clients will show up in the Client Status List where you can add your fancy icons.

Disclosure: I have one PoE cam that does not like to stay online with a static IP address assigned at the cam. My solution is to set the cam to use DHCP and I manually assign the cam IP at the router to an address in the space below the IP Pool Starting Address. It works!

Also, you can copy the list of manually assigned addresses from the router DHCP Server page and paste it into a text file. The copy and paste the MAC and other info back into the router GUI.
 

KevTech

Very Senior Member
Just get a copy of Winscp (portable version is available if do not want to install) and copy the files then later you can restore them.
To use Winscp you enable SSH on the router and set Winscp to file protocol SCP.
All the files you need are in jffs/nvram except the hosts file which is in etc directory.

You want to copy:
custom_clientlist
dhcp_staticlist
hosts
Not sure about custom icons but there are custom icon files in there too.
EDIT: Just tested and if you are using the default icons that come with the router those icon changes are stored in custom_clientlist too.
Hostnames are now listed in some models even on stock firmware and that will be in the hosts file on stock firmware.

Screenshot 2021-11-24 082550.jpg
 
Last edited:

Justinh

Regular Contributor
Why are you typing in MAC addresses? Connect the devices in the order of the IP addresses that you want assigned (one-by-one?) and just use the dropdown list in the DHCP UI and select the device and assign it. You can assign the icon at the same time.
 

gspannu

Regular Contributor
Why are you typing in MAC addresses? Connect the devices in the order of the IP addresses that you want assigned (one-by-one?) and just use the dropdown list in the DHCP UI and select the device and assign it. You can assign the icon at the same time.
I assign all my IP addresses before powering on the clients.

If I did not do that, some of the clients would get a different IP from the router - and it is painful to address the issue later.

Just a quirk of the devices that I have. The devices trade financial data (as in converting energy consumption to carbon footprint that is then offset in monetory terms). I know the networking code in the clients needs a proper rehaul (so they respect any IP they get…. But that is for another day). Every single byte of data from these devices is important and getting the IPs mixed up would create far too much of a hassle to fix.

My plan is to rebuild the router from scratch, assign all static IPs as needed, then power on the clients… hence wanted an easy way to get my IPs assigned rather than having to type in 20 Mac Addr and IP addresses.
I am not fussed about the icons..

I think the approach by @KevTech should work….
 

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