CompTIA Network+ (N10-009) · Lesson 13
Subnetting with CIDR and VLSM
Convert between subnet masks and CIDR prefixes, work out a subnet's block size, network, broadcast and usable hosts, and plan different-sized subnets with VLSM.
Tip: turn your phone sideways or use full screen for larger labels.
Captions match the narration word for word. Press Space to play or pause and the arrow keys to change scenes.
Learning objective
Convert between subnet masks and CIDR prefixes, work out a subnet's block size, network, broadcast and usable hosts, and plan different-sized subnets with VLSM.
Exam mapping
Domain 1.0: Networking Concepts (23%). Objective 1.7 in the official N10-009 exam objectives.
Key takeaways
- A subnet mask's ones (always first) mark the network part; CIDR notation counts them, so 255.255.255.0 = /24 and 255.255.255.192 = /26.
- Block size = 256 minus the last non-255 mask octet; each extra prefix bit halves the block (/25 128, /26 64, /27 32, /28 16, /29 8, /30 4).
- Usable hosts = 2^(host bits) − 2, because the first address is the network ID and the last is the broadcast. /31 (RFC 3021) is the point-to-point exception; /32 is a single host.
- Borrowing n host bits creates 2^n subnets. To place a host, count in block sizes: the network is the block start, the broadcast is the next block minus one.
- VLSM gives each subnet its own prefix length sized to its needs; allocate the largest subnets first so blocks stay aligned and never overlap.
- CIDR is classless: prefixes of any length replace classes A/B/C, and adjacent blocks can be summarized into one route (four /24s = one /22).
Exam tips
How the exam asks about this
Questions describe a situation and expect you to recognize the concept behind it.
| If the question mentions… | Think |
|---|---|
| 255.255.255.224 | /27: 32 addresses, 30 hosts |
| Usable hosts in a /28 | 14 |
| Smallest subnet for 50 hosts | /26 (255.255.255.192, 62 hosts) |
| Subnet for a point-to-point link between two routers | /30 (or /31 per RFC 3021) |
| Different subnet sizes inside one address block | VLSM |
| One route advertised for several contiguous networks | CIDR summarization (supernet) |
Common traps
- Don't forget the minus two: a /27 has 32 addresses but only 30 usable hosts.
- The broadcast address is the last address of the block (next block start minus one), not .255, unless the block really ends there.
- Two hosts are in the same subnet only if they fall in the same block: 192.168.10.60/26 and 192.168.10.70/26 are in different subnets.
- With VLSM, assign the largest subnets first; starting small can leave a large subnet with no aligned block to fit in.
Practice
Exam-style questions
Answer each one before you open the explanation.
Question 1. A host is configured as 172.16.5.100/27. What is the network address of its subnet?
- 172.16.5.64
- 172.16.5.96
- 172.16.5.100
- 172.16.5.127
Show answer
B. 172.16.5.96. A /27 has a block size of 32 (256 − 224), so subnets start at .0, .32, .64, .96 and .128. 100 falls in the block that starts at .96. 172.16.5.64 is the previous block, .100 is the host itself, and .127 is the broadcast address of the .96 subnet.
Question 2. A new warehouse VLAN must support at least 50 hosts while wasting as few addresses as possible. Which subnet mask should the administrator use?
- 255.255.255.224
- 255.255.255.240
- 255.255.255.192
- 255.255.255.128
Show answer
C. 255.255.255.192. 255.255.255.192 is a /26: 64 addresses, 62 usable hosts, the smallest block that holds 50. A /27 (.224) has only 30 hosts and a /28 (.240) 14, so they're too small; a /25 (.128) works but wastes more than half its 126 hosts.
Question 3. An administrator divides 192.168.1.0/24 into subnets for departments of very different sizes. Which TWO statements about this design are correct? (Select TWO.)
- It is an example of VLSM, with a different prefix length per subnet
- Every subnet must use the same subnet mask
- Allocating the largest subnets first keeps blocks aligned and avoids overlaps
- It only works with classful routing
- Each subnet loses its broadcast address, so all addresses are usable
Show answer
A. It is an example of VLSM, with a different prefix length per subnet and C. Allocating the largest subnets first keeps blocks aligned and avoids overlaps. Different-sized subnets from one block is VLSM, and assigning the largest subnets first keeps each block on a boundary of its own size so none overlap. Requiring one mask is fixed-length subnetting, VLSM needs classless routing, and every normal subnet still reserves its network and broadcast addresses.
Question 4. How many usable host addresses does a /28 subnet provide?
- 16
- 30
- 12
- 14
Show answer
D. 14. A /28 leaves 4 host bits: 2^4 = 16 addresses, minus the network and broadcast addresses, gives 14. 16 forgets the minus two, and 30 is a /27.
Question 5. A router learns 10.1.0.0/24, 10.1.1.0/24, 10.1.2.0/24 and 10.1.3.0/24. Which single route most precisely summarizes all four?
- 10.1.0.0/22
- 10.1.0.0/23
- 10.1.0.0/24
- 10.1.0.0/21
Show answer
A. 10.1.0.0/22. Four contiguous /24 blocks starting on a multiple of four share their first 22 bits, so 10.1.0.0/22 covers exactly 10.1.0.0 to 10.1.3.255. A /23 covers only two of them, a /24 only one, and a /21 also covers 10.1.4.0 to 10.1.7.255, which this router didn't learn.
Transcript
Lesson transcript
The full narration, scene by scene. The captions file contains the same text with timings.
Scene 1 · 0:00
Lesson 13: Subnetting with CIDR and VLSM. Welcome to lesson thirteen, the second half of objective 1.7. This is the lesson where IPv4 turns into arithmetic, but only a little. We'll cover three ideas. Subnet masks and the CIDR prefix, like /24. Subnetting itself: block sizes, usable hosts, and finding which subnet a host belongs to. And VLSM, which lets one network hold subnets of different sizes, plus how CIDR summarizes routes.
Scene 2 · 0:28
Subnet mask and CIDR prefix. A subnet mask is another 32-bit number. Its ones mark the network part of an address and its zeros mark the host part, and the ones always come first. Our online store's office uses 192.168.10.0 with the mask 255.255.255.0: twenty-four ones, then eight zeros. CIDR notation, short for Classless Inter-Domain Routing, simply counts the ones, so the same network is written 192.168.10.0/24.
Scene 3 · 0:56
The /24 to /30 cheat sheet. Most exam questions live in the last octet, so learn this table. Every extra network bit halves the block: a /25 holds 128 addresses, a /26 holds 64, a /27 32, down to a /30 with just 4. The mask octets follow the same pattern: 128, 192, 224, 240, 248, 252. And here's the shortcut: the block size is 256 minus the last mask octet. 256 minus 192 gives 64.
Scene 4 · 1:26
Network, broadcast and hosts. Not every address in a block goes to a device. The first address is the network ID and the last is the broadcast address, so usable hosts are two to the power of the host bits, minus two. A /26 has six host bits: 64 addresses, 62 hosts. Two exceptions: RFC 3021 lets a /31 use both of its addresses on a point-to-point link, and a /32 is exactly one host.
Scene 5 · 1:57
Borrowing bits to make subnets. Subnetting means borrowing host bits and giving them to the network part. Say the store wants four separate subnets out of 192.168.10.0/24. Borrowing two bits gives two squared, four subnets, each a /26. They start at .0, .64, .128 and .192, and each keeps six host bits, so 62 hosts. The rule: subnets are two to the borrowed bits, and every extra bit halves the hosts.
Scene 6 · 2:26
Which subnet is a host in?. Now the classic question: which subnet is 192.168.10.77/26 in? Step one, the block size: 256 minus 192 is 64. Step two, count in sixty-fours: 0, 64, 128, 192. Step three, 77 falls in the block that starts at 64. So the network is .64, the broadcast is one less than the next block, .127, and usable hosts run from .65 to .126.
Scene 7 · 2:53
Why one mask size wastes addresses. Fixed-size subnets have a problem. The store's office has 100 devices, the warehouse 50, and the link to its internet router needs just 2. With a /26 everywhere, the office doesn't fit at all, and the router link wastes 60 of its 62 hosts. Real networks have subnets of very different sizes, so a single mask either runs short or throws addresses away.
Scene 8 · 3:21
VLSM: right-size every subnet. Variable Length Subnet Masking, or VLSM, fixes this by giving each subnet its own prefix. Start with the largest need. The office's 100 hosts get a /25, .0 to .127. The warehouse gets a /26 from .128, guest Wi-Fi a /27 from .192, the servers a /28 from .224, and the router link a /30 from .240. Everything fits in one /24, with room left for later.
Scene 9 · 3:50
CIDR aggregation: summarize routes. CIDR works in the other direction too. Classless means a prefix can be any length, not just /8, /16 or /24. So adjacent blocks can be combined. The store's four branch networks, 10.1.0.0 through 10.1.3.0, all /24, share their first 22 bits. One summary route, 10.1.0.0/22, covers all four. This is called supernetting or route summarization, and it keeps routing tables small.
Scene 10 · 4:17
How the exam asks about this. On the exam, convert quickly. 255.255.255.224 is a /27. A /28 has 14 usable hosts. For at least 50 hosts with the least waste, pick a /26. A point-to-point router link calls for a /30, or a /31. To find a network address, count in block sizes. Subnets of different sizes in one network mean VLSM, and combining routes into one is a CIDR summary.
Scene 11 · 4:45
Recap: subnetting. To recap: the mask's ones mark the network, and CIDR counts them. The block size is 256 minus the last mask octet, and usable hosts are two to the host bits, minus two. Borrowing bits makes more, smaller subnets. Count in block sizes to find a host's network and broadcast. VLSM sizes each subnet to its needs, and CIDR summarizes routes. Next: SDN, SD-WAN and VXLAN.
Sources and accuracy
Checked against the official CompTIA N10-009 exam objectives and the standards below on October 24, 2026. Diagrams and addresses in the animation are illustrative.
- CompTIA Network+ N10-009 exam objectives (objective 1.7)
- RFC 4632: Classless Inter-domain Routing (CIDR)
- RFC 1878: Variable Length Subnet Table for IPv4
- RFC 3021: Using 31-Bit Prefixes on IPv4 Point-to-Point Links
- RFC 950: Internet Standard Subnetting Procedure
This free course is independent and isn't affiliated with or endorsed by CompTIA. CompTIA and Network+ are trademarks of CompTIA, Inc.
Preparing a team for Network+?
I run hands-on networking and cloud training for teams, built around your own environment and goals.