Problems switching from Static IP block to DHCP on the WAN
-
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.
-
@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.
-
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.
-
@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.
-
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.
-
@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.....
-
Open a bug report: https://redmine.pfsense.org/
-
@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.
-
@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?
-
@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).