How many usable IPs does an AWS subnet of /28 have?
BeginnerScenarioAddressing, CIDR & Routing
Answer
Situation read → AWS reserves five addresses in every subnet, which surprises people who only know the textbook formula.
What I'd do →
- A /28 has 16 addresses
- AWS reserves the first four (network, VPC router, DNS, future use) and the last one (broadcast, unused)
- Usable is 16 - 5 = 11
- Confirm with
aws ec2 describe-subnets --subnet-ids subnet-0abc --query 'Subnets[0].AvailableIpAddressCount'
Why → The smallest subnet AWS allows is /28, and small subnets get eaten fast by ENIs from load balancers, Lambda in VPC and EKS nodes.
Interview tip → Add that EKS with the VPC CNI can consume dozens of IPs per node, so /28 for anything but a tiny appliance is a trap.
More on Addressing, CIDR & Routing
You own 10.0.0.0/16 for a new VPC and need separate /24 subnets for dev, QA and prod across two AZs. How do you carve it up?BeginnerA host is configured as 192.168.1.130/25. What network does it belong to and what is the broadcast address?BeginnerA route table has 10.0.0.0/16 -> local and 10.0.1.0/24 -> vpn-gw. Where does a packet to 10.0.1.5 go?BeginnerA newly built server can ping everything in its subnet but nothing outside. What is the first thing you check?BeginnerYou are picking a private range for a new company network. Which RFC 1918 range do you choose and why?BeginnerA server has two NICs and traffic to 10.20.0.0/16 is leaving through the wrong one. How do you see and fix the route?Beginner