Addresses and Subnets
Every other idea in this course can be seen in a packet. This one cannot: the split between the network and host portions of an address is not in the bytes anywhere. It lives in the mask, the mask is configuration rather than something transmitted, and the comparison it drives happens before a single byte is sent.
So this page shows the working. Move the prefix and watch the boundary move through the binary — the awkward cases are the ones worth trying, because a /25 or a /30 is exactly where reading the dotted decimal misleads.
| Address | 192.168.5.130 | 11000000 | 10101000 | 00000101 | 10000010 |
| Mask | 255.255.255.128 | 11111111 | 11111111 | 11111111 | 10000000 |
| Network | 192.168.5.128 | 11000000 | 10101000 | 00000101 | 10000000 |
The first 25 bits are the network and the remaining 7 are the host. Two addresses are on the same subnet when their network bits match — that comparison, and nothing else, is what decides whether a packet goes straight to its destination or to a router.
Different subnets. 192.168.5.10 masked with /25 gives 192.168.5.0, and 192.168.5.130 gives 192.168.5.128. The frame goes to a router instead, and ARP resolves the gateway rather than the destination.
Only the sender's own mask takes part in this decision. The destination's mask is unknown to it and irrelevant — which is why a wrong mask on one machine produces a failure in one direction only.
Where this decision shows up
- ARP-02 — the same comparison, deciding whether to ARP for the destination or for the gateway.
- IPv4-04 — the guided lesson this page accompanies, with the arithmetic done against a real capture.
- The wrong-mask capture — what a one-sided disagreement about the boundary actually looks like on the wire.
- BGP-05 — the same structure at internet scale, where four networks become one announcement.