"The pro is the person who has all the hassles, obstacles, and disappointing frustrations that everyone else has. yet continues to persist, does the job, and makes it look easy." -- David Cooper
CIDR stands for Classless Inter-Domain Routing. 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.
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
An IP address is actually a binary number 32 bits long. To make it "more readable" we split the 32 bits into 4 groups of 8 bits as follows:
b31b30b29b28b27b26b25b24.b23b22b21b20b19b18b17b16.b15b14b13b12b11b10b9b8.b7b6b5b4b3b2b1b0 The first 8 bits are used to indicate the starting IP number. The remaining 24 bits (32 -8) are used to determine ending IP number. All of the 24 remaining bits can be either 1's or 0's which is the same as 2 to the power of 24 numbers in range.
An IPV4 address we are all familiar with looks like so XXX.XXX.XXX.XXX where XXX is a number between 0 and 255. For example 127.0.0.0 or 10.0.0.1. This address is the decimal equivalent of the 4 groups of 8 bits.
As stated previously, each bit in the group can have the value of 1 (if it exists) or 0 (if it does not exist) as shown below:
If b7b6b5b4b3b2b1b0 = 11111111 then this equals 27+26+25+ 24+23+22+ 21+20 = 128+64+32+16+8+4+2+1 = XXX = 255
If b7b6b5b4b3b2b1b0 = 00100000 then this equals 0+0+25+0+0+0+0+0 = 0+0+32+0+0+0+0+0 = XX = 32
If we had the IP range of 32.0.0.0 to 32.255.255.255 then: - start IP = 00100000.00000000.00000000.00000000 = 32.0.0.0 - end IP = 00100000.11111111.11111111.11111111 = 32.255.255.255