nerdexam
CompTIA

SK0-004 · Question #484

An administrator is given the following network information to configure a server with a static IP address: 10.152.0.4/21. Which of the following is the subnet mask for the given IP address?

The correct answer is C. 255.255.248.0. A /21 prefix length corresponds to 21 consecutive 1-bits in the subnet mask, which resolves to 255.255.248.0.

Server administration

Question

An administrator is given the following network information to configure a server with a static IP address:

10.152.0.4/21. Which of the following is the subnet mask for the given IP address?

Options

  • A255.248.0.0
  • B255.255.128.0
  • C255.255.248.0
  • D255.255.255.248

How the community answered

(29 responses)
  • B
    3% (1)
  • C
    93% (27)
  • D
    3% (1)

Why each option

A /21 prefix length corresponds to 21 consecutive 1-bits in the subnet mask, which resolves to 255.255.248.0.

A255.248.0.0

255.248.0.0 corresponds to a /13 prefix (13 ones), not /21, as only the first octet is fully masked and the second has 5 bits set.

B255.255.128.0

255.255.128.0 corresponds to a /17 prefix (17 ones), where only the high bit of the third octet is set (10000000 = 128), not 5 bits.

C255.255.248.0Correct

A /21 CIDR prefix means the first 21 bits of the subnet mask are set to 1. The first two octets are fully masked (255.255), the third octet has the top 5 bits set (11111000 = 248), and the fourth octet is 0, yielding 255.255.248.0. This gives 2048 total addresses per subnet.

D255.255.255.248

255.255.255.248 corresponds to a /29 prefix (29 ones), which masks into the fourth octet with 5 bits set, yielding only 8 addresses per subnet.

Concept tested: CIDR prefix to subnet mask conversion

Source: https://learn.microsoft.com/en-us/troubleshoot/windows-client/networking/tcpip-addressing-and-subnetting

Topics

#subnet mask#CIDR notation#static IP#networking

Community Discussion

No community discussion yet for this question.

Full SK0-004 Practice