Load Balancer, Static Route not working….
-
I have 2 DSL lines that both reside in the same subnet as eachother. The problem that I am experiencing, FreeBSD keeps determining that it should be using an incorrect interface for the route to my DNS server, which it pings for the load balancing. Below is my following configuration.
Interfaces:
WAN = bfe0
WAN2 = rl0WAN:
IP: 76.196.29.110
Subnet: 255.255.255.0
Gateway: 76.196.29.111WAN2:
IP: 76.196.29.102
Subnet: 255.255.255.0
Gateway: 76.196.29.103Static Routes:
WAN, 206.81.96.55/32, 76.196.29.111
WAN2, 206.81.96.15/32, 76.196.29.103Route Table:
206.81.96.55/32, 76.196.29.111, rl0
206.81.96.15/32, 76.196.29.103, rl0As you can see, even though I have the static route set correctly, both networks are still going out one interface. This makes the load balancing fail when WAN2 goes down since it can no longer ping either DNS servers. This is usually the interface that came up first and FreeBSD decided to use. When I try to manually add a route on the box through SSH, it does not let me specify a gateway and an interface device at the same time. FreeBSD is suppose to determine the best interface to use when I specify the gateway, yet it keeps choosing the wrong one.
How would I got about forcing FreeBSD to use a specific gateway and interface for a route?
-
Are these IP's static?
If they are you could change both subnets to /29 . -
Yup, these are static IPs.
If I do /29 then the gateway IP will become the broadcast.
IP: 76.196.29.102
Subnet: 255.255.255.248
Host Range: 76.196.29.97 - 76.196.29.102
Broadcast: 76.196.29.103 -
Ah yes i didnt read right and ignored the 1 before the 02 and 03 ^^"
Well in this case it's not so easy.Basically you need a cheap broadband router to put before one of the WAN's to emulate a different subnet.
There is currently no way to have the same subnet on two WANs. -
Ahh good idea. Though I do not want to put another device in front of the pfsense box, that gave me an idea. My speedstreams have the option to give public or a private IP, I can just enabled private IP on one device and should be good to go.
Thank you!