AP Networking • IPv4 • Subnetting

Find the Network Address From an IP and Mask

Find IPv4 network addresses using bitwise AND, CIDR block sizes, binary proof, earlier-octet subnetting, validation rules, and forwarding logic.

Independent AP Networking resource • Updated 2026-09-12 • Includes 24 free digital flashcards
Subnetting rule: the network address is the first address in the block because all host bits are zero.
Practice with Flashcards
Answer first

The network address is the IP address with every host bit forced to zero

The fastest definition is exact: IP address AND subnet mask = network address. The mask preserves the network portion and clears the host portion. You can arrive at the same result with binary AND, CIDR block-size math, or subnet-boundary reasoning. A strong answer should be able to explain why all three methods agree.

Core chain: IP + Mask → Network Bits → Block Boundary → Network Address → Same/Remote Subnet Decision.
Method 1

Bitwise AND is the mathematical definition

Each IPv4 address is 32 bits. The subnet mask is also 32 bits. In the mask, 1s identify the network portion and 0s identify the host portion. AND keeps a bit only when both inputs contain 1.

IP bit Mask bit Result 0 0 0 0 1 0 1 0 0 1 1 1

Because host-bit positions in the mask are 0, those positions become 0 in the network address.

Simple /24

Example: 192.168.14.88 with 255.255.255.0

A /24 mask keeps the first three octets and clears the fourth. Therefore the network is 192.168.14.0/24.

IP: 192.168.14.88 Mask: 255.255.255.0 Network: 192.168.14.0

This is easy because the prefix ends exactly at an octet boundary. The harder cases are prefixes such as /26, /27, /20, and /22 where the boundary lands inside an octet.

Method 2

Use block size when the partial mask octet is easy to recognize

Find the mask octet that is neither 255 nor 0. Subtract that value from 256. The result is the subnet block size for that octet.

255.255.255.128 → block 128 255.255.255.192 → block 64 255.255.255.224 → block 32 255.255.255.240 → block 16 255.255.255.248 → block 8 255.255.255.252 → block 4
Worked /26

Example: 192.168.14.150/26

A /26 mask is 255.255.255.192. The final-octet block size is 64, so the legal subnet starts are 0, 64, 128, and 192. Address 150 lies in the 128–191 block.

IP: 192.168.14.150/26 Boundaries: 0, 64, 128, 192 150 lies in: 128 - 191 Network: 192.168.14.128/26
Binary proof

Why 192.168.14.150/26 becomes 192.168.14.128

The fourth octet of 150 is 10010110. The /26 mask's fourth octet is 11000000. AND keeps only the first two network bits in that octet.

150: 10010110 192: 11000000 AND: 10000000 10000000₂ = 128

The decimal block-size method and binary AND therefore agree.

Worked /27

Example: 10.0.4.77/27

A /27 uses a block size of 32. Boundaries are 0, 32, 64, 96, 128, and so on. Since 77 lies between 64 and 95, the network is 10.0.4.64/27.

77 ÷ 32: current block begins at 64 Network: 10.0.4.64/27 Next boundary: 10.0.4.96
Worked /28

Example: 192.168.5.201/28

A /28 uses a 16-address block. The fourth-octet boundaries near 201 are 192, 208, and 224. Because 201 lies between 192 and 207, the network is 192.168.5.192/28.

Quick validation: 201 is inside 192–207, and 192 is divisible by the 16-address block size.
Earlier-octet subnetting

Example: 172.16.45.200/20

A /20 mask is 255.255.240.0. The interesting octet is the third, not the fourth. Its block size is 16. Third-octet boundaries are 0, 16, 32, 48, 64, and so on. The value 45 belongs to the 32–47 block.

IP: 172.16.45.200/20 Third-octet block: 32 - 47 Network: 172.16.32.0/20

This is one of the most important subnetting habits: do not assume the calculation always happens in the fourth octet.

Worked /22

Example: 172.20.115.8/22

A /22 mask is 255.255.252.0. The third-octet block size is 4. Boundaries include 108, 112, 116, and 120. The value 115 belongs to the 112–115 block.

IP: 172.20.115.8/22 Third-octet boundaries: 108, 112, 116, 120 Network: 172.20.112.0/22
Method 3

Use integer block math when you want a repeatable shortcut

For a partial octet, divide the target octet by the block size, discard the remainder, and multiply back by the block size. That gives the beginning of the block.

