User Tools

Site Tools


monitoring_gateway_ping

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

monitoring_gateway_ping [2009/09/24 01:37]
k2patel created
monitoring_gateway_ping [2020/08/10 02:35]
Line 1: Line 1:
-====== Loosing Gateway on freebsd 5.5 ====== 
  
-I have not seen any solution so far, so following custom scripts will help you. 
- 
-add following line to rc.local. 
-<code bash | /​etc/​rc.local>​ 
-/​usr/​local/​bin/​netmonitor 
-</​code>​ 
- 
-create script netmonitor 
-<code bash | /​usr/​local/​bin/​netmonitor>​ 
-#!/bin/sh 
- 
-. /​etc/​rc.conf 
- 
-netmonitor(){ 
-   while [ 1 ]; do 
-      ping -c 5 -t 1 $defaultrouter 
- 
-      if [ $? -ne 0 ]; then 
-         sh /​etc/​netstart 
-         sh /​etc/​rc.virtual 
-      fi 
-      sleep 5 
-   done 
-} 
- 
-netmonitor & 
-</​code>​ 
monitoring_gateway_ping.txt ยท Last modified: 2020/08/10 02:35 (external edit)