AWS VPC/Subnet CIDR Blocks?

In this tutorial, We will discuss how to choose Classless Inter-Domain Routing (CIDR) Block for IPv4 for your VPC

1. AWS VPC CIDR Rules:

  • The allowed block size is between “/16” netmask and “/28” netmask
  • You can create almost every CIDR that you want (like: 100.100.0.0/16, ….) But AWS Recommend follow RFC 1918 (Ref here: http://www.faqs.org/rfcs/rfc1918.html) as below
10.0.0.0        -   10.255.255.255  (10/8 prefix)
172.16.0.0      -   172.31.255.255  (172.16/12 prefix)
192.168.0.0     -   192.168.255.255 (192.168/16 prefix)
  • Example CIDR “15.15.0.0/16” still can be provisioned, but NOT RECCOMENDATION
  • Some AWS services use the 172.17.0.0/16 CIDR range, avoid this range.

2. AWS VPC Subnet CIDR Rules:

  • The allowed block size for subnet is between “/16” netmask and “/28” netmask
  • The first four IP addresses and the last IP address in each subnet CIDR block are not available for your use, and they cannot be assigned to a resource. For example, in VPC (10.100.0.0/16) we have subnet (10.100.1.0/24), the following five IP addresses are reserved, CAN NOT be used.
    • 10.100.1.1: Reserved by AWS for the VPC router.
    • 10.100.1.2: Reserved by AWS. The IP address of the DNS server is the base of the VPC network range plus two
    • 10.100.1.3: Reserved by AWS for future use.
    • 10.100.1.255: Network broadcast address (AWS does not support broadcast)

Comments

One response to “AWS VPC/Subnet CIDR Blocks?”

  1. […] “IPv4 CIDR”: Put your CIDR, example “10.50.0.0/16” (for more information how to put the right CIDR, please refer to this tutorial. AWS CIDR Block) […]

Leave a Reply

Your email address will not be published. Required fields are marked *