Computer Networking Basics

Which subnet mask is equivalent to /20 in CIDR notation?

  1. A255.255.240.0
  2. B255.255.255.240
  3. 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.
Practice this topic Back to topic

Related calculators

Books on Computer Networking Basics Ad

As an Amazon Associate I earn from qualifying purchases.

More Computer Networking Basics questions

  1. Which of the following IPv4 addresses falls within a private address range?
  2. Home broadband routers perform NAPT (IP masquerading), a form of NAT (Network Address Translation). What does NAPT make possible?
  3. Host A (192.168.1.10), inside a router performing NAPT whose outside global address is 198.51.100.7, connects from source port 50000 to port 443 on web server 203.0.113.5. The router translates the source to port 61000 on 198.51.100.7. What is the destination of the response packets the web server sends back?
  4. Which correctly describes the role of ARP?
  5. A host (192.168.1.10/24, default gateway 192.168.1.1) sends a packet to server 203.0.113.80 on a different network. With an empty ARP cache, whose MAC address does the host look up with ARP?