What is CIDR?
Last Updated: Fri, 22 Apr 2011 > Related Articles
Learn about this approach to Internet IP allocation.
Unfortunately, there is no easy, one-line explanation of what CIDR (Classless Inter-Domain Routing) is. To understand the ins and outs of CIDR, you must know some binary math as well as how IPs are routed. We will give a brief explanation of what CIDR is here.
CIDR is an addressing scheme for the Internet which allows for more efficient allocation of IP addresses than the old Class A, B, and C address scheme.
- Class A would give a network 16,777,214 host addresses.
- Class B would give a network 65,534 host addresses.
- Class C would give a network 254 host addresses.
A host is any device attached to the network (e.g. a router, a computer, a printer, etc.). Thus, if you needed 70,000 IP addresses, you would receive a Class A network, and then waste a lot of IP addresses. Using the old way of Class routing, you could be assigned a Class C network containing 255 IPs. In the past, this was the only way to assign the IPs to a network. But what if you only had 5 computers? You'd be left with a lot of unused IPs.
Using CIDR, those 255 IPs can be broken up into multiple smaller blocks allowing more efficient use of the space. For example, that same IP block can be split up into 32 separate IP blocks ranging from 192.168.0.0 thru 192.168.0.7 and continuing until 192.168.0.248 thru 192.168.0.253. Each of the blocks will contain 8 IPs. 2 are unusable - the first IP and the last IP - so a total of 6 IPs can be used for your network. Using CIDR, blocks of addresses can be assigned to networks as small as 8 hosts and as large as over 500,000 hosts. This allows for a much more efficient use of the IPs. If you need 5 IPs for your office, you could receive 8 using CIDR and only allow 3 to go unusued instead of receiving a Class C IP block and wasting 249 IPs. This allows for address assignments that much more closely fit an organization's specific needs.
CIDR specifies an IP address range by the combination of an IP address and its associated network mask. CIDR notation uses the following format - xxx.xxx.xxx.xxx/n - where n is the number of (leftmost) '1' bits in the mask. For example, 192.168.12.0/23 applies the network mask 255.255.254.0 to the 192.168 network, starting at 192.168.12.0. This notation represents the address range 192.168.12.0 - 192.168.13.255. Compared to traditional class-based networking, 192.168.12.0/23 represents an aggregation of the two Class C networks 192.168.12.0 and 192.168.13.0, each using the default network mask 255.255.255.0.
CIDR supports Internet address allocation and message routing independent of the traditional class of a given IP address range. For example, 10.4.12.0/22 represents the address range 10.4.12.0 - 10.4.15.255 by employing the network mask 255.255.252.0. This effectively represents an apportioning of four Class C networks within the much larger Class A space. Please consult the documentation that came with your router before choosing to enable CIDR.