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.

    WAN = bfe0
    WAN2 = rl0



    Static Routes:

    Route Table:,, rl0,, rl0

    As 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.

    Host Range: -

  • 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!

Log in to reply