[nycbug-talk] Internet 768kb and up on a budget

George Georgalis george
Tue Jul 5 21:30:19 EDT 2005


On Tue, Jul 05, 2005 at 05:07:40PM -0700, David Rio Deiros wrote:
>On Tue, Jul 05, 2005 at 11:44:53AM -0400, George Georgalis wrote:
>> I was suprised at Alex's point that two dsl lines would work. It's
>> just a few command lines (once you know them) in Linux to load balance
>> multiple gateways
>
>Can you tell me those "few commands"? I didn't know it was so easy.


Well a few more than I remembered, but here's my notes; I think this
works (add the iproute2 package if you don't have it), GATEWAY0 is
used on a 6:1 ratio with GATEWAY1 (or vice versa?)


GATEWAY0=216.254.97.1
GATEWAY1=65.185.37.22
NIC0=216.254.97.15
NIC1=65.185.37.21
route del default
ip route add 0.0.0.0/0 via $GATEWAY0 table E0
ip route add 0.0.0.0/0 via $GATEWAY1 table E1
ip rule add from $NIC0 table E0
ip rule add from $NIC1 table E1
ip route add default scope global \
        nexthop via $GATEWAY0 weight 6 \
        nexthop via $GATEWAY1 weight 1
ip route flush cache


Not sure what happens if a link fails and I wonder if it would work with
one physical interface...

// George


-- 
George Georgalis, systems architect, administrator Linux BSD IXOYE
http://galis.org/george/ cell:646-331-2027 mailto:george at galis.org




More information about the talk mailing list