One, the IP division of the standard classification
This division of IP in the form of IP in accordance with the network number + host number, each type of IP network number in the first few different, the rest of you except special IP (for example, all 0 and all 1, loopback address, broadcast address, such as these special-purpose addresses) can not be used, others are OK.
When you initially calculate the range of IP addresses, you can use each 0 or 1 write-out, and then 8-bit groups to convert to 10 binary numbers. For example:
Second, the division of three-level network structure
The three-level network structure feels on the basis of two levels, and increases the subnet.
In order to improve IP utilization, the A,b,c class network is divided according to Netid-subnet Id-host ID.
1, how to get the subnet mask
Subnet Mask: Place the host ID in front of all 1.
For example:
From the address of the IPV4, I now use a class C IP address, the class C IP address is composed of the following:
110+ Network number (21-bit) + host number (8) bit.
Its subnet mask is: 11111111,11111111,11111111,00000000 (255.255.255.0)
If you now want to divide the network into 5 subnets, then we separate n bits from the host number, so that 2^n represents a decimal number greater than or equal to 5, that is, 2^n>=5, to obtain n=3, that is, the subnet mask becomes: 11111111,11111111,11111111, 11100000
Third, how to determine which type of IP address to use
1, Molecular mesh
For example, now to divide 5 subnets, and back to the above problem, we just occupy the host number of the first 3 bits can be divided into 5 subnets;
2, determine the number of host units
For example, now I have 20 hosts, in order to make 2^n>=20, then, n least desirable: 5, that is, only 5 bits 0 and 1 of the combination can represent 20 computers.
3, depending on the number of subnets and the number of hosts to determine IP type
The two n values in 1 and 2 are added together and found to be equal to 8, stating that 8-bit 2-binary can represent hosts in all subnets.
IP & Subnet