A subnet divides a large network into several small networks. Each small network has the same number of IP addresses. This small network is called the subnet of this large network. A large network can be a type, B type, or C type.
In a type-a large network, the IP address can be 2 to the power of 24, that is, 16777216 IP addresses. In B type-B large networks, the IP address can be 2 to the power of 16, that is, 65536 IP addresses; in a C-type large network, there are 8 IP addresses to the power of 2, that is, 256 IP addresses.
If you divide a Class B network into 32 small networks, the number of IP addresses for each small network is 65536/32 = 2048. If you divide a class C network into 32 small networks, then the number of IP addresses for each small network is 256/32 = 8.
(1) convert binary to decimal
For example, if the calculation of IP addresses is not involved, convert the binary 111 to decimal. The method used is (2 to the power + 2 to the power of 1 + 2 to the power of 0 + 2, 4 + 2 + 1). The result is 7 in decimal format. However, this method cannot be used to convert the binary to decimal when IP addresses are calculated. When binary 111 is converted to decimal, several "1" values are displayed ", it is expressed as the power of 2. Here there are three "1", which is the power of 3 of 2. That is, when the IP address is calculated, the binary 111 is converted to decimal, which is the power of 3 of 2, the result of 2's 3rd power is 8 .)
(2) Total number of networks and available number
The number of A-class networks is the seventh power of 2, that is, 128. According to the Network specification, the first and last of the 128 S should be removed, so the number of available class A networks is 126.
The number of B-type networks is the 14th power of 2, that is, 16384. According to the Network specification, the first and last of the 16384 networks should be removed, so the number of available B-class networks is 16382.
The number of class C networks is two to the power of 21, that is, 2097152. According to the Network specification, the first and last of the 16384 S should be removed, so the number of available class C networks is 2097150.
(3) Total number of IP addresses and available IP addresses of the Network
Each class a large network (Class A network) can contain up to 24 IP addresses, that is, 16777216 IP addresses. Each Class B network can contain up to 16 IP addresses of 2, that is, 65536 IP addresses. Each Class C network can accommodate up to 256 IP addresses. The number of available IP addresses is obtained by subtracting 2 from the total number of IP addresses.
If a Class B network is divided into 32 small networks, the number of IP addresses for each small network is 65536/32 = 2048. If a class C network is divided into 32 small networks, then the number of IP addresses for each small network is 256/32 = 8.