Example: 201 with /28 Block size: 16 201 ÷ 16 = 12 remainder 9 12 × 16 = 192 Network octet: 192

This is just another way to find the largest legal boundary that does not exceed the host value.

Boundary table

Common prefixes and their block sizes

PrefixMaskInteresting-octet block sizeTotal addresses
/25255.255.255.128128128
/26255.255.255.1926464
/27255.255.255.2243232
/28255.255.255.2401616
/29255.255.255.24888
/30255.255.255.25244

Swipe horizontally to see the prefix table.

Same-subnet reasoning

The network address tells you whether a destination is local

A host compares its own network prefix with the destination's network prefix. If the results match under the same prefix length, the destination is local to the same IP subnet. If the results differ, normal communication requires routing.

Host A: 192.168.14.150/26 network 192.168.14.128 Host B: 192.168.14.170/26 network 192.168.14.128 Same subnet ✓ Host C: 192.168.14.210/26 network 192.168.14.192 Different subnet ✕ gateway required
Forwarding consequence

Network-address math predicts the host's next Layer 2 target

If the destination is local, the host normally ARPs for the destination's MAC address. If the destination is remote, the host ARPs for the default gateway's MAC address and sends the frame there.

That means subnet math is not abstract: it directly predicts ARP behavior and the first-hop forwarding decision.
Wrong-mask impact

A wrong subnet mask changes the network address—and therefore the forwarding decision

Suppose the intended configuration is 10.10.10.50/24 but the host is mistakenly configured as /16. For destination 10.10.20.8, /24 produces network 10.10.10.0 for the host and 10.10.20.0 for the destination, so the destination is remote. Under /16, both addresses fall under 10.10.0.0/16, so the host incorrectly treats the destination as local.

Correct /24: different networks → gateway Wrong /16: same network → ARP directly Symptom: selective failure even though gateway may be healthy
Route-table connection

The interface prefix creates a connected route for the calculated network

When an interface is configured as 192.168.14.150/26, the host or router normally installs an on-link/connected route for 192.168.14.128/26. This route can outrank a default route for matching destinations.

Interface: 192.168.14.150/26 Connected route: 192.168.14.128/26 on-link Default: 0.0.0.0/0 via 192.168.14.129 Destination: 192.168.14.170 Selected: connected /26 route
Validation rule 1

The network address must be the first address in the block

For /27, every network address in the interesting octet must be a multiple of 32: 0, 32, 64, 96, 128, 160, 192, or 224. An answer such as .70 cannot be the network address of a /27 because it is not a legal block boundary.

Validation rule 2

The original IP must fall inside the network's address block

If you calculate 192.168.5.192/28, that block runs from .192 through .207. Host .201 is inside it, so the answer is plausible. If your calculated network produced a block that did not contain the original host, the math is wrong.

Validation rule 3

All host bits must be zero in the network address

This is the binary check that never changes. If any host-bit position remains 1, the result is not the network address. This rule is especially useful when working with prefixes outside the memorized /24–/30 range.

★ Addressing Practice • Find the Network Address From an IP and Mask

A five-minute warm-up for Find the Network Address From an IP and Mask

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
Best practice: use block-size math for speed and binary logic for proof.
Common error 1

Do not round the host up to the next subnet boundary

The network is the beginning of the block containing the host, so you always choose the largest legal subnet boundary that is less than or equal to the host value.

Host: 77/27 Boundaries: 64, 96 Correct: 64 Wrong: 96
Common error 2

Do not assume every network address ends in .0

That is true for many /24 networks, but not for /25 through /30. A /26 network can start at .0, .64, .128, or .192. A /28 can start every 16 addresses.

Common error 3

Do not assume subnetting always happens in the fourth octet

Prefixes such as /20 and /22 move the partial mask into the third octet. The final octet then becomes entirely host space and becomes 0 in the network address.

Addressing & Subnetting Lab • 120 Missions

Let students try Find the Network Address From an IP and Mask 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 Find the Network Address From an IP and Mask.

AP Networking Browser Troubleshooting Simulator
$29.99
120 Missions • 60 Failure Patterns • Offline Copy
GET THE SIMULATOR → See all 120 missions & features
172.16.45.200/20 Interesting octet: third Network: 172.16.32.0 Not: 172.16.45.0
Practice set 1

Find the network address before opening the answer

10.0.4.77/27

Block size 32. 77 lies in 64–95. Network: 10.0.4.64/27.

192.168.5.201/28

Block size 16. 201 lies in 192–207. Network: 192.168.5.192/28.

