CompTIA Network+ (N10-009)Networking ConceptsHard
A company is allocated the network 192.168.10.0/24 and needs to create subnets that each support at least 50 hosts while wasting as few addresses as possible. Which subnet mask should be used?
- A255.255.255.128
- B255.255.255.192
- C255.255.255.240
- D255.255.255.224
Show answer & explanationAnswer & explanation
Correct answer: B. 255.255.255.192
To support 50 hosts, at least 6 host bits are needed since 2^6 - 2 = 62 usable addresses (2^5 - 2 = 30 is insufficient). Borrowing 2 bits from the host portion of a /24 gives a /26 mask (255.255.255.192), which provides 62 usable hosts per subnet, the smallest block that satisfies the requirement.
Why the other options are wrong
- A. A /25 mask (255.255.255.128) provides 126 hosts, wasting far more addresses than needed.
- C. A /28 mask (255.255.255.240) provides only 14 usable hosts, far too few.
- D. A /27 mask (255.255.255.224) only provides 30 usable hosts, insufficient for 50 hosts.
Subnetting for Host Requirements
To determine the subnet mask for a required number of hosts, find the smallest number of host bits h such that 2^h - 2 is greater than or equal to the required host count.
- 2^6 - 2 = 62 hosts requires 6 host bits (/26)
- 2^5 - 2 = 30 hosts requires 5 host bits (/27)
- Subtract 2 for network and broadcast addresses
Memory trick: Powers of 2 minus 2 for network and broadcast