Computer Networking Basics
Which subnet mask is equivalent to /20 in CIDR notation?
- A255.255.240.0
- B255.255.255.240
- C255.255.248.0
Show answer and explanation
Answer: A. 255.255.240.0
/20 is a mask with the upper 20 bits set to 1. The first 16 bits give 255.255, and the remaining 4 bits fill the upper 4 bits of the third octet. Binary 11110000 is 128 + 64 + 32 + 16 = 240, so the subnet mask is 255.255.240.0. The host part is 12 bits, holding 2^12 − 2 = 4094 hosts. 255.255.255.240 has the upper 28 bits set (/28), and 255.255.248.0 has the upper 21 bits set (/21).
- A. Correct. The upper 20 bits are 1, and the third octet is 11110000 = 240.
- B. This is the subnet mask for /28.
- C. Its third octet is 11111000 = 248, so it is the subnet mask for /21.