VPC subnet mask and classless Inter-Domain Routing

Source: Internet
Author: User
1 vlsm
  
The Variable Length Subnet Mask (Variable Length Subnet Mask, VLSM) is defined in RFC 1878 ). VLSM specifies how different subnet masks are used in different parts of a network with subnet division. This is very effective when different network segments in the network need different subnets of different sizes.
  
VLSM is actually a multi-level subnet Partitioning technology. 1.
    
Figure 1 vlsm Application
  
In Figure 1, a company has two main departments: Marketing Department and Technology Department. The Technical Department is divided into the hardware department and the software department. The company applied for a complete Class c ip address segment: 210.31.233.0, subnet mask 255.255.255.0. To facilitate hierarchical management, the company uses VLSM technology to divide the original master network into two-level subnets (not all 0 and all 1 subnets are considered ).
  
The market has obtained 1st subnets In the first-level subnet, namely 210.31.233.64 and the subnet mask 255.255.255.192. A total of 62 IP addresses are available for allocation in the first-level subnet.
  
The Technology Department further divides the 2nd subnets 210.31.233.128 In the first-level subnet, And the subnet mask 255.255.192 into two second-level subnets. Among them, there are 1st second-level subnets 210.31.233.128, And the subnet mask is allocated to the hardware division of the technical department. The second-level subnet has 30 IP addresses available for allocation. The sub-division of the Technology Department-the software part has 2nd Second-level subnets 210.31.233.160, And the subnet mask is too large. The second-level subnet has 30 IP addresses available for allocation.
  
In practice, the network can be further divided into three-level or more multi-level subnets. At the same time, you can consider using full 0 and full 1 subnets to save network address space.
  
   2 CIDR
  
Classless Inter-Domain Routing (CIDR) in RFC 1517 ~ All are described in RFC 1520. The original intention of proposing CIDR is to solve the problem that the IP address space is about to run out (especially the B-class address. CIDR does not use the traditional concept of class network addresses, that is, it does not distinguish class A, B, and C network addresses. When an IP address segment is allocated, the IP address space is not allocated according to the network address categories. Instead, the IP address space is regarded as a whole and divided into consecutive address blocks. Then, use the multipart Method for allocation.
  
In CIDR technology, the length of the binary bit of the network number in the subnet mask is often used to distinguish the size of a network address block, which is called the CIDR prefix. For example, if the IP address is 210.31.233.1, The subnet mask 255.255.0 can be expressed as 210.31.233.1/24, the IP address 166.133.67.98, And the subnet mask 255.255.0.0 can be expressed as 166.133.67.98/16, the subnet mask 255.255.255.255.240 can be expressed as 192.168.0.1/28.
  
CIDR can be used for IP Address Aggregation (or super netting ). Before summarizing the IP addresses, the vro must declare all the IP address segments of the internal network. This results in a large number of Route entries (nearly 0.1 million) in the Internet core router ). After CIDR address aggregation, you can combine consecutive address space blocks into a route entry. The vro no longer needs to declare all IP address space segments of the internal network. In this way, the number of Route entries in the route table is greatly reduced.
  
For example, a company has applied for a network address block (a total of 8 Class C network addresses): 210.31.224.0/24-210.31.231.0/24. To summarize these 8 Class C network address blocks, the new subnet mask 255.255.248.0 is used, and the CIDR prefix is/21. 2.
    
Figure 2 CIDR Application
  
It can be seen that CIDR actually uses some network numbers to act as host numbers. In Figure 2, because the first 21 bits of the eight class C address network numbers are identical, only the last 3 bits are changed. Therefore, you can regard the last three digits of the network number as the host number, select the new subnet mask as 255.255.248.0 (1111,1000), and summarize these eight class C network addresses into 210.31.224.0/21.
  
There are two basic conditions for using CIDR to achieve Address Aggregation:
  
The Network numbers of the addresses to be summarized have the same high positions. In 2-2-8, the first five digits of the 3rd-bit domain of the eight network addresses to be summarized are completely equal, all of which are 11100. The number of network addresses to be summarized must be 2n, such as 2, 4, 8, and 16. Otherwise, a routing black hole may occur (the summarized Network may contain subnets that do not actually exist ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.