what is IPv4 CIDR while launching a custom VPC in AWS?

394 views Asked by At

I am about to create a custom VPC in AWS . While creating, I could find a section IPv4 CIDR and a value to be entered . Could anyone tell me which value I should enter there?

1

There are 1 answers

0
Nico On

The IPv4 CIDR (Classless Inter-Domain Routing) is the range of IP addresses that will be allocated to your VPC. This value determines the number of IP addresses available for your resources within the VPC.

The CIDR notation consists of an IP address and a subnet mask, separated by a forward slash (/). The subnet mask specifies the number of bits used for the network portion of the IP address.

When selecting a value for the IPv4 CIDR, you need to consider the number of resources you plan to have in your VPC and the future scalability requirements. Here are some considerations:

  1. IP address range: Choose an IP address range that does not overlap with any existing networks you may have or networks of other VPCs in your AWS account. The IP address range should be selected from private IP address ranges, such as those defined in RFC 1918 (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16).

  2. Size: Determine the number of IP addresses you need for your VPC based on the number of resources (instances, load balancers, databases, etc.) you plan to deploy. Consider future growth and resource scalability. Keep in mind that larger CIDR blocks provide more IP addresses but may require more complex network configurations.

  3. Subnets: The CIDR block you choose for your VPC will be divided into smaller CIDR blocks for your subnets. Plan your subnets based on the required number of resources and their separation. Each subnet must be within the range of the VPC's CIDR block.

For example, if you want to create a VPC with 10.0.0.0/16 CIDR, you'll have a total of 65,536 IP addresses available for your resources. This range can be further divided into subnets based on your needs.

Remember that once you have created a VPC and assigned an IPv4 CIDR block, it cannot be changed. However, you can add additional CIDR blocks later by creating new subnets within the VPC.

Here a video better explaining the above concepts.

Hoping it helps!