What is CIDR?

67 Views
English
#CIDR#IP#port#network

CIDR Calculator | Rohde & Schwarz

Outline

Classless Inter-Domain Routing (CIDR)

This is a method for allocating IP addresses and routing packets.

Prior to 1993, a class-based method was used to allocate IP addresses. However, as the number of hosts increased, the number of available IP addresses would deplete, and routing tables would grow. To address this issue, the IETF introduced a standard IP address allocation method in 1993. CIDR offers the advantage of utilizing depleted IP addresses more efficiently than the existing class-based method. Since the introduction of CIDR, the previous class-based method has been deprecated, and thus, it is also called classless inter-domain routing.

 

CIDR block

A CIDR IP address consists of two groups of numbers, called bit groups. They consist of a network address and a host identifier. Unlike class-based IP addresses, which must be categorized into one of three blocks, CIDR allows IP address blocks to be allocated to Internet Service Providers (ISPs). ISPs can then subdivide these allocated blocks and assign them to customers. This is how the IP addresses we receive today from telecommunications companies are allocated.

Prior to CIDR, IP address ranges were designated using class-based designations like A, B, C, and D. This method is no longer used; CIDR is now referred to as "classless" to indicate a new method. Instead of classes, IP address ranges are designated using CIDR blocks and subnet masks.

 

CIDR notation

This section uses IPv4 as an example. The same principle can be applied to IPv6.

A.B.C.D/E


CIDR consists of four parts: a decimal IP address separated by a period (.), a slash ('/') character, and a number from 0 to 32. A through D are decimal numbers from 0 to 255, broken down into 8-bit chunks, just like IPv4 addresses. The number following the slash is also called the prefix length.

Octet
Octet
Octet
Octet
1
1
0
0
0
0
0
0
1
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
192
168
0
0
192.168.0.0

As shown above, one octet consists of 8 bits, and the commonly used IPv4 address consists of 4 octets. Therefore, CIDR can use up to 32 bits, from 0 to 32.

 
 
 
/24
1
1
0
0
0
0
0
0
1
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
192
168
0
0
192.168.0.0/24

In the case of CIDR '/24', this means that the entire 4th octet after the first 24 bits can be used, as shown above. One octet is 8 bits, and since there are 256 octets, which is 2 to the power of 8, when it is 192.168.0.0/24, 192.168.0.0 ~ 192.168.0.255 can be used.

 

CIDR
Host
Mask
/32
1
255.255.255.255
/31
2
255.255.255.254
/30
4
255.255.255.252
/29
8
255.255.255.248
/28
16
255.255.255.240
/27
32
255.255.255.224
/26
64
255.255.255.192
/25
128
255.255.255.128
/24
256
255.255.255.000
/23
512
255.255.254.000
/22
1,024
255.255.252.000
/21
2,048
255.255.248.000
/20
4,096
255.255.240.000
/19
8,192
255.255.224.000
/18
16,384
255.255.192.000
/17
32,768
255.255.128.000
/16
65,536
255.255.000.000
/15
131,072
255.254.000.000
/14
266,144
255.252.000.000
/13
524,288
255.248.000.000
/12
1,048,576
255.240.000.000
/11
2,097,152
255.224.000.000
/10
4,194,304
255.192.000.000
/9
8,388,608
255.128.000.000
/8
16,777,216
255.000.000.000
/7
33,554,432
254.000.000.000
/6
67,108,864
252.000.000.000
/5
134,217,728
248.000.000.000
/4
268,435,456
240.000.000.000
/3
536,870,912
224.000.000.000
/2
1,073,741,824
192.000.000.000
/1
2,147,483,648
128.000.000.000

 

Related Posts