Daemon News Ezine BSD News BSD Mall BSD Support Forum BSD Advocacy BSD Updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: route selection and ipfw forwarding



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@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw
To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe@xxxxxxxxxxx"


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