AP Networking • IPv4 • CIDR Practice

CIDR Prefix Practice

Practice prefixes as complete network decisions: convert masks, count host bits, calculate block sizes, find network and broadcast boundaries, determine usable ranges, and explain the forwarding behavior each prefix creates.

Independent AP Networking resource • Updated 2026-09-12 • Interactive CIDR drill + 24 free digital flashcards
CIDR rule: the slash number tells you more than the mask—it controls address capacity, subnet boundaries, local delivery, and route specificity.
Practice with Flashcards
CIDR practice model

Treat every prefix as a bundle of six facts

CIDR practice becomes much faster when you stop treating /24, /26, or /29 as isolated labels. Every prefix tells you the subnet mask, number of host bits, total address count, block size, subnet boundaries, and how the host classifies destinations as local or remote.

Practice chain: Prefix → Mask → Host Bits → Block Size → Network/Boundary → Local-vs.-Remote Meaning.
Prefix length

The number after the slash tells you how many bits belong to the network

A /24 has 24 network bits and 8 host bits. A /27 has 27 network bits and 5 host bits. A /30 has 30 network bits and only 2 host bits. Each time the prefix grows by one bit, the host space is cut in half.

/24 → 8 host bits → 256 total addresses /25 → 7 host bits → 128 total addresses /26 → 6 host bits → 64 total addresses /27 → 5 host bits → 32 total addresses /28 → 4 host bits → 16 total addresses /29 → 3 host bits → 8 total addresses /30 → 2 host bits → 4 total addresses
Mask conversion

Memorize the common prefix-to-mask ladder

PrefixSubnet maskHost bitsTotal addresses
/24255.255.255.08256
/25255.255.255.1287128
/26255.255.255.192664
/27255.255.255.224532
/28255.255.255.240416
/29255.255.255.24838
/30255.255.255.25224

Swipe horizontally to see the full prefix table.

Block size

Use 256 minus the interesting mask octet

When the prefix boundary falls inside an octet, subtract the mask value from 256. For /26, the interesting octet is 192, so the block size is 64. For /27, 256 − 224 = 32.

/25: 256 - 128 = 128 /26: 256 - 192 = 64 /27: 256 - 224 = 32 /28: 256 - 240 = 16 /29: 256 - 248 = 8 /30: 256 - 252 = 4
Boundary drill

Write the legal subnet starts before placing the host

A powerful practice habit is to list boundaries first. For /27, subnet starts in the fourth octet are 0, 32, 64, 96, 128, 160, 192, and 224. Then place the host value into the correct block.

IP: 10.20.30.77/27 /27 boundaries: 0, 32, 64, 96, 128... 77 falls in: 64 - 95 Network: 10.20.30.64 Broadcast: 10.20.30.95
Network/broadcast practice

The next subnet boundary gives you the broadcast

After you identify the current network, find the next subnet start and subtract one. That is the traditional broadcast address.

192.168.10.130/26 Current network: 192.168.10.128 Next network: 192.168.10.192 Broadcast: 192.168.10.191 Traditional usable: 192.168.10.129 - 190
Usable host range

For ordinary subnets, network + 1 through broadcast − 1 gives the host range

Traditional IPv4 subnetting reserves the first address as the network address and the last as the broadcast. The usable range sits between them. Special cases such as /31 and /32 should be treated separately when specifically introduced.

Fast check: total addresses should equal the block size, and the original IP must fall inside the network-to-broadcast range.
Earlier-octet practice

/17 through /23 move the interesting boundary into the third octet

For /20, the mask is 255.255.240.0, so the third-octet block size is 16. For /22, the mask is 255.255.252.0, so the third-octet block size is 4.

172.16.45.10/20 Third-octet boundaries: 0, 16, 32, 48... 45 falls in: 32 - 47 Network: 172.16.32.0 Broadcast: 172.16.47.255
Local vs remote

CIDR directly controls whether the host uses ARP for the destination or the gateway

