[Subnet division] Find the subnet network prefix, subnet address, and the minimum and maximum addresses that each subnet can assign to hosts

1. A unit is allocated an address block 152.7.77.0/24, and now it needs to be further divided into 4 subnets of the same size. (10 points)
Questions:
(1) How long is the network prefix for each subnet?
(2) How many addresses are there in each subnet?
(3) What is the network address of each subnet?
(4) What are the minimum and maximum addresses that each subnet can assign to hosts?

Answer
(1) Because 4 subnets of the same size are to be divided, 2 bits are needed, that is, 2 2 =4 (if 8 subnets of the same size are to be divided, 3 bits are needed, that is, 2 3 =8), the subnet The mask is 24 bits, plus 2 bits, which is 26 bits, so每个子网的网络前缀是26位

(2) Because the IP address has a total of 32 bits, the first 26 bits represent the network prefix, so the last 6 bits represent the network address, and each bit has two values ​​​​of 0 and 1, so一共有26=64个地址

(3) 152.7.77.0/24, the first 26 bits are the network prefix so:
 152.7.77.00000000 - - -> 152.7.77.0 - - -> 152.7.77.0 -152.7.77.63
 152.7.77.01000000 - - -> 152.7.77.64 - - -> 152.7.77.64 -152.7.77.127
 152.7.77.10000000 - - -> 152.7.77.128 - - -> 152.7.77.128 -152.7.77.191 152.7.77.11000000 - - -> 152.7.77 .192
 - - -> 152.7.77.192 -152.7. 77.255

(4) It is stipulated that the first address and the last address cannot be allocated to the host, so the minimum and maximum addresses that can be allocated to the host are: 152.7.77.1
- 152.7.77.62
152.7.77.65 - 152.7.77.126
152.7.77.129 - 152.7.77.190
152.7.77.193 - 152.7.77.254

insert image description here

Guess you like

Origin blog.csdn.net/qq_45796486/article/details/128960896