172.20.115.8/22

Third-octet block size 4. 115 lies in 112–115. Network: 172.20.112.0/22.

Practice set 2

Mixed-prefix challenge

192.168.50.190/26

Block size 64. 190 lies in 128–191. Network: 192.168.50.128/26.

10.50.73.9/21

/21 mask = 255.255.248.0. Third-octet block size 8. 73 lies in 72–79. Network: 10.50.72.0/21.

172.31.199.254/23

/23 mask = 255.255.254.0. Third-octet block size 2. 199 lies in 198–199. Network: 172.31.198.0/23.

Addressing Exam Practice • Find Network Address From IP And Mask

Check whether Find the Network Address From an IP and Mask 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
Calculator discipline

Use a subnet calculator to verify reasoning, not replace it

A calculator is valuable after you have predicted the network manually. Compare the calculator's network, broadcast, mask, and host range with your work. If they differ, diagnose the step that failed: prefix conversion, block size, boundary selection, or earlier-octet handling.

Study method: calculate → predict → verify → explain the mismatch if any.
Capstone example

Find the network, then predict the forwarding behavior

Host: 172.22.118.9/22 Mask: 255.255.252.0 Third-octet block size: 4 118 lies in: 116 - 119 Network: 172.22.116.0/22 Destination: 172.22.120.10/22 Destination network: 172.22.120.0/22 Decision: different networks → use default gateway

This is the complete skill: calculate the network address, validate it, then use it to explain what the host should do with a destination.

Worked /25

Example: 192.168.77.190/25

A /25 mask is 255.255.255.128, which divides the final octet into two 128-address blocks: 0–127 and 128–255. Since 190 lies in the second block, the network address is 192.168.77.128/25.

Premium Evidence-Grading Copilot

Spend less time marking explanations about Find the Network Address From an IP and Mask

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
IP: 192.168.77.190/25 Block size: 128 Boundaries: 0, 128 Network: 192.168.77.128/25

This example is useful because /25 is the first prefix after /24 where the network address may no longer end in .0.

Worked /29

Example: 10.44.8.246/29

A /29 uses mask 255.255.255.248 and an 8-address block size. Nearby boundaries are 232, 240, 248, and 256. Address 246 belongs to 240–247, so the network is 10.44.8.240/29.

IP: 10.44.8.246/29 Block: 240 - 247 Network: 10.44.8.240/29 Next network: 10.44.8.248/29

Small prefixes are especially good for practicing boundary accuracy because one mistaken block changes the answer quickly.

NEW • COMPLETE 180-DAY TEACHER CURRICULUM

Teach Find the Network Address From an IP and Mask 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
Mask-first diagnostic

When the dotted-decimal mask is given, convert the partial octet into a block before doing anything else

Suppose the prompt gives 255.255.248.0 instead of /21. The third octet is the interesting octet. Subtract 248 from 256 to get an 8-value block size. Then use third-octet boundaries 0, 8, 16, 24, and so on. This keeps dotted-decimal questions from feeling like a different skill than CIDR questions—they are the same calculation expressed in another notation.

Translation habit: mask → partial octet → block size → current boundary → network address.
Network address vs broadcast address

Do not confuse the first address of the block with the last address of the block

The network address is the beginning of the subnet. The broadcast address is the final address in a conventional IPv4 subnet. Once you know one boundary and the block size, you can derive the other—but they serve different purposes.

192.168.14.150/26 Network: 192.168.14.128 Block size: 64 Next network: 192.168.14.192 Broadcast: 192.168.14.191

If a question asks only for the network address, stop at the first boundary. The broadcast calculation is useful as a validation step, not a replacement answer.

Exam-speed routine

Use a four-line scratch process under time pressure

1. Prefix/mask 2. Block size 3. Legal boundaries 4. Largest boundary ≤ host

For 10.50.73.9/21, write: /21 → mask 255.255.248.0 → block 8 → boundaries 64, 72, 80 → network 10.50.72.0. This routine is short enough to use quickly but still leaves an auditable trail if you need to check your work.

Free digital flashcards

24 Network Address digital flashcards

Practice bitwise AND, CIDR block sizes, /24–/30 boundaries, earlier-octet subnetting, validation, local-vs.-remote behavior, wrong-mask effects, and route implications.

All network-address cards
Click or press Enter/Space to reveal.
Always connect the network address to the subnet boundary and forwarding meaning.
0 seen•24 cards