Re: Least expensive connection?



Dave Rudisill <denali@xxxxxxxxxx> hath wroth:

I recall seeing a post in which somebody used a simple command line tool
or set of tools (like tracert or arp or netstat, etc.) to determine
which of two available Internet connections was used by a system. Don't
even remember the OS, although I remember trying it on my Windows XP
laptop. There was some evaluation by the OS of which link was the "least
expensive."

That was a method that I used initially with routers that didn't have
RIP or load balancing. The customer would have an ISDN or DSL line as
their "main" connection to the internet. On the LAN was also a 3Com
3C886 or 3C888 dialup router as a backup. The script ran on every
computah on the LAN. When it detected a link failure, it would switch
the default route (gateway) from the DSL router to the 3C886 dialup
router. I can't seem to find the script but as I recall, it went
something like this (in pseudo code):

while true;
do
if ping returns "100% loss"
# switch default route to dialup router
route change 0.0.0.0 0.0.0.0 192.168.1.2 METRIC 1
else
# test if default route already points to DSL router
if [ route print | grep "default gateway = 192.168.1.1 ]
then
do nothing
else
# change default route to DSL router
route change 0.0.0.0 0.0.0.0 192.168.1.1 METRIC 1
endif
endif
# run every 10 mins
sleep 6000
done

Or something like that. I can dig out the original that I scribbled
as a KSH (Korn Shell) script, which should run under Cygwin, GNU
tools, or MKS Toolbox. I wrote the original for SCO Unix which I can
fish out of some backup tapes.

An application of the above method was when I had a really flakey
optical link across a freeway. I think this was in 1995. The optical
link would go up and down several times a day depending on what the
sun, smog, inversion zone, and street lights were doing. I had to
switch to dialup backup several times per day. If I only tested for
connectivity every 10 minutes, I would have an horde of irate managers
to deal with.

I had various schemes for rapidly switching to dialup, but ended up
with an ugly kludge. Instead of having each machine test the
connection, I had the server run the connection test every minute. The
script would post a text file containing the route command with the
proper gateway IP address. Every minute, the users machine would test
if this file had changed and run the route command contents if it had
changed. That drastically reduced the work at each workstation but
caused other problems. Switching in the middle of a web browser
session or download was almost a guaranteed hang, but the main
application tolerated the switch just fine. That was deemed better
than not having any connectivity at all, so they learned to live with
it.

I wanted to build a gateway machine that did all the switching, but
that was deemed too expensive, complex, or something. I eventually
"solved" the problem by getting rid of the optical link and ordering
an overpriced full time ISDN connection and an Ascend something router
which had built-in dialup failover.

--
Jeff Liebermann jeffl@xxxxxxxxxxxxxxxxxxxxxx
150 Felker St #D http://www.LearnByDestroying.com
Santa Cruz CA 95060 http://802.11junk.com
Skype: JeffLiebermann AE6KS 831-336-2558
.



Relevant Pages

  • Re: 2 Network Connections - How to Force Internet Explorer to use a Specific one
    ... communicate with LinkSys router on 192.168? ... a switch using ethernet. ... The current connection to the Internet is 64k ISDN. ... The next step would be to add USB based wireless adapters to ...
    (microsoft.public.windowsxp.general)
  • Re: FC3 with BEFSR11 Linksys router slow connection
    ... >>Linksys, you know that you are not going to be getting more ... >>Full Duplex connection to the switch, ... > strange about the Linksys router. ...
    (Fedora)
  • Re: A Newbie Question about networking
    ... to switch the wireless off on the router when you don't need the laptop. ... If you want to share an Internet connection between multiple computers, the best way to do this is with a router as you are currently doing. ...
    (microsoft.public.windowsxp.network_web)
  • Re: Switch crashes when watching UDP video streaming
    ... > laptop or a single PC connected to the Switch. ... Router is a Alcatel ... > loop with the router (Switch-Router connection LED blinking at fast ... > change to TCP streaming problem does not happen - I know for TCP there ...
    (microsoft.public.windowsmedia.player)
  • Re: dhcp, router and debian
    ... the power socket. ... up trying the connection and starts Exim4 anyway. ... It seems that if my router is running without problems already, exim connects fine through the router as well. ... I shutdown from within KDE and then I switch of the main socket on the wall. ...
    (Debian-User)