Chapter 1: How Networks Work
How Networks Work 🌐
Section titled “How Networks Work 🌐”You can’t protect what you don’t understand
Every message you send, every video you stream, and every assignment you turn in travels across a network. Most of the time it just works, so it feels like magic. But security professionals can’t afford to think of it as magic. To protect a network, you have to know what it is made of, how devices find each other, which rules they follow, and what happens when one piece breaks.
That is what this chapter is about. You’ll learn the types and shapes of networks, the two kinds of addresses every connected device uses, the equipment that moves data from place to place, the protocols that make websites and email work, and the cloud services your school probably relies on every day. By the end, you’ll be able to look at a simple network diagram and explain it like a defender.
1.1 — Types of Networks 🌐
Section titled “1.1 — Types of Networks 🌐”A network is two or more devices connected so they can share information. Your phone and your earbuds form a network. So do the thousands of computers at a big university. Networks are usually compared in three ways: their scope (how much area they cover), their purpose (what they are for), and their topology (how they are arranged).
Scope: How Big Is It?
Section titled “Scope: How Big Is It?”| Type | Covers | Everyday Example |
|---|---|---|
| PAN (Personal Area Network) | A few meters around one person | Phone connected to a smartwatch by Bluetooth |
| LAN (Local Area Network) | One home, classroom, or building | Every laptop and printer in your school |
| WLAN (Wireless LAN) | A LAN that uses Wi-Fi instead of cables | Your home Wi-Fi |
| MAN (Metropolitan Area Network) | A city or campus | A city connecting its libraries and schools |
| WAN (Wide Area Network) | Countries or the whole planet | The internet, the biggest WAN of all |
Purpose: What Is It For?
Section titled “Purpose: What Is It For?”Two networks can be the same size but built for different jobs. A school might run one network for staff computers, a separate one for student Chromebooks, and a guest network for visitors. Keeping them apart is a security decision: if a guest’s infected laptop joins the guest network, it can’t reach the computers that hold student records.
Topology: How Is It Arranged?
Section titled “Topology: How Is It Arranged?”The network topologynetwork topology: The layout of a network: how its devices are arranged and connected. Common topologies are star, bus, ring, and mesh. is the network’s shape. Each shape has strengths and weak spots.
| Topology | How It Works | Strength | Weak Spot |
|---|---|---|---|
| Star | Every device connects to one central box | Easy to add devices and find problems | If the center fails, everything stops |
| Bus | All devices share one main cable | Cheap and simple | One break can split the whole network |
| Ring | Each device connects to two neighbors in a loop | Orderly traffic | One broken link can stop the loop |
| Mesh | Devices connect to many others | Many paths, so very reliable | Costs more and is harder to manage |
Most homes and schools today use a star: every device connects to a router, switch, or access point in the middle. Mesh Wi-Fi systems, where several access points talk to each other, are a mix of star and mesh. The internet itself is a giant mesh, which is why it keeps working even when some links go down.
1.2 — Addresses: MAC and IP 🏷️
Section titled “1.2 — Addresses: MAC and IP 🏷️”To deliver a letter, the post office needs an address. Networks are the same. Every connected device uses two different addresses, and defenders need to know the difference.
The MAC Address: Who You Are on the Local Network
Section titled “The MAC Address: Who You Are on the Local Network”A MAC addressMAC address: Media access control address: a hardware identifier assigned to a device's network adapter, used to deliver data between devices on the same local network. (media access control address) identifies a device’s network adapter. It looks like six pairs of letters and numbers, such as 3C:22:FB:9A:10:4E. The first half usually identifies the manufacturer. MAC addresses are used only inside a local network, so a switch knows which port to send data to. They don’t travel across the internet.
Because a fixed MAC address could be used to track a phone from place to place, modern phones and laptops can use a random MAC address for each Wi-Fi network they join. That small privacy feature is a good example of security built into everyday devices.
The IP Address: Where You Are on the Internet
Section titled “The IP Address: Where You Are on the Internet”An IP addressIP address: Internet protocol address: a number assigned to a device on a network so data can be routed to it, locally and across the internet. (internet protocol address) tells the network where a device is, so data can be routed to it, even across the world. There are two versions:
- IPv4 looks like four numbers from 0 to 255, such as
192.168.1.25. There are only about 4.3 billion IPv4 addresses, which is not enough for every device on Earth. - IPv6 is much longer, written in groups of letters and numbers separated by colons, such as
2001:db8::25. It has enough addresses for practically everything.
Public and Private Addresses
Section titled “Public and Private Addresses”Your home router usually gets one public IP address from your internet provider. Inside the house, the router hands out private IP addresses (often starting with 192.168. or 10.) to every device. When your laptop visits a website, the router swaps the private address for the public one on the way out and back again on the way in. This is why a whole family can share one internet connection.
| MAC Address | IP Address | |
|---|---|---|
| Identifies | The network adapter (hardware) | The device’s location on a network |
| Used by | Switches, inside one local network | Routers, locally and across the internet |
| Example | 3C:22:FB:9A:10:4E |
192.168.1.25 |
| Changes? | Fixed in hardware, though devices can randomize it | Can change each time you join a network |
Reading a Network Diagram
Section titled “Reading a Network Diagram”Defenders sketch networks constantly. Here is a simple home network, labeled with addresses:
Internet ── Modem ── Router (public IP 203.0.113.7 / private 192.168.1.1) ├── Laptop 192.168.1.20 MAC 3C:22:FB:9A:10:4E ├── Phone 192.168.1.21 MAC random per network └── Printer 192.168.1.30 MAC 00:1B:A9:44:2C:01Notice that every device inside shares the router’s network (192.168.1.), and only the router faces the internet.
1.3 — Network Components and Failure Points 🔌
Section titled “1.3 — Network Components and Failure Points 🔌”A network is a team of devices, and each one has a job. When one member of the team fails, something specific stops working. Being able to predict what stops is one of the most useful skills in IT and security.
The Team and What Happens When Each Member Fails
Section titled “The Team and What Happens When Each Member Fails”| Component | Its Role | If It Fails… |
|---|---|---|
| Modem | Connects your building to the internet provider | Local devices still talk to each other, but nobody reaches the internet |
| Router | Directs traffic between networks and hands out IP addresses | Devices can’t get addresses or leave the local network |
| Switch | Connects wired devices inside a LAN, using MAC addresses | Every device plugged into that switch goes offline |
| Access point | Lets Wi-Fi devices join the network | Wireless devices in that area drop off; wired ones keep working |
| Firewall | Filters traffic in and out based on rules | Traffic may be blocked entirely, or worse, allowed without checks |
| Server | Provides a service, such as files, email, or a website | That service goes down for everyone who needs it |
| Cables | Physically carry the signal | One device, or a whole room, loses its connection |
A routerrouter: A network device that forwards data between networks, such as between your home network and the internet, and usually assigns local IP addresses. is the most important box in most homes, because it sits between the private network and the internet. In a star network, it is also the single point of failure. Large organizations add redundancy: two internet connections, backup switches, and extra power, so that one failure doesn’t stop everything.
Hardware Has Vulnerabilities Too
Section titled “Hardware Has Vulnerabilities Too”Security isn’t only about software. Physical network hardware has weak spots that attackers look for and defenders fix:
- Default passwords. Many routers and cameras ship with a simple admin password. If no one changes it, anyone who finds it can take control.
- Outdated firmware. Firmware is the software built into hardware. If it never gets updated, known flaws stay open.
- Open ports and unused jacks. A live network jack in an empty room is an invitation to plug in an unknown device.
- Unknown USB devices. A “lost” USB drive can carry malware. Plugging it in to see who owns it is exactly what an attacker hopes you’ll do.
- Physical access. Anyone who can touch a router can often reset it to factory settings.
Raising Awareness
Section titled “Raising Awareness”Most hardware problems are fixed by people who simply notice them. That’s why awareness matters. A good awareness strategy is short, specific, and repeated: a poster by the printer that says “Found a USB drive? Give it to the front office. Don’t plug it in.” works better than a long lecture. Schools also label network closets “Authorized Staff Only” and keep them locked.
1.4 — Protocols and Online Services 📨
Section titled “1.4 — Protocols and Online Services 📨”Devices made by different companies, running different software, all over the world, still understand each other. That works because they follow the same protocols. A protocolprotocol: An agreed set of rules for how devices format, send, and receive data, so different systems can understand each other. is a shared set of rules for communicating, the way traffic laws let drivers who have never met share a road.
Two Ways to Deliver Data
Section titled “Two Ways to Deliver Data”Almost all internet traffic travels using one of two delivery protocols:
- TCP is careful. It numbers every piece of data, confirms that each one arrived, and resends anything lost. It’s slower but reliable, which is what you want for a web page, an email, or a file download.
- UDP is fast. It sends data without checking, and lost pieces are simply skipped. That sounds bad, but for a video call or an online game, a tiny glitch is better than freezing to wait for an old piece of data.
The Protocols Behind Your Favorite Services
Section titled “The Protocols Behind Your Favorite Services”| Protocol | What It Does | Service It Supports |
|---|---|---|
| HTTP / HTTPS | Requests and delivers web pages; HTTPS encrypts them | Every website and web app |
| DNS | Turns names like a school website into IP addresses | Every time you type a web address |
| DHCP | Hands out IP addresses automatically | Joining any Wi-Fi network |
| SMTP / IMAP | Sends email (SMTP) and lets you read it from any device (IMAP) | |
| TLS | Encrypts data in transit | The “S” in HTTPS, secure email, many apps |
DNSDNS: Domain Name System: the internet's phone book, which translates human-friendly names like a website address into IP addresses computers use. deserves special attention. It’s the internet’s phone book. Your browser can’t visit a name; it needs an IP address. If DNS fails, websites can be perfectly healthy and still unreachable, because no one can look up where they are.
Protocols and Security
Section titled “Protocols and Security”Many early protocols were designed when the internet was a small network of researchers who trusted each other. Plain HTTP sends everything as readable text, so anyone on the same network path could read it. That’s why the modern web moved to HTTPS, which encrypts traffic with TLS. Today, browsers warn you when a site is “Not secure,” meaning it isn’t using HTTPS.
The lesson for defenders: when you compare protocols, ask two questions. What does this protocol do well? (speed, reliability, convenience) and what does it protect? (nothing, or the contents of the conversation).
1.5 — The Cloud ☁️
Section titled “1.5 — The Cloud ☁️”“It’s saved in the cloud” really means “it’s saved on someone else’s computers, in a data center, reached over the internet.” cloud computingcloud computing: Using computing resources such as storage, software, or processing power that run in remote data centers and are delivered over the internet. lets you open your work from any device, and lets schools run email and learning platforms without owning a room full of servers.
Deployment Models: Who Owns It?
Section titled “Deployment Models: Who Owns It?”| Model | What It Means | Advantages | Disadvantages |
|---|---|---|---|
| Public cloud | Shared infrastructure run by a big provider, rented by many customers | Cheap to start, scales instantly, expert security staff | Less control; you depend on the provider |
| Private cloud | Cloud-style systems used by only one organization | More control and customization | Expensive; the organization must secure it |
| Hybrid cloud | A mix of public and private | Keep sensitive data private, use public for the rest | More complex to manage and secure |
| Community cloud | Shared by organizations with similar needs, like several school districts | Shared cost, shared rules | Everyone must agree on how it’s run |
Service Models: How Much Do You Manage?
Section titled “Service Models: How Much Do You Manage?”Cloud services also differ by how much the customer controls:
- SaaS (Software as a Service): you just use the app. Online documents and school email are SaaS. The provider handles almost everything.
- PaaS (Platform as a Service): developers get a ready-made platform to build and run their own apps.
- IaaS (Infrastructure as a Service): you rent raw virtual computers and storage and manage everything on top of them.
The more you manage, the more you control, and the more security work is yours. This idea is called the shared responsibility model: the provider secures the data center and hardware, but the customer is still responsible for things like strong logins and who gets access.
The Trade-Offs
Section titled “The Trade-Offs”The cloud is often more secure than a closet server, because big providers have full-time security teams. But it also concentrates risk. When a major cloud region has a problem, thousands of apps can go down at once. And if someone steals your password, your files are reachable from anywhere in the world.
Chapter 1 Activity: Map and Defend a Network 🗺️
Section titled “Chapter 1 Activity: Map and Defend a Network 🗺️”Your Mission: Become the network analyst for an imaginary school library. Work on paper or in a school-approved drawing tool. Do not scan, test, or change any real network.
Part 1: Draw the Network
Section titled “Part 1: Draw the Network”The library has a modem, a router, one switch, one Wi-Fi access point, a firewall, four wired desktop computers, a printer, and student laptops on Wi-Fi. Draw it as a star. Label the topology and say whether it’s a LAN, WLAN, or both.
Part 2: Add the Addresses
Section titled “Part 2: Add the Addresses”Give the router a public IP address and a private one. Give every device a private IPv4 address in the same range, and invent a MAC address for two of the wired desktops. Write one sentence explaining why the laptops’ MAC addresses might change.
Part 3: Failure Lab
Section titled “Part 3: Failure Lab”Pick three components. For each, write what fails for library users, who notices first, and one way to add redundancy.
Part 4: Protocols and Cloud
Section titled “Part 4: Protocols and Cloud”The library uses an online catalog, school email, and video lessons. For each, name a protocol from section 1.4 and say whether it’s SaaS, PaaS, or IaaS. Finish with one awareness poster slogan about a hardware vulnerability from section 1.3.
Key Concepts Checklist
Section titled “Key Concepts Checklist”- I can compare networks by scope, purpose, and topology
- I can explain the difference between a MAC address and an IP address
- I can label a simple network diagram with private and public IP addresses
- I can name the role of a modem, router, switch, access point, firewall, and server
- I can predict what stops working when a network component fails
- I can describe hardware vulnerabilities and how to raise awareness of them
- I can compare TCP and UDP and explain what DNS and HTTPS do
- I can compare public, private, hybrid, and community clouds and SaaS, PaaS, and IaaS
