Addresses, subnets, and the default gateway
Your laptop almost certainly has an address starting 192.168.1. — and so does a laptop
in every other house on your street. That is not a collision. It is the design.
An IP address alone is not enough to send anything. A host also needs to know which addresses are its neighbours, reachable directly across the local link, and which are somewhere else entirely. That is what a
subnet mask encodes, and it drives the only routing decision a host ever makes.
The one decision a host makes
Before sending, a host masks the destination address and compares it with its own network:
my address 192.168.1.24 /24 -> network 192.168.1.0destination A 192.168.1.31 -> network 192.168.1.0 same: send directdestination B 93.184.216.34 -> network 93.184.216.0 different: send to gatewaySame network, and the packet goes straight out of the link with the neighbour's hardware address on the front. Different network, and it goes to the
default gateway — still addressed to the far-off destination at the IP layer, but handed to the router at the link layer. One test, two outcomes, and no host anywhere needs to know more than that.
Private addresses, and why they repeat
Three ranges are set aside by RFC 1918 for use inside networks and nowhere else:
10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. No router on the public Internet
will carry them, which is precisely what makes them safe to reuse in every building on
Earth.
That is also why a household of a dozen devices appears from outside as one address: the router rewrites the sender as packets leave, a mechanism called NAT. Nothing configures any of this by hand — a machine joining the network asks, and
DHCP hands it an address, a mask, a gateway and a resolver in one exchange.
Scale the same rules up and you get an office: one physical switch, several separate networks, and a firewall standing at the boundary between them.
Key takeaways
- An address on its own is not routable information. An address plus a prefix length is.
- Every host makes exactly one decision: masked destination equals my network, or not. Same means direct, different means the default gateway.
- The IP destination never changes across that decision — only the link-layer address on the front of the frame does.
- RFC 1918 ranges are unique only inside one network, which is what lets every home reuse them and what breaks when two such networks are joined.
- DHCP is what supplies the address, the mask, the gateway and the resolver, which is why an unfamiliar network needs no configuration.