Non-standard subnet division)

Source: Internet
Author: User
Tags rfc

After an organization applies for an IP address, it may need to further divide the IP address into subnets. For example, a large company applies for a Class B IP address 166.133.0.0. If you use the standard subnet mask 255.255.0.0 without further dividing subnets, all hosts in the 166.133.0.0 Network (a maximum of 65534 hosts) will be in the same broadcast domain, A large number of broadcast data packets in the network will make the network unavailable.
  
The solution is to divide non-standard subnets. The non-standard subnet division policy is to borrow a part of the host number to act as the network number. The specific method is to use a new, non-standard subnet mask instead of the default standard subnet mask.
  
For example, the Class B address 166.133.0.0 does not use the standard subnet mask 255.0.0, but uses a non-standard subnet mask, such as 255.255.255.0 and 255.255.255.240.0, to divide the network into multiple subnets.
  
1. We use the 3rd-bit domain that originally belongs to the host number range to act as the subnet number range, that is, the 8-bit host number is used as the subnet number. The new subnet mask used is 255.255.255.0, the subnet mask divides the large network 166.133.0.0 of Class B into 254 small subnets (all 0 and all 1 subnet numbers are not available ). For these 254 subnets, each subnet can accommodate another 254 hosts.
  

 

  
Figure 1 non-standard subnet division

  
Next, we will take the C, B, And a IP addresses as examples to discuss in detail the non-standard subnet division.
  
   1. Non-standard subnet division for Class C Networks
  
For standard class c ip addresses, the standard subnet mask is 255.255.255.0, that is, the first 24 bits of the 32-bit IP address are used to identify the network number, and the last 8 bits are used to identify the host number. Therefore, each class C network can accommodate a total of 254 hosts (28-2 ).
  
Now, we should first consider using a 2-bit host number to act as a sub-network number. 2.
  
 

  
Figure 2 uses a 2-bit host number to act as a sub-network number

  
In Figure 2, In order to borrow the first two digits of the original eight-digit host number to act as the sub-network number, a new, non-standard subnet mask, subnet mask, and subnet mask, were used as the 192.
  
After a new subnet mask is used, the borrowed two-seat network number can be used to identify two subnets: 01 subnet and 10 subnet (the subnet number cannot be all 0 or 1, therefore, the 00 and 11 subnets cannot be used ).
  
First, for the 01 subnet, the network number is in decimal format: 210.31.233.64. The minimum IP address of this subnet is 210.31.233.65, and the maximum IP address is 210.31.233.126, A total of 62 hosts are supported. The direct broadcast address for this subnet is 210.31.233.127. 3.
  
 

  
Figure 3 01 subnet calculation process

  
Secondly, for 10 subnets, the network number is in decimal format: 210.31.233.128. The minimum IP address of this subnet is 210.31.233.129, and the maximum IP address is 210.31.233.190, A total of 62 hosts are supported. The direct broadcast address for this subnet is 210.31.233.191.
  
Similarly, you can also use three, four, five, and six host numbers as the subnet numbers. Table 1 summarizes the subnet mask used to borrow host numbers of different digits from Class c ip addresses, and the number of subnets that can be divided into and the number of hosts that each subnet can accommodate. Note that one or seven digits are invalid.
  
 

   2. Non-standard subnet division for Class B Networks
  
For standard class B IP addresses, the standard subnet mask is 255.255.0.0, that is, the first 16 bits of the 32-bit IP address are used to identify the network number, and the last 16 bits are used to identify the host number. Therefore, each B-type network can accommodate a total of 65534 hosts (216-2 ).
  
We also consider using a 2-bit host number to act as a sub-network number. 4.
  
 

  
Figure 4 Use a 2-bit host number to act as a sub-network number

  
In Figure 4, In order to borrow the first two digits of the original 16-bit host number to act as the sub-network number, a new non-standard subnet mask ipv192.0 is used.
  
After a new subnet mask is used, the borrowed two-seat network number can be used to identify two subnets: 01 subnet and 10 subnet (the subnet number cannot be all 0 or 1, therefore, the 00 and 11 subnets cannot be used ).
  
First, for the 01 subnet, the network number is in decimal format: 166.133.64.0. The minimum IP address of this subnet is 166.133.64.1, and the maximum IP address is 166.133.127.254, supports a total of 16382 hosts. The direct broadcast address for this subnet is 166.133.127.255. 5.
  
 

  
Figure 5 01 subnet calculation process
  

Second, for 10 subnets, the network number is in decimal format: 166.133.128.0. The minimum IP address of this subnet is 166.133.128.1, and the maximum IP address is 166.133.191.254 ., supports a total of 16382 hosts. The direct broadcast address for this subnet is 166.133.191.255.
  
Likewise, you can use three, four, five, six, seven, eight, or more host numbers to act as subnet numbers, table 2 summarizes the subnet mask that is commonly used for B-type networks to borrow host numbers of different digits, and the number of subnets that can be divided into and the number of hosts that each subnet can accommodate. Note that one or 15 digits are invalid.
  
 

   3. Non-standard subnet division for Class A Networks
  
