Using two Internet connections

I have a cable (2 Mbps) and an adsl (4 Mbps) connection to two different providers. To utilize both, I have to decide an Internet IP range that will be reached via one or the other and set it manually in routing table. Is there another way to maximize use of both connections dynamically?
 
Thanks all,
I don't see how link aggregation helps since it's dual-homing connection that has two external IP addresses.
BGP, well, out of question obviously.
What I was thinking of was ability for dynamic routing out of slower link only if the faster link is full. In other words if I'm downloading something and adsl link is saturated, switch any other upload request to cable link. When adsl link is free again, send new requests to it. Important thing is not to load-share per packet (each different packet to same destination over different links).
Right now I have to mess with static routing every time I need a change.
 
Unfortunately that doesn't work well for this scenario since you either end up with static hash mappings or round-robin (basically equal load balancing which won't work well with 2 Mbps and 4 Mbps connections).
 
bbzz said:
Unfortunately that doesn't work well for this scenario since you either end up with static hash mappings or round-robin (basically equal load balancing which won't work well with 2 Mbps and 4 Mbps connections).
Haven't tried this, but you can try add the 4 Mbps connection into the pool twice, with the hope of it being round-robinned twice as frequently as the 2 Mbps connection.
 
Code:
#
# Macros
#
INT_IF = "em0"
EXT_IF = "bge0"
EXT_IF2 = "bge1"

table <private_nets> persist { 127/8, 172.16/12, 192.168/16, 169.254/16 }

#
# Options and default policy
#
set block-policy drop
set state-policy if-bound

#
# Packet normalization
#
scrub in                          all
scrub out on $EXT_IF all random-id
scrub        on $EXT_IF all reassemble tcp

#
# NAT/redirects
#

# NAT
nat on $EXT_IF from <private_nets> to any -> ($EXT_IF)
nat on $EXT_IF2 from <private_nets> to any -> ($EXT_IF2)

#
# Filter rules
#
pass all
#pass in from 192.168.100.0/24 to any rtable 0
#pass in from 192.168.150.0/24 to any rtable 1
This one works in FreeBSD, but it won't failover. If the first link is down the whole connextion is down. I have to start /etc/rc.d/ppp, /etc/rc.d/netif, /etc/rc.d/routing, /etc/rc.d/pf and /etc/rc.d/named.

The main problem is the DNS server. When the first WAN is down, you cannot access its DNS. But freebsd FreeBSD is still using the old DNS server.
 
The problem with pf load balancing features is (as far as I remember when I originally asked this question), is that it simply uses static hash or round robin, etc for your outgoing connections. What is needed is something like Performance Edge Routing (in Cisco world), which could, among other things, check download saturation and accordingly send requests upstream. In other words, one connection could be nearly saturated on upload, but not on downstream.

Is there a solution like this?
 
Back
Top