[EKS] Difference Between Assigned IP Addresses and Available IPs in Subnet

Print

Question 

There is a difference between the number of IP addresses assigned to Pods or EC2 instances and the number of available IP addresses in the subnet. 

Answer 

According to reference link [1], “The first four IP addresses and the last IP address in each subnet CIDR block are not available for use and cannot be assigned to any resources such as EC2 instances.”

Therefore, in a /24 subnet with 256 IP addresses, only 251 addresses are available for use after excluding the 5 reserved addresses.

For example, in a subnet with the CIDR block 10.0.0.0/24, the following five IP addresses are reserved:

  • 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 DNS server IP address is the base VPC network address plus two.
    If the VPC has multiple CIDR blocks, the DNS server IP resides in the primary CIDR.
    AWS also reserves the address that is the base of each subnet range plus two in every CIDR block in the VPC. 

  • 10.0.0.3 : Reserved by AWS for future use 

  • 10.0.0.255 : Network broadcast address. Although VPC does not support broadcast, this address is still reserved. 

[1] Subnets in your VPC
https://docs.aws.amazon.com/ko_kr/vpc/latest/userguide/configure-subnets.html#subnet-sizing

Czy ta odpowiedź była pomocna? Tak Nie

Wyślij opinię
Przykro nam, że nie mogliśmy Ci pomóc. Pomóż nam dopracować ten artykuł, pozostawiając informacje zwrotne.