4.3.9 · D5Computer Networks
Question bank — Subnetting — subnet mask, network - host bits, VLSM
True or false — justify
A subnet mask can legally be 255.255.0.255.
False — mask 1-bits must be contiguous on the left; that octet pattern
11111111.11111111.00000000.11111111 has a gap, so the bitwise AND would not cleanly "keep left, zero right." See Bitwise AND OR.Every subnet wastes exactly 2 addresses.
True — the all-0 host pattern is the network address and the all-1 host pattern is the broadcast, so patterns always give usable.
A /31 subnet has usable hosts, so it is useless.
Mostly true by the classic formula, but RFC 3021 allows
/31 for point-to-point links (no broadcast needed there); by the standard exam formula it gives 0, which is why point-to-point links usually use /30.Increasing the prefix from /24 to /26 gives you more usable hosts.
False — a bigger prefix means fewer host bits ( shrinks), so hosts drop from to ; you gained subnets, not hosts.
Two different subnets of the same parent block can share a broadcast address.
False — each subnet's broadcast is its own last address (next boundary − 1); distinct non-overlapping blocks have distinct boundaries and therefore distinct broadcasts.
The subnet mask 255.255.255.255 describes a single host.
True — that is
/32: , so pattern and (by convention) exactly one address, used for host routes in Routing Tables and Longest Prefix Match.0.0.0.0/0 is a valid mask meaning "match everything."
True — network bits match no fixed prefix, so every address matches; this is the default route in a routing table.
Adding subnet bits and adding host bits are independent choices.
False — always, so it is a zero-sum trade: every bit you give to the network is taken from the host part.
Spot the error
"Mask 255.255.255.192 means the subnet holds 192 hosts."
Error: 192 is the mask octet value, not a host count; usable hosts , and the mask's own last-octet ones are .
"For /26, block size is ."
Error: block size uses the mask octet value (192), not the prefix number 26; block size .
"192.168.10.130/26 is on subnet 192.168.10.130."
Error: the subnet address is found by AND-ing with the mask (or: which 64-block holds 130); so the subnet is
192.168.10.128, not the host's own address."Broadcast of 192.168.10.128/26 is 192.168.10.192."
Error: broadcast is the next boundary minus 1; the next boundary is 192, so broadcast is
.191 — 192 already belongs to the next subnet."VLSM: place the tiny /30 link first to use up small scraps, then the big LANs."
Error: smallest-first can leave leftover space mis-aligned, so a later
/25 won't fit its size boundary; the rule is allocate largest subnets first."Usable hosts for /25 is ."
Error: forgot the reserved pair; it is usable.
"A subnet's number of hosts equals the number of subnets."
Error: these are opposite quantities — (roughly) gives hosts while borrowing bits gives subnets; they trade against each other, not equal each other.
"The network address can be assigned to a router interface."
Error: the all-0 host pattern names the subnet itself and is never assignable; the router uses a real host address like
.1 or the last usable one.Why questions
Why must the 1-bits in a subnet mask be contiguous?
Because the router extracts the network by a bitwise AND; only a left-packed run of 1s cleanly keeps the network part and zeroes the host part — a gap would zero bits in the middle and corrupt the prefix.
Why do we subtract exactly 2, never 1 or 3?
Precisely two host-bit patterns are structurally reserved — all-0 (network) and all-1 (broadcast) — and no others; every remaining pattern is a legal host.
Why does VLSM save addresses that fixed-size subnetting cannot?
Fixed subnetting forces one size for all, so it over-provisions small groups; VLSM matches each subnet's prefix to its actual host need (a 2-host link gets
/30, a 100-host LAN gets /25).Why do routers prefer many small right-sized subnets over one flat network?
Subnets summarise into fewer routing-table entries and create broadcast/security boundaries; routers store networks, not individual hosts, per Routing Tables and Longest Prefix Match.
Why is 256 − mask octet the block size?
The block size is the increment between consecutive subnet boundaries in the varying octet, which equals , and that is exactly minus the mask's octet value.
Why does a host use the mask (not just the IP) to decide local vs remote delivery?
The host ANDs its own IP and the destination IP with the mask; equal results mean same subnet (deliver directly via ARP), unequal means send to the default gateway.
Why is largest-first the safe VLSM order?
Big blocks must start on addresses that are multiples of their own size; allocating them first guarantees an aligned start, and the smaller blocks then fit neatly into the remaining aligned space.
Edge cases
What are the usable hosts and reserved addresses of a /30?
usable; the block of 4 addresses reserves the first (network) and last (broadcast), leaving exactly 2 for the two link endpoints.
What happens to the "usable hosts" formula at /32?
, which is meaningless —
/32 is a single-address host route by convention, an edge case the formula simply doesn't cover.Is 192.168.1.63/26 a valid host address?
No — with
/26 block size 64, the block .0–.63 has broadcast .63, so it is reserved, not assignable.Can a /24 be split into subnets of unequal size totalling exactly 256 addresses?
Yes via VLSM — e.g. a
/25 (128) + /26 (64) + /27 (32) + /27 (32) exactly fills the 256 addresses with no overlap or waste.What is the block size and host count of a /24 (a full "Class C")?
Block size 256 in the last octet, usable hosts — the boundary case where the entire fourth octet is host bits.
If you borrow all 8 bits of one octet from a /16, how many subnets and hosts?
Borrowing gives subnets, and the remaining host bits give hosts each — this is exactly turning a
/16 into 256 /24s.Does 0.0.0.0 as a subnet address ever appear?
Yes — it is the network address of the
0.0.0.0/0 default route and also the "this network" placeholder; it is a legitimate all-0 network address, not a host.Connections
- IPv4 Addressing — the 32-bit canvas every trap here sits on
- Bitwise AND OR — why contiguous masks and AND-extraction behave as claimed
- Network and Broadcast Addresses — the reserved pair behind every ""
- CIDR and Supernetting — same prefix math run in reverse (merging)
- Routing Tables and Longest Prefix Match — why right-sized subnets matter
- Default Gateway and ARP — the mask-based local/remote decision