CIDR Notation

CIDR Notation

This section reviews addresses and the Classless Inter-Domain Routing (CIDR) Notation. This is best explained with an example.

cidr-example CIDR Example

Remember that an IPv4 address is 32 bits so in this example we’ve taken the first 16 bits and we’ve frozen those. We call that the frozen bits - those will not change and so that leaves us with a range of IP addresses from 10.0.0.0 to 10.0.0.255. The last one or the last 8 bits are free to change giving us 256 possible combinations.

cidr-num-addresses Table with example address ranges - when we create virtual private clouds, when we create security groups, network access control lists and other controls we need to specify IP address ranges in CIDR notation.

IETF has defined also three ranges for IP addresses that are reserved for private networks.

private-ip-ranges Private IP address ranges

When we create a virtual private cloud and divide it into subnets use one of these three ranges, 10/8, 172.16/12, or 192.168/16.

The CIDR calculator is useful when we would like to calculate the right mask for the amount of IP addresses that we require.

In many instances you will be given the subnet IP address in CIDR notation and you need to calculate the network ID and broadcast ID and the number of hosts that can be supported.

Create VPC Subnets Determine IP address space of a subnet from CIDR notation - click to watch on youtube