Is it possible to do a backup of my long Static IP Address Binding List? This would be very useful when reseting router or installing new firmware from scratch so that there will not be a need to rebuild my entire IP binding list again. Thanks in advance for any help
stored in /etc/config/dhcp
config host ‘xxxxxxxxxx’
option mac ‘xx:xx:xx:xx:xx’
option ip ‘192.168.8.28’
option name ‘client28’
Many thanks indeed for the rapid reply. I am not familiar with the advanced settings and so would greatly appreciate it if someone could guide me as to how to be able to access that list and also how to save a backup of it if possible. Thank you again.
no step by step but you can search here or the interent.
in unix style os
connect to router using ssh client
copy and paste into your own file.
Many thanks indeed for the explanation. Much appreciated
Managed to succefully get the list by SSH to router using PuTTY but how do I restore back to the router? Sorry for being a complete noob but never used linux commands previously.
Nevermind, found solution using WinSCP using this article if anyone else is interested:
SSH to the router - GL.iNet Docs.
Thanks again rp201rp for your help.
great! now do remeber you dont need everything in the file but just the four lines that begin with "config host ‘xxxxxxxxx’ for each static address. do note sometimes they can be anywhere in the file. when you want to restore to a new config just copy and reboot
Not sure what you mean by “dont need everything in the file”. Are you saying the other info in the file is redundant, and is configured somewhere else?
Yes, ignore all the other lines in the file, only add the ones rp was talking about.
But there is nothing hurt if I just leave them and paste my IP bindings below that block of text, right?
Yes. Basically what you want to do is just append your static bindings to the end of the default file after restoring or flashing a new version.
Here is a paste and run script you can edit:
cat<<'SEOF' | ash cat<<'EOF' >> /etc/config/dhcp config host 'HOST1' option mac 'MAC1' option ip 'IP1' option name 'DeviceName1' config host 'HOST2' option mac 'MAC2' option ip 'IP2' option name 'DeviceName2' config host 'HOST3' option mac 'MAC3' option ip 'IP3' option name 'DeviceName3' EOF /etc/init.d/firewall reload SEOF
After you edit just paste that block into your SSH window and press enter, it will add your static bindings and reload the firewall.
I have now populated a bigger list of static IPs on my Slate AX and before resetting the router to experiment with various things, I wanted to check whether this backup procedure still applies to the new firmware versions (i.e. firmware 4+). Can someone please confirm? Many thanks in advance.
I can confirm that “Static IP Address Binding” are the same in firmware v4 and v3.
So the back up method are also the same.
Thanks for the confirmation. Much appreciated.