Warning when saving, any place this is done?
-
Hi!
I recently lost quite a bit of time because I forgot to change the subnet mask (in CIDR notation) from /32 to /24 in the interfaces page...I am not sure if there is any time it is valid to put a /32 there but I would like to try (I am far from a PHP guru which is why I say "try") to put a validation there that warns during save that doing this is suspicious.
Is there any place in another page where something similar is currently done?
Thank you and have a nice day!
Nick
-
/32
is just as valid as any other mask there, and there is no way to predict what the subnet mask will actually be, and/32
is the safest choice as it's the least likely to cause a problem on the network if it's wrong.We can do a lot to prevent foot-shooting, but in this case it's one thing that only the user can set for sure and the GUI can't hold their hand on.
-
Hi!
The idea was to warn, not too block...
Maybe something like the warning message when you change the interface configuration when someone leaves /32 there
i.e.
Don't forget to adjust the DHCP Server range if needed after applying.
That message is probably not dynamic though like it would need to be to only appear if it is a /32...
I totally understand the idea that /32 is the safest bet but for the life of me I do not see in what situation someone would want to put a /32 for subnet mask for an interface...
I guess this is the first place I will look the next time I have a similar problem though, it was inattention on my part that made me forget to set the subnet mask, it is the first time ever I did such a mistake. That being said, I doubt I was the only person who made it...
Does it really need to be set by default? Couldn't it be empty and only forced to be filled in when the user type an IP address?
Thank you and have a nice day!
Nick
-
But the GUI doesn't know if /32 is correct or not so warning about /32 could cause people who use it validly to second guess their own input.
The DHCP thing is more likely to be true for static interfaces so it's always displayed there.
I get that /32 trips people up a lot but there is only so much the GUI can do to help there. At some point the burden is on the user to input their settings correctly.
-
And what about not filling in this field by default, only making it mandatory if the user filled in the IP address?
Unless you type in an IP address that page still behaves as it did before and if the the user types in an IP address the user is forced to provide the subnet mask...
This way it will never warn about the subnet mask unless there is a reason to do so (ie it is missing...). Doesn't this make way more sense than what I suggested earlier, to warn when it is a /32, not knowing whether it is good or not? If the user has to actually fill it and it still manage to still fill in the wrong information then (s)he is a lost cause...
Thank you and have a nice day!
Nick