[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Debian Etch with 2 Internet Connections Load Balanced



Hi

So I'm trying to configure a Debian Etch box that is connected to 2 internet connections (WAN) both have static IP configurations and work fine if a default route points to only 1 of them and 1 LAN connection.

I've followed the directions at: http://lartc.org/howto/lartc.rpdb.multiple-links.html many times and am at a loss. My first step is just to quasi load balance the outgoing connections from the debian box onto the 2 WAN connections eth1+eth2.

I can get my routing to work via only 1 WAN connection, but if I try to get both to work through:
ip route add default scope global nexthop via 10.10.30.1 dev eth1 weight 1 nexthop via 10.10.90.1 dev eth2 weight 1

I can't get any internet connectivity (would just get destination host unreachable through PING but it would alternate between for different connections so it seems like it's trying to do some kind of load balancing).
From 10.10.90.251 icmp_seq=2 Destination Host Unreachable (on an attempt to 1 host)
From 10.10.30.250 icmp_seq=2 Destination Host Unreachable (on an attempt to a different host)

eth0: my IP: 10.10.11.1 netmask: 255.255.255.0 (LAN)
eth1: my iP: 10.10.30.250 gateway 10.10.30.1  netmask: 255.255.255.0 (WAN1 / DSL)
eth2: my IP: 10.10.90.251 gateway 10.10.90.1 netmask: 255.255.255.0 (WAN2 / cable)

Here's my settings from /etc/network/interfaces:
auto eth1
iface eth1 inet static
        address 10.10.30.250
        netmask 255.255.255.0
        network 10.10.30.0
        broadcast 10.10.30.255
        post-up ip route add 10.10.30.0/24 dev eth1 src 10.10.30.250 table dsl
        post-up ip route add default via 10.10.30.1 table dsl
        post-up ip rule add from 10.10.30.250 table dsl
        post-down ip rule del from 10.10.30.250 table dsl

auto eth2
iface eth2 inet static
        address 10.10.90.251
        netmask 255.255.255.0
        network 10.10.90.0
        broadcast 10.10.90.255
        post-up ip route add 10.10.90.0/24 dev eth2 src 10.10.90.251 table cable
        post-up ip route add default via 10.10.90.1 table cable
        post-up ip rule add from 10.10.90.251 table cable
        post-down ip rule del from 10.10.90.251 table cable

 #ip route show
10.10.30.0/24 dev eth1  proto kernel  scope link  src 10.10.30.250
10.10.11.0/24 dev eth0  proto kernel  scope link  src 10.10.11.1
10.10.90.0/24 dev eth2  proto kernel  scope link  src 10.10.90.251
default
        nexthop via 10.10.30.1   dev eth1 weight 1
        nexthop via 10.10.90.1  dev eth2 weight 1

# ip rule show
0:      from all lookup local
32764:  from 10.10.90.251 lookup cable
32765:  from 10.10.30.250 lookup dsl
32766:  from all lookup main
32767:  from all lookup default

/etc/iproute2/rt_tables:
#
# reserved values
#
255     local
254     main
253     default
0       unspec
#
# local
#
#1      inr.ruhep
201  dsl
202  cable

Any ideas? Much thanks in advance! I've been beating my head on this for many many hours and I bet it's something stupidly obvious.


Reply to: