2

When installing a new Ubuntu server instance, the installer asks for a subnet in CIDR notation and then it asks for an IP address without CIDR notation.

Why can't I just specify the IP address in CIDR notation? Wouldn't that include all of the necessary information? I seem to always mess up the subnet in CIDR notation during installation because I don't use that method anywhere else.

Izzo
  • 71
  • 2

1 Answers1

0

Theoretically when entering the subnet address in CIDR notation it would be sufficient information to enter

<your IP address>/<mask> 

rather than

<your IP address & ^<mask>>/<mask> 

although perhaps Ubuntu insists on the latter. Have you tried it?

Craig Hicks
  • 809
  • 7
  • 18
  • I would agree "/" should be enough information, there's no reason that we need to explicitly spell out the subnet. – Izzo Nov 01 '20 at 23:21
  • 1
    You've essentially confirmed that the information is redundant. However, why would the installer be asking for redundant information? – Izzo Nov 07 '20 at 23:17
  • Right - why not just ask for the CIDR - i.e., the number of bits for the prefix? One guess would be that it was slightly easier for the programmer, because the was already a routine for reading in standard CIDR notation (addr/mask). Another is that it follows standard precedent - in fact I can't recall seeing anyplace that asked just CIDR suffix without the net address too (although I have found address can contain random insignificant bits without generating more than a warnring, e.g., it works in UFW with just a warning). – Craig Hicks Nov 08 '20 at 19:31
  • Edit: above should be "why not just ask for the CIDR suffix, " – Craig Hicks Nov 08 '20 at 19:42