Think of a network as a building full of rooms, doors, and hallways. You move information the same way you’d move letters and packages between apartments.

License: CC BY-NC-ND 4.0


Preface: Why We Need Analogies

This series is dedicated to the version of me back in university who struggled, spending way too long staring at a whiteboard while a professor drew endless clouds and cylinders, completely failing to understand subnetting.

Subnet math can feel incredibly frustrating when you are first learning it. It’s all /24s and 255.255.255.0s, and it can feel like nobody tells you what it actually means in the real world. I desperately needed to know how a physical network packet moved through a switch, not just what layer of the OSI model it belonged to. I needed a map, not a textbook definition.

That is why we’re using analogies. I get that analogies have their limits, but honestly, I find this approach more fun. They give you something tangible to hold onto when you’re sweating bullets trying to fix a broken network at 3 AM. This isn’t a full map, but rather a starting point. We are prioritizing intuition over trivia.

Prologue: The Time I Broke Everything

My realization that I actually didn’t understand networking came in 2014, staring at a frozen terminal.

A customer’s database cluster had vanished. Gone. The lead engineer leaned over my shoulder, smelling vaguely of stale coffee and panic, and muttered something about an old ASA firewall dropping its ARP cache and the gateway being unreachable.

I blindly ran ping 10.50.2.1. Destination Host Unreachable. I ran traceroute 10.50.2.100. Timeout.

I knew the CLI commands. I could recite the definition of “ARP cache” if you put a gun to my head. But I couldn’t picture where the packet was actually going. A junior dev had hardcoded an IP on the old switch stack, causing an IP conflict that completely scrambled the ARP tables, and I was utterly useless to fix it because I had no intuition for how the pieces physically connected.

Networking isn’t just typing ifconfig and hoping for the best. It’s built from repeatable, physical patterns. Once you visualize how those patterns connect, the terminal output stops looking like the Matrix.


Part One: Buildings as Networks

Chapter 1: The Room, The Door, and the Placard

Think of moving into an apartment. The building super meets you at the entrance, hands you a key, and walks you to your unit. Let’s call it room 10-101 (floor ten, room one hundred and one).

In our model, this building represents your local network. Your laptop or phone is an apartment. In networking terms, any device that sends or receives data is a host. And every host needs a room.

Your network interface is your door. An Ethernet port is a door. A Wi-Fi card is a door. Massive servers usually have multiple doors connecting to different parts of the network.

Every door has two critical labels that dictate how mail gets delivered.

The first label is literally stamped into the metal of the doorknob at the factory. This is your MAC address (Media Access Control). It’s typically a 48-bit identifier (like AA:BB:CC:11:22:33) used for local, floor-level deliveries inside a single Layer-2 network. It’s meant to be unique, but it can be spoofed, virtualized, or randomized (especially on Wi-Fi), so don’t treat it as a sacred, unchangeable ID. If your neighbor wants to slide a note under your door, they look for that label to verify they have the right place.

The second label is the cheap plastic placard screwed into the wall next to the door. This is your IP address (like 192.168.1.101). Unlike the MAC label, this placard is temporary and situational. It tells the delivery drivers exactly where you fit into the building’s current floor plan. If you take your laptop to a coffee shop, you’ll usually get a brand-new IP placard that fits their building.

When two devices on the same floor need to talk, they just figure out each other’s MAC addresses and send the data directly. It’s fast, and it never leaves the building. But to understand how that actually happens, we need to talk about the hallways.


Chapter 2: The Hallways Between Rooms

Not all hallways are built the same. The physical medium connecting your door to the rest of the floor dictates how fast you can shove data down it.

In most offices, you’re dealing with copper Ethernet cables (Cat5e or Cat6). Think of an Ethernet cable as a private pneumatic tube running directly from your door to a central mailroom on your floor. It’s a dedicated, point-to-point link. Copper is cheap and works great, but run it past 100 meters, and the electrical signal degrades heavily.

If you need to connect different floors, buildings, or cross an entire ocean, you use fiber optics. Instead of copper wire, you have thin strands of glass shooting laser pulses. Fiber is incredibly fast and goes for kilometers without dropping the signal, but it’s fragile and expensive.

