Computer Networking Basics

You want to fit 500 hosts in one subnet. Of the subnets that can do this, which is the smallest (has the longest prefix)?

  1. A/24
  2. B/22
  3. C/23
Show answer and explanation

Answer: C. /23

A subnet with prefix length n can hold 2^(32 − n) − 2 hosts. /24 has 8 host bits, giving 2^8 − 2 = 254 hosts, which is not enough. /23 has 9 host bits, giving 2^9 − 2 = 510 hosts, enough for 500. /22 gives 2^10 − 2 = 1022 hosts, which also fits but uses about twice the addresses needed. The subnet mask for /23 is 255.255.254.0; for example, 10.0.2.0/23 covers 10.0.2.0 to 10.0.3.255.

  • A. It holds only 2^8 − 2 = 254 hosts.
  • B. It holds 1022 hosts, but it is larger than /23, not the smallest.
  • C. Correct. 2^9 − 2 = 510 hosts; it is the smallest subnet that fits 500.
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 subnet mask is equivalent to /20 in CIDR notation?
  2. Which of the following IPv4 addresses falls within a private address range?
  3. Home broadband routers perform NAPT (IP masquerading), a form of NAT (Network Address Translation). What does NAPT make possible?
  4. 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?
  5. Which correctly describes the role of ARP?