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

Re: dest-hash ?

On Monday, Jun 2, 2003, at 13:02 US/Pacific, Jedi/Sector One wrote:

I have two upstream ADSL links, and PF with route-to/round-robin works
very well to balance outgoing connections over both links.

Although it won't solve all issues (especially with servers that use DNS
to balance the load), would it have been possible to implement something
like "dest-hash" so that a destination always get the same source address?

As I suggested to someone else a while ago, you would probably be better
off with something that dynamically manipulates the routing tables on the
machine instead. You would also gain failover abilities from that setup.
I believe routed(8) is capable, but I've never tried it.

If you want to experiment with static routing:
  route add -netmask gateway1.ip
  route add -netmask gateway2.ip

The net effect should be to choose one gateway based on whether the dest
IP is odd or even.

For the ICQ issue, you could also add a rule to route-to only one
gateway for dest tcp port 5190.

All that said, dest-hash might still be a useful option.