Quoting Steven Surdock <[EMAIL PROTECTED]>:
I'm stepping a bit outside my area of knowledge on the topic, but I
_think_ the pf route-to directive is consulted on an inbound packet
before the routing table lookup. Once the routing look-up is done,
either with route-to or OS, the opportunity to reroute the packet is
gone. But both FreeBSD and OpenBSD support multipath routing, which is
performed at the OS level and should give you load-balancing across
multiple links (with the same route metric.) I _think_ this will offer
only 50/50 load balance, but you should _really_ dig deeper into the man
pages and check for yourself.
I am note sure I understand you here correctly.
When trying to load balance connections from a local daemon (like
squid) I can use a rule like (typing from memory)
pass out on $ext_if1 route-to \
{ ($ext_if1 $ext_gw1), ($ext_if2 $ext_gw2) } round-robin \
proto tcp from $ext_if1 to any flags S/SA modulate state
and packets go via both gateways load balanced, But with same source
ip, that of the default gateway (usually). Only step missing is NAting
packets on non default gateway to it's ip so that all packets exit
with correct source ip.
In fact I had used another box in front of second link just to do
NATing and load balancing was working correctly.
I have tried various combination of nat rules, but none of them were
matching. So this is the exact problem I am facing/trying to solve.
Thanks again for your answers,
raj