CIDR Prefix length | Dotted Decimal Netmask | Hex Netmask | Binary | # of classfull subnets | # of host address |
---|---|---|---|---|---|
/1 | 128.0.0.0 | 80 00 00 00 | 1000 0000 0000 0000 0000 0000 0000 0000 | 128 As | 2147483646 |
/2 | 192.0.0.0 | C0 00 00 00 | 1100 0000 0000 0000 0000 0000 0000 0000 | 64 As | 1073741822 |
/3 | 224.0.0.0 | E0 00 00 00 | 1110 0000 0000 0000 0000 0000 0000 0000 | 32 As | 536870910 |
/4 | 240.0.0.0 | F0 00 00 00 | 1111 0000 0000 0000 0000 0000 0000 0000 | 16 As | 268435454 |
/5 | 248.0.0.0 | F8 00 00 00 | 1111 1000 0000 0000 0000 0000 0000 0000 | 8 As | 134217726 |
/6 | 252.0.0.0 | FC 00 00 00 | 1111 1100 0000 0000 0000 0000 0000 0000 | 4 As | 67108862 |
/7 | 254.0.0.0 | FE 00 00 00 | 1111 1110 0000 0000 0000 0000 0000 0000 | 2 As | 33554430 |
/8 | 255.0.0.0 | FF 00 00 00 | 1111 1111 0000 0000 0000 0000 0000 0000 | 1 A or 256 Bs | 16777214 |
/9 | 255.128.0.0 | FF 80 00 00 | 1111 1111 1000 0000 0000 0000 0000 0000 | 128 Bs | 8388606 |
/10 | 255.192.0.0 | FF C0 00 00 | 1111 1111 1100 0000 0000 0000 0000 0000 | 64 Bs | 4194302 |
/11 | 255.224.0.0 | FF E0 00 00 | 1111 1111 1110 0000 0000 0000 0000 0000 | 32 Bs | 2097150 |
/12 | 255.240.0.0 | FF F0 00 00 | 1111 1111 1111 0000 0000 0000 0000 0000 | 16 Bs | 1048574 |
/13 | 255.248.0.0 | FF F8 00 00 | 1111 1111 1111 1000 0000 0000 0000 0000 | 8 Bs | 524286 |
/14 | 255.252.0.0 | FF FC 00 00 | 1111 1111 1111 1100 0000 0000 0000 0000 | 4 Bs | 262142 |
/15 | 255.254.0.0 | FF FE 00 00 | 1111 1111 1111 1110 0000 0000 0000 0000 | 2 Bs | 131070 |
/16 | 255.255.0.0 | FF FF 00 00 | 1111 1111 1111 1111 0000 0000 0000 0000 | 1 B or 256 Cs | 65534 |
CIDR Prefix length | Dotted Decimal Netmask | Hex Netmask | Binary | # of classfull subnets | # of host address |
/17 | 255.255.128.0 | FF FF 80 00 | 1111 1111 1111 1111 1000 0000 0000 0000 | 128 Cs | 32766 |
/18 | 255.255.192.0 | FF FF C0 00 | 1111 1111 1111 1111 1100 0000 0000 0000 | 64 Cs | 16382 |
/19 | 255.255.224.0 | FF FF E0 00 | 1111 1111 1111 1111 1110 0000 0000 0000 | 32 Cs | 8190 |
/20 | 255.255.240.0 | FF FF F0 00 | 1111 1111 1111 1111 1111 0000 0000 0000 | 16 Cs | 4094 |
/21 | 255.255.248.0 | FF FF F8 00 | 1111 1111 1111 1111 1111 1000 0000 0000 | 8 Cs | 2046 |
/22 | 255.255.252.0 | FF FF FC 00 | 1111 1111 1111 1111 1111 1100 0000 0000 | 4 Cs | 1022 |
/23 | 255.255.254.0 | FF FF FE 00 | 1111 1111 1111 1111 1111 1110 0000 0000 | 2 Cs | 510 |
/24 | 255.255.255.0 | FF FF FF 00 | 1111 1111 1111 1111 1111 1111 0000 0000 | 1 C | 254 |
/25 | 255.255.255.128 | FF FF FF 80 | 1111 1111 1111 1111 1111 1111 1000 0000 | 1/2 C | 126 |
/26 | 255.255.255.192 | FF FF FF C0 | 1111 1111 1111 1111 1111 1111 1100 0000 | 1/4 C | 62 |
/27 | 255.255.255.224 | FF FF FF E0 | 1111 1111 1111 1111 1111 1111 1110 0000 | 1/8 C | 30 |
/28 | 255.255.255.240 | FF FF FF F0 | 1111 1111 1111 1111 1111 1111 1111 0000 | 1/16 C | 14 |
/29 | 255.255.255.248 | FF FF FF F8 | 1111 1111 1111 1111 1111 1111 1111 1000 | 1/32 C | 6 |
/30 | 255.255.255.252 | FF FF FF FC | 1111 1111 1111 1111 1111 1111 1111 1100 | 1/64 C | 2 |
/31 | 255.255.255.254 | FF FF FF FE | 1111 1111 1111 1111 1111 1111 1111 1110 | 1/128 C | 0 |
/32 | 255.255.255.255 | FF FF FF FF | 1111 1111 1111 1111 1111 1111 1111 1111 | 1/256 C | 1 |
The number of host addresses is the number of available addresses in the given netblock, minus the network number (host = all zeroes) and the broadcast address (host = all ones). A /31 network is useless, and the /32 is typically used to designate a host address (in access lists and the like).
What Is CIDR?
CIDR is a new addressing scheme for the Internet which allows for more efficient allocation of IP addresses than the old Class A, B, and C address scheme.
Why Do We Need CIDR?
With a new network being connected to the Internet every 30 minutes the Internet was faced with two critical problems:
- Running out of IP addresses
- Running out of capacity in the global routing tables
Running Out of IP Addresses
There is a maximum number of networks and hosts that can be assigned unique addresses using the Internet’s 32-bit long addresses. Traditionally, the Internet assigned “classes” of addresses: Class A, Class B and Class C were the most common. Each address had two parts: one part to identify a unique network and the second part to identify a unique host in that network. Another way the old Class A, B, and C addresses were identified was by looking at the first 8 bits of the address and converting it to its decimal equivalent.
Address Class # Network Bits # Hosts Bits Decimal Address Range Class A 8 bits 24 bits 1-126 Class B 16 bits 16 bits 128-191 Class C 24 bits 8 bits 192-223
Using the old Class A, B, and C addressing scheme the Internet could support the following:
- 126 Class A networks that could include up to 16,777,214 hosts each
- Plus 65,000 Class B networks that could include up to 65,534 hosts each
- Plus over 2 million Class C networks that could include up to 254 hosts each
(Some addresses are reserved for broadcast messages, etc.). Because Internet addresses were generally only assigned in these three sizes, there was a lot of wasted addresses. For example, if you needed 100 addresses you would be assigned the smallest address (Class C), but that still meant 154 unused addresses. The overall result was that while the Internet was running out of unassigned addresses, only 3% of the assigned addresses were actually being used. CIDR was developed to be a much more efficient method of assigning addresses.
Global Routing Tables At Capacity
A related problem was the sheer size of the Internet global routing tables. As the number of networks on the Internet increased, so did the number of routes. A few years back it was forecasted that the global backbone Internet routers were fast approaching their limit on the number of routes they could support.
Even using the latest router technology, the maximum theoretical routing table size is approximately 60,000 routing table entries. If nothing was done the global routing tables would have reached capacity by mid-1994 and all Internet growth would be halted.
How Were These Problems Solved?
Two solutions were developed and adopted by the global Internet community:
- Restructuring IP address assignments to increase efficiency
- Hierarchical routing aggregation to minimize route table entries
Restructuring IP Address Assignments
Classless Inter-Domain Routing (CIDR) is a replacement for the old process of assigning Class A, B and C addresses with a generalized network “prefix”. Instead of being limited to network identifiers (or “prefixes”) of 8, 16 or 24 bits, CIDR currently uses prefixes anywhere from 13 to 27 bits. Thus, blocks of addresses can be assigned to networks as small as 32 hosts or to those with over 500,000 hosts. This allows for address assignments that much more closely fit an organization’s specific needs.
A CIDR address includes the standard 32-bit IP address and also information on how many bits are used for the network prefix. For example, in the CIDR address 206.13.01.48/25, the “/25” indicates the first 25 bits are used to identify the unique network leaving the remaining bits to identify the specific host.
Hierarchical Routing Aggregation To Minimize Routing Table Entries
The CIDR addressing scheme also enables “route aggregation” in which a single high-level route entry can represent many lower-level routes in the global routing tables.
The scheme is similar to the telephone network where the network is setup in a hierarchical structure. A high level, backbone network node only looks at the area code information and then routes the call to the specific backbone node responsible for that area code. The receiving node then looks at the phone number prefix and routes the call to its subtending network node responsible for that prefix and so on. The backbone network nodes only need routing table entries for area codes, each representing huge blocks of individual telephone numbers, not for every unique telephone number.
Currently, big blocks of addresses are assigned to the large Internet Service Providers (ISPs) who then re-allocate portions of their address blocks to their customers. For example, Pacific Bell Internet has been assigned a CIDR address block with a prefix of /15 (equivalent to 512 Class C addresses or 131,072 host addresses) and typically assigns its customers CIDR addresses with prefixes ranging from /27 to /19. These customers, who may be smaller ISPs themselves, in turn re-allocate portions of their address block to their users and/or customers. However, in the global routing tables all these different networks and hosts can be represented by the single Pacific Bell Internet route entry. In this way, the growth in the number of routing table entries at each level in the network hierarchy has been significantly reduced. Currently, the global routing tables have approximately 35,000 entries.
User Impacts
The Internet is currently a mixture of both “CIDR-ized” addresses and old Class A, B and C addresses. Almost all new routers support CIDR and the Internet authorities strongly encourage all users to implement the CIDR addressing scheme. (We recommend that any new router you purchase should support CIDR).
The conversion to the CIDR addressing scheme and route aggregation has two major user impacts:
- Justifying IP Address Assignments
- Where To Get Address Assignments
Justifying IP Address Assignments
Even with the introduction of CIDR, the Internet is growing so fast that address assignments must continue to be treated as a scarce resource. As such, customers will be required to document, in detail, their projected needs. Users may be required from time to time to document their internal address assignments, particularly when requesting additional addresses. The current Internet guideline is to assign addresses based on an organization’s projected three month requirement with additional addresses assigned as needed.
Where To Get Address Assignments
In the past, you would get a Class A, B or C address assignments directly from the appropriate Internet Registry (i.e., the InterNIC). Under this scenario, you “owned” the address and could take it with you even if you changed Internet Service Providers (ISPs). With the introduction of CIDR address assignments and route aggregation, with a few exceptions, the recommended source for address assignments is your ISP. Under this scenario, you are only “renting” the address and if you change ISPs it is strongly recommended that you get a new address from your new ISP and re-number all of your network devices.
While this can be a time-consuming task, it is critical for your address to be aggregated into your ISP’s larger address block and routed under their network address. There are still significant global routing table issues and the smaller your network is, the greater your risk of being dropped from the global routing tables. In fact, networks smaller than 8,192 devices will very likely be dropped. Neither the InterNIC nor other ISPs have control over an individual ISP’s decisions on how to manage their routing tables.
As an option to physically re-numbering each network device, some organizations are using proxy servers to translate old network addresses to their new addresses. Users should be cautioned to carefully consider all the potential impacts before using this type of solution.
Need More Information?
For more detailed technical information on CIDR, go to http://www.rfc-editor.org/rfcsearch.html and type in the number of the CIDR RFC you are interested in:
- RFC 1517: Applicability Statement for the Implementation of CIDR
- RFC 1518: An Architecture for IP Address Allocation with CIDR
- RFC 1519: CIDR: An Address Assignment and Aggregation Strategy
Leave a Reply
You must be logged in to post a comment.