Two addresses can share the first three decimal octets and still be in different subnets. A host at 192.168.10.130/26 treats 192.168.10.150 as local because both belong to 192.168.10.128/26. It treats 192.168.10.200 as remote because that address belongs to a different /26 block.

Forwarding consequence: local destination → ARP for destination; remote destination → ARP for default gateway.
Same IP, different prefix

The host address can stay constant while its local network changes

Address/prefixNetworkBroadcast
192.168.10.140/24192.168.10.0192.168.10.255
192.168.10.140/26192.168.10.128192.168.10.191
192.168.10.140/27192.168.10.128192.168.10.159

Swipe horizontally to compare how CIDR changes the local network.

Longest-prefix match

CIDR prefixes also drive routing-table selection

Routers compare matching route prefixes and choose the most specific match. A /24 wins over a /16 for a destination inside both. A /16 wins over the default /0. This makes CIDR important not only for subnetting but also for routing behavior.

10.20.0.0/16 via A 10.20.30.0/24 via B 0.0.0.0/0 via C Destination: 10.20.30.50 Winner: 10.20.30.0/24 via B
Wrong-prefix troubleshooting

A wrong CIDR prefix can create selective failures rather than total failure

If the prefix is too broad, a host may treat a remote destination as local and ARP for it directly. If the prefix is too narrow, it may send local traffic to the gateway unnecessarily. Some destinations can still work, which makes wrong-prefix problems easy to misdiagnose.

High-information clue: when some destinations work and others fail unpredictably, recompute the client's actual local subnet before moving upstream.
Prefix practice set 1

Convert prefix to mask, host bits, and total addresses

/25

Mask? Host bits? Total addresses?

/27

Mask? Host bits? Total addresses?

/29

Mask? Host bits? Total addresses?

Show answers

/25: 255.255.255.128, 7 host bits, 128 addresses.

/27: 255.255.255.224, 5 host bits, 32 addresses.

/29: 255.255.255.248, 3 host bits, 8 addresses.

Prefix practice set 2

Find network, broadcast, and usable range

192.168.44.77/27

Find network, broadcast, and host range.

10.4.8.201/28

Find current block and next boundary.

172.20.37.10/20

Find third-octet block and broadcast.

Show answers

192.168.44.77/27: network 192.168.44.64, broadcast .95, usable .65–.94.

10.4.8.201/28: network 10.4.8.192, broadcast .207, usable .193–.206.

172.20.37.10/20: network 172.20.32.0, broadcast 172.20.47.255.

Interactive CIDR drill

Check a prefix quickly

Use this mini tool to review the common /24–/30 prefixes. It is a study aid, not an official exam feature.

Choose a prefix, then reveal the facts.
Verification triangle

Use three checks to catch arithmetic mistakes

A strong CIDR answer can be checked three ways: the original IP lies inside the calculated network-to-broadcast range, the range contains the expected number of addresses, and broadcast + 1 equals the next legal subnet boundary.

For 192.168.10.130/26: Network: .128 Broadcast: .191 Check 1: 130 lies in 128-191 ✓ Check 2: 128 through 191 = 64 addresses ✓ Check 3: 191 + 1 = 192 next /26 boundary ✓
Gateway check

Use CIDR math to verify whether the default gateway is actually local

For a normal endpoint, the gateway needs to be reachable on the local link. If a host is 192.168.10.130/26, then 192.168.10.129 is local while 192.168.10.1 is outside that /26.

Exam shortcut: if the gateway is outside the calculated local subnet, stop and repair the addressing logic before diagnosing the ISP or DNS.
DHCP scope connection

CIDR can reveal that a valid-looking lease belongs to the wrong network

A client can receive a complete IP configuration from DHCP and still be on the wrong VLAN or wrong scope. Compare the prefix and gateway with a known-good peer. The values should form a coherent local subnet and match the intended segment.

Route-table connection

The prefix creates the connected route that competes with other routes

On an endpoint or router, an interface prefix creates a directly connected route. That route can outrank the default route for matching destinations. A wrong prefix therefore changes both subnet math and route selection.

