Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Load Balancer, Static Route not working….

    Scheduled Pinned Locked Moved Routing and Multi WAN
    5 Posts 2 Posters 2.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Shanlar
      last edited by

      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 = rl0

      WAN:
      IP: 76.196.29.110
      Subnet: 255.255.255.0
      Gateway: 76.196.29.111

      WAN2:
      IP: 76.196.29.102
      Subnet: 255.255.255.0
      Gateway: 76.196.29.103

      Static Routes:
      WAN, 206.81.96.55/32, 76.196.29.111
      WAN2, 206.81.96.15/32, 76.196.29.103

      Route Table:
      206.81.96.55/32, 76.196.29.111, rl0
      206.81.96.15/32, 76.196.29.103, 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?

      1 Reply Last reply Reply Quote 0
      • GruensFroeschliG
        GruensFroeschli
        last edited by

        Are these IP's static?
        If they are you could change both subnets to /29 .

        We do what we must, because we can.

        Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

        1 Reply Last reply Reply Quote 0
        • S
          Shanlar
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • GruensFroeschliG
            GruensFroeschli
            last edited by

            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.

            We do what we must, because we can.

            Asking questions the smart way: http://www.catb.org/esr/faqs/smart-questions.html

            1 Reply Last reply Reply Quote 0
            • S
              Shanlar
              last edited by

              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!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.