To preface, I understand why this is happening, but it took me a bit to figure out why I was losing access to OpenWRT for something as simple as changing the LAN IP of the router. Hoping to make a change to save others in the future confusion.
Problem: In case you didn't know OpenWrt 25.12 and later uses CIDR so if you attempt to change the default 192.168.1.1/24 IP to 192.168.2.1 in LuCI for example (without CIDR), you will lose access. After 30 seconds it will fail back to the previous config. You can choose to "Apply Unchecked", but will lose access to web interface permanently.
The correct format would be 192.168.2.1/24 for my intended use. Am I just dense or is it worth putting something like the blue ? at the bottom of the image to explain this?
Again hoping to make a change to save others in the future confusion. If everyone else knew this already, feel free to close this topic because I also won't forget this after struggling for longer than I should.
This has been pretty well documented. The following should be noted:
- OpenWrt 25.12 uses CIDR notation by default.
- From a default/fresh 25.12 installation, changing the lan address will require the CIDR notation.
- Configs that have been carried forward from 24.12 may still contain the netmask line and thus changes here wouldn't require CIDR notation.
- 25.12 does support the use of the netmask line, but CIDR is preferred.
- 24.10 uses the 2-line (ipaddr + netmask) approach by default, but will accept 1-line CIDR method.
- 23.05 and earlier use the 2-line method and (IIRC) CIDR notation is not supported.
I agree it is documented in the Wiki, but from the number of search results you linked on the same confusion I had it seems those could be addressed with some help text in LuCl like is already there for IPv6 routed prefix.
Also on the second bullet, changing the LAN address does not require CIDR notation meaning LuCl will not warn or stop you from applying a LAN address without CIDR notation. You will simply lose access if you apply a LAN address without CIDR and then need to wait for rollback.
It would be helpful to have some text or a warning for someone who hasn't read all the documentation that CIDR notation is required
Yes, that is true. But leveraging forum search can often help answer these types of questions very quickly.
That's a reasonable idea. Typically the best way to ensure this idea is seen by the devs would be to post it as a bug/feature request on the official Github.
I'll have to test this to confirm the LuCI behavior (I seem to recall it not being willing to apply without the CIDR notation, but I could be mistaken). That said, when I said it is required, I was referring to the functional configuration (assuming no netmask line exists).
This seems to go hand-in-hand with the idea you have about adding help text. Add that to the bug/feature request on GitHub so its all considered at the same time.