★ Addressing Practice • CIDR Prefix Practice

A five-minute warm-up for CIDR Prefix Practice

Tomorrow’s opening question can pick up where this page leaves off: ask students to explain the idea in their own words and apply it to a real network. The 300 Bell Ringers give you short questions and teacher answers you can use without preparing a new starter each morning.

300 AP Networking Bell Ringers
$74.99
BUY TEACHER PACK → See what is included in the 300 Bell Ringers →
Instant Access • Full-Year Teacher Resource
Host: 10.1.5.20/16 Connected route: 10.1.0.0/16 on-link Default: 0.0.0.0/0 via 10.1.5.1 Destination: 10.1.99.20 Host decision: /16 says local default route never used
Common mistakes

Eight CIDR practice errors to eliminate

  • Forgetting that prefix length counts network bits, not host bits.
  • Adding block size to the host value instead of the current network boundary.
  • Assuming every broadcast ends in .255.
  • Assuming same first three octets means same subnet.
  • Forgetting earlier-octet subnetting for /17–/23.
  • Using the default route when a more-specific route matches.
  • Assuming a valid DHCP lease must be the correct subnet.
  • Stopping after arithmetic without explaining local-vs.-remote behavior.
Exam method

Use one repeatable seven-step method

1. Read the CIDR prefix 2. Convert to mask 3. Count host bits 4. Calculate block size 5. Find network + broadcast 6. Find usable range 7. State forwarding implication: local or gateway

This turns CIDR from memorization into a reusable network-analysis process.

Binary pattern drill

See the prefix boundary instead of memorizing only decimal masks

A /27 means the first 27 bits are network bits and the last 5 are host bits. In the final octet, the mask is 11100000. That leaves five host-bit positions that can vary from 00000 through 11111, producing a 32-address block.

/27 fourth octet: 11100000 Host-bit patterns: 00000 → first address in block 11111 → last address in block 2^5 = 32 total addresses

If you understand that pattern, /25 through /30 become a simple progression: each additional network bit cuts the block size in half.

Addressing & Subnetting Lab • 120 Missions

Let students try CIDR Prefix Practice for themselves

Reading the explanation is a start. In the browser simulator, students work through a broken network, choose what to test and see whether their fix worked. It gives them another chance to use what they learned about CIDR Prefix Practice.

AP Networking Browser Troubleshooting Simulator
$29.99
120 Missions • 60 Failure Patterns • Offline Copy
GET THE SIMULATOR → See all 120 missions & features
Prefix comparison

A larger slash number means a smaller subnet

Students sometimes reverse this relationship. Moving from /24 to /25 adds one network bit and removes one host bit. The result is twice as many subnets of half the size. Moving from /27 to /28 does the same thing again.

PrefixTotal addressesRelative size
/24256Largest in this set
/25128Half of /24
/2664Half of /25
/2732Half of /26
/2816Half of /27
/298Half of /28
/304Half of /29

Swipe horizontally to see the prefix-size pattern.

VLSM sizing

Choose the smallest prefix that can satisfy the host requirement

CIDR practice is more useful when you connect prefixes to design. If a LAN needs 25 traditional usable host addresses, /27 provides 30 usable addresses and is a reasonable fit. /28 provides only 14, so it is too small. /26 provides 62, which works but wastes more space.

Addressing Exam Practice • CIDR Prefix Practice

Check whether CIDR Prefix Practice has really stuck

Once students have worked through this topic, give them questions mixed in with the rest of the course. The Exam Prep Vault includes practice exams, multiple-choice questions and artifact labs so they cannot rely on a chapter heading to tell them what to do.

AP Networking Complete Exam Prep Vault
$39.99
GET THE EXAM PREP VAULT → See the Exam Prep Vault contents →
4 Practice Exams • 320 MCQs • 60 Artifact Labs
Need 25 hosts /28: 16 total 14 traditional usable too small /27: 32 total 30 traditional usable fits /26: 64 total 62 traditional usable fits, but larger than necessary

