1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Static arp after reboot

Discussion in 'ASUS N Routers & Adapters' started by spiggot, Sep 12, 2012.

  1. spiggot

    spiggot New Around Here

    Joined:
    Sep 11, 2012
    Messages:
    3
    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?
     
  2. Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!
  3. koan00

    koan00 Occasional Visitor

    Joined:
    Aug 21, 2012
    Messages:
    28
    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).
     
  4. RMerlin

    RMerlin Super Moderator

    Joined:
    Apr 14, 2012
    Messages:
    28,023
    Location:
    Canada
    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.
     
  5. Optix

    Optix New Around Here

    Joined:
    Feb 8, 2013
    Messages:
    1
    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).
     
  6. Rondo

    Rondo New Around Here

    Joined:
    Jan 14, 2016
    Messages:
    1
    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!
     
  7. fgiorgia

    fgiorgia New Around Here

    Joined:
    Jun 9, 2016
    Messages:
    1
    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.
     
  8. m33ts4k0z

    m33ts4k0z Occasional Visitor

    Joined:
    May 4, 2016
    Messages:
    44
    You need to hit esc and then type :wq
     
  9. alfredog1976

    alfredog1976 New Around Here

    Joined:
    Jul 27, 2016
    Messages:
    4
    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.
     
  10. Clayton Burton

    Clayton Burton Occasional Visitor

    Joined:
    Jun 17, 2016
    Messages:
    15
    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.
     
  11. sfx2000

    sfx2000 Part of the Furniture

    Joined:
    Aug 11, 2011
    Messages:
    13,379
    Location:
    San Diego, CA
    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...
     
  12. alfredog1976

    alfredog1976 New Around Here

    Joined:
    Jul 27, 2016
    Messages:
    4
    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.
     
  13. Clayton Burton

    Clayton Burton Occasional Visitor

    Joined:
    Jun 17, 2016
    Messages:
    15
    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.
     
  14. Clayton Burton

    Clayton Burton Occasional Visitor

    Joined:
    Jun 17, 2016
    Messages:
    15
    The /opt is not on my attached usb Device.
     
  15. m33ts4k0z

    m33ts4k0z Occasional Visitor

    Joined:
    May 4, 2016
    Messages:
    44
    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: Jan 20, 2017
  16. Clayton Burton

    Clayton Burton Occasional Visitor

    Joined:
    Jun 17, 2016
    Messages:
    15
    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.
     
  17. m33ts4k0z

    m33ts4k0z Occasional Visitor

    Joined:
    May 4, 2016
    Messages:
    44
    Because it's faster. Glad you got it working.
     
    Clayton Burton likes this.
  18. Clayton Burton

    Clayton Burton Occasional Visitor

    Joined:
    Jun 17, 2016
    Messages:
    15
    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.
     
  19. Clayton Burton

    Clayton Burton Occasional Visitor

    Joined:
    Jun 17, 2016
    Messages:
    15
    SOLVED:When I did the latest firmware update, it deleted my port forwarding settings. Restored a previous backup and all is good.
     
  20. Angel-Luis Domínguez

    Angel-Luis Domínguez New Around Here

    Joined:
    Feb 24, 2017
    Messages:
    6
    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
     
  21. Clayton Burton

    Clayton Burton Occasional Visitor

    Joined:
    Jun 17, 2016
    Messages:
    15
    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.
     
Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!