Networking · Concept
CIDR blocks and subnet sizes
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voiceThe interviewer asks
What does 10.20.0.0/16 mean? How many addresses are in a /24 and a /20, and how many can you actually use in an AWS subnet? Why do people say 'pick your VPC CIDR carefully'?
Then
Follow-ups the interviewer asks next
- Split 10.20.0.0/16 into subnets for three AZs with public, app and database tiers.
- Why is a /24 often too small for EKS nodes?
- What happens if two VPCs both use 10.0.0.0/16 and you need to connect them?
- What are the private address ranges, and what is 100.64.0.0/10 used for?
- Is 10.20.1.0/23 a valid block?
The answer
What a strong answer covers
- /16 means the first 16 bits are the network and 16 bits are left for hosts: 65,536 addresses. /24 is 256, /20 is 4,096; each bit halves or doubles.
- AWS reserves 5 addresses in every subnet (network address, VPC router, DNS, one for future use, broadcast), so a /24 gives 251 usable.
- A sensible split: /20s (or larger) per AZ for app and Kubernetes subnets, /24s for public and database subnets, space left for growth.
- With the EKS VPC CNI every pod gets a VPC IP: 30 nodes × 30 pods needs about 900 IPs plus warm pools, so a /24 runs out and pods can't start. Prefix delegation, bigger subnets, or a secondary CIDR (often from 100.64.0.0/10) help.
- Overlapping CIDRs can't be peered or routed simply (you need NAT or PrivateLink). Plan non-overlapping ranges across VPCs, regions (Mumbai and Hyderabad), offices and partner VPNs before building; changing later is painful.
- Private ranges (RFC 1918): 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. 100.64.0.0/10 is carrier-grade NAT shared space, usable as extra VPC space.
- 10.20.1.0/23 isn't aligned: a /23 must start on an even third octet, so 10.20.0.0/23 or 10.20.2.0/23.
The red pen
Common traps
Avoid:10.0.0.0/16 for every VPC "because it's the default"; forgetting the 5 reserved addresses; one giant subnet for everything.
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voicePractise questions like this out loud
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.