Least expensive connection?

A while back, somebody (probably Jeff) described how a system makes a choice between two Internet connections when deciding which to use when sending data. There was some mechanism for deciding which was the "least expensive" connection, as I recall.

Can somebody point me to that post?

Thanks.

Reply to
Dave Rudisill
Loading thread data ...

Groups.google.com ??

fundamentalism, fundamentally wrong.

Reply to
Rico

rico snipped-for-privacy@hotmail.com (Rico) hath wroth:

Failover? Load distribution? Route optimization? QoS? Whatcha trying to accomplish?

There are several protocols that will do this. If you're using cheap routers, it's called RIP or RIP-2 (Router Information Protocol) dynamic routing. If you have two routers, with two seperate connections to the internet, RIP will juggle the routing tables depending on which route is "best" based on the fewest number of hops (or cost). I don't recommend this approach because it only uses one route at a time.

I much prefer a "load balancing router" which uses all routes at the same time. See:

formatting link
formatting link
formatting link
formatting link
If you have more than one path to the internet, such a load balancing router will distribute the traffic between the two paths. There are some limitations in terms of what can be done. If you have two

1.5Mbits/sec DSL lines, it will not combine the speeds of these two connections into a single stream for downloading from a single server. However, if you have two downloads running at the same time, from two different web servers, such a router will allocate 1.5Mbits/sec to each download. Methinks this is much better than switching or failover. I had one such system with a DSL and an ISDN connection at a customers. They were running for a week with the DSL dead, and nobody even noticed the interruption.

There are other schemes and products available depending on what you're trying to accomplish. Ummm.... what are you trying to accomplish and what do you have to work with?

Note: This has little or nothing to do with wireless internet.

Reply to
Jeff Liebermann

Not trying to accomplish anything. This is simple intellectual curiosity, coupled with a lousy memory.

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."

Reply to
Dave Rudisill

Dave Rudisill hath wroth:

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.

Reply to
Jeff Liebermann

Yeah, least-cost-routing. I'm not sure this was the previous answer, but it's also the "Metric" collumn in "route print" from a command prompt.

Reply to
William P.N. Smith

That was it! The message "Wireless AND ethernet to same router" from Jeff on 2/5/06.

Thanks.

Reply to
Dave Rudisill

Dave Rudisill hath wroth:

Oh, that message. |

formatting link
(mis)read the original question somewhat differently.

Reply to
Jeff Liebermann

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.