CIDR (Classless Inter-Domain Routing) notation is a compact representation of an IP address and its associated network prefix. It's commonly used to specify IP address ranges, particularly in the context of subnetting.
In CIDR notation, an IP address is followed by a slash ("/") and then a number representing the number of bits in the network prefix. For example, "192.168.0.0/24" represents the IPv4 address range from 192.168.0.0 to 192.168.0.255, where the first 24 bits represent the network address, and the last 8 bits represent host addresses within that network.
With subnets in AWS, CIDR notation is used to define the IP address range for each subnet within a VPC. When you create a subnet, you specify the CIDR block for that subnet. For example, you might create one subnet with the CIDR block "10.0.1.0/24" and another with "10.0.2.0/24". This divides your VPC's IP address space into smaller segments, each assigned to a different subnet.
CIDR notation allows for efficient allocation of IP addresses and enables flexible subnetting within a VPC. By choosing appropriate CIDR blocks for your subnets, you can effectively manage IP address allocation, accommodate future growth, and design a network architecture that meets your specific requirements.