What Is a Network?
Understand what a computer network is, what it is made of, how data moves through it, and the basic terms the rest of this course builds on.
What a network is
A network is two or more devices that can send data to each other. That is the full definition, and it holds for everything from two phones sharing a file to the whole internet.
Your phone and your home router form a network. So do your laptop and the printer in the next room. The internet is the same idea at a much larger scale: millions of smaller networks connected to each other.
The rest of this course explains how those connections actually work, one piece at a time.
The three parts of every network
Every network, large or small, has the same three ingredients:
- Devices that send and receive data: phones, laptops, servers, printers, smart TVs.
- Links that carry the signal between devices: a copper or fibre cable, or radio waves for WiFi.
- Protocols, which are written-down rules that every device follows so a message sent by one device can be understood by another.
A protocol decides things like how a message starts, how it is addressed and how the receiver says "I got it". Two devices made by different companies can work together only because both follow the same protocols. You will meet the main ones in this course: IP, TCP, UDP, DNS and HTTP.
How data travels: packets
When you send a photo, it does not travel as one big block. It is cut into thousands of small pieces called packets. Each packet carries a small slice of the photo plus a header with the sender's address, the receiver's address and a number that says where the slice belongs.
Networks work this way for three practical reasons:
- Sharing. Many people use the same cable at once because their packets take turns.
- Easy repair. If one packet is lost, only that packet is sent again, not the whole photo.
- Flexibility. Packets from the same photo can take different routes if one path is busy or broken. The receiving device puts them back in order using the numbers in the headers.
You will see the word packet in almost every lesson from here on.
Why networks matter
Without a network a computer can only use what is stored on it. With one, a computer can:
- Share resources. One printer serves a whole office, and one internet connection serves a whole house.
- Communicate. Email, video calls and chat apps all move data between devices.
- Keep data in one place. A file saved on a company server is the same file whether you open it at work or at home.
Networks come in sizes
Networks are named by how far they reach:
- PAN (Personal Area Network): a few metres. Your phone connected to wireless earbuds.
- LAN (Local Area Network): one home, school or office. This is the network you use every day.
- MAN (Metropolitan Area Network): a city or a large campus, for example a university with several buildings across town.
- WAN (Wide Area Network): cities, countries and continents. The internet is the largest WAN.
The boxes in a home setup
A typical home has a few network devices, usually combined into the one box your provider gave you. Each has its own job:
- Modem: converts the signal on your provider's line (cable, phone line or fibre) into data your network can use.
- Router: connects your home network to the internet and decides where each packet goes next.
- Switch: connects wired devices to each other inside the network.
- Access point: lets WiFi devices join the network.
In an office these are usually separate devices, so each one can be replaced or upgraded alone.
Clients and servers
In most network conversations, one device asks and another answers.
- The client is the device that starts the request. Your web browser, your email app and your phone's apps are all clients.
- The server is the device that waits for requests and sends back a response, such as a web page, a video or a message.
When you open a website, your browser sends a request and the web server sends back the page.
A server is not special hardware. It is a computer running software that listens for requests. Data centre servers are powerful machines, but your own laptop becomes a server the moment you run a program that waits for connections.
Peer to peer
Not every network has a clear client and server. In a peer to peer (P2P) setup every device can both ask for data and provide it. Two laptops sending files directly to each other is a peer to peer transfer.
Many apps mix both models. A video call app usually contacts a server to find the other person, then sends the video directly between the two devices when it can.
For this course the client and server model is the one to keep in mind, because it explains most of how the web works.
Wired or wireless
- Wired (Ethernet) is usually faster and more stable, and it is harder for outsiders to listen in on. It suits desktops, game consoles and servers.
- Wireless (WiFi) needs no cable, which is convenient. The downside is that WiFi shares radio space with every other network nearby, so speed can drop when the area is crowded or the signal is weak.
Most homes use both: a TV or desktop plugged in with a cable, and phones and laptops on WiFi.
Try it on your own network
Open the WiFi settings on your phone and note the name of the network you are connected to. Then count the devices at home that use it: phones, laptops, a TV, maybe a speaker or a games console.
That is already a small network, with a router in the middle, a link (WiFi) to each device and protocols that all of them follow. If you are on a computer, you can also see your own network settings from a terminal:
ip addr # Linux
ipconfig # Windows
Do not worry about the output yet. By the end of this course you will be able to read every line of it.