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

    Problems switching from Static IP block to DHCP on the WAN

    Scheduled Pinned Locked Moved General pfSense Questions
    12 Posts 3 Posters 502 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.
    • stephenw10S
      stephenw10 Netgate Administrator
      last edited by

      When you use DHCP the gateway is dynamic and passed by the upstream server. You probably still had the old gateway set from the static config and to access that it has to be inside a locally defined subnet. Since the last place that subnet was defined was the VIP it objected when you tried to remove it. Removing the old gateway before removing the VIPs would have avoided that.

      N 1 Reply Last reply Reply Quote 0
      • N
        NickJH @stephenw10
        last edited by NickJH

        @stephenw10 OK, but to me, when you switch from Static to DHCP, all Static settings should be removed. Surely that is what the menu option 2 should be doing? There is nothing there to delete the static settings, only to change the interface. Changing it should remove the old settings rather than leave you in limbo, trying to clean up a mess left behind when the average user would not know where to look or what to look for. Nothing should have been left in the routing table, at a minimum.

        1 Reply Last reply Reply Quote 0
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          It would be difficult to do that and be sure the gateway removed was correct and not in use. It's safer to allow the user to remove it manually.

          N 1 Reply Last reply Reply Quote 0
          • N
            NickJH @stephenw10
            last edited by

            @stephenw10 I am afraid I disagree. If you are changing from Static to DHCP, as the gateway was set up in option 2 of the console, I'd also expect it to be removed when unsetting it. IMHO, it is a realistic expectation for the internet to be cut transiently when changing from one method to another.

            Just about any commercial router will do the same.

            At a very minimum, a warning should pop up telling you what you still need to do. It caused me a load of pain this morning.

            1 Reply Last reply Reply Quote 0
            • stephenw10S
              stephenw10 Netgate Administrator
              last edited by

              What happens if there was no gateway on the interface but one was added later in the WAN subnet? Or if there was a gateway added on the WAN but it's still being used?

              There are a lot of permutations here. Manually removing it is always safer.

              N 1 Reply Last reply Reply Quote 0
              • N
                NickJH @stephenw10
                last edited by NickJH

                @stephenw10 A view not held by your average commercial router. Add routes automatically and remove them automatically.

                Also don't leave your users in the lurch by not warning them.....

                1 Reply Last reply Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  Open a bug report: https://redmine.pfsense.org/

                  N 1 Reply Last reply Reply Quote 0
                  • N
                    NickJH @stephenw10
                    last edited by stephenw10

                    @stephenw10 Done - https://redmine.pfsense.org/issues/16144 - but failed with the text formatting of console output. I've put it down as a Configuration Backend issue but I was not sure which category to use. Feel free to change it.

                    1 Reply Last reply Reply Quote 1
                    • tinfoilmattT
                      tinfoilmatt @NickJH
                      last edited by

                      @NickJH said in Problems switching from Static IP block to DHCP on the WAN:

                      I removed all the 1:1 NAT rules and then tried deleting all the Virtual IPs, but I can't delete the last one. If I try, I get the message:

                      The following input errors were detected:

                      This entry cannot be deleted because it is required to reach Gateway: WANGW.
                      

                      This was your at-a-very-minimum-thrown warning. Seems reasonable to me.

                      And what's a "domestic router" by the way? British, American, or other?

                      N 1 Reply Last reply Reply Quote 0
                      • N
                        NickJH @tinfoilmatt
                        last edited by

                        @tinfoilmatt A domestic router, I guess, can be called a SOHO router that the average man in the street can but from their local computing shop - Linksys, TP-Link, D-Link, Draytek, Netgear etc or is supplied by your ISP. It excludes high end devices like some of the CIsco and Juniper devices and things like that.

                        The warning is not good. It does not even point the user to the correct screen or give him any instructions. It did help me eventually narrow it down, but I consider myself way more advanced than your average user - I used work for Clearcenter providing support for ClearOS (which also resets the routing table when changing the external WAN settings).

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