route selection and ipfw forwarding
G Bryant
bsd at roamingsolutions.net
Sun Jan 1 22:44:09 PST 2006
Dennis Olvany wrote:
>Let's say that I wanted to balance upstream traffic across four WAN
>links to the same ISP and default gateway using IPFW probabilities.
>
>Can the FreeBSD routing table contain multiple routes to the same
>destination?
>
>How would a route be selected and could such a selection be influenced
>by IPFW?
>_______________________________________________
>freebsd-ipfw at freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw
>To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe at freebsd.org"
>
>
>
>
It is possible to do load sharing, but not balancing in the true sense
of the word.
You need to use ipfw's FWD rule to forward (push) packets to the
different gateways of
the 4 WAN links, but it get's a bit more complicated from there.
You now also need to keep-state on each of the sessions, and will have
to check-state
of all established outgoing packets to send them out the same WAN link
as the rest of that
sessions packets.
If you are NATting first, then you will have to divert via each of the
natd's and then check-state.
It's a dirty solution, but I have a working system with 2 WAN links.
You can also use IPFW set's to manage the percentage splits betweeen the
links. (or for failover).
Another solution would be to have a second FreeBSD box at the ISP and
use ng_one2many on
both sides to distribute the network traffic over the 4 WAN links.
Regards, Graham
More information about the freebsd-ipfw
mailing list