[SATLUG] **SOLVED** Routing from one box to two different ISPs
Bruce Dubbs
bruce.dubbs at gmail.com
Fri Apr 6 20:54:32 CDT 2007
Daniel J. Givens wrote:
> I just got done testing my kernel sans CONFIG_IP_ROUTE_MULTIPATH_CACHED
> successfully. Also, it does look to be a standard (experimental) network
> option in the stock kernel[1].
I finally found it. It doesn't show up unless you select 'IP:advanced
router first'.
> I got the routing to work with the following command:
>
> $ ip route add default equalize \
> nexthop via <gateway 1> dev eth0 \
> nexthop via <gateway 2> dev eth0
If you do `route -n`, what does it look like? How about `ip route show`?
> The way it works is each new route it adds to the route cache is
> alternated between the two. That means that full each unique ip you
> visit will be sent through one gateway only. This isn't a packet level
> alternation, but a route based alternation. I wouldn't say it's as good
> as the load balancing Cisco does, but it could definitely be beneficial
> in cases where you had lots of outgoing connections, like a network with
> multiple users, bittorrent downloading, etc.
In a TCP connection, you have a stream of packets. I would think that
you would want them all to take the same route, if possible. I know
that IP packets are supposed to be independent, but packets arriving out
of order should not be common.
> Mind you, I have two WRT54Gs and setup my desktop to do multipath
> routing to both of them on the same interface. If you need NAT on a
> router with two interfaces, see this guide[2].
>
> If you don't want or need route balancing, I think you can just remove
> the "equalize" option. To test, you could just unplug the network
> connection to one gateway and see if it detects it properly.
>
> This has been a fun little distraction.
Yes, it is interesting.
-- Bruce
More information about the SATLUG
mailing list