一个子网可以创建多少个EC2实例



条件为:VPC CIDR-10.0.0.0/28和子网CIDR-10.0.0.0/28

因此,我们知道/28到/32将创建总共(0到15(16个CIDR块。

但是,当我在AWS中尝试创建EC2机器时,它只创建了11台机器。

EC2机器的IP如下所示:10.0.0.4至10.0.0.14(串联(

好的!跳出框框思考。

在指定的范围内,最后一个CIDR块IP将是所有1的so(255.255.255(

为什么AWS给出了一个错误,尽管还有4个CIDR块可用?

它们如下所述:10.0.0.0/32、10.0.0.1/32、10.00.2/32、10.0.0.3/32

在这种情况下,请帮助解释为什么AWS不使用它们,并回复一条没有可用IP的错误消息。

都在文档中:

每个子网CIDR块中的前四个IP地址和最后一个IP地址不可供您使用,并且它们不能分配给资源,例如EC2实例。例如,在具有CIDR块10.0.0.0/24的子网中,保留以下五个IP地址:

10.0.0.0: Network address.
10.0.0.1: Reserved by AWS for the VPC router.
10.0.0.2: Reserved by AWS. The IP address of the DNS server is the base of the VPC network range plus two. For VPCs with multiple CIDR blocks, the IP address of the DNS server is located in the primary CIDR. We also reserve the base of each subnet range plus two for all CIDR blocks in the VPC. For more information, see Amazon DNS server.
10.0.0.3: Reserved by AWS for future use.
10.0.0.255: Network broadcast address. We do not support broadcast in a VPC, therefore we reserve this address.

有关AWS中子网大小的更多信息,请点击此处。

最新更新