Hacker News new | ask | show | jobs
by brianshaler 1015 days ago
Off topic, but I'm confused about the IPv4 notation in this quote:

> When we launched EC2 in 2006, it was one giant network of 10.2.0.0/8.

In my understanding, /8 means the first octet would be fixed (10.0.0.0-10.255.255.255) and I'm having trouble understanding the significance of the 2 here. If the 2 is significant, wouldn't you write it as /16? Given the source and my confidence on this notation, I feel like there must be some meaning an expert can glean from this. If so, I'm curious to learn. If it's just a typo, then that's fine and I apologize if this is nit-picky.

6 comments

You are right, it was a typo. It should have been 10.0.0.0/8. Updated that in the blog, also resolved a confusion about the memory in a P3dn.24xlarge.

Thanks for your critical reading!

@brianshaler not only read TFA, but found the bug in TFA, and TFA was by Werner Vogels.

I dont think there's any higher honor/role model as a HN community member. inspiring.

I’m guessing it’s a typo, but maybe it was a 10.0.0.0-10.255.255.255 subnet with EC2-Classic machines allocating purely from 10.2.0.0-10.2.255.255, and 10.x.0.0-10.x.255.255 was allocated for other services?
I think it must be a typo. because 10.2.0.0/8 is not a valid subnet mask. The largest subnet you can make starting with 10.2.0.0 is 10.2.0.0/15.
It's still a valid subnet notation, the 2 just doesn't mean anything.

When you take the logical AND of the IP and the expanded mask, you'll just end up with 10.0.0.0 as the network address and 10.255.255.255 as the broadcast address.

You are right. The /8 is 10.0.0.0/8.

I guess it's not a typo, but a weird way to write 10.0.0.0/8 excluding 10.1.0.0/16 .

It doesn't exclude 10.1.0.0/16, or any of the rest of 10/8.
My thought was that 10.2.0.0/16 is part of the 10.0.0.0/8 address range which is by default a private network address range (i.e. not routable by any other machines). I interpreted what the author wrote to say that your machine would be assigned an address in 10.2/16 but would still be able to route to other AWS services / machines in other 10/8 subnets (e.g. 10.1/16)
Formally it should be 10.0.0.0/8, but you'll often encounter CIDRs written less formally by including set bits outside of the cidr prefix length. Often it is shorthand for "the subnet that includes this IP address", so 192.254.33.12/16, for instance. Or it might be a typo! ;)
I would interpret 192.254.33.12/16 to mean 'host 192.254.33.12 in a /16 subnet'.

That's also the notation `ip` on Linux supports