Then there’s Wi-Fi. If Ethernet is a private tube, Wi-Fi is an open-plan shared lobby. Your device uses radio waves to scream at an access point bolted to the ceiling. Because it’s open air, the medium is completely shared. Everyone is shouting over each other in the exact same airspace. If the network is crowded or someone fires up a poorly shielded microwave, your connection tanks.

Measuring the Hallway

We measure these connections with two metrics: bandwidth and latency.

Bandwidth is how wide the tube is. It dictates how much data you can jam through it at the exact same moment. A 10 Gbps fiber link is a massive ten-lane highway compared to a narrow 100 Mbps dirt road.

Latency is how long the tube is. It measures how long it takes for a single piece of data to travel from point A to point B. A latency of 10 milliseconds means a packet gets there almost instantly. You can have a tube that is incredibly wide (high bandwidth) but incredibly long (high latency): once you start streaming, you can move a ton per second, but the first drop still takes a while to reach the other end.


Chapter 3: Floors as Subnets

Imagine if an apartment building had no floors. Just one endless, sprawling warehouse containing thousands of apartments. Finding one specific unit would be a nightmare, and if the building super shouted an announcement over a megaphone, thousands of people would have to stop what they were doing and listen.

Architects build floors to group a sane number of rooms together. Networks do this with subnets.

A subnet is just a floor in the building. It logically groups together a chunk of IP addresses that share the same network prefix. Devices in the same subnet can talk directly to one another. If a device wants to talk to a different subnet, it can’t just shout down the hall; it has to take the elevator.

We break networks into subnets mostly to shut up broadcast traffic. Devices are constantly yelling broadcast messages to everyone on the local segment (“Hey! Who has this IP address?!”). On a floor with thirty devices, fine. On a flat network with five thousand devices, the background noise would bring the whole thing to a grinding halt.

Subnets also give you security and organization. You can isolate your backend databases on floor 10, and throw the untrusted guest Wi-Fi on floor 2.

Finding the Elevator

To keep this organized, we use a subnet mask. If your IP address is your apartment number, the subnet mask is the blueprint that tells your laptop exactly where the floor ends.

A subnet mask like 255.255.255.0 (or /24) means that if your IP is 192.168.10.101, the first three numbers (192.168.10) represent your floor, giving you about 254 usable apartment numbers before you hit a wall.

When you try to talk to someone, your computer checks their IP address against that mask. If they aren’t on your floor, your computer knows it has to hand the packet off to the default gateway.

The default gateway is the elevator lobby. It’s your only way off the floor. Same floor? Deliver it locally. Different floor? Shove it in the elevator and trust the building to route it.


Chapter 4: Sliding the Envelope

You are in room 10-101 and you need to send a file to your coworker in room 10-115.

Your computer checks the subnet mask. Oh hey, 192.168.10.115 is on the same floor. Local delivery.

To physically send the data, your computer needs their MAC address. So, your computer sends a broadcast message yelling to the entire floor: “Who has IP address 192.168.10.115? What is your MAC address?”

This yelling is an ARP request (Address Resolution Protocol). Everyone on the floor hears it and ignores it, except your coworker in 10-115, who yells back: “That’s me! My MAC address is AA:BB:CC:DD:EE:FF.” Your computer hastily writes this down in its ARP table so it doesn’t have to yell next time.

Now, your computer packages the file into data frames, stamps the destination MAC address on the outside, and shoves it down its private Ethernet tube.

At the other end of all these tubes is a central mailroom on your floor: the Switch. The switch looks at the MAC address on your envelope. Here’s the brilliant part—the switch doesn’t inherently know where anything is. It learns. Every time an envelope comes from a room, the switch peeks at the return address and jots it down in its internal directory (“Ah, MAC address AA:BB… is connected to port 4”).

By the time you send your file, the switch checks its directory, finds the exact tube leading to your coworker, and shoots the frame down that exact path. No one else on the floor ever sees it.

If you want to send a file to floor twenty, it starts the same way. Your computer realizes the destination is on a different floor. It doesn’t bother yelling for their MAC address; it needs the MAC address of the elevator (the default gateway). Once it gets the elevator’s MAC address via ARP, it stamps that on the frame and sends it to the switch.

The switch guides the frame to the elevator lobby, and you stop caring. The building’s internal routing takes over.