CIDR notation
A compact way to write a block of IP addresses as an address, a slash and a number, such as 10.20.1.0/24.
In more detail
CIDR stands for classless inter-domain routing. The number after the slash, called the prefix length, says how many leading bits are fixed: a /24 holds 256 IPv4 addresses, a /8 holds over 16 million, and /0 means every address. Firewall and security group rules use it to say which sources are allowed, so one wrong prefix can open a service to far more hosts than intended.
Examples
{"CidrIp": "10.20.1.0/24", "Description": "app subnet"}ip_network("10.0.0.0/8").num_addresses # 16777216Related terms
- subnet — A range of IP addresses sharing the same network prefix, such as 192.0.2.0/24, whose members can reach each other without a router.
- IP address — The numeric address, such as 192.168.1.10, that identifies a machine or container on a network.
- security group — A stateful firewall attached to a resource’s network interface, made only of allow rules for ports, protocols and sources.
- private address space — Ranges of IP addresses reserved for internal networks that are not routed on the public internet.
Taught in
- Security Architecture Gap Analysis — Cybersecurity Fundamentals, GRC & Cryptography