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

    Static routes question

    Scheduled Pinned Locked Moved Routing and Multi WAN
    3 Posts 2 Posters 1.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
      shaoranrch
      last edited by

      Hello,

      I've been working around with pfSense and I happen to need to have 2 static routes, both pointing to the same subnet but using different gateways. This is an straight forward configuration on any kind of router, but pfsense being mainly a firewall I don't find out how to do this, or if this is even supported.

      Current configuration:

      Pfsense got 4 interfaces:
      WAN: IP via DHCP
      LAN: 10.1.1.1/30
      LAN2: 10.1.1.5/30
      OPT-1: Not currently used

      I've created 2 gateways:
      LAN1GW: 10.1.1.2
      LAN2GW: 10.1.1.6

      I try to create a static route to 10.1.0.0/23 (my full LAN network) which currently (because of how the topology is layered) can be reached via LAN1GW and/or LAN2GW, I do this by assigning LAN1GW as the gateway for the static route. It works as intended, the problem comes when I try to create another static route for the same subnet (10.1.0.0/24) but using LAN2GW as its gateway, I get an error stating that there's already a static route for said subnet.

      My question is, is this kind of configuration possible on pfsense? I need to either load-balance or failover that route, again this is quite easy on any router, but here of I can't find out how to do it. If possible I'd like a different approach other than using gateway groups and firewall rules.

      One more question,

      Eventually I'd probably hire another internet connection, both will get their addresses via DHCP, if I create a gateway group, will this group be kept even if the IPs and /or gateways assigned by the providers via DHCP change?

      Thanks in advance.

      1 Reply Last reply Reply Quote 0
      • R
        rubic
        last edited by

        You can not have two gateways to the same destination due to FreeBSD  internal routing table organization, wich is trie. ECMP implemented in 8.0 is rather an exeption than a common practice. Not impemented in pfSense.
        Why do you need that? I mean, what disadvantage is to have one working path to the destination? In case you need something like failover, use dynamic routing protocol like OSPF.

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

          @rubic:

          You can not have two gateways to the same destination due to FreeBSD  internal routing table organization, wich is trie. ECMP implemented in 8.0 is rather an exeption than a common practice. Not impemented in pfSense.
          Why do you need that? I mean, what disadvantage is to have one working path to the destination? In case you need something like failover, use dynamic routing protocol like OSPF.

          Hi, thanks for the concise answer.

          Well we're working on a particular deployment where dynamic routing is not an option due to certain limitation with the routers we're using. This will get fixed but as of now, we can't use routing protocols. The thing is, we need the 2 redudant paths either on ECMP or Active/Standby.

          What about my second question, any insight about that?

          Thanks again.

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