Broadband-Hamnet™ Forum :: Problems & Answers
Welcome Guest   [Register]  [Login]
 Subject :Scripts on the Router.. 2014-07-22- 04:39:35 
LA3QSA
Member
Joined: 2014-06-27- 14:53:46
Posts: 2
Location

Hi All,


I have tried to install a script to check internet connectivity, and reboot a remote node if the connectivity has been gone for more than five minutes, this script was supposed to be executed by cron every minute. Where do I store the script on the hsmm firmware image to persist between reboots?


73 and Best Regards

LA3QSA

Per Øyvind

IP Logged
 Subject :Re:Scripts on the Router.. 2014-07-22- 07:59:09 
LA3QSA
Member
Joined: 2014-06-27- 14:53:46
Posts: 2
Location

Nevermind, found a persistent storage in /jffs/usr/bin/ and storred the script there. if anyone is interested, the i used this script to get the job done:

#/bin/sh

count=$((`ping -c 3 8.8.8.8 | grep -c '64 bytes'`))

if [ $count -le 1 ]

then

  `echo "timeout" >> /tmp/network_watchdog` # add timeout to watchdog

else

  `> /tmp/network_watchdog` # reset timeouts

fi

count=$((`cat /tmp/network_watchdog | grep -c "timeout"`)) # count occurred timeouts

if [ $count -ge 5 ]

then '/sbin/reboot` #reboot if more than 5 concurrent timeouts

fi

IP Logged
Last Edited On: 2014-07-22- 08:01:33 By LA3QSA for the Reason Formating error when pasting script from editor
 Subject :Re:Scripts on the Router.. 2014-07-22- 09:19:08 
KG6JEI
Member
Joined: 2013-12-02- 19:52:05
Posts: 516
Location

I am curious,

Why are you rebooting the node if internet is lost ?

Nodes can still be very useful even if they don't have internet, putting it in a reboot loop every 5 minutes would degrade the network, and if you have an entire area internet outage and this is on lots of nodes you could take your entire mesh network down at once as all the nodes going into constant reboot cycles (a cascade failure)


IP Logged
Note: Most posts submitted from iPhone
 Subject :Re:Scripts on the Router.. 2014-07-23- 04:43:30 
K6AH
Member
Joined: 2012-03-05- 10:47:45
Posts: 181
Location: San Diego, CA
Hei Per. Hyggelig å se mesh implementeringer i Norge. Jeg er fra Drammen, men har bodd i USA siden jeg var barn. Andre, K6AH
IP Logged
Member of:
Beta Test Team
San Diego Mesh Working Group
Running 3.0.1
 Subject :Re:Scripts on the Router.. 2014-07-23- 05:03:16 
AE4ML
Member
Joined: 2014-06-01- 15:17:42
Posts: 47
Location: Spotsylvania VA USA
 
I agree there is no need to reboot the router and cause the mesh to re-converge constantly. This could be a bad cable , a route re-convergence. a bad or dropped route. I would be checking form the internet side and identify where the problem is located. From the mesh side what can you ping ? take this in steps and lets see where its broke. This is going to sound rather simple but it will tell us something about what is working. With a laptop on the mesh network. Can you ping yourself ? Can you ping other devices on the same subnet ? if yes then you have local access. if no then you have a problem right there with the laptop or a switch. assuming everything is good to this point. Can you ping the IP of the internet gateway ? Can you ping beyond that ? Move the laptop to the ISP side and repeat the tests going back into the mesh. Ping yourself. the first IP going into the mesh. Another device on the mesh. Where did it fail ?
IP Logged
Michael Lussier
AE4ML
 Subject :Something is causing a possible routing problem... 2014-07-26- 01:31:11 
AE4ML
Member
Joined: 2014-06-01- 15:17:42
Posts: 47
Location: Spotsylvania VA USA
 

I ran a couple test this week with my mesh network and connecting it to the internet. This was specifically for port 14580 for APRS and DNS. my setup was ISP, Cisco 2600 Router Cisco 2950 switch configured with vlan 1,2,20( 1 WAN, 2 BBHN, 20 ISP).  a nano Bridge M5(AE4ML-504) connected to the trunk port.The WAN picked up an IP 192.168.20.1 with gateway 192.168.20.254 as expected.

  At the other end was an un-managed switch with a nano bridge M5(AE4ML-501). I connected a laptop and WX3in1 APRS Igate device.

On a third setup(AE4ML-503) was a Nano station M5 with a PC. The entire setup initially it worked. no internet access .

The Igate was passing traffic out and then in about Oh about 5 minutes. it came to a stop. 

I did a reboot of AE4ML-504 (Im not a fan of reboots unless it is needed and it came backup only to slow down and fail again.

My ISP is a 10 network. and that side is stable. it never failed. I had a third laptop on that point and that will be my wireshark capture point.

Curious though. From my ISP router I had a static route to 10.0.0.0/8 to the mesh. On the router  I could ping my local and internet networks however I never could ping out over the mesh. when I went to  AE4ML-504 and I pinged the entire mesh except for the default gateway  on the inside of my Cisco router. Mesh gateway was checked and the address from the router was set to DHCP. I had an IP from the cisco router on AE4ML-504

There seems to be something going on. I need to run some wireshark captures and see what is going on. I did notice one thing. Something said for the email message about the script. Let me say this. I'm not a fan of the idea nor do I want to go down that road.


Mike AE4ML



[LA3QSA 2014-07-22- 04:39:35]:

Hi All,


I have tried to install a script to check internet connectivity, and reboot a remote node if the connectivity has been gone for more than five minutes, this script was supposed to be executed by cron every minute. Where do I store the script on the hsmm firmware image to persist between reboots?


73 and Best Regards

LA3QSA

Per Øyvind


IP Logged
Michael Lussier
AE4ML
Page # 


Powered by ccBoard


SPONSORED AD: