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

How many usable hosts are in a /24, and why minus two?

BeginnerConceptIP Addressing, CIDR, Subnetting & Routing
Answer

A /24 has 256 addresses; traditionally the network address (.0) and broadcast (.255) are not assignable, leaving 254. In AWS the VPC reserves five per subnet: network, VPC router, DNS, future use, and broadcast, so a /24 gives 251 usable IPs.

Azure also reserves five and GCP reserves four, so check the cloud's rule before you size small subnets.

All Networking questions Roadmap: Networking for DevOps

More on IP Addressing, CIDR, Subnetting & Routing