Classless Inter-Domain Routing or CIDR for short has helped solve many problems that has helped delay the complete exhaustion of usable IPv4 IP Addresses for Internet use. This delay allowed enough time for IPv6 to be created, but CIDR has far outlived its original lifespan of 3-5 years back in 1992 because IPv4 is still heavily used today.
There were 3 main problems with classful IP Addresses:
- Class B was running out of usable IP Addresses
- The size of routing tables were becoming too large to manage
- Every IPv4 IP Address would eventually be used up
CIDR was designed to solve problems 1 and 2, but could only delay inevitable of problem 3.
CIDR gets rid of the Class A, B, & C architecture and instead uses “prefixes” to determine how many bits are used for the network portion of the IP Address. A prefix is simply represented by a “/” followed by a number ranging from 0 – 32. For example a typical Class C address of
192.168.1.0 255.255.255.0
would be represented like:
192.168.1.0/24
The 24 comes from counting the number of bits in the subnet that are 1′s. Each 255 in the subnet is represented by 8 1′s. Here is the binary representation of the above subnet:
11111111.11111111.11111111.00000000
Rather than only having “/8″, “/16″, and “/24″ with classful routing CIDR makes it possible to break up IP Address ranges from “/0″ all the way to “/32″. Below is a table showing the number of IP Addresses for each prefix size.
notation……………….. # of IP Address
n.n.n.n/32 ……………….. 1
n.n.n.x/31 ……………….. 2
n.n.n.x/30 ……………….. 4
n.n.n.x/29 ……………….. 8
n.n.n.x/28 ……………….. 16
n.n.n.x/27 ……………….. 32
n.n.n.x/26 ……………….. 64
n.n.n.x/25 ……………….. 128
n.n.n.0/24 ……………….. 256
n.n.x.0/23 ……………….. 512
n.n.x.0/22 ……………….. 1,024
n.n.x.0/21 ……………….. 2,048
n.n.x.0/20 ……………….. 4,096
n.n.x.0/19 ……………….. 8,192
n.n.x.0/18 ……………….. 16,384
n.n.x.0/17 ……………….. 32,768
n.n.0.0/16 ……………….. 65,536
n.x.0.0/15 ……………….. 131,072
n.x.0.0/14 ……………….. 262,144
n.x.0.0/13 ……………….. 524,288
n.x.0.0/12 ……………….. 1,048,576
n.x.0.0/11 ……………….. 2,097,152
n.x.0.0/10 ……………….. 4,194,304
n.x.0.0/9 …………………. 8,388,608
n.0.0.0/8 …………………. 16,777,216
x.0.0.0/7 …………………. 33,554,432
x.0.0.0/6 …………………. 67,108,864
x.0.0.0/5 …………………. 134,217,728
x.0.0.0/4 …………………. 268,435,456
x.0.0.0/3 …………………. 536,870,912
x.0.0.0/2 …………………. 1,073,741,824
x.0.0.0/1 …………………. 2,147,483,648
0.0.0.0/0 …………………. 4,294,967,296
Being able to assign a “/21″ or a “/19″ allows for a much more efficient allocation of IP Address ranges instead of just “/24″ or “/16″. Some companies don’t need 65,536 IP Address, but they may need 2,048. Before CIDR this was not possible and many IP Addresses were wasted.
Routers that run at the Internet Core can have huge routing tables that take up valuable memory space and processor speed. CIDR helps in minimizing the size of routing tables by being able to summarizing many smaller routes into one large one. For example if you have many different “/21″ ranges going out one connection all of them can be summarized using only one “/20″ range.
This practice alone can reduce the size of routing tables significantly. Although in order to achieve this there needs to be order when assigning IP Addresses so that the routes can be summarized. If routes are not assigned correctly it can be impossible to summarize routes because they are broken up and scattered across many different connections. The Internet Assigned Number Authority or IANA is in charge of making sure IP Address are assigned in such away that routes can be summarized across the Internet’s core.
For more information on CIDR read RFC 4632
Related Articles:
Related Topics:
ICND1 Study Guide – The Fastest Way To Get Cisco Certified Guaranteed!