Meaning and assumptions
An IPv4 prefix /p fixes the first p bits as the network portion. The remaining32−p bits determine address-block size. Network and conventional broadcast addresses follow from the mask; usable interface-address count additionally depends on network type.[1]
IPv4 has32 bits and prefix length0…32. The conventional minus-two rule applies to ordinary broadcast subnets with at least two host bits; /31 point-to-point links and /32 host routes are separate cases. Reserved ranges do not become generally available Internet addresses.[1]
Why the approach works
Each free host bit has two settings, so a block contains2ʰ addresses. In an ordinary broadcast subnet, the all-zero host pattern identifies the network and the all-one pattern identifies broadcast. For appropriate prefixes this leaves2ʰ−2 interface addresses. An RFC3021 /31 point-to-point link instead has two endpoints without the usual broadcast function, allowing both addresses to be used. A /32 identifies one address. Masking operates on bits, not by simply truncating decimal digits.[1]
Two complete worked examples
Locate a /26 address
- Given
- Given10.20.30.77/26 in an ordinary broadcast subnet.
- Find
- Result
Determine block size.
In the final octet,77 lies in block64…127.
Result: Result: network10.20.30.64, broadcast10.20.30.127; conventional host addresses.65….126,62 in total.
Check: The mask is255.255.255.192;77 AND192=64 and127−64+1=64 addresses.
The /31 special case
- Given
- A compatible point-to-point link uses192.0.2.10/31.
- Find
- Result
One remaining bit gives two addresses.
Apply RFC3021 semantics rather than the conventional minus-two rule.
Result: Result: the endpoints may use192.0.2.10 and192.0.2.11.
Check: The count is2 rather than0; the explicitly specified point-to-point context is essential.
Recall the method later with the formula’s flashcards.
10 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Five exercises with solutions
Calculate · Application
How many addresses are in a /28 block?
Show hint
State the approach and assumptions before substituting.
Learning goal: How many addresses are in a /28 block?
Show solution and calculation
h=4;24=16 addresses.
Calculate · Application
How many conventional host addresses does an ordinary /29 broadcast subnet offer?
Show hint
State the approach and assumptions before substituting.
Learning goal: How many conventional host addresses does an ordinary /29 broadcast subnet offer?
Show solution and calculation
23−2=6 host addresses.
Interpret · Application
What does /32 mean?
Show hint
State the approach and assumptions before substituting.
Learning goal: What does /32 mean?
Show solution and calculation
All bits are fixed; the block contains exactly one address, for example for a host route.
Error analysis · Application
Why is “2ʰ−2 for every prefix” wrong?
Show hint
State the approach and assumptions before substituting.
Learning goal: Why is “2ʰ−2 for every prefix” wrong?
Show solution and calculation
An RFC3021 /31 may use both point-to-point endpoints; /32 identifies one address.
The conventional broadcast deduction is not universal.
Transfer · Challenge
Which ordinary prefix provides at least30 conventional host addresses in the smallest block?
Show hint
State the approach and assumptions before substituting.
Learning goal: Which ordinary prefix provides at least30 conventional host addresses in the smallest block?
Show solution and calculation
25−2=30, so5 host bits and /27.
A /28 provides only14.
Check your understanding with the formula’s reference test.
7 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Related next steps
Related foundations: Two’s-complement signed integer, Exponent laws and root rules.
Sources for this explanation
Quanta · Updated November 6, 2026
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Locally authored DE/EN article with two original examples, five exercises, model limits and a native diagram.
Cite this reference page
Quanta. IPv4 subnetting: prefix, network and host addresses. Updated November 6, 2026. https://quanta-study.de/en/formula-sheet/ipv4-subnetting
When citing a specific scientific statement, also cite the specialist source linked to that statement.