AWS VPC Subnet Configuration: How Many Subnets Allowed?

How Many Subnets Allowed with AWS VPC 172.168.128.128/28 Configuration?

Prev Question Next Question

Question

There is a request from the networking team in your organization to create the below VPC in AWS 172.168.128.128/28 How many subnets would be allowed with this configuration?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - A.

Smallest allowable CIDR range for a VPC is /28 so it cannot be subnetted any further.

With a AWS VPC would result in only 1 Subnet and 11 available hosts (16 - 5 reserved)

For more details, Please check the following AWS Docs.

https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html

The given CIDR block is 172.168.128.128/28. This means that the IP range starts at 172.168.128.128 and has a netmask of 255.255.255.240 (28 bits set to 1).

To determine the number of subnets that can be created, we need to use the formula 2^(n-s) where n is the total number of bits in the IP address and s is the number of bits used for subnetting. In this case, we have:

  • n = 32 (IPv4 address length)
  • s = 28 (from the given CIDR block)

Substituting the values into the formula, we get:

2^(32-28) = 2^4 = 16

Therefore, the answer is B. 16 subnets can be created with the given CIDR block.

Each subnet in the VPC can accommodate up to 14 IP addresses (2^(32-28)-2). The first 4 addresses (i.e., the network address, the VPC router, DNS server and the reserved IP address) and the last address (the broadcast address) are not available for allocation to EC2 instances or any other resources.

It's worth noting that the VPC can be created with fewer subnets than the maximum allowed. However, the number of subnets cannot exceed the maximum number calculated using the above formula.