|
|
Posted on 10/7/2023 8:56:29 PM
|
|
|
|

definition
CIDR, the full name in English is Classless InterDomain Routing. Chinese means classless inter-domain routing. is a method of assigning IP addresses and IP routing. A collection of Internet Protocol (IP) standards used to create unique identifiers for networks and individual devices. IP addresses allow unique packets of information to be transmitted to a specific computer.
CIDR is mainly used to use IP addresses to efficiently solve routing table explosions. It is defined in RFC (Request for Comments) 1518 and RFC 4632. It is an address block assignment. There are five different classes in the IPV4 addressing system. The IP address class is used for internet IP address assignment. They are Class A addresses, Class B addresses, Class C addresses, Class D addresses, and Class E addresses.
- Class A addresses: In category A, consider the first place. It is always set to zero. It can change IP addresses from 1.X.X.X to 126.X.X.X.
- Class B addresses: In category B, consider the first two. It can get an IP address from 128.0.X.X to 191.255.X.X.
- Class C addresses: In category C, consider the top three. It can get the IP address from 192.0.0.X to 223.255.255.X.
- Category D addresses: Consider the top four positions of Class D. It can get an IP address from 224.0.0.0 to 239.255.255.255. This class is used for multicasting.
- Class E addresses: Class E IP addresses are reserved for research and development. It can change IP addresses from 240.0.0.0 to 255.255.255.254.
Therefore, we can choose the IP address according to our needs. For host addresses, we use IP addresses of class A/B/class C.
Currently, network address ranges use classless inter-domain routing. By using CIDR, the old method of using Class A, Class B, and Class C IP addresses is replaced. In the older method, if we take class B as an example, since it is used the most. If any agency or any organization needs hosts, they are provided with hosts, but in most cases, all assigned hosts are not used and even cause routing tables to explode.
In CIDR, people who need IP addresses must purchase an IP address allocator from a service provider; It can be any size requested by the buyer. Whenever it is enabled based on address prefixes, it allows different routers of different levels to route on prefixes of different lengths. CIDR is used for IPV4. IPV4 is 32-bit,The most commonly used networks are /8, /16, /24, and /32。
How does CIDR work?
CIDR is an alternative to traditional subnetting. It is also known as classless addressing. It consists of CIDR blocks; In this way, it dynamically assigns IP addresses according to the user's requirements according to certain rules. The Internet Assigned Numbers Authority (IANA) handles the assignment of CIDR blocks.
Network segments
This block contains the IP address. The block consists of 3 basic rules.
The 3 basic rules mentioned below:
Rule 1: In a CIDR block, the IP addresses assigned to the host should be contiguous. Rule 2: Blocks should be 2 powers of size and should be equal to the total number of IP addresses. Rule 3: The size of the block must be divisible by the first IP address of the block.
CIDR notation
CIDR IP addresses are represented in the same form as IP addresses; It ends with a backslash followed by a number. n represents the number of bits in the network. It is known as an IP network prefix. The general expression of the IP address of the CIDR segment is A.B.C.D/N
illustrate
If we are given a CIDR representation, we can find the range of IP addresses. We can see this with an example.
Example #1
The CIDR representation is 21.19.35.40/24. Find the IP address of the CIDR segment? 24 indicates the number of bits used to identify the network. These 5 digits are used to identify the host. The network block address is 21.19.35.40/24. The first IP address is 21.19.35.0 The last IP address is 21.19.35.255 The total cost is 256. The netmask is 255.255.255.0.
Example #2
The representation is 255.255.255.255/31. Find the IP address of the CIDR segment? 31 indicates the number of bits used to identify the network. 1 digit is used to identify the host. The network block address is 255.255.255.255/31. The first IP address is 255.255.255.254 The last IP address is 255.255.255.255 The total cost is 2. The netmask is 255.255.255.254. We can find the CIDR block from the IP address block.
Example #3
The IP addresses range from 21.19.35.64 and 21.19.35.127. Find the network segment? The IP addresses range from 21.19.35.64 and 21.19.35.127. Before going any further, it should be checked if the CIDR block rules mentioned above are satisfied, then it is a CIDR block. So the size of the block is 26. (i.e. 127 – 64 + 1 = 64) Number of digits = 32 – 6 = 26. The network segment is 21.19.35.64/26.
Example #4
The IP addresses range from 255.255.255.32 and 255.255.255.63. The IP addresses range from 255.255.255.32 and 255.255.255.63. Before going any further, it should be checked if the CIDR block rules mentioned above are satisfied, then it is a CIDR block. So the size of the block is 25. (i.e. 63 – 32 + 1 = 64) Number of digits = 32 – 5 = 27. The network segment is 255.255.255.32/27.
Original:The hyperlink login is visible.
|
Previous:CentOS Linux alternatives Rocky Linux, AlmaLinuxNext:ASP.NET Core (twenty-five) dependencies inject Lazy lazy lazy initialization
|