Lesson 1 of 9
Computer Networks
"The network is the computer." — John Gage, Sun Microsystems
The device in your hand is powerful, but almost nothing you value about it lives inside it. The message, the video call, the certificate you just earned — all of it arrives from somewhere else, carried across wires, radio, and glass you will never see. A computer network is the machinery that makes "somewhere else" feel like "right here." Understanding it is the difference between a programmer who ships features and an engineer who understands where their code actually runs.
You type a message and it appears on a friend's screen a continent away, in a fraction of a second, with no one in charge of the whole journey. How is that even possible — and why does it almost never fail?
Core Concepts
A network is simply two or more devices that can exchange data. That is the entire definition, and it is worth taking literally. Two laptops joined by a cable are a network. A phone talking to a nearby speaker over Bluetooth is a network. The scale is not what makes it interesting — the agreement is. For two devices to exchange data, they must agree, in advance and in exhaustive detail, on how the data is packaged, addressed, and interpreted. Those agreements are called protocols, and they are the real subject of this entire Part.
The internet is a network of networks — that is what the name literally says: inter-net, "between networks." Your home Wi-Fi is one small network. Your university, your bank, and chika.ng's server each sit on their own. The internet is the set of agreements that lets all of those separate networks pass data to one another. Crucially, no one owns it. There is no central computer, no master switchboard, no company you could call to "turn it off." It works entirely by voluntary adherence to shared protocols — which is exactly why it has survived companies, governments, and technologies that were supposed to replace it.
LANs, WANs, and the machines that connect them
Networks come in two broad sizes, and the distinction shapes everything above it.
A LAN (Local Area Network) covers a small area under one administrative roof — your home, an office floor, a single building. A WAN (Wide Area Network) spans cities, countries, or continents by stitching many LANs together over long-distance links. The internet is the largest WAN there is.
Inside a LAN, the device that ties everything together is a switch. A switch forwards data between machines on the same local network using their MAC addresses — a permanent hardware identifier burned into every network adapter at the factory. The switch keeps a small table of "which device is on which port" and delivers each frame only to the port it belongs to. That is all a switch does, and it does it very fast, because its job is deliberately narrow: move data within one network.
To move data between networks you need a router. A router speaks a higher, more portable language — the IP address — and its job is to decide which neighbouring network to hand a packet to so that it gets one hop closer to its destination. Your home router is the seam between your LAN and your internet provider's WAN; it is the single door through which everything you send leaves the building.
Why keep the two jobs separate? Because they solve genuinely different problems. MAC addresses are permanent and flat — perfect for a small local group where everyone can shout and be heard, useless for finding one machine among billions. IP addresses are hierarchical and assignable — perfect for routing across the globe, but overkill inside your living room. Switches optimise for local speed; routers optimise for global reach. Collapsing them into one device would make each worse at its job.
| Device | Operates on | Scope | Decides |
|---|---|---|---|
| Switch | MAC address | Within one LAN | Which local port to forward to |
| Router | IP address | Between networks | Which next network to hand off to |
Packet switching: why the internet doesn't break
Here is the idea that made the modern internet possible, and it is easy to miss because it is now invisible.
When you send data across a network, it is not sent as one continuous stream down a reserved wire. Instead it is chopped into small chunks called packets. Each packet carries a piece of your data plus a header — the destination address, a sequence number, and other bookkeeping. Each packet is then released into the network to find its own way, and here is the surprising part: two packets from the same message may take completely different routes and arrive out of order. The receiving end uses the sequence numbers to reassemble them correctly. This is packet switching.
The older approach, inherited from the telephone system, was circuit switching: before any data flowed, the network reserved a dedicated end-to-end path — a physical circuit — held open for the whole conversation, whether you were speaking or silent. It was simple and gave predictable quality, but it was brittle and wasteful. Brittle because if any link on that reserved path failed, the whole call dropped. Wasteful because the reserved capacity sat idle during every pause.
Packet switching won decisively, for two reasons that were design goals, not happy accidents:
- Resilience. ARPANET, the internet's ancestor, was built to keep working even if parts of the network were destroyed. Because packets route independently and hunt for any available path, losing a link doesn't kill a conversation — traffic simply flows around the damage. There is no single circuit to sever.
- Sharing. One physical link can carry packets from thousands of unrelated conversations, interleaved. Nobody reserves the line, so nobody wastes it during their silences. This is why a single fibre can serve a whole neighbourhood.
Resilience and sharing are the entire reason the internet scales to billions of devices on infrastructure no one fully controls.
Circuit switching is booking an entire private train, exclusively yours, from Lagos to Abuja — reserved the moment you sit down, idle while you nap, and cancelled entirely if one bridge is out. Packet switching is mailing a long letter as a hundred separate postcards, each addressed and numbered, each free to take whatever road is clearest that day. Some go via Ibadan, some via Lokoja; a few arrive out of order. Your friend re-sorts them by number and reads the whole thing. If one road floods, only those postcards reroute — the letter still arrives. One approach reserves the world; the other shares it.
Why we build networks in layers
A working internet has to solve a staggering range of problems at once: turning bits into radio waves, finding a machine across the planet, resending data that got lost, and rendering a web page — all in the same instant. If one giant program had to handle all of it, no one could build it, debug it, or improve any part without breaking the rest.
The answer is layering. We stack the responsibilities so that each layer trusts the layer below it and offers one clean service to the layer above. A layer does its own job and hands off — it neither knows nor cares how the layers beneath it work, only that they deliver on their promise. This is the same discipline as a well-designed function that hides its internals behind a signature, applied to an entire planet's plumbing.
The model everyone actually uses is the TCP/IP stack, four layers deep. Read it from the bottom up, because that is the order a bit travels:
| Layer | Job | Talks in | Example protocols | Covered in |
|---|---|---|---|---|
| Application | What the data means to humans and apps | Messages | HTTP, DNS, SMTP | later chapters of Part III |
| Transport | Reliable (or fast) delivery between programs | Segments / datagrams | TCP, UDP | "TCP & UDP" |
| Internet | Addressing and routing across networks | Packets | IP | "IP Addresses" |
| Link | Moving bits across one physical hop | Frames | Ethernet, Wi-Fi | this chapter |
The beauty of the split is that each layer can change independently. Fibre replaced copper at the Link layer without the Application layer noticing. HTTP evolved without IP changing a line. That independence — bought entirely by layering — is why the internet can be upgraded piece by piece while never once being switched off.
You will also hear about the OSI seven-layer model. It is an older, more academic reference that splits the same ideas into seven layers instead of four. It is worth recognising the names in an interview, but in working practice engineers speak TCP/IP. Treat OSI as the textbook and TCP/IP as the field.
Bandwidth and latency: two numbers, often confused
When people say a connection is "fast," they usually mean one of two very different things, and mixing them up leads to real engineering mistakes.
Bandwidth is how much data you can move per unit of time — the width of the pipe. It is measured in bits per second (Mbps, Gbps). Latency is how long a single trip takes — the delay before the first bit arrives. It is measured in milliseconds.
These are independent, and the classic illustration makes it stick: a truck loaded with hard drives driving across the country has enormous bandwidth — it can carry petabytes — and terrible latency, because you wait days for it to arrive. A fibre link might have far less bandwidth but deliver its first bit in milliseconds. A big pipe does not make a short trip, and a short trip does not make a big pipe.
Why does the distinction matter to you as an engineer? Because you fix them differently. If a large file download is slow, you need more bandwidth. If a game feels laggy or an app stutters on every click, more bandwidth won't help at all — the enemy is latency, often set by physical distance and the number of hops. Latency has a floor that money cannot lower: nothing travels faster than light, so a round trip across the planet has a minimum delay no upgrade can beat. Recognising which of the two numbers is actually hurting you is a senior instinct.
In the early 1960s, Paul Baran at the RAND Corporation was asked a Cold War question: how do you build a communications network that survives a nuclear strike on part of it? His answer, published in 1964, was to abandon the central switchboard entirely — break messages into standardised blocks and let them find their own way across a mesh of nodes, routing around whatever was destroyed. Donald Davies in the UK reached the same idea independently and gave it the name we still use: packet switching. When ARPANET went live in 1969 on those principles, it did not just connect four computers — it encoded resilience into the network's DNA. The internet is decentralised today because it was designed, from the first packet, to have no single point to attack.
What experienced engineers actually reach for when the network is the suspect:
• They separate bandwidth from latency before touching anything. "Slow" is not a diagnosis. Is it slow to start (latency) or slow to finish (bandwidth)? The fix is different for each.
• They count the hops. A traceroute shows every router a packet passes through. A surprise detour through another continent explains a lot of "mysterious" lag.
• They think in layers when debugging. "Can I ping the IP but not load the site?" instantly narrows the problem — the Internet layer is fine, so look higher, at DNS or the Application layer. Layering isn't just architecture; it's a fault-isolation tool.
When a student in Kano opens the Academy, their request doesn't teleport to the server. Their laptop hands it to the home router (leaving the LAN), which forwards it to their internet provider's WAN, which routes it — packet by packet, hop by hop — across the country to the data centre where chika.ng lives at 104.243.37.16. The page comes back the same way, as a swarm of packets reassembled in the browser. Every layer of this chapter is doing its job on that single click: Wi-Fi frames at the Link layer, IP routing at the Internet layer, a reliable TCP connection at the Transport layer, and HTTP carrying the actual page at the top. When the site once "went down" and was in fact a DNS problem, layered thinking is exactly what told us the server was healthy and the fault lay elsewhere.
Common Mistakes
- Thinking the internet is "in the cloud" somewhere. It is physical: cables, routers, and radio. The "cloud" is someone else's computers in a building, reached over the network you just learned.
- Confusing bandwidth with latency. "I upgraded to gigabit and the game still lags." Of course it does — lag is latency, and a wider pipe doesn't shorten the trip.
- Believing packets travel together in order. They are independent and may arrive scrambled; reassembly is a separate job the receiver does using sequence numbers.
- Blurring switches and routers. A switch moves data within a network by MAC address; a router moves it between networks by IP. Same shape of box, different universe of responsibility.
- Assuming someone is in charge. There is no central internet computer. It is agreements — protocols — honoured by independent networks, and nothing more.
Imagine you sever the single busiest undersea cable between two continents at 3pm. On a circuit-switched world, every conversation using that path drops instantly and dead — the reserved line is gone. On the packet-switched internet, something quieter happens: routers within seconds notice the link is unreachable and begin steering packets down alternative paths. Latency rises, some packets are lost and re-sent, but conversations survive and self-heal. Now ask the deeper question: who ordered the reroute? No one. No central authority decided anything — each router, acting only on local knowledge of its neighbours, collectively routed around the damage. That leaderless resilience is not a feature bolted on later. It is the design.
Interview Corner
ping the server IP — is the Internet layer even reachable, and what's the round-trip time? Does traceroute show an unexpected detour or a hop where latency jumps, hinting at a routing problem? If IP is healthy but pages hang, I move up the stack — DNS resolution, then the Application layer and the server itself. The layered model isn't just architecture here; it's the fault-isolation method. I want to name the layer before I touch a fix, because 'the network is slow' is a symptom, not a diagnosis."- Open a terminal and run
ping chika.ng(or any site). Read off the round-trip time in milliseconds — that number is latency. Stop it and note the packet loss percentage; on a healthy link it should be zero. - Run
traceroute chika.ng(ortracerton Windows). Count the hops between your device and the server — every line is a router. Notice where the latency jumps; that jump is often the long-distance link. - Run
ipconfig(Windows) orifconfig/ip addr(Mac/Linux) and find your device's own IP address and your router's address (the "default gateway"). You've just located the door out of your LAN. - Out loud (as in a micro1 screen), trace one packet's full journey from your laptop to chika.ng and back, naming the switch, the router, and at least two layers it passes through.
Chapter Summary
- A network is two or more devices that can exchange data; the internet is a network of networks, owned by no one and held together by shared protocols.
- Switches move data within a LAN by MAC address; routers move it between networks by IP. Both exist because local speed and global reach are different problems.
- Packet switching — chopping data into independently routed packets — beat circuit switching because it is resilient (reroutes around failures) and efficient (shares links), both original design goals.
- We build networks in layers so each layer trusts the one below and offers a clean service above; the working model is the four-layer TCP/IP stack (Link, Internet, Transport, Application), with OSI as the academic reference.
- Bandwidth (data per second) and latency (delay per trip) are independent; a truck of hard drives has huge bandwidth and awful latency. Diagnose which one is hurting before you "fix" it.
- Protocols are the shared agreements that make all of this work — the rest of this Part is a tour of the most important ones.
We now know that data travels as packets, and that routers move those packets between networks by consulting an address. But we've been waving at that address without ever looking at it. What exactly is an IP address? How does a number a few digits long uniquely name one machine among billions, and how does a router read it to choose the next hop? That number is the coordinate system of the entire internet — and it's where we turn next: IP Addresses.
Editorial reflection — the internet is the most complex machine humanity has ever built, and no one is driving it. That should be terrifying, and instead it is the source of its strength. Every idea in this chapter — packets over circuits, routers over switchboards, layers over monoliths, protocols over ownership — is the same instinct expressed again: decentralise, agree on the interface, and let the system heal itself. Learn to see that instinct, and you will recognise it far beyond networking — in good code, good teams, and good institutions.
Q&A · 0
Enrol to ask questions and join the discussion.
No questions yet — be the first to ask.