What is the smallest subnet one can create on AWS in the VPC?

我是研究僧i 提交于 2019-12-07 01:31:02

问题


I want to limit the number of instances that can run in a subnet to the smallest number of instances possible. This in combination with an IAM role will allow me to limit how many instances a user can create on my AWS account (see https://forums.aws.amazon.com/thread.jspa?threadID=174503 requirement #4 which reflects my motivations).

What is the smallest subnet one can create on AWS in the VPC and what would the IPv4 CIDR be?


回答1:


16 IPs is the smallest range for a VPC Subnet -- /28 netmask.

For example, you could create a VPC with the CIDR range 10.0.0.0/26 which would support up to 64 IPs in the range of 10.0.0.0 - 10.0.0.63.

Then you could create 4 subnets, each with 16 available IPs using the following VPC CIDR ranges:

10.0.0.0/28   (10.0.0.0  - 10.0.0.15)
10.0.0.16/28  (10.0.0.16 - 10.0.0.31)
10.0.0.32/28  (10.0.0.32 - 10.0.0.47)
10.0.0.48/28  (10.0.0.48 - 10.0.0.63)

NOTE: See important comment below by @sqlbot. Not all 16 in range can be used for instances.



来源:https://stackoverflow.com/questions/41947212/what-is-the-smallest-subnet-one-can-create-on-aws-in-the-vpc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!