• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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 276 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.
  • N
    NickJH
    last edited by Apr 17, 2025, 11:24 AM

    I think I've found it. I've had to go System > Routing and set WAN_DHCP to be default. This allowed me to delete the 62.30.63.88/29 from there as well. Then I could remove the Virtual IP.

    Question. Why was all this necessary? Shouldn't pfSense looked after it all for me when I change the WAN from Static to DHCP?

    1 Reply Last reply Reply Quote 0
    • S
      stephenw10 Netgate Administrator
      last edited by Apr 17, 2025, 1:21 PM

      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 Apr 17, 2025, 1:32 PM Reply Quote 0
      • N
        NickJH @stephenw10
        last edited by NickJH Apr 17, 2025, 1:33 PM Apr 17, 2025, 1:32 PM

        @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
        • S
          stephenw10 Netgate Administrator
          last edited by Apr 17, 2025, 2:15 PM

          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 Apr 17, 2025, 3:20 PM Reply Quote 0
          • N
            NickJH @stephenw10
            last edited by Apr 17, 2025, 3:20 PM

            @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
            • S
              stephenw10 Netgate Administrator
              last edited by Apr 17, 2025, 6:33 PM

              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 Apr 17, 2025, 7:13 PM Reply Quote 0
              • N
                NickJH @stephenw10
                last edited by NickJH Apr 17, 2025, 7:15 PM Apr 17, 2025, 7:13 PM

                @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
                • S
                  stephenw10 Netgate Administrator
                  last edited by Apr 17, 2025, 8:45 PM

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

                  N 1 Reply Last reply Apr 18, 2025, 8:41 AM Reply Quote 0
                  • N
                    NickJH @stephenw10
                    last edited by stephenw10 Apr 18, 2025, 2:08 PM Apr 18, 2025, 8:41 AM

                    @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
                    • T
                      tinfoilmatt @NickJH
                      last edited by 30 days ago

                      @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 30 days ago Reply Quote 0
                      • N
                        NickJH @tinfoilmatt
                        last edited by 30 days ago

                        @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
                        12 out of 12
                        • First post
                          12/12
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                          This community forum collects and processes your personal information.
                          consent.not_received