Subject: pf & round-robin _outbound_ not inbound
To: None <tech-net@netbsd.org>
From: David Brownlee <abs@purplei.com>
List: tech-net
Date: 05/10/2006 20:40:52
 	We have an office in Capetown where fast leased lines are
 	prohibitive, and we need a lot of download bandwidth, so
 	we have a 128K leased line, plus four 1Mbit ADSL lines for
 	download, all hooked up to our gateway.

 	The default route is via the leased line (storm), and
 	utilising all four ADSL line for traffic routed through
 	the gateway is simple enough (see pf.conf fragment below).

 	The problem is getting traffic _from_ the gateway to go
 	over the interface connected to the adsl modems. According
 	to the docs a 'pass out quick on $storm_if route-to { ...
 	} ...' should work, but I've not had any luck...

 	Does anyone have any thoughts?

storm_if = "rtk0"
int_if   = "rtk1"
adsl_if  = "rtk3"
int_net  = "192.168.3.0/24"
adsl_gw1 = "192.168.9.1"
adsl_gw2 = "192.168.9.2"
adsl_gw3 = "192.168.9.3"
adsl_gw4 = "192.168.9.4"
[...]
nat on $storm_if from !($storm_if) -> ($storm_if:0)
nat on $adsl_if  from !($adsl_if)  -> ($adsl_if:0)
[...]
pass in on $int_if route-to { \
         ($adsl_if $adsl_gw1), \
         ($adsl_if $adsl_gw2), \
         ($adsl_if $adsl_gw3), \
         ($adsl_if $adsl_gw4) \
     } round-robin proto tcp from $int_net to any port != 8880 \
     flags S/SA modulate state

-- 
 	   David Brownlee -- Purple Interactive CTO -- abs@purplei.com