Week 7 · Lesson 2

Hosts per Subnet

The most common subnetting question is the simplest arithmetic one: given a prefix, how many hosts does this subnet hold? This lesson teaches one method and drills it until it is automatic.

CCNA 200-301 Domain 1.7 IPv4 Addressing Verified 2026-10-11
Part 1

The one method to learn first

Before any tricks, before any tables, the exam expects you to be able to derive the answer from first principles. Here is the method you should use until it is reflex.

Definition — the host-count method. Step 1. Host bits h = 32 − prefix. Step 2. Total addresses = 2h. Step 3. Usable hosts = 2h − 2.

Every question about “how many hosts fit here” is those three steps. The prefix is given; subtraction gives the host bits; a power of 2 gives the address count; subtract 2 for the network and broadcast addresses. If you memorise nothing else, memorise this.

Calculation trick. You never need to compute 32 − prefix for the common masks if you remember the host-bit ladder: /24→8, /25→7, /26→6, /27→5, /28→4, /29→3, /30→2. Each step up the prefix removes exactly one host bit, which halves the address count. That halving is why the numbers go 256, 128, 64, 32, 16, 8, 4.
Host-count calculator · pick a prefix
/24

Step 1 · Host bits

Step 2 · Total addresses

Step 3 · Usable hosts

Part 2

Worked drills from /24 to /30

Below, each drill uses the same three steps against a real network so you can watch the arithmetic change while the method stays fixed.

/24 — 254 hosts
Network 192.168.10.0/24
  h = 32 − 24 = 8 host bits
  Addresses = 2^8 = 256
  Usable     = 256 − 2 = 254
  Network .0 | first .1 | last .254 | broadcast .255
  Count check: 254 − 1 + 1 = 254   OK

/25 — 126 hosts
Network 192.168.10.0/25
  h = 32 − 25 = 7 host bits
  Addresses = 2^7 = 128
  Usable     = 128 − 2 = 126
  Network .0 | first .1 | last .126 | broadcast .127
  Count check: 126 − 1 + 1 = 126   OK

/26 — 62 hosts
Network 192.168.10.0/26
  h = 32 − 26 = 6 host bits
  Addresses = 2^6 = 64
  Usable     = 64 − 2 = 62
  Network .0 | first .1 | last .62 | broadcast .63
  Count check: 62 − 1 + 1 = 62   OK

/27 — 30 hosts
Network 192.168.10.0/27
  h = 32 − 27 = 5 host bits
  Addresses = 2^5 = 32
  Usable     = 32 − 2 = 30
  Network .0 | first .1 | last .30 | broadcast .31
  Count check: 30 − 1 + 1 = 30   OK

/28 — 14 hosts
Network 192.168.10.0/28
  h = 32 − 28 = 4 host bits
  Addresses = 2^4 = 16
  Usable     = 16 − 2 = 14
  Network .0 | first .1 | last .14 | broadcast .15
  Count check: 14 − 1 + 1 = 14   OK

/29 — 6 hosts
Network 192.168.10.0/29
  h = 32 − 29 = 3 host bits
  Addresses = 2^3 = 8
  Usable     = 8 − 2 = 6
  Network .0 | first .1 | last .6 | broadcast .7
  Count check: 6 − 1 + 1 = 6   OK

/30 — 2 hosts
Network 192.168.10.0/30
  h = 32 − 30 = 2 host bits
  Addresses = 2^2 = 4
  Usable     = 4 − 2 = 2
  Network .0 | first .1 | last .2 | broadcast .3
  Count check: 2 − 1 + 1 = 2   OK
Exam tip. Watch the wording. “How many addresses in a /28?” is 16. “How many usable hosts in a /28?” is 14. The trap answer is always the one you get if you forget the − 2. Re-read the question before you commit.
Seeing the shrink · select a prefix
Total addresses per subnet (each extra prefix bit halves the block) /24256 addresses · 254 usable /25128 · 126 /2664 · 62 /2732 · 30 /2816 · 14 /298 · 6 /304 · 2 (point-to-point) Each step right by one prefix bit halves the subnet.

Part 3

The full lookup table

This table is worth committing to memory. It is the single most reused set of numbers in the CCNA.

Notice the pattern: as the prefix increases by one, the total address count halves and the usable count is always two less than that total. There is no prefix between /24 and /30 whose usable count is not in this table — so for any host-count question inside a /24, the answer is one of 254, 126, 62, 30, 14, 6, 2.

The /24–/30 ladder · select a row
PrefixMask (last octet)Host bits hTotal addresses 2hUsable hosts 2h−2
/24.0 (255.255.255.0)8256254
/25.1287128126
/26.19266462
/27.22453230
/28.24041614
/29.248386
/30.252242

Part 4

Why /30 for router links

A link between two routers has exactly two devices that need addresses — one at each end. The smallest subnet that still follows the network/broadcast convention and yields two usable addresses is a /30: 22 − 2 = 2. That is a perfect fit, so /30 became the traditional point-to-point mask.

Point-to-point link 10.0.0.0/30
  h = 32 − 30 = 2 host bits
  Addresses = 2^2 = 4
  Usable     = 2

  Network 10.0.0.0   (reserved)
  Router A 10.0.0.1  (usable - often the .1 end)
  Router B 10.0.0.2  (usable - often the .2 end)
  Broadcast 10.0.0.3 (reserved)

  Check: 2 usable = Router A + Router B   OK

You will see /30 links in routing labs, on serial interfaces, and in OSPF or EIGRP neighbour statements for the rest of the course. It is wasteful by exactly nothing for a two-device link: a /29 would give six using two and wasting four, which is why /30 is the disciplined choice.

Point-to-point link · /30 or /31?

Part 5

The special cases: /31 and /32

Two prefixes break the “minus 2” rule. The exam treats them as special and you must label them as such.

Watch out. If a question asks for the number of usable hosts in a /31, do not blindly answer 0. Read the context: on a point-to-point link under RFC 3021 the answer is 2. When in doubt, state that /31 is a point-to-point special case with no network/broadcast reservation.
Part 6

Key terms & sources

Host bits

The bits not covered by the prefix: 32 − prefix.

Usable hosts

2h − 2, after removing the network and broadcast addresses.

Point-to-point link

A link with exactly two devices, one at each end (usually a /30 or /31).

/30

The classic router-to-router mask: 4 addresses, 2 usable.

/31

RFC 3021 point-to-point special case: 2 addresses, both usable.

/32

A single address (host route or loopback), 0 host bits.

  1. Pummill, R. & Manning, B. RFC 1878: Variable Length Subnet Table For IPv4 (1995) (usable-host table for every mask). rfc-editor.org/rfc/rfc1878.
  2. Rekhter, Y. et al. RFC 3021: Using 31-Bit Prefixes on IPv4 Point-to-Point Links (2000). rfc-editor.org/rfc/rfc3021.
  3. Fuller, V. & Li, T. RFC 4632: Classless Inter-Domain Routing (CIDR) (2006). rfc-editor.org/rfc/rfc4632.
  4. Cisco. CCNA (200-301) Exam Topics, IPv4 Addressing and Subnetting. cisco.com.
Part 7 · Your turn

Review

Check what you have learned with these review questions.

Review · 6 questions

Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.