On Fri, 7 Dec 2001, Nick Rogness wrote:
> On Fri, 7 Dec 2001, Lars Eggert wrote:
>
> > rick norman wrote:
> >
> > > What would be nice would be to load balance on a per connection
> > > basis, not a per packet basis, between the two modems.
> > > Any ideas how to do this ?
> >
> >
> > Not with the current mechanisms in FreeBSD. You'd need a simple policy
> > routing engine (actually, policy forwarding). A prototype based on tun
> > devices shouldn't be too hard to put together. Basically, you'd want
> > to pick one of your links based on destination address and optionally
> > the port pair.
>
>
> An idea on how you would do pseudo load-balancing, would be:
>
Damn it, fat fingered it...corrections to firewall:
ipfw add 500 divert natd1 ip from $NET to 0.0.0.0/1 out via $DSL_INT#1
ipfw add 550 divert natd1 ip from 0.0.0.0/1 to any in via $DSL_INT#1
ipfw add 560 fwd $DSL-2 ip from $NET to 128.0.0.0/1 out via $DSL_INT#1
ipfw add 570 divert natd2 ip from any to any via $DSL_INT#2
>
> Where:
> - $DSL_INT#1 is the default gateway interface.
> - $DSL_INT#2 is the interface of the second dsl Service
> - $DSL-2 is the IP of the gateway to the second dsl Service
> - $NET is your local network IP subnet.
>
>
What the above is doing is sending anything TO 1-127.X.X.X out
dsl service 1 and sending 128-256.X.X.X out dsl service 2.
Nick Rogness <[EMAIL PROTECTED]>
- Keep on Routing in a Free World...
"FreeBSD: The Power to Serve!"
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message