# Cisco CCNA mock exam questions sample test – Question 62

.You are the network administrator for your company. You have a Class B address range and are planning for a network that allows 150 hosts per subnet and at least 164 subnets.

A. 255.255.192.0
B. 255.255.255.192
C. 255.255.255.0
D. 255.255.255.252

Explanation:
You should use 255.255.255.0 as the subnet mask to allow 150 hosts per subnet and at least 164 subnets. The formulas used to calculate the number of subnets and hosts are:
Number of subnets = 2number-of-subnet-bits
Number of hosts per subnet = 2number-of-host-bits – 2
Number of subnet bits: 8 (binary 1s in the subnet octet of the subnet mask)
Number of host bits: 8 (binary 0s in the subnet mask)
In this scenario, we find that for 255.255.255.0:
Subnets that can be used: 28 = 256
Hosts that can be used: 28 – 2 = 254
The other options do not allow 150 hosts per subnet and at least 164 subnets.
If you use 255.255.192.0 as the subnet mask, then the total number of hosts that can be connected per subnet is 16382 (214 – 2 = 16382). However, there will be 4 subnets (22 = 4).
If you use 255.255.255.192 as the subnet mask, there will be 62 hosts (26 – 2 = 62).
If you use 255.255.255.252 as the subnet mask, there will be two hosts per subnet (22 – 2 = 2).
Note: This mask is frequently used for a subnet that connects two routers. In that case, there are two interfaces in the subnet, and thus it is most efficient use of the addressing space.
This is also the most efficient way to address a point-to-point serial link.
A note about the formulas: You will always subtract 2 from the number of hosts (2number-of-host-bits – 2) because the all-zeroes bit address is reserved for the network address and