Hi Michael,

On Tue, Apr 12, 2016 at 08:12:48PM -0400, Michael Ezzell wrote:
> On Apr 12, 2016 8:09 AM, "Willy Tarreau" <w...@1wt.eu> wrote:
> >
> 
> > I learned it 18 years ago when QNX was shipping a fully working OS and
> browser
> > on a single diskette. The browser used to connect to http://127.1/ and
> since
> > then I don't think I have ever typed 127.0.0.1 anymore. Same for most IP
> > addresses, on test platforms I arrange for setting the networks with
> zeroes
> > in the middle so that I can have 10.1, 11.1, etc... Very convenient.
> 
> Willy, isn't it true, though, that this notation is a holdover from
> pre-CIDR days, and only makes sense (to the extent that it makes sense)
> without a CIDR mask?
> 
> Isn't 127.1 interpreted as 127.0.0.1 because 127.* was a Class-A network?
> By extension, the bizarre-looking 127.65535 would actually be 127.0.255.255
> ...

Yes absolutely.

> But it seems like 127.1/32 should be unambiguously interpreted as 127.1.0.0
> because of the explicit mask.
> 
> Shouldn't it?

As I explained, there is a huge ambiguity because people can add a mask
after an existing address which was already valid without the mask. The
best thing we can do is to emit a warning when a short address is used
with a mask, but the current function is not appropriate to emit such
warnings, it's just a lower level utility function.

> Otherwise this seems like we're interpreting addresses using sort of a
> hybrid of classful and classless notation.

Sure, which is why the warning would be appropriate. I guess the real issue
is the change of behaviour in the shortened addresses between classful and
classless notations, that people are not necessarily aware of. But you see,
even the classless notation isn't completely classless since you have to
write integers with forced zero bits that you're supposed to ignore just
because we write one integer per octet. In fact the only "clean"
representation we could have for classless notation would be binary, and
it wouldn't require any mask since you'd only write the necessary bits.

Regards,
Willy

Reply via email to