Byte by Byte › Book 7: Networks, Programming and Machine Learning › Chapter 1: Computer Networks and How Devices Connect
Chapter 1: Computer Networks and How Devices Connect
You will learn: what a network is, the types of network by size (PAN, LAN, MAN, WAN), network topologies, the devices that make networks work, wired and wireless transmission media, client-server and peer-to-peer networks, and the difference between a MAC address and an IP address.
🔎 The Case
The picture appeared at 6:42 on a Sunday morning.
By 6:50 it was on every message board in Moonbrook. By breakfast it had crossed the Light Bridges to Riverbend, Pebble Hollow and Palace Town. It showed Simbha, Guardian of Memunic, jaws wide open, roaring over a huddle of terrified young rabbits. The caption underneath said: THE GUARDIAN SHOWS HIS TRUE FACE.
Memoon saw it on her laptop before she had finished her tea. For a long moment she just stared. She had known Simbha since she was seven. He had never roared at anyone. He purred when Kachui read to him.
By Monday the Moonbrook rabbits had gathered outside the palace. Luna, the tall moon rabbit who ran Moonbrook's riddle booth, stood at the front, her silver-tipped ears flat. "We have all seen it," she said. "Thousands of us have seen it. Are we supposed to ignore our own eyes?"
The Queen of Memunic looked tired. She did not believe it either, Memoon could tell. But a queen cannot rule on what she believes. "Until we know the truth," she said quietly, "Simbha will step aside as Guardian."
Simbha took off his medallion and laid it on the steps without a word. That was the worst part.
That evening Nimo floated at Memoon's window. "Everyone keeps asking who made the picture," he said. "Nobody is asking how it travelled. Every message in Memunic passes through the Light Bridges. And every Light Bridge passes through one place."
"Snowpeak," said Memoon.
The Snowpeak Hub sat on the highest ridge in Memunic World: glass, steel and a forest of antenna masts humming in the cold. Inside, a huge snowy owl in brass goggles was frowning at a wall of glowing maps. This was Frost, the inventor who had built half the Light Bridges himself. Beside him, a young peregrine falcon with a headset over one ear was typing faster than Memoon had ever seen anyone type.
"Vega, my apprentice," said Frost. "She is your age and twice as rude."
"Accurate, not rude," said Vega, without looking up. "You're the Deep Engine girl. Good. Then you know computers. But do you know networks? Because this," she waved a wing at the map, "is not one computer. It's forty thousand of them, all talking at once. If you want to find where that picture came from, you need to understand how they talk."
💡 The Concepts
What is a network? A computer network is two or more devices connected so they can share data and resources. Each device on a network is called a node: computers, phones, printers, smart TVs, servers and the boxes that pass data along are all nodes. Networks let us share files, printers and internet connections, send messages, stream video, play online games and store data in one place where many people can reach it.
The price of being connected is risk. A network that lets you share a file also lets malware travel, and a network that lets a true story spread also lets a lie spread. Everything in this book comes back to that idea.
Types of network by size.
| Type | Full name | Covers | Example |
|---|---|---|---|
| PAN | Personal area network | A few metres around one person | Your phone, wireless earbuds and smartwatch linked by Bluetooth |
| LAN | Local area network | One building or a group of nearby buildings | The computer lab at school; the Wi-Fi network in your home |
| MAN | Metropolitan area network | A town or city | A city's network linking its government offices; cable TV and broadband across a city |
| WAN | Wide area network | Countries and continents | A bank linking branches across India; the internet itself, the largest WAN of all |
A LAN that uses Wi-Fi instead of cables is sometimes called a WLAN (wireless LAN). The internet is not one network but a network of networks: millions of LANs and WANs joined together, as you learned in Book 5.
Network topologies. A topology is the layout of a network: how the nodes are connected to each other. Topology matters because it decides how fast data travels, how much cable is needed, and what happens when something breaks.
| Topology | Layout | Strengths | Weaknesses |
|---|---|---|---|
| Bus | Every node is attached to one main cable, the backbone | Cheap; little cable | If the backbone breaks, the whole network fails; slows down as more nodes are added |
| Ring | Each node connects to the next, forming a closed loop; data travels round the ring | Orderly, no data collisions | One broken link or node can stop the whole ring (unless a second ring is added) |
| Star | Every node connects to a central switch | If one cable breaks, only that node is affected; easy to add nodes; the most common LAN layout | If the central switch fails, everything stops; needs more cable |
| Mesh | Nodes connect to many other nodes, so there are several routes between any two | Very reliable: if one link fails, data takes another route | Expensive and complex |
| Tree | Several star networks joined in a hierarchy, like branches | Easy to expand in sections, e.g. one star per floor | Depends on the main links near the top |
| Hybrid | A mix of two or more topologies | Can use the best layout for each part | More complex to design |
Most homes and schools use a star. The internet's backbone is a giant, partly meshed network: there are many routes between big cities, which is why the internet keeps working when one cable is cut.
The devices that make networks work.
- A network interface card (NIC), or network adapter, connects a device to a network. Today it is usually a chip built into the motherboard, with a wired Ethernet port, a Wi-Fi antenna, or both.
- A hub is an old, simple box that connects devices in a star. When a message arrives, a hub copies it to every port, whether that device needs it or not. This wastes bandwidth, so hubs are now rare.
- A switch also connects devices in a LAN, but it is smarter. It learns which device is on which port and sends each message only to the device it is meant for.
- A router connects different networks and chooses the best path for data between them, as you learned in Book 5. Your home router connects your home LAN to your internet provider's network.
- A modem converts signals so data can travel over a particular line, such as a telephone line, a cable TV line or a fibre-optic line. The word comes from modulator-demodulator. For a fibre connection, the box is often called an ONT (optical network terminal).
- A wireless access point (WAP) lets Wi-Fi devices join a wired network.
- A repeater receives a weakening signal and sends it on at full strength, so it can travel further. A Wi-Fi extender does this for wireless signals.
- A gateway connects networks that use different protocols, translating between them.
The box your family calls "the Wi-Fi" is usually several of these in one case: a modem, a router, a small switch with a few Ethernet ports, and a wireless access point.
MAC addresses and IP addresses. Every NIC is given a unique hardware address when it is made, called a MAC address (media access control address). It is 48 bits long, written as six pairs of hexadecimal digits, such as 3C-A9-F4-1B-77-02 . You learned hex in Book 6: the first three pairs identify the manufacturer.
| MAC address | IP address |
|---|
| Identifies | One network card (hardware) | One device's position on a network |
| Given by | The manufacturer | The network (usually by the router, automatically) |
| Changes? | Normally stays the same | Can change when you join a different network |
Example 3C-A9-F4-1B-77-02 192.168.1.7 (IPv4)
| Used by | Switches, inside a LAN | Routers, across networks |
A good comparison is a person's name and their home address. Your name stays with you; your address changes when you move house. A switch delivers by "name" within the building; a router delivers by "address" across the world. (Modern phones often show a different, random MAC address to each Wi-Fi network to protect your privacy, so even MAC addresses are not always permanent.)
Transmission media: how the data actually travels. The path that carries signals between nodes is called the transmission medium.
| Medium | How it carries data | Typical use | Notes |
|---|---|---|---|
| Twisted-pair cable (Ethernet, e.g. Cat 6) | Electrical signals in pairs of copper wires twisted together to reduce interference | Wired LANs in homes, schools, offices | Cheap; fast up to about 100 m |
| Coaxial cable | Electrical signals in a copper core surrounded by shielding | Cable TV, some broadband | Well shielded but thicker |
| Fibre-optic cable | Pulses of light in thin strands of glass | Internet backbones, undersea cables, fibre-to-the-home broadband | Fastest and longest range; not affected by electrical interference |
| Wi-Fi (radio) | Radio waves, usually at 2.4, 5 or 6 GHz | WLANs | Convenient; slowed by walls and distance |
| Bluetooth (radio) | Short-range, low-power radio | PANs: earbuds, keyboards, watches | About 10 m |
| Mobile networks (4G, 5G) | Radio waves between phones and cell towers | Mobile internet | 5G is much faster and has lower latency than 4G |
| Satellite | Radio signals to and from satellites | Remote areas, ships, aircraft | Reaches almost anywhere; can have high latency |
| Infrared | Invisible light | TV remote controls | Needs a clear line of sight |
Wired media are generally faster, more reliable and more secure. Wireless media are more convenient and need no cables to every device. Wi-Fi's 2.4 GHz band reaches further and passes through walls better; the 5 GHz and 6 GHz bands are faster over short distances.
Client-server and peer-to-peer. Networks also differ in how the work is shared.
| Client-server | Peer-to-peer (P2P) |
|---|
| How it works | Powerful central computers called servers provide services; ordinary devices called share directly with others clients request them | Every computer is equal and can |
| Examples | Websites, email, school login systems, online banking | Sharing files between two laptops, some file-sharing and video-call systems |
| Strengths | Central control, easier backups and security | Cheap, simple, no single point of failure |
| Weaknesses | Servers cost money; if a server fails, its clients lose the service | Harder to secure and back up; slower with many users |
Internet, intranet and extranet. The internet is the public worldwide network. An intranet is a private network inside one organisation that uses internet technology, such as a school portal only students and teachers can reach. An extranet is part of an intranet that is opened to chosen outsiders, such as a company letting its suppliers check orders.
Real World: India's BharatNet project is laying optical fibre to connect lakhs of gram panchayats (village councils), so that rural areas can get high-speed internet for schools, health centres and government services. It is one of the largest rural broadband projects in the world.
Career Spotlight: Network engineer. Network engineers design, build and protect the networks that companies, hospitals and internet providers depend on. They choose topologies, configure switches and routers, and diagnose faults when things go down, often with the same command-line tools you will use in Build It.
💡 Memoon’s tip: If your Wi-Fi is slow in one room, the problem is often distance or thick walls, not your internet plan. Moving the router to a central, high, open spot often helps more than paying for a faster connection.

