Networks and the Internet
Better Together
One computer alone can compute. Connect it to others and it can communicate β share files, send messages, print to the printer down the hall, and reach the rest of the planet. A network is two or more computers connected so they can exchange data, by cable or by radio (Wi-Fi).
Networks come in sizes:
- A LAN (Local Area Network) covers one site β your home, a school, an office. Your house's Wi-Fi, the family laptop, a phone, and a smart TV form a small LAN.
- A WAN (Wide Area Network) connects machines across long distances β between cities or continents.
And the internet? Take millions of LANs and WANs β homes, schools, companies, data centres β and connect them all to each other. The name says it exactly: an inter-network, a network of networks. Nobody owns it; everybody agrees to speak the same rules.
Packets β Data Travels in Pieces
Here is the internet's most surprising design decision. When you send anything β a photo, a video call, this web page β it is not sent whole. It is chopped into packets: small chunks of data, typically around a thousand bytes each.
Every packet gets labelled, like a parcel:
- the destination address (where it is going)
- the sender's address (for replies and errors)
- a sequence number (packet 4 of 91β¦)
- the chunk of data itself
The packets are launched into the network independently. They may travel different routes, arrive out of order, or occasionally get lost (lost ones are requested again). At the destination, the sequence numbers let the receiving device reassemble the original photo perfectly. It is decomposition applied to communication: break a big problem into small, manageable, numbered pieces.
Why bother? Robustness and sharing. Millions of users' packets can interleave on the same cables, and if a route fails β a cable cut, a router down β packets simply flow around the damage. The internet was designed so that no single failure stops the whole.
Addresses and Routers
For a packet to find its way, every device needs an address. That is the IP address β a unique number like 172.217.16.46, the postal address of the network world. Your laptop has one; so does every server, phone, and smart lightbulb.
The journeys are made possible by routers β the junction boxes of the internet. A router's job is simple and endless:
- Receive a packet
- Read its destination address
- Forward it one step (hop) closer, along the best available path
- Repeat, millions of times per second
A packet from your phone to a server in another country might pass through 15β20 routers, hopping from your home router, through your internet service provider, across undersea fibre-optic cables, and into a data centre β usually in well under a second.
Tracing a Message
Follow one photo from your phone to a friend abroad:
- The photo (stored as binary, of course) is split into hundreds of packets
- Each packet is labelled with your friend's device's address and a sequence number
- Packets hop router to router β some by one route, some by another
- At the far end, packets are reordered by sequence number and reassembled
- Your friend's phone decodes the binary back into pixels β the photo appears
Everything you do online β every web page, game, stream, and call β is this same machinery underneath. The layers of abstraction are doing their job: you see "message delivered", not twenty router hops.
Worked Example β What Happens When a Router Fails Mid-Transfer
Suppose you are downloading a large file, and partway through, one of the routers along the path suddenly goes offline β a cable is accidentally unplugged in some building along the route. Trace through what actually happens, using only the ideas already covered in this lesson:
- Packets that had already passed through that router before it failed are unaffected β they continue toward their destination via whatever path they were already on
- New packets, launched after the failure, are not sent down a route that no longer works β routers constantly share information about which paths are currently available, so traffic is automatically directed around the gap
- Any packets that were lost in the failure (mid-transit when the router died) are simply never acknowledged as received, so the sending device notices they are missing and sends replacement copies
- At the destination, sequence numbers let all the packets β original and replacement, arrived via different routes and in a jumbled order β be reassembled into the exact original file
Nothing about this requires the file transfer to restart from the beginning, and typically neither you nor the person on the other end notices anything happened at all beyond perhaps a brief pause. This resilience is not an accident β it was a deliberate design goal from the internet's earliest days: no single failure anywhere in the network should be able to stop communication everywhere else, which is precisely why data is split into small, independently routable, individually numbered packets in the first place, rather than sent as one giant unbroken stream down one fixed path.
Key Words
- Network β computers connected to share data and resources
- LAN / WAN β a network covering one site / one covering large distances
- Internet β the worldwide network of interconnected networks
- Packet β a small, labelled chunk of data sent across a network
- IP address β the unique numerical address of a device on a network
- Router β a device that forwards packets between networks towards their destination