search for: switch_cable

Displaying 1 result from an estimated 1 matches for "switch_cable".

2006 Mar 27
0
Re: Re: multiple isp. masqueraded machines somtimes work and somet
...is how long >does it takes to find host unreachable.... >#!/bin/sh >CABLE_IP=ISP1 gw ip >DSL_IP=ISP2 gw ip > >## function to switch to dsl router >switch_dsl() >{ >route del default >route add default gw $DSL_IP >} > >## function to switch to cable router >switch_cable() >{ >route del default >route add default gw $CABLE_IP >} > >if ping -c1 -q www.google.com >/dev/null 2>&1; then ># since we can ping google we''re online so we exit. >exit 0 >else ># internet is down, let''s switch to other router >if rou...