Results 1 to 2 of 2
Hi! 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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-16-2012 #1
- Join Date
- Nov 2012
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:
#!/bin/sh arp -s 192.168.0.1 11:22:33:44:55:66 arp -s 192.168.0.2 22:33:44:55:66:77 and so on and save as static_arp.sh
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 06:00 AM. Reason: added code tags for readability & fixed link
- 11-17-2012 #2
- Join Date
- May 2011
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/static_arp.sh, 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/static_arp.sh and my /etc/rc.d/rc.local file might look like this:
#!/bin/sh # # 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/static_arp.sh ] && /etc/rc.d/static_arp.sh