Navigation

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

    Switching default gateway issue in multi wan

    2.1 Snapshot Feedback and Problems - RETIRED
    2
    8
    1743
    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.
    • X
      xbipin last edited by

      i have 2 separate wan connections from same isp, i use one for p2p, surfing etc and second for voip, when both r connected, the gateway is the same as the isp is the same, wan1 is set to be the default gateway and wan2 default gateway unticked, now suppose if i wanted to switch the connections, make wan2 as default and wan1 as non default, general some1 would first goto wan1 and untick the default gateway and hit save and then goto wan2 routing and tick default gateway but this doesnt seems to work unless the 2 wan connections r from a different isp where the gateway ip would be different so i guess some smart coding is required in such a scenario so as to be able to make wan2 as default.

      1 Reply Last reply Reply Quote 0
      • E
        eri-- last edited by

        Why would you want to do that if its the same gateway?

        Normally just use policy routing to do that.

        1 Reply Last reply Reply Quote 0
        • X
          xbipin last edited by

          the reason is the isp authenticates based on mac id and userid/pass so even if its 2 connections from same isp, the packages and speeds r different

          changing all those complex rules would takes ages compared to flipping the default gateway

          1 Reply Last reply Reply Quote 0
          • E
            eri-- last edited by

            Well that is a downside of the routing table presently.
            Maybe it will improve in later versions will see.

            For now the trick is that you do not play with the gateways in this case but leave them as autodetected and just flip the assignment.
            The default gateway will come from the interface assigned as wan.

            With some mac address spoofing on them and depending what is wan you will have that be the default gw.

            Its a workaround i know but its something better than nothing.

            1 Reply Last reply Reply Quote 0
            • X
              xbipin last edited by

              wouldnt it be easier to detect the interface on each entry and provide a flip default gateway switch or something like a drop down where some1 could select the interface to make as default gateway and hit save and it would change the default gateway to that

              1 Reply Last reply Reply Quote 0
              • E
                eri-- last edited by

                Well i did a commit to mpd5 to solve this.
                It will behave correctly now by changing gateways in the gateways tab.

                You need to wait for a snapshot with a changed mpd5 to test.

                1 Reply Last reply Reply Quote 0
                • X
                  xbipin last edited by

                  so with this will i be able to untick default gateway in one and then go and tick it in the other or unticking one will automatically make the other the default?

                  1 Reply Last reply Reply Quote 0
                  • X
                    xbipin last edited by

                    bytheway i have another system with just one wan connection so obviously its set as default, now if i go edit it and untick default and save then the default flag goes away but still surfing etc keeps working fine, but if i edit it again and tick default gateway and hit save, then it wont flag it as default no matter how many times u try whereas in system log i see this

                    php: /system_gateways.php: ROUTING: setting default route to 203.109.65.1
                    


                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post