AP Subject A 17: IPv4 Subnets, CIDR, and Routing Decisions
IPv4 masks and AND, subnet ranges, equal subnetting, CIDR aggregation, longest-prefix routing, and private address ranges for AP Subject A, with worked examples and five original questions.
AP Subject A · Installment 17 · An independent study resource for the 2026 exam and Syllabus Ver.7.2. It is not affiliated with IPA and does not guarantee a pass. Open the series hub
2026 exam basis · revised/source-checked 2026-10-21 · primary locale: Korean
Learning index
- Official scope and terms 2. Procedure 3. Address-range example 4. Equal subdivision 5. Aggregation and routing 6. Exceptions and address scope 7. Questions 8. Review
1. Official scope and terms
This lesson maps to IPA Ver.7.2, Major Category 3 > Middle Category 10 Network, specifically 1. Network Systems > (7) Internet Technology and 3. Communication Protocols > (1) Protocols and Interfaces > ③ Network-layer protocols, on PDF pages 47–49 / printed footer pages 43–45. It only connects AP1 binary arithmetic to AND rather than reteaching it. In the AP16 layer model, IP addressing and routing belong to the network layer.
| KO | JA | EN | Meaning |
|---|---|---|---|
| 접두 길이 | プレフィックス長 | prefix length | number of leading network bits |
| 서브넷 마스크 | サブネットマスク | subnet mask | network bits 1, host bits 0 |
| 네트워크 주소 | ネットワークアドレス | network address | ordinarily all host bits 0 |
| 지향성 브로드캐스트 | ディレクテッドブロードキャスト | directed broadcast | ordinarily all host bits 1 |
| 사용 가능 호스트 범위 | 利用可能ホスト範囲 | usable host range | ordinarily between network and broadcast |
| 경로 집약 | 経路集約 | route aggregation | represent consecutive prefixes exactly as one |
| 최장 접두 일치 | 最長プレフィックス一致 | longest-prefix match | choose matching route with longest prefix |
/26 means that the first 26 bits are the network part; its mask is 255.255.255.192. Bitwise AND of the address and mask produces the network address.
2. Compact procedure
- Convert
/pto a mask; host-bit count ish=32-p. - AND the IP and mask to obtain the network address.
- Set all host bits to 1 to obtain the broadcast address.
- In a conventional multi-access subnet, addresses between them are ordinarily usable and count
2^h-2. - For equal subdivision, borrow enough bits that
2^b ≥ required subnets; the new prefix isp+b. - For routing, choose the longest prefix among all matches—not the first row.
3. Address range: 192.168.10.77/26
- Mask:
255.255.255.192 - Last octet:
77 = 01001101;192 = 11000000 - AND:
01001101 AND 11000000 = 01000000(=64) - Network:
192.168.10.64 - Broadcast:
192.168.10.127 - Ordinary usable range:
192.168.10.65–192.168.10.126 - Ordinary usable hosts:
2^(32-26)-2 = 62
4. Equal subdivision: 10.20.30.0/24 into at least six
2^2=4 is insufficient and 2^3=8, so borrow 3 bits to make /27. Each block contains 32 addresses and ordinarily supports 30 hosts.
| No. | Network | Broadcast | Ordinary usable range | Total/ordinary |
|---|---|---|---|---|
| 1 | 10.20.30.0/27 | 10.20.30.31 | 10.20.30.1–10.20.30.30 | 32/30 |
| 2 | 10.20.30.32/27 | 10.20.30.63 | 10.20.30.33–10.20.30.62 | 32/30 |
| 3 | 10.20.30.64/27 | 10.20.30.95 | 10.20.30.65–10.20.30.94 | 32/30 |
| 4 | 10.20.30.96/27 | 10.20.30.127 | 10.20.30.97–10.20.30.126 | 32/30 |
| 5 | 10.20.30.128/27 | 10.20.30.159 | 10.20.30.129–10.20.30.158 | 32/30 |
| 6 | 10.20.30.160/27 | 10.20.30.191 | 10.20.30.161–10.20.30.190 | 32/30 |
| 7 | 10.20.30.192/27 | 10.20.30.223 | 10.20.30.193–10.20.30.222 | 32/30 |
| 8 | 10.20.30.224/27 | 10.20.30.255 | 10.20.30.225–10.20.30.254 | 32/30 |
5. Exact aggregation and longest-prefix match
10.0.8.0/24 and 10.0.9.0/24 are consecutive and aligned on a /23 boundary, so their exact aggregate is 10.0.8.0/23. In contrast, the smallest single-prefix cover of 10.0.8.0/24 and 10.0.10.0/24 is 10.0.8.0/22, but it also includes 10.0.9.0/24 and 10.0.11.0/24; it is therefore not an exact aggregation.
| Prefix | Route |
|---|---|
| 10.0.0.0/8 | A |
| 10.20.0.0/16 | B |
| 10.20.30.0/24 | C |
| 10.20.30.128/25 | D |
| 0.0.0.0/0 | E |
The results are 10.20.30.200 → D, 10.20.30.100 → C, 10.20.99.1 → B, 10.99.1.1 → A, and 8.8.8.8 → E. Selection uses the greatest number of matching prefix bits, not row order.
6. Exceptions, address scope, and exam traps
2^(32-p)-2 applies only to a conventional multi-access subnet that reserves one network and one directed-broadcast address. An RFC 3021 point-to-point /31 uses both addresses as endpoints. A /32 denotes one address or host route. Never apply the formula blindly to claim zero or minus one.
The private blocks are exactly 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Private addressing is not NAT: private describes address scope; NAT rewrites address/port mappings. “Not private” does not automatically mean globally routable because IANA also maintains special-purpose ranges. NAT itself is not a security guarantee.
/27has an increment of 32, not 27; use AND, not the decimal appearance, to decide membership.- Equal size alone is insufficient for exact aggregation; contiguity and boundary alignment matter.
/0is selected only when no more-specific route matches.
7. Five original questions
Q1
Which range is correct for 172.16.35.200/27? ア network .192, broadcast .255, usable .193–.254 イ network .200, broadcast .231, usable .201–.230 ウ network .192, broadcast .223, usable .193–.222 エ network .224, broadcast .255, usable .225–.254
Answer: ウ (3). ア incorrectly expands it like /26. イ treats a host as a network boundary. ウ is the correct 192–223 block. エ is the next /27 block.
Q2
What is the smallest equal subdivision of 192.168.50.0/24 into at least five subnets? ア /26, 4 subnets, 62 ordinary usable each イ /27, 8 subnets, 30 ordinary usable each ウ /28, 16 subnets, 32 ordinary usable each エ /29, 5 subnets, 6 ordinary usable each
Answer: イ (2). ア provides only four. イ borrows three bits: eight blocks, 32 total/30 ordinary usable each. ウ has 14 ordinary usable and is not minimal. エ produces 32 subnets, not five.
Q3
What is the exact aggregate of 10.4.8.0/24 and 10.4.9.0/24? ア 10.4.8.0/24 イ 10.4.8.0/22 ウ 10.4.9.0/23 エ 10.4.8.0/23
Answer: エ (4). ア omits the second network. イ includes two unnecessary /24s. ウ is not aligned because /23 starts on an even third-octet boundary. エ contains exactly the two consecutive /24s.
Q4
Using the routing table above, which route handles 10.20.30.140? ア /25 → D イ /24 → C ウ /16 → B エ /0 → E
Answer: ア (1). ア matches the /25 range .128–.255 and is longest. イ and ウ match but are less specific. エ is the least-specific default.
Q5
Which address-count statement is correct? ア /26 has 64 ordinary usable hosts; /31 has zero イ /26 has 62; /31 zero; /32 zero ウ /26 has 62 ordinary usable; RFC 3021 point-to-point /31 has two endpoints; /32 names one address エ /26 has 63 ordinary usable; /31 one endpoint; /32 two addresses
Answer: ウ (3). ア confuses total with ordinary usable addresses. イ ignores /31 and /32 semantics. ウ states both the conventional case and exceptions correctly. エ has all three counts wrong.
Answer key: [3, 2, 4, 1, 3] = [ウ, イ, エ, ア, ウ]
8. Quick sheet, self-check, and review
- Quick sheet:
network = IP AND mask; conventionalbroadcast = all host bits 1; block size2^(8-prefix bits in the relevant octet); route by longest match. - Self-check: Can you state the
/26mask and 64-step boundaries, reproduce all eight/27s, distinguish exact aggregate from mere cover, and explain/31,/32, private scope, and NAT? - Day 1: reproduce mask/AND/range steps from memory.
- Day 3: rewrite the
/27table and five routing results on blank paper. - Day 7: retake the questions and explain every distractor.
Official sources and notices
All are first-party official sources, checked 2026-10-21: IPA syllabus Ver.7.2, RFC 4632 CIDR, RFC 1812 longest match, RFC 3021 /31, RFC 1918 private addresses, RFC 3022 Traditional NAT, and the IANA IPv4 Special-Purpose Address Registry.
This independently created study aid is not affiliated with IPA, IETF, or IANA. It uses no past questions or third-party commentary and does not guarantee exam success.