Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Startup script that sets static arp for NAS (Synology DS-213)


    Have a problem which I really hope you guys can help me out with, first I want to make sure that I have the right fix and then how to implement the fix:

    1) (Will this fix it)
    I have 4x Foscam FI8905W wireless cameras that drop their connection regularly.
    I tried upgrading the router, upgrading the cameras WiFi antennas, set static IP and dynamic IP, reserve IP by MAC-address but they all lose connection at least once every 24h.
    Rebooting them by removing/inserting their AC-adapter gets them going again.
    When they are "disconnected" I can still see their IP, MAC-address and sometimes log into their webinterface and there it works perfectly but not in "Security Center". Sometimes they are totally dead even though I can see their IP and MAC as "connected" via my router.

    This problem SEEMS to be because of that the cameras stop responding to ARP-requests, see more detail here:

    Will making a startup script that sets static arp for my DS-213 (DSM 4.1) fix this problem and make them work over time with "Security Center"? (meaning the official Synology camera mangement tool)

    2 (Is this the right way to write the script)

    SSH as root into /etc/rc.local
    Open vi and write:
    arp -s 11:22:33:44:55:66
    arp -s 22:33:44:55:66:77
    and so on and save as
    Make the script executable with chmod +x

    Thats it? Reboot and see for how long it works? Can I see if the script is running anyhow?

    Extremely grateful for replies and help - TheSwede86
    Last edited by atreyu; 11-17-2012 at 05:00 AM. Reason: added code tags for readability & fixed link

  2. #2
    Hello and welcome!

    I'm not sure if your solution will solve your problem, but I'll try to help you troubleshoot your solution.

    So you've created a script called /etc/rc.local/, is that right? Usually, rc.local is a file, so I'm not sure that is right. Anyway, what you'd do is create the script like you've done, somewhere in /etc/ (or /etc/rc.d/ or similar), and then call that script from the rc.local file. for example, if I were in your boat, i'd create /etc/rc.d/ and my /etc/rc.d/rc.local file might look like this:
    # This script will be executed *after* all the other init scripts.
    # You can put your own initialization stuff in here if you don't
    # want to do the full Sys V style init stuff.
    touch /var/lock/subsys/local
    # this is a new line added that will execute the script, if found and executable
    [ -x /etc/rc.d/ ] && /etc/rc.d/
    you cannot check to see if the script is running b/c it just runs, does its thing, and exits. you can check to see that what it is supposed to have done has in fact been done. In this case, just check the arp table:
    arp -a
    and see if your new entries exist.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts