View Single Post
  #1   (View Single Post)  
Old 6th November 2008
ivanatora ivanatora is offline
Real Name: Ivan
Fdisk Soldier
 
Join Date: Jul 2008
Location: Bulgaria
Posts: 51
Default Using multiple gateways

Hello,
Could I have two gateways for my PC? Here is an example setup:
=====================
NIC - rl0 - IP 192.168.0.50
GW1 - IP 192.168.0.1
GW2 - IP 10.10.10.1
=====================
All of these is connected via simple switches and cables into one network.
In order to reach the second GW, should I put an alias for rl0 with IP in 10.10.10.0/24 network, or just add a static route to that network via rl0?
More - I want to be able to use both gateways to access Internet. Every of the two shapes its clients to a X Mbit speed, so I want to have total of 2*X Mbit connection.
I know about adding static routes, and I could set one of the GWs to be used for accessing specific addresses or networks, but I want to dynamically change routes on round-robin basis. This is how I think of it in a timeline:
- GET page from www.host1.com - GW1 is used
- GET page from www.host2.com - GW2 is used
- connect to ICQ - GW1 is used
- ssh to server1.com - GW2 is used
and so on...
Is there a pf based solution for this? I think I've seen something like 'probability match' somewhere in the manual - can I use it?

Oh, and why I can't find anything on 'freebsd load balancing' in Google? Is there a reason for this, or just I'm misunderstanding the terms?
Reply With Quote