A computer network is two or more devices connected so they can exchange data. Your laptop and the Wi-Fi router form one. A data center with fifty thousand servers is one. The internet is a network of networks: tens of thousands of independently run networks that agree to carry each other’s traffic.
Everything you do online, from loading this page to pushing code, is the same thing underneath: one program sends bytes, the network carries them, another program receives them.
The parts every network has
| Part | What it is | Examples |
|---|---|---|
| Nodes | Anything that sends, receives or forwards data | Laptops, phones, servers, printers, routers |
| Links | The path between two nodes | Copper cable, fiber, radio (Wi-Fi, 5G) |
| Protocols | The agreed rules for talking | Ethernet, IP, TCP, DNS, HTTP |
| Addresses | How nodes find each other | MAC addresses, IP addresses, port numbers |
A node that only sends and receives for itself is a host (or end system). A node that passes traffic along for others is an intermediate device: a switch, a router, a firewall.
Data travels in packets
The network never sends a 2 GB file as one block. The data is cut into small pieces, usually up to about 1,500 bytes each on Ethernet, and every piece carries a header with the destination address. This is packet switching, and it has three big advantages:
- Sharing. Packets from thousands of conversations take turns on the same link, so nobody holds a cable for themselves.
- Resilience. If a link fails, routers send the next packets another way.
- Efficiency. A silent conversation uses no capacity at all.
The old telephone network did the opposite, circuit switching: a dedicated path was reserved end to end for the whole call, used or not. Lesson 6 compares the two in more detail.
Network sizes
| Type | Covers | Typical example |
|---|---|---|
| PAN (personal area) | A few meters around one person | Phone to earbuds over Bluetooth |
| LAN (local area) | A home, office floor or building | Office Ethernet and Wi-Fi |
| CAN (campus area) | Several buildings of one owner | University or factory site |
| MAN (metropolitan area) | A city | A city fiber ring linking offices |
| WAN (wide area) | Countries and continents | A company network linking branches, the internet |
Two more terms you will meet: a WLAN is a wireless LAN, and an SD-WAN is a WAN whose paths (fiber, broadband, 5G) are chosen by software policy instead of fixed configuration.
Who talks to whom
- Client-server. Clients ask, a server answers. Your browser and a web server, your mail app and a mail server. Easy to secure and manage centrally.
- Peer-to-peer. Every node is both client and server. BitTorrent, some video call paths and blockchain networks work this way. No central point of failure, but harder to control.
Most real systems mix both: a video call uses a server to set up the call and then tries to send the media directly between peers.
How the internet is put together
Your home router connects to an ISP (internet service provider). Your ISP connects to bigger providers and to internet exchange points (IXPs), buildings where hundreds of networks plug into shared switches to swap traffic cheaply. Each independently run network is an autonomous system (AS) with its own number, and they announce to each other which addresses they can reach using BGP (lesson 12).
$ whois -h whois.radb.net 1.1.1.1 | grep -E '^(route|origin)'
route: 1.1.1.0/24
origin: AS13335
That output says the block 1.1.1.0/24 is announced by autonomous system 13335, which belongs to Cloudflare.
Measuring a network
| Measure | Meaning | Unit |
|---|---|---|
| Bandwidth | Maximum capacity of a link | bits per second (Mbit/s, Gbit/s) |
| Throughput | What you actually get end to end | bits per second |
| Latency | Time for one packet to arrive | milliseconds |
| Round-trip time (RTT) | There and back again | milliseconds |
| Jitter | How much latency varies | milliseconds |
| Packet loss | Share of packets that never arrive | percent |
Bits, not bytes. Network speeds are quoted in bits per second. A “1 Gbit/s” link moves at most 125 megabytes per second, and less in practice because every packet also carries headers.
See your own network
Three commands show you where you are. On Linux:
$ ip -brief address
lo UNKNOWN 127.0.0.1/8 ::1/128
enp3s0 UP 192.168.1.42/24 fe80::3a2c:4aff:fe1b:9c10/64
$ ip route show default
default via 192.168.1.1 dev enp3s0 proto dhcp metric 100
$ ping -c 3 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=57 time=11.8 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=57 time=12.1 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=57 time=11.6 ms
--- 1.1.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 11.6/11.8/12.1/0.2 ms
Read it like this: the interface enp3s0 has the address 192.168.1.42, traffic for anywhere else goes to the router at 192.168.1.1, and a public server answers in about 12 ms with no loss.
On Windows, the same information comes from:
PS> ipconfig
PS> Get-NetRoute -DestinationPrefix 0.0.0.0/0
PS> Test-Connection 1.1.1.1 -Count 3
Quick reference
| Task | Linux | Windows |
|---|---|---|
| Show addresses | ip -brief address | ipconfig |
| Show the default gateway | ip route show default | Get-NetRoute -DestinationPrefix 0.0.0.0/0 |
| Test reachability | ping -c 3 <host> | Test-Connection <host> -Count 3 |
| Your public IP | curl -s https://ifconfig.me | curl.exe -s https://ifconfig.me |
| Who owns an address | whois <ip> | (web whois) |
Exercise
A company links its offices in Lisbon, São Paulo and Toronto over leased lines. What kind of network is that?
Show answer
Answer: C. Offices on different continents are connected by a wide area network. A LAN stays inside one building or site.
Exercise
Your provider sells you a “500 Mbit/s” plan. What is the best download rate you can expect in megabytes per second?
Show answer
Answer: A. A byte is 8 bits, so 500 Mbit/s is at most 62.5 MB/s. Protocol headers use a few percent, so real downloads land just under 60 MB/s.
Exercise
Why does the internet use packet switching instead of reserving a circuit for every conversation?
Show answer
Answer: D. Packet switching shares capacity and survives broken links. It does not promise delivery; protocols like TCP add that on top.
Key takeaways
- A network is nodes, links, protocols and addresses.
- Data is cut into packets, each with its own header, and packets share links.
- PAN, LAN, MAN and WAN describe scale; the internet is a network of autonomous systems.
- Bandwidth is capacity, throughput is what you get, latency is delay.
ip address,ip routeandpingare your first three tools.
FAQ
Is the internet the same as the web?
No. The internet is the global network that carries packets. The web is one application that runs on top of it, using HTTP. Email, SSH, video calls and DNS use the internet too, without being the web.
What is the difference between bandwidth and speed?
Bandwidth is how much data a link can carry per second, like the width of a pipe. What people feel as “speed” is a mix of throughput and latency. A link with huge bandwidth but 300 ms of latency still feels slow for interactive work.
Why does my ping show ttl=57?
TTL (time to live) starts at a value set by the sender, often 64, and every router on the path subtracts one. Seeing 57 means the reply crossed about seven routers. Lesson 7 covers the TTL field.
Do I need Linux to follow this course?
No, but it helps. Every lesson shows Linux commands, and Windows equivalents where they differ. A free Linux virtual machine, WSL on Windows or a cheap cloud server works fine.