Interview Prep/Networking/IP Addressing, CIDR, Subnetting & Routing

Subnet 10.0.0.0/16 into /24 subnets. How many do you get and what are the first three?

IntermediateConceptIP Addressing, CIDR, Subnetting & Routing
Answer

Going from /16 to /24 borrows 8 bits, so 2^8 = 256 subnets of 256 addresses each: 10.0.0.0/24, 10.0.1.0/24, 10.0.2.0/24, … 10.0.255.0/24.

For a /20 carve-out you step by 16 in the third octet: 10.0.0.0/20, 10.0.16.0/20, 10.0.32.0/20. The block size is 2^(32 − prefix) addresses, and subnets must start at a multiple of the block size.

All Networking questions Roadmap: Networking for DevOps

More on IP Addressing, CIDR, Subnetting & Routing