Based on the previous analysis, we can obtain the common subnet partitioning methods and related data of the Class A network, as shown in table 3.
  
 

   4 full 0 and full 1 CIDR blocks
  
Recall that in the previous example, after dividing the class C network 210.31.233.0 into two subnets 210.31.233.64 and 210.31.233.128, each subnet can accommodate 62 hosts, and the two subnets can accommodate a total of 124 hosts. Before dividing the subnets, the class C network 210.31.233.0 can accommodate 254 hosts. That is to say, dividing subnets wastes half of the IP addresses (210.31.233.1-210.31.233.63 and 210.31.233.192-210.31.233.254 ).
  
The main reason for the waste of IP address space is that when the RFC 1009 stipulates that the subnet is divided, the subnet number cannot be all 0 or 1. We call it all 0 and all 1 network segments.
  
RFC 1009 retains the IP addresses of all 0 and all 1 CIDR blocks because when all 0 and all 1 CIDR blocks are used, this may lead to the ambiguity of IP addresses.
  
For example, a non-standard subnet mask (255..15.66.0) is used to divide the standard class C network into eight subnets. This subnet mask divides the class C network 201.15.66.0 into the following eight subnets (assuming that all subnet numbers are 0 or 1 ).
  
● Subnet 1: Network No. 201.15.66.0, available IP address range: 201.15.66.1-201.15.66.30, subnet broadcast address: 201.15.66.31.
  
● Subnet 2: Network No. 201.15.66.32, available IP address range: 201.15.66.33-201.15.66.62, subnet broadcast address: 201.15.66.63.
  
● Subnet 3: Network No. 201.15.66.64, available IP address range: 201.15.66.65-201.15.66.94, subnet broadcast address: 201.15.66.95.
  
● Subnet 4: Network No. 201.15.66.96, available IP address range: 201.15.66.97-201.15.66.126, subnet broadcast address: 201.15.66.127.
  
● Subnet 5: Network No. 201.15.66.128, available IP address range: 201.15.66.129-201.15.66.158, subnet broadcast address: 201.15.66.159.
  
● Subnet 6: Network No. 201.15.66.160, available IP address range: 201.15.66.161-201.15.66.190, subnet broadcast address: 201.15.66.191.
  
● Subnet 7: Network No. 201.15.66.192, available IP address range: 201.15.66.193-201.15.66.222, subnet broadcast address: 201.15.66.223.
  
● Subnet 8: Network No. 201.15.66.133, available IP address range: 201.15.66.225-201.15.66.254, subnet broadcast address: 201.15.66.255.
  
For the original primary network without dividing subnets, the network number of .15.66.0 and the network number of the 1st subnets after dividing the subnets are the same! Similarly, for the original primary network 201.15.66.0, its broadcast address 201.15.66.255 is the same as the broadcast address of the first subnet after dividing the subnet 201.15.66.255! Therefore, RFC 1009 prohibits the use of subnet numbers of all 0 or all 1 to avoid the above IP address ambiguity.
  
To solve the problem of IP address ambiguity, it can be stipulated that the IP address cannot be used independently and must carry the corresponding subnet mask information. For example, 201.15.66.0 + 255.255.255.0 refers to the original primary network without a subnetwork, 201.15.66.0, and 201.15.66.0 + 255.255.255.255.255.255.255.255.255.0 refers to the network number of the 1st subnetworks after the subnetwork is divided.
  
Similarly, 201.15.66.255 + 255.255.255.0 refers to the broadcast of the original primary network 201.15.66.0 without subnetworks, and 201.15.66.255 + 255.255.255.255.255.255.255 refers to the broadcast of the 8th subnetworks after the subnetworks are divided.
  
In this way, both valuable IP address space and waste are effectively utilized, and IP address ambiguity can be effectively avoided.
  
On a Cisco router, you can use full 1 CIDR block by default, but not all 0 CIDR blocks. If you want to use the full 0 CIDR block, you must enter the command IP subnet-Zero to allow the full 0 CIDR block.
  
Note that although the command IP subnet-zero allows us to use all 0 network segments, some classful routing protocols, such as Rip and IGRP, are used to broadcast route update information, only the network address information is sent, but the corresponding subnet mask information is not sent. At this time, there will still be the ambiguity of the IP address.
  
   5. Dedicated address space
  
RFC 1918 defines the private address space used inside the enterprise network, as follows:
  
● Class A: 10.0.0.0-10.255.255.255
  
● Class B: 172.16.0.0-172.31.255.255
  
● Class C: 192.168.0.0-192.168.255.255
  
These network addresses cannot be routed over the Internet and can only be used within the enterprise network. A host with these network addresses needs to access the Internet either through a proxy server or through a router or firewall with the network address translation function.
  
In addition, Microsoft defines the linklocal network address space in its TCP/IP implementation: 169.254.0.0-169.254.255.255 is also a dedicated internal address and cannot be routed over the Internet. 6.
  


  
Figure 6 linklocal network address

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.