Penguin
Diff: FailoverInternetConnection
EditPageHistoryDiffInfoLikePages

Differences between version 3 and revision by previous author of FailoverInternetConnection.

Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History

Newer page: version 3 Last edited on Friday, July 4, 2003 2:45:42 pm by CraigBox Revert
Older page: version 1 Last edited on Thursday, February 13, 2003 11:47:01 am by DanielLawson Revert
@@ -1,8 +1,7 @@
-  
 I'll describe a simple way of setting up a redundant internet connection. 
  
-My setup involves my main server being the 'router' for the network. I have another machine, elsewhere on the network that has a radio card in it. All traffic is directed to the main server, which then routes it on the the radio machine, which does the NAT. I also have another connection - a so-called "Internet Hub" which takes ethernet in and has a serial line out, connected to a modem. This does dial on demand and NAT. 
+My setup involves my main server being the 'router' for the network. I have another machine, elsewhere on the network that has a radio card in it. All traffic is directed to the main server, which then routes it on the the radio machine, which does the [ NAT] . I also have another connection - a so-called "Internet Hub" which takes ethernet in and has a serial line out, connected to a modem. This does dial on demand and NAT. 
  
  Radio machine IP: 10.0.0.254 (name radio) 
  Internet Hub IP: 10.0.0.253 (name modem) 
  Server IP: 10.0.0.1 
@@ -10,9 +9,9 @@
 So I can change which internet connection I use simply by changing the default route on the server. 
 What I do, is set up my default gateway as being radio, with a metric of 0 
  route add default gw radio metric 0 
 I then add the backup route in as well, with a higher metric 
- route add default gw radio metric 10 
+ route add default gw modem metric 10 
  
 The higher metric means it is used less preferentially. As I don't have load balancing enabled, it doesn't get used at all. 
  
 So, If I discover that the radio connection has gone down, I can manually failover by issuing 
@@ -28,9 +27,9 @@
  
  
 I can automate this a number of ways. One way I finalized on was a cron script that is run every minute 
  
-:/usr/local/sbin# cat check-internet.pl 
+ :/usr/local/sbin# cat check-internet.pl 
  
  #!/usr/bin/perl 
  
  $primary="radio"; 
@@ -84,8 +83,13 @@
 If we get a 0 retval, and the counter is less or equal to the tolerance level, we reset the counter 0. 
 If its above the tolerance level, it means we've dropped the default route, so we reset the counter, and bring the default route back up 
  
  
-Thats pretty simple, and it works. Although with a tolerance of 3, as shown, it takes 4 minutes or so to work out the link is down and to bring it back up. Cron can only schedule tasks every minute, so thats the smallest accuracy you'll get 
+Thats pretty simple, and it works. Although with a tolerance of 3, as shown, it takes 4 minutes or so to work out the link is down and to bring it back up. Cron can only schedule tasks every minute, so thats the smallest accuracy you'll get.  
+  
+  
+Another method is to use [Nagios]. I have a eventhandler that I wrote for nagios, but I never got it working nicely, hence writing my own above. I can provide it as a sample, however I think the issues were due to the link going to a hard critical state straight away, and not being in a warning state for any length of time.  
  
+-- DanielLawson  
  
-Another method is to use nagios. I have a eventhandler that I wrote for nagios, but I never got it working nicely, hence writing my own above. I can provide it as a sample, however I think the issues were due to the link going to a hard critical state straight away, and not being in a warning state for any length of time.  
+-----  
+CategoryNetworking  
The following authors of this page have not agreed to the WlugWikiLicense. As such copyright to all content on this page is retained by the original authors.
  • EeroVolotinen
The following authors of this page have agreed to the WlugWikiLicense.

PHP Warning

lib/blame.php (In template 'html'):177: Warning: Invalid argument supplied for foreach()

lib/plugin/WlugLicense.php (In template 'html'):99: Warning: Invalid argument supplied for foreach()

lib/plugin/WlugLicense.php (In template 'html'):111: Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument