Networking interview question · Most asked
What is CIDR notation? How many usable addresses are in a /26, and in an AWS /26 subnet?
Summary
CIDR writes a block as a base address plus the number of fixed prefix bits. A /26 leaves 6 host bits, so 64 addresses; 62 are usable in classic networking (minus network and broadcast), and 59 in an AWS subnet, which reserves 5 addresses.
Longer Answer
Each extra prefix bit halves the block: /24 = 256, /25 = 128, /26 = 64. Cloud providers reserve addresses for the router, DNS and future use (AWS and Azure 5, Google Cloud 4). Subnets can't be resized, so sizing them for growth (especially for Kubernetes pods) matters.
Key Points
- 2^(32 - prefix) addresses.
- /26 = 64 addresses.
- AWS reserves 5 per subnet: 59 usable.
- Subnets can't be resized later.
Deep dive: Networking Tutorial: Subnets and CIDR
Explanation
What interviewers look for
Quick, correct arithmetic and awareness of cloud reservations.
More most-asked Networking questions
- How does NAT work, and what are its limits?
- What's the difference between stateful and stateless firewalls? Give cloud examples.
- What happens, at the network level, when you type a URL into a browser and press Enter?
- How does DNS resolution work, and what does a record's TTL control?
- What does TLS provide, and how does certificate validation work?
- What's the difference between TCP and UDP, and when would you choose UDP?
- What do 502, 503 and 504 errors from a load balancer usually mean?
- A service is unreachable. How do you troubleshoot it systematically?