CIDR

A compact way to write a range of IP addresses, such as 10.244.0.0/24, where the number after the slash says how many leading bits are fixed.

In more detail

CIDR stands for Classless Inter-Domain Routing. The smaller the number after the slash, the bigger the range: a /16 holds 65,536 addresses and a /24 holds 256. Choose ranges that do not overlap networks you will ever need to connect.

Examples

A VPC range of 10.20.0.0/16 split into /24 subnets.
kubectl get node -o jsonpath='{.items[0].spec.podCIDR}'
kubectl get node -o jsonpath='{.items[0].spec.podCIDR}'   # each Kubernetes node's slice of the pod address range
The number after the slash says how many leading bits are fixed: /24 covers 256 addresses.
cidr_block = "10.0.0.0/16"
In Terraform: The number after the slash says how many leading bits are fixed, so /16 holds 65,536 addresses and /24 holds 256. Networks and subnets are sized with CIDR blocks, and subnets must fit inside their network's block without overlapping.

Related terms

Taught in

References

Certification courses