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

    Problems with default gateway assignment

    Routing and Multi WAN
    2
    4
    3.8k
    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.
    • V
      Vadimi4
      last edited by

      Hi all.

      I've noticed a problem with DG assignment, and also have idea for developers.

      1)

      So, I've pfsense 2.0-RELEASE (i386) built on Tue Sep 13 17:28:43 EDT 2011 with 3 NIC's :

      WAN1 (PPPoE)
        WAN2 (PPPoE)
        LAN

      At least one of my WAN gateways have to be marked as Default. I could change which one is marked, but I can't unmark them all.
      In my example WAN1 is marked. Also, I allowed "default gateway switching".

      So, when system power-on, but no WAN links connected, there is no default route in routing table. That's ok.

      If now I connect the link, marked as default in Gateways menu (WAN1) , system recognizes that and adding a default route to routing table. That's ok too.

      BUT if system boot up with no WAN links connected, and then I connect WAN2 (which is not marked as default), I have next message in systemlog:

      php: : The command '/sbin/route change -inet default dynamic' returned exit code '68', the output was 'route: bad address: dynamic'

      The reason of this error is that in despite of allowed DG switching, system trying to use as DG the gateway of non existing at the moment WAN1 connection (dynamic). However WAN2 connection is already exists and we could use it's gateway as default.

      I think, it is not correct. What do you think? How can I correct this?

      2)

      Also, I've another problem with DG assignment: in my Gateways menu, I've got not only two WAN connections, but also two VLAN connections and two OpenVPN connection to access other offices of company, which are working over WAN connections.

      So if I  allow "default gateway switching", and the default WAN connection become down, system going to use one of the rest gateways including VLAN's and OpenVPN's instead of using second WAN connection only. I understand, that it is difficult to automaticly recognize which connection to use.

      So I've an idea. Why not to add another checkbox into gateway edit menu named "Allow using this gateway for a default gateway switching script". In this case, it would be possible to mark needed connection for using as DG only and script will switch between them.

      Thanks.

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        You must always have a default gateway, even if you have switching enabled.

        The other bits are likely bugs in the switching, which is why it's off by default and IIRC there is a ticket open in redmine for the behavior you are seeing.

        We wanted to leave it in because it did work for some people in certain circumstances, but it's at best considered an experimental feature.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • V
          Vadimi4
          last edited by

          You must always have a default gateway, even if you have switching enabled.

          I know. So I'm describing the bug, when system already has usable gateway, but not assigning it as default gateway.

          The other bits are likely bugs in the switching, which is why it's off by default and IIRC there is a ticket open in redmine for the behavior you are seeing.

          That is wery good. So maybe I can help anyway? I can get some logs or anything else…

          Thanks for reply.

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            http://redmine.pfsense.org/issues/1837

            I'm not sure anyone is actively working on that - it won't be fixed until 2.1+ and attention is focused elsewhere. If you discover anything (or a workaround), etc, then update the ticket.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

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