Understand the concepts of subnets and CIDR

1. IP addresses are divided into 5 categories, A, B, C, D, E, their prefixes are: 
    A: 0 network number 2^7, host number 2^24, about 16 million 
    b : 10 number of networks 2^14, about 16k, number of hosts 2^16, about 65k 
    C: 110 number of networks 2^21, about 2 million, number of hosts 2^8,254 
    D : 1110 is used for multicast addressing 
    E: 1111 is reserved for future use 
    Note: For host numbers, all 0s and all 1s are of special use, so the available addresses are subtracted by 2 
2, subnetting, IP addresses are divided into network IDs and The host ID, considering the host ID of class B, can accommodate 65,000 hosts, which is not used at all in reality. 
    Therefore, a part of the host ID can be demarcated as a subnet internally (such as a local area network). If the subnet masks are the same, the hosts are considered to be on the same network. 
3. The broadcast address is divided into the following cases: 
    the limited broadcast is 255.255.255.255, the router never forwards this datagram, all hosts in the LAN can receive the 
    network direct broadcast as the specified network ID, the host ID is all set to 1, and sent to All hosts of the target network 
    directly broadcast the subnet to specify the network ID and subnet ID, and all hosts in the subnet receive datagram 
4. For class C addresses, the number of hosts that can be accommodated is too small, and the network ID needs to be reduced. This can be considered as CIDR (Classless Inter Domain Routing) 
    subnet mask is to lengthen the network ID, while CIDR makes it shorter and specifies the network mask at the same time.
    Although the class B address, plus the subnet mask, is similar to the class C address, the network number is shortened, but the class B address is used from the outside, and the network number is considered to be without the prefix of the subnet. 
    Instead of classifying traditional IP addresses, CIDR specifies a netmask, which makes IP address assignment more efficient. 
5. Why does CIDR make IP address allocation more efficient? 
    For example, now there are 3 1000G hard disks, using the traditional method, can only be partitioned as follows: 
    10 100G partitions, 100 10G partitions, 1000 1G partitions, corresponding to A type, B type, Class C addresses. 
    However, in actual use, 10 100G partitions may not be needed at all, but there is no way but to use such partitions. 
    CIDR has completely abandoned this method, and no classification means that the category to which the IP address belongs is not considered. 
    Partition according to actual needs. For example, the first 1000G hard disk can be divided into 25 40G partitions, or 40 25G partitions, or 200 5G partitions. 
6. More importantly, CIDR networking technology can aggregate a group of smaller classless networks into a larger single routing table entry, 
    reducing the number of routing table entries in the Internet routing domain.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325325033&siteId=291194637