AWS Certified Advanced Networking – Specialty (ANS-C01)Network ImplementationMedium

A company is deploying a new multi-tier application in a VPC (10.0.0.0/16). They require three private subnets for application servers (10.0.1.0/24), databases (10.0.2.0/24), and caching services (10.0.3.0/24). Additionally, they need a public subnet for load balancers and NAT Gateways, which should accommodate at least 50 usable IP addresses. Which of the following CIDR blocks is the most appropriate choice for the public subnet while ensuring no overlap and efficient use of IP addresses?

  1. A10.0.4.0/25
  2. B10.0.5.0/26
  3. C10.0.0.0/26
  4. D10.0.0.0/24
Show answer & explanation

Correct answer: A. 10.0.4.0/25

A /25 CIDR block provides 128 total IP addresses, with 123 usable IPs (after subtracting 5 for AWS reserved addresses), which comfortably exceeds the requirement of 50 usable IPs. 10.0.4.0/25 is the first available non-overlapping block after the private subnets.

Why the other options are wrong

  • B. A /26 block (10.0.5.0/26) provides 64 total IPs (59 usable), which might be too restrictive for future growth, and 10.0.5.0/26 is not the most efficient use after 10.0.3.0/24, as 10.0.4.0/25 is available and provides more flexibility.
  • C. A /26 block provides 64 total IPs (59 usable), which is barely enough but places it at the start of the VPC (10.0.0.0/26) which could lead to fragmentation.
  • D. A /24 block (10.0.0.0/24) overlaps with the proposed 10.0.1.0/24 application subnet. It also provides more IPs than needed (251 usable).

VPC Subnet Sizing

VPC subnet sizing involves selecting appropriate CIDR blocks for subnets to accommodate current and future resource needs while avoiding IP address overlap.

  • AWS reserves 5 IPs per subnet (first four and last one)
  • A /24 block has 256 IPs (251 usable)
  • A /25 block has 128 IPs (123 usable)
  • A /26 block has 64 IPs (59 usable)
  • A /27 block has 32 IPs (27 usable)

Memory trick: Power of 2 for hosts, subtract 5 for AWS, check for overlap.

More Network Implementation questions