CIDR Notation Does Not Match Subnet Mask

Beginner Troubleshoot

Question

A network documentation entry claims the network is 10.0.0.0/20, but the subnet mask configured on the router interface is 255.255.248.0. Are these consistent? If not, what is the correct CIDR notation for the mask, and what is the actual network size?

Given

{
  "claimed_cidr": "10.0.0.0/20",
  "actual_mask": "255.255.248.0"
}

Answer

{
  "claimed_prefix": 20,
  "actual_prefix": 21,
  "correct_cidr": "10.0.0.0/21",
  "mask_for_20": "255.255.240.0",
  "mask_for_21": "255.255.248.0",
  "consistent": false,
  "actual_addresses": 2048,
  "actual_usable": 2046,
  "claimed_addresses": 4096,
  "problem": "Mask 255.255.248.0 is /21, not /20. /20 mask would be 255.255.240.0"
}

Try to solve it first, then click Reveal Answer

Step-by-Step Explanation

Step 1: Convert the claimed prefix to a mask

/20 means the first 20 bits are 1:

11111111.11111111.11110000.00000000
= 255.255.240.0

So /20 corresponds to mask 255.255.240.0.

Step 2: Convert the actual mask to a prefix

255.255.248.0 in binary:

11111111.11111111.11111000.00000000

Count the leading 1s: 8 + 8 + 5 = 21 ones → prefix length = /21

Step 3: Confirm the mismatch

Claimed Actual
CIDR /20 /21
Mask 255.255.240.0 255.255.248.0
Addresses 4,096 2,048
Usable hosts 4,094 2,046

The documentation says /20 but the router is configured with /21. They are not consistent — documentation is wrong.

Step 4: What 255.255.248.0 actually covers

With 10.0.0.0/21: - Network: 10.0.0.0 - Broadcast: 10.0.7.255 - Range: 10.0.0.0 – 10.0.7.255 - Usable: 10.0.0.1 – 10.0.7.254 (2,046 hosts)

With 10.0.0.0/20: - Network: 10.0.0.0 - Broadcast: 10.0.15.255 - Range: 10.0.0.0 – 10.0.15.255 - Usable: 10.0.0.1 – 10.0.15.254 (4,094 hosts)

The /20 documentation suggests hosts up to 10.0.15.254 are on this network, but the router only knows about 10.0.0.0–10.0.7.255. Hosts in 10.0.8.0–10.0.15.255 would be unreachable from the router interface.

Step 5: Fix the documentation

Correct the network documentation to say 10.0.0.0/21 (mask 255.255.248.0).

Or, if the network really should be /20 (4,094 hosts), change the router interface mask to 255.255.240.0.

Memorizing common masks

Prefix Mask Addresses
/16 255.255.0.0 65,536
/17 255.255.128.0 32,768
/18 255.255.192.0 16,384
/19 255.255.224.0 8,192
/20 255.255.240.0 4,096
/21 255.255.248.0 2,048
/22 255.255.252.0 1,024
/23 255.255.254.0 512
/24 255.255.255.0 256

The third-octet values follow powers of 2: 128, 192, 224, 240, 248, 252, 254, 255.

Related Terms

More Troubleshoot Worksheets