🛠️ Build It
Activity 1: Find your MAC and IP addresses.
- Click Start, type
cmdand open Command Prompt. - Type
ipconfig /alland press Enter. - Scroll to your active adapter (usually Wireless LAN adapter Wi-Fi or Ethernet adapter).
- Find Physical Address: this is the MAC address. Find IPv4 Address: this is your IP address on the home network. Find Default Gateway: this is your router's address. Write all three in your notebook.
- Which part of the MAC address identifies the manufacturer?
Activity 2: Check your Wi-Fi connection.
- Open Settings → Network & internet → Wi-Fi, then click the name of the network you are connected to (or Hardware properties).
- Find the Protocol (for example Wi-Fi 5, Wi-Fi 6), the Network band (2.4 GHz, 5 GHz or 6 GHz) and the Link speed.
- Walk to a room further from the router (on a laptop) and check the link speed again. What changed, and why?
Activity 3: See who your computer has talked to. In Command Prompt, type arp - a and press Enter. This shows the ARP table: the IP addresses on your LAN that your computer has recently contacted, with their MAC addresses. Your router's IP address (the default gateway) should be on the list. Which other devices can you see? (Do not try to connect to devices that are not yours.)
Activity 4: Draw your home network. Draw a diagram of the network at your home. Include the router (and modem, if separate), every device that connects, and how each one connects: Wi-Fi, Ethernet cable or Bluetooth. Label which parts form a PAN and which form the LAN. What topology is it?
Unplugged: Hub versus switch. Six people sit in a circle; one sits in the middle as the hub. Each person writes a short note addressed to someone else. Round 1: the hub reads every note aloud to everyone. Round 2: the middle person becomes a switch, learns where everyone sits, and passes each note only to the person it is addressed to. Which round was faster? Which round was more private? Which kept others from being interrupted?
✅ Case Closed
Vega pulled up the hub's logs: a record of every message that had crossed the Light Bridges that Sunday morning. "Every message carries the address of where it came from," she said. "Let's go back to 6:42."
Memoon traced the picture backwards. It had reached Palace Town from Riverbend. It had reached Riverbend from the main Moonbrook router. And it had entered the Moonbrook network through one wireless access point: the one above the busy market square.
"So somebody stood in the market and posted it," said Nimo.
"That's what I thought," said Memoon slowly. "But look." She pointed at the screen. The picture had not been posted once. It had been posted forty times, in the same minute, through the same access point, and every copy came from a different MAC address. "Forty different network cards. Forty devices, all at once."
Vega stopped typing for the first time. "Forty people don't all post the same picture in the same sixty seconds."
"No," said Memoon. "But forty machines might." She looked at the list of manufacturer codes at the start of each MAC address. Every one of them was the same: a small company in Pebble Hollow that made something cheap, popular and connected to the network in nearly every home in Memunic.
Frost took off his goggles. "Echo birds," he said. "Somebody is using the echo birds."
❓ Test Yourself
- What is a computer network? Give three things networks let us do.
- Match each network type to its example: (a) PAN, (b) LAN, (c) MAN, (d) WAN. Examples: (i) a city's government offices linked together; (ii) a phone connected to wireless earbuds; (iii) a bank linking branches in different states; (iv) the computers in your school lab.
- In a star topology, what happens if (a) one cable to a computer breaks, (b) the central switch fails?
- Why is a mesh topology more reliable than a bus topology? Why isn't every network a mesh?
- What is the difference between a hub and a switch?
- What does a router do that a switch does not?
- Give two differences between a MAC address and an IP address.
- Which transmission medium would you choose for each and why: (a) a cable under the ocean between India and Singapore, (b) connecting a mouse to a laptop without wires, (c) the network in a new school computer lab?
- True or false: the internet is a client-server network only. Explain.
- What is the difference between an intranet and the internet?
- Challenge: A school has three floors, each with a computer lab of 30 computers, and one internet connection. Design its network: say which topology you would use for each floor and for the whole building, and which devices you need. Draw it.
📚 Key Terms
- Computer network: two or more devices connected to share data and resources.
- Node: any device connected to a network.
- PAN: a personal area network covering a few metres around one person.
- LAN: a local area network covering one building or site.
- MAN: a metropolitan area network covering a town or city.
- WAN: a wide area network covering a large geographical area; the internet is the largest WAN.
- WLAN: a wireless local area network, usually Wi-Fi.
- Topology: the layout of the connections in a network.
- Bus, ring, star, mesh, tree, hybrid topology: the main network layouts.
- Network interface card (NIC): the hardware that connects a device to a network.
- Hub: a device that sends every message to all connected devices.
- Switch: a device that sends each message only to the device it is addressed to.
- Modem: a device that converts signals so data can travel over a particular line.
- Wireless access point (WAP): a device that lets Wi-Fi devices join a wired network.
- Repeater: a device that boosts a weakening signal so it can travel further.
- Gateway: a device that connects networks using different protocols.
- MAC address: a unique hardware address given to a network card by its manufacturer.
- Transmission medium: the path that carries signals between nodes, wired or wireless.
- Fibre-optic cable: cable that carries data as pulses of light through glass strands.
- Client-server network: a network where servers provide services that clients request.
- Peer-to-peer (P2P) network: a network where all computers are equal and share directly.
- Intranet: a private network inside an organisation that uses internet technology.
- Extranet: part of an intranet opened to chosen outsiders.
Keep learning with Byte by Byte
Explore Book 7: Networks, Programming and Machine Learning. Find the ebook, purchase details and teaching slides on MemuniCity.
Comments
Post a Comment