What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation is a way to represent IP addresses and their associated routing prefix information. It is a notation used in Internet Protocol (IP) addressing to allocate IP addresses and route IP traffic efficiently.
In CIDR notation, an IP address is represented along with a prefix length, which indicates the number of significant bits in the routing prefix. The notation is in the form of "IPAddress/PrefixLength." For example:
- 192.168.1.0/24 represents the IPv4 address 192.168.1.0 with a prefix length of 24 bits. This means that the first 24 bits of the IP address are the network address, and the remaining 8 bits are available for host addresses within that network.
- 2001:0db8:85a3:0000:0000:8a2e:0370:7334/64 represents an IPv6 address with a prefix length of 64 bits. In this case, the first 64 bits are used for the network, and the remaining 64 bits can be used for host addresses.
CIDR notation allows for more flexibility in defining network boundaries compared to the older class-based addressing (Class A, B, C) system. It enables more efficient use of IP addresses and simplifies routing on the Internet by allowing for the aggregation of multiple contiguous IP address ranges into a single routing entry.