This is the basic logic behind variable-length subnetting: assign prefix sizes according to actual host needs instead of forcing every segment to use the same mask.

Routing specificity

Prefix length changes route priority as well as subnet size

In a routing table, a longer matching prefix is more specific. That means 10.20.30.0/24 wins over 10.20.0.0/16 for destination 10.20.30.50. Both routes match, but /24 describes a smaller and more exact destination range.

Premium Routing Feedback

Spend less time marking explanations about CIDR Prefix Practice

When students explain their answer, it takes more than a right-or-wrong check to see what they understand. The Grading Copilot helps you review how they used the clues, where their explanation falls short and what feedback to give next. You make the final grading decision.

AP Networking Artifact Analysis Grading Copilot
$49.99
8 Criteria • 5 Task Modes • Offline Premium Copy
GET THE GRADING COPILOT → See the free Copilot preview
Important connection: the same slash notation that defines subnet size also defines route specificity.
Special prefixes

/31 and /32 should not be forced into the ordinary usable-host formula

Most classroom subnetting drills use conventional subnets where the first address is network and the last is broadcast. Point-to-point /31 networks and host /32 routes are special cases. A /31 can be used on point-to-point links without the traditional network/broadcast host loss, while /32 identifies one exact IPv4 address.

Practice rule: use the conventional network/broadcast method for normal subnet questions unless the prompt specifically introduces /31 or /32 behavior.
Troubleshooting case 1

A client with /16 ARPs for a server that should be remote

Observed: client 10.10.10.50/16 repeatedly ARPs for 10.10.20.8 instead of sending to its gateway.

Interpretation: under /16, the destination appears local. If the intended design is /24, the wrong prefix is the first failed dependency.

Troubleshooting case 2

A gateway looks familiar but is outside the actual /27

Observed: 192.168.50.70/27 is configured with gateway 192.168.50.1.

NEW • COMPLETE 180-DAY TEACHER CURRICULUM

Teach CIDR Prefix Practice as part of a planned school year

This page gives you one topic. The 180-Day Teacher Curriculum puts it into a full course plan, with daily teaching notes, student activities and checks for understanding. Use it when you need to know what comes before this lesson and what to teach next.

AP Networking Complete 180-Day Teacher Curriculum
$199.99
180 Lessons • 180 Daily Simulators • 36 Teaching Weeks
GET THE 180-DAY CURRICULUM → See 3 free curriculum examples

Calculation: .70 belongs to the .64–.95 block. A normal local gateway should therefore be inside that subnet.

Interpretation: the addressing plan is invalid before any Internet troubleshooting begins.

Troubleshooting case 3

Two clients have the same IP pattern but different prefixes

Observed: Client A is 192.168.80.130/24 and Client B is 192.168.80.130/27 in two separate lab scenarios. Both try to reach 192.168.80.200.

Interpretation: under /24, .200 is local; under /27, .200 is remote. The destination address did not change—the prefix changed the forwarding decision.

Capstone CIDR analysis

Work from one address all the way to forwarding behavior

Client: 172.22.118.9/22 Mask: 255.255.252.0 Third-octet block size: 4 Current block: 116 - 119 Network: 172.22.116.0 Broadcast: 172.22.119.255 Traditional usable: 172.22.116.1 - 172.22.119.254 Destination: 172.22.120.10 Decision: remote send to gateway

This one example connects prefix conversion, block size, earlier-octet subnetting, network and broadcast calculation, usable range, and the local-versus-remote forwarding decision.

Free digital flashcards

24 CIDR Prefix Practice digital flashcards

Practice prefix conversion, host bits, block sizes, network and broadcast boundaries, earlier-octet subnetting, local-vs.-remote behavior, routing, and troubleshooting.

All CIDR cards
Click or press Enter/Space to reveal.
Always connect prefix math to forwarding behavior.
0 seen•24 cards
Continue studying

Connect CIDR practice to masks, broadcasts, host ranges, and routing