Hello
My main router is a WRT1900ACS running version 1.13.0. My backup router is also a WRT1900ACS but was running version 1.12.0. I have upgraded my backup router to 1.13.0 and would like to transfer a large amount of static IPs from the main router to the backup router. In version 1.12.0 I could do this by copying;
/etc/hosts
/etc/ethers
from one router to the other.
Using Winscp I have found that in 1.13.0 these files do not have the required information. Is there another file or files in 1.13.0 I can copy from main router to backup router to avoid manually entering all my Static IP information.
Thank you
Transferring Static IPs
Moderator: Moderators
Transferring Static IPs
Netgear WNDR3700 v1 and v2 and v4
Linksys WRT1900ACS
Linksys WRT1900ACS
Re: Transferring Static IPs
It is possible. Been there, done that ![Smile :-)](./images/smilies/icon_e_smile.gif)
From viewtopic.php?p=65238#p65238
"I was able to copy over the DHCP and hostname settings by combining them into the new /etc/dhcp file using a spreadsheet. "
![Smile :-)](./images/smilies/icon_e_smile.gif)
From viewtopic.php?p=65238#p65238
"I was able to copy over the DHCP and hostname settings by combining them into the new /etc/dhcp file using a spreadsheet. "
Re: Transferring Static IPs
Code: Select all
#!/bin/sh
idx=1
grep -v '^#' /etc/hosts | while read line
do
[ -z "$line" ] && continue
ip=$(echo "$line" | cut -f 1)
hostname=$(echo "$line" | cut -f 2)
etherline=$(cat /etc/ethers | grep "$ip")
mac=$(echo "$etherline" | cut -f 1)
uci set dhcp.static_host_$idx=host
uci set dhcp.static_host_$idx.name=$hostname
uci set dhcp.static_host_$idx.mac=$mac
uci set dhcp.static_host_$idx.ip=$ip
uci commit
idx=$((idx + 1))
done
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.
Please be respectful when posting. I do this in my free time on a volunteer basis.
Re: Transferring Static IPs
Thank you ektus and Lantis for your replys.
Using some of the info ektus supplied I found all the static addresses in my main router in the file '/etc/config/dhcp'. I copied the static addresses from this file to the backup router, rebooted backup router and now all the static addresses are showing in the backup router Gargoyle screen. I assume now that this problem is solved. Any comments on this approach?
Thank you
Using some of the info ektus supplied I found all the static addresses in my main router in the file '/etc/config/dhcp'. I copied the static addresses from this file to the backup router, rebooted backup router and now all the static addresses are showing in the backup router Gargoyle screen. I assume now that this problem is solved. Any comments on this approach?
Thank you
Netgear WNDR3700 v1 and v2 and v4
Linksys WRT1900ACS
Linksys WRT1900ACS
Re: Transferring Static IPs
I didn't fully grasp your problem then. Both our solutions were for transferring the DHCP assignments from the old to the new format. In your case, with both routers identical in hardware and software, the easiest way should be to simply backup the main router and restore that on the spare.