1

Is there a way to find how many total ip addresses that an AWS subnet can hold?

If my subnet CIDR is a.b.c.d/n, then the total ips allowed in this subnet - are they decided by a, b, c & d as well?

1 Answer 1

1

AWS docs show what the reserved IP's in each subnet are: https://docs.aws.amazon.com/vpc/latest/userguide/VPC_Subnets.html

The gist of it is, the first 4 IP's and the last IP of the subnet are off limits if your subnet starts with the same IP as the VPC. It's probably a good rule of thumb to avoid assuming these IPs are going to be available in any subnet even though potentially the second subnet address reserved for DNS could be available for consumption in another subnet. A better rule of thumb to avoid under-sizing subnets in AWS. Like, never plan on using a subnet smaller than /24. You need them for auto-scaling groups, NAT gateways, VPN's, and networking hooks into other apps like DynamoDB or Lambda.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.