Static arp after reboot

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

spiggot

New Around Here
Wake on LAN with the latest official firmware is ok, however it doesn't seem to keep all machines in the list if you re-scan once they're switched off. Powering on the machine you're trying to wake up puts it back in the list until the next scan. I can't find a way of keeping a machine in the list permanently, which limits it's usefulness to me. Also you need to authenticate and use a browser, which is a pain.

I haven't tried Merlins yet, but I believe wake on LAN is also web based with that.

I like to use the simple method of Wake on LAN for convenience over security, port forwarding a port to a machine I'd like to Wake on LAN. This has worked well for me in the past with a cheapo O2 wireless box, allowing me to switch on machines with a couple of taps on my phone when I'm out and about. Of course for this I need static arp, which worked well on the Thomson o2 router I used to use.

With the Asus stock firmware using the command "arp -s 1.2.3.4 aa:bb:cc:dd:ee:ff" works well and adds a static arp entry I need, however this isn't persistent across router reboots, again limiting its usefulness.

Is there any way I can make static arp persistent and store in NVRAM in latest stock firmware? Could be set using the CLI as some part of startup script?
 

koan00

Occasional Visitor
Usually you can add stuff like that to the rc.local file. Not sure of the exact location.

Telnet in and then do:

find / -name rc.local -print

Edit that file and add your command to the end of it. Make sure to specfiy the full path to the arp binary in your command (to be safe/sure).
 

RMerlin

Asuswrt-Merlin dev
There is no init.d (so no rc.local) in Asuswrt.

You can't run scripts at boot with the stock firmware, however you can with Asuswrt-Merlin.
 

Optix

New Around Here
There is a way!

If you install the USB application "Download Master" you can just add your commands to the end of the script at:

/opt/.asusrouter

NOTE: You'll have to have some sort of USB storage attached (I believe). Also, you can disable Download Master after you've installed it. I'm not sure if you can uninstall it and still have this setup work, but you can try!

I discovered this information from this page:
Hacking Functionality into ASUSWRT Routers


Hope this helps. (I'm on a RT-AC66U).
 

Rondo

New Around Here
There is a way!

If you install the USB application "Download Master" you can just add your commands to the end of the script at:

/opt/.asusrouter

NOTE: You'll have to have some sort of USB storage attached (I believe). Also, you can disable Download Master after you've installed it. I'm not sure if you can uninstall it and still have this setup work, but you can try!

I discovered this information from this page:
Hacking Functionality into ASUSWRT Routers


Hope this helps. (I'm on a RT-AC66U).

Registered just to say thank you to Optix whose only post on this forum saved me a lot of headache! Googling "persistent static arp entry asus" brought me here.

To add to his post for non-technical people:

Install Download Master on the Asus Router like he said (you must have a usb drive in the router).
Telnet to your router's ip. Login with your router username and pass. (My preferred telnet program is MobaXterm or Putty).
Type cd /opt
Type vi .asusrouter
Use the down arrow to go all the way to the bottom of the text. And then the right arrow to get to the end of the line.
Hit the A button. (Allows you to append text).
Hit the enter button to go to the next line.
Type arp -s 1.2.3.4 aa:bb:cc:dd:ee:ff (obviously replace 1.2.3.4 with your IP and aa:bb... with your mac address),
Hit the colon button.
Type wq

Done!
 

fgiorgia

New Around Here
Registered just to say thank you to Optix whose only post on this forum saved me a lot of headache! Googling "persistent static arp entry asus" brought me here.

To add to his post for non-technical people:

Install Download Master on the Asus Router like he said (you must have a usb drive in the router).
Telnet to your router's ip. Login with your router username and pass. (My preferred telnet program is MobaXterm or Putty).
Type cd /opt
Type vi .asusrouter
Use the down arrow to go all the way to the bottom of the text. And then the right arrow to get to the end of the line.
Hit the A button. (Allows you to append text).
Hit the enter button to go to the next line.
Type arp -s 1.2.3.4 aa:bb:cc:dd:ee:ff (obviously replace 1.2.3.4 with your IP and aa:bb... with your mac address),
Hit the colon button.
Type wq

Done!
Hello,

I am new to all of this and trying to learn.

I am trying to make a permanent ARP that would survive router (Asus ac68u) reboot. After going to countless Google searches I found your post.

I followed your directions and everything seems to work except that I am not sure what the commands are after the mac address entry. Should I enter colon : (Hit the colon button) on the same line and then type wq? I have tried all sorts of combinations, nothing seems to work.

Any help would be greatly appreciated.

Thank you.
 

m33ts4k0z

Regular Contributor
Hello,

I am new to all of this and trying to learn.

I am trying to make a permanent ARP that would survive router (Asus ac68u) reboot. After going to countless Google searches I found your post.

I followed your directions and everything seems to work except that I am not sure what the commands are after the mac address entry. Should I enter colon : (Hit the colon button) on the same line and then type wq? I have tried all sorts of combinations, nothing seems to work.

Any help would be greatly appreciated.

Thank you.

You need to hit esc and then type :wq
 

alfredog1976

New Around Here
This doesn't appear to work anymore with latest firmware. Workaround for me was: while in /opt directory, type "cd /etc/init.d". There's 2 scripts in there for me, you could probably use either, I chose S50downloadmaster
Make a backup of the script somewhere, then use vi instructions mentioned above and do same thing, but vi into S50downloadmaster
and add arp command to end of file. Save with esc, :wq or Shift ZZ.
 

Clayton Burton

Occasional Visitor
This doesn't appear to work anymore with latest firmware. Workaround for me was: while in /opt directory, type "cd /etc/init.d". There's 2 scripts in there for me, you could probably use either, I chose S50downloadmaster
Make a backup of the script somewhere, then use vi instructions mentioned above and do same thing, but vi into S50downloadmaster
and add arp command to end of file. Save with esc, :wq or Shift ZZ.
Do you have another solution for this doesn't seem to work anymore. I placed the line arp -s 1.2.3.4 aa:bb:cc:dd:ee:ff at the end of S50downloadmaster and saved the changes and rebooted the router (Asus AC3200) and it still doesn't work. I had it working perfectly every time back 2 firmwares ago when the arp line was included in the .asusrouter file. I need a way to always WOL, even after a router reboot. I'm not sure where the :wq is placed and even if it impacts the WOL without it. I never had it in the .asusrouter file and wol worked everytime. Seems like Asus is trying to prevent the WOL feature. Wol doesn't even work from the router's config >Network Tools >Wake on LAN or AiCloud's manual WOL. Not sure if Asus changed the file. I added the arp string to other files with no luck. Is there a permanent solution that will allow WOL over WAN, even after a reboot? Thank you and I look forward to some ideas and a solution.
 

sfx2000

Part of the Furniture
I placed the line arp -s 1.2.3.4 aa:bb:cc:dd:ee:ff at the end of S50downloadmaster and saved the changes and rebooted the router (Asus AC3200) and it still doesn't work.

Static ARP doesn't add much value, and adds a lot of maintenance overhead as clients move and change - there are other better ways to manage things there for WOL and whatnot...
 

alfredog1976

New Around Here
Do you have another solution for this doesn't seem to work anymore. I placed the line arp -s 1.2.3.4 aa:bb:cc:dd:ee:ff at the end of S50downloadmaster and saved the changes and rebooted the router (Asus AC3200) and it still doesn't work. I had it working perfectly every time back 2 firmwares ago when the arp line was included in the .asusrouter file. I need a way to always WOL, even after a router reboot. I'm not sure where the :wq is placed and even if it impacts the WOL without it. I never had it in the .asusrouter file and wol worked everytime. Seems like Asus is trying to prevent the WOL feature. Wol doesn't even work from the router's config >Network Tools >Wake on LAN or AiCloud's manual WOL. Not sure if Asus changed the file. I added the arp string to other files with no luck. Is there a permanent solution that will allow WOL over WAN, even after a reboot? Thank you and I look forward to some ideas and a solution.

I have 2 ASUS routers (the RT-AC66U and the RT-AC87U) and they both set the static arps fine after reboot. The RT-AC66U has firmware version: 3.0.04.380_3831. There appears to be a newer firmware, but I really don't need to upgrade. The ":wq" command is simply a vi command that writes your changes from the buffer to file and quits vi.

Things to check: do you still have Download Master installed? Check "USB Application" in your router's admin web pages. Also, add command at "touch test.txt" at end of script to see if it's really being run. After reboot, see if "touch.txt" file exists in directory. If not, script may be in another location that you'll have to search for. Also, run "which arp" to see full path of arp. For example, it may show "/sbin/arp". You may have to put this full path in the script when you add the command at the end of S50downloadmaster. Hope this helps.
 

Clayton Burton

Occasional Visitor
I have 2 ASUS routers (the RT-AC66U and the RT-AC87U) and they both set the static arps fine after reboot. The RT-AC66U has firmware version: 3.0.04.380_3831. There appears to be a newer firmware, but I really don't need to upgrade. The ":wq" command is simply a vi command that writes your changes from the buffer to file and quits vi.

Things to check: do you still have Download Master installed? Check "USB Application" in your router's admin web pages. Also, add command at "touch test.txt" at end of script to see if it's really being run. After reboot, see if "touch.txt" file exists in directory. If not, script may be in another location that you'll have to search for. Also, run "which arp" to see full path of arp. For example, it may show "/sbin/arp". You may have to put this full path in the script when you add the command at the end of S50downloadmaster. Hope this helps.
Thank you for your reply. I still couldn't get it to work and I'm now thinking I never had working before either. However, after resetting the AC3200's settings to factory and formating the usb stick, I got it to work. I have all my settings reapplied and it still works. I wonder why Asus changes this now and then. After installing the latest firmware and prior to getting the WOL working yesterday, my computer would not wakeup. There's an option to wol within the router's configuration settings > Network Tools > Wake On Lan and within the AiCloud app > Plugins > Manual WOL, and both these methods worked flawlessly up to the latest released firmware and not up to now. I haven't tried it since following the instructions above. I had contacted Asus and asked why have these 2 WOL options do not work. This was the response "
Hi Sir,

For WOL, please make sure you have done a proper settings of your PC side.

https://www.asus.com/support/faq/114359/https://www.asus.com/support/faq/114359/

Most cases we got before were failed bios setting.

Thanks."

Yel ok, it's an issue with the router, not my PC. On my AC3200, I had string file.asusrouter in folder Asusware.arm and on my RT-N66U the file was inside the Asusware folder and remote WOL worked flawlessly until the latest FW release. Not sure of the status with the RT-N66U for I'm currently using it as an Access Point. There must be another way to WOL with just a string file inside a folder and not have to install Download Master. Again, thank you for your help.
 

Clayton Burton

Occasional Visitor
This doesn't appear to work anymore with latest firmware. Workaround for me was: while in /opt directory, type "cd /etc/init.d". There's 2 scripts in there for me, you could probably use either, I chose S50downloadmaster
Make a backup of the script somewhere, then use vi instructions mentioned above and do same thing, but vi into S50downloadmaster
and add arp command to end of file. Save with esc, :wq or Shift ZZ.
The /opt is not on my attached usb Device.
 

m33ts4k0z

Regular Contributor
The /opt is not on my attached usb Device.

The method that alfredog1976 mentions still works for my AC88U as well. After you ssh to your router type cd /opt directly and you will get into the folder. This folder is not listing with the ls command because its on a different directory level.
 
Last edited:

Clayton Burton

Occasional Visitor
The method that alfredog1976 mentions still works for my AC88U as well. After you ssh to your router type cd /opt directly and you will get into the folder. This folder is not listing with the ls command because its on a different directory level.
Why would you need to SSH into the router when all you need to do is remove the attached storage device and connect it to a PC and edit the "S50downloadmaster" file in asusrouter/etc/init.d folder.
 

Clayton Burton

Occasional Visitor
with the release of the latest firmware (Version 3.0.0.4.380.7266) on 14 Feb 2017, Asus as once again disabled or changed the Wake On LAN ability. I checked my arp table and it indicates PERM for my computer. They disabled it some how. I also have a line in the "S50downloadmaster" file to reboot my AC3200 router every morning at 4am, that works fine. This might be a tough one to solve. Thanks.
 

Clayton Burton

Occasional Visitor
SOLVED:When I did the latest firmware update, it deleted my port forwarding settings. Restored a previous backup and all is good.
 

Angel-Luis Domínguez

New Around Here
Hello,
I have AC3200 with 3.0.0.4.380.7266 official firmaware, but I can't find the file "S50downloadmaster" to add my ARP's commands.

I have solved the problem with a pendrive attached permanently, a srcipt with arps y the following modifications in nvram variable to execute the script at rebooting

nvram set script_usbmount="/jffs/scripts/ARPSET.sh"
nvram commit

Checking the result...
nvram show 2>&1 | grep script_usbmount
gives...
script_usbmount=/jffs/scripts/ARPSET.sh


I prefer not to have a pendrive and use your solution i "S50downloadmaster" file

Please, could you tell me the path to this file?

Thanks a lot
 

Clayton Burton

Occasional Visitor
Hello,
I have AC3200 with 3.0.0.4.380.7266 official firmaware, but I can't find the file "S50downloadmaster" to add my ARP's commands.

I have solved the problem with a pendrive attached permanently, a srcipt with arps y the following modifications in nvram variable to execute the script at rebooting

nvram set script_usbmount="/jffs/scripts/ARPSET.sh"
nvram commit

Checking the result...
nvram show 2>&1 | grep script_usbmount
gives...
script_usbmount=/jffs/scripts/ARPSET.sh


I prefer not to have a pendrive and use your solution i "S50downloadmaster" file

Please, could you tell me the path to this file?

Thanks a lot

Did you go into the router's configuration at 192.168.1.1 and install the Download Master in the USB Application section? Once you're done that you can find the file in the directory stated above.
 

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