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!

RT-AC68U - WOL - Static arp reboot survival

Discussion in 'Routers' started by silent, Mar 25, 2014.

  1. silent

    silent New Around Here

    Joined:
    Mar 8, 2014
    Messages:
    2
    Hi everyone!

    I've already gone 99% of my way to configure normally working WOL on my RT-AC68U.

    Background: I'm running latest Asuswrt Merlin and also I've installed transmission.

    By now I can wake my home desktop computer from my iPhone by logging in my router's web interface from WAN.

    If I type the following command: arp -s [my desktop's LAN IP] [my MAC address of desktop's network card] in Putty or via Tools - Cmd in router's web interface my port-forwarding starts working normally and I can wake my desktop PC via Team Viewer app for iPhone.

    If I reboot my router my arp table is refreshed and router doesn't know what IP address corresponds to my MAC address of desktop's network card.

    All I need to do is to type a command which will automatically start "arp -s" each time I boot my router, but I can't figure out how does this command looks like.

    As far as I understand, I have to do the following actions:

    •On router UI we have to enable "jffs partition" and "Format JFFS partition at next boot" under Administration / System Tab (available only on custom firmware) and reboot router

    [due to the fact, that I have transmission installed, I need to type the following]

    •wget -c -O /jffs/scripts/firewall-start http://goo.gl/ZFHdHC
    •chmod a+rx /jffs/scripts/firewall-start (make it executable)

    [then type some other lines, making my router remember to start arp -s command each time I boot my router]

    Then type "reboot"

    If anyone knows how to solve this problem, I would appreciate your help.

    P.S. Sorry for the noob question.


    Отправлено из моего iPhone используя Tapatalk
     
  2. stevech

    stevech Part of the Furniture

    Joined:
    Mar 13, 2010
    Messages:
    7,007
    Location:
    San Diego
    Can you config. your router with a DHCP reservation for the desktop PC (based on its MAC address)? That done, the desktop's LAN IP will be unchanging even though it uses DHCP.

    The desktop could also be configured with a static LAN IP address that doesn't conflict and is outside the range of IP addresses used by the router's DHCP server.
     
  3. silent

    silent New Around Here

    Joined:
    Mar 8, 2014
    Messages:
    2
    Stevech, sorry for not identifying in my first post, that I've already did DHCP reservation in my router's web interface.

    But luckily I've managed to find a solution yesterday!

    1. Firstly, you've got to run Putty terminal

    One can find how to use Putty terminal in a guide in respect of "Transmission" installation - https://github.com/RMerl/asuswrt-merlin/wiki/Transmission-through-Optware

    Enter you login / password from router's web interface in the Putty terminal.

    2. You've got to edit file "services-start" (It looks like it is a file containing several scripts)

    You've got to type in the Putty terminal:

    nano -w /jffs/scripts/services-start
    #!/bin/sh
    arp -i br0 -s [LAN IP of your desktop PC which you want to boot, for example 192.168.1.254] [MAC address of the network card of your desktop PC, which you want to boot, for example FF:FF:FF:FF:FF:FF]

    Press CTRL-O (to save changes in the "services-start" and you'll see something like "Wrote 2 Lines"
    Then press CTRL-X (in order to close nano-editor [it looks like "nano" command is like a nano text editor - it gives you an opportunity to edit "services-script"])

    Then type the following in Putty terminal:

    chmod a+rx /jffs/scripts/services-start

    Then type in Putty terminal "reboot" and the router will reboot.

    That's it!

    3. Testing

    After reboot you can then login into your router's web interface, go to "Tools" -> "Run Cmd" and type a command "arp". You'll see what IP addresses correlate to what MAC addresses. I've got phrase "PERM" just right after the MAC address of the network card I wanted to "pair". I guess, that PERM means permanent.

    I've made several reboots and each time I get static arp.

    Now port-forwarding and Team Viewer's Wake on LAN works correctly (but I'll run some more tests).

    P.S. There are quite a lot of interesting scripts prepared by Merlin - https://github.com/RMerl/asuswrt-merlin/wiki




    Отправлено из моего iPhone используя Tapatalk
     
    Last edited: Mar 26, 2014
  4. grendizerus

    grendizerus New Around Here

    Joined:
    Jul 21, 2017
    Messages:
    1