When you work with VPCs, subnets, security groups, and network access control lists, you will often need to specify IP address ranges. CIDR provides a succinct method, known as CIDR notation, for defining IP address blocks.
In this section, we're going to briefly explain CIDR notation and then review the valid IP address ranges you can use when defining your VPC and subnets. We'll also discuss IP addresses that are reserved by AWS, and why this is important when you're sizing your subnets.
VPCs on AWS use version 4 of the Internet Protocol, known as IPv4. We can assign the IPv6 CIDR block to our VPC, and assign IPv6 CIDR blocks to our subnets. An IPv4 address is defined using 32 bits, broken up into four parts (4x8 bits). Each part is 8 bits, and so their values range from 0 to 255. So, an IP address can be anywhere from 0.0.0.0
to 255.255.255.255
. This means that the total number of IP addresses available globally is 2 to the 32 power, or 4,294,967,296, so basically just under 4...