SubnetLayerProtocols

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.

Address192.168.5.13011000000101010000000010110000010
Mask255.255.255.12811111111111111111111111110000000
Network192.168.5.12811000000101010000000010110000000

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.

Network
192.168.5.128/25
Broadcast
192.168.5.255
Addresses
128
Usable
126

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