Networking
What Is a Network?¶
A computer network is two or more devices connected so they can exchange data. This page is the on-ramp for the Networking Fundamentals track: it explains the core ideas you will see on every other page.
Applies to
These concepts are OS-agnostic — they apply equally to Linux, Windows, macOS, phones, and dedicated network gear (switches, routers, firewalls). Where a command helps, we show both a Linux and a Windows example.
Why networks exist¶
Standalone computers are limited. The moment you want to share something — a file, a printer, a database, an internet connection — you need a network. Networking lets devices:
- Share resources (storage, printers, internet access).
- Communicate (email, chat, video calls, web).
- Centralize services (one server many people use).
- Back up and synchronize data between machines.
Clients and servers¶
Most network communication follows the client–server model:
| Role | What it does | Examples |
|---|---|---|
| Client | Requests a service | Web browser, email app, your laptop |
| Server | Provides a service and responds | Web server, file server, database server |
A single machine can be both — your laptop is a client when browsing the web but can act as a server if it shares a folder. A second model, peer-to-peer (P2P), has devices act as equals with no central server (common in small home networks and some file-sharing apps).
CLIENT SERVER
+--------+ request -----> +--------+
| Laptop | | Web |
| | <----- response | server |
+--------+ +--------+
Network sizes: LAN, WAN, MAN¶
Networks are classified by the geographic area they cover:
| Type | Stands for | Scope | Example |
|---|---|---|---|
| LAN | Local Area Network | One building or site | Your home or office network |
| MAN | Metropolitan Area Network | A city or campus | A university spanning several buildings |
| WAN | Wide Area Network | Large distances, multiple sites | A company linking offices in different cities |
Note
The internet is the largest WAN of all. A LAN is usually under your control; a WAN often crosses links you rent from an ISP or telecom provider.
The internet: a network of networks¶
The internet is not a single network — it is a network of networks. Millions of independent LANs and WANs interconnect through Internet Service Providers (ISPs), who in turn connect to one another. There is no central "main computer"; data finds its way across many independent networks to reach its destination.
Home LAN ---\ /--- Company WAN
\ /
Office LAN ---- ISP --- ISP --- ISP ---- Data center
/ \
Phone -----/ \--- Cloud provider
How data moves: packets¶
Data does not travel as one big lump. It is broken into small chunks called packets. Each packet carries:
- A piece of the data (the payload).
- Headers with addressing info — where it came from and where it is going.
Packets travel independently and may even take different paths, then get reassembled in the correct order at the destination. This is called packet switching, and it makes networks resilient: if one path fails, packets reroute around it.
Big file
+-------------------------------+
| AAAAAAAAA BBBBBBBBB CCCCCCCC |
+-------------------------------+
split into
+-----+ +-----+ +-----+
| P1 | | P2 | | P3 | each with source/dest addresses
+-----+ +-----+ +-----+
sent across the network, then reassembled
How packets are addressed and routed is covered in IP addressing and subnetting and routing and NAT. The layered structure behind packets is in the OSI and TCP/IP models.
Bandwidth vs latency¶
Two different measures describe network performance — and beginners often confuse them:
| Term | What it measures | Unit | Analogy |
|---|---|---|---|
| Bandwidth | How much data per second | bits/sec (Mbps, Gbps) | Width of a pipe |
| Latency | How long one packet takes to arrive | milliseconds (ms) | Length of the pipe / delay |
A connection can have high bandwidth but high latency (e.g. satellite: lots of throughput but a long round trip), or low latency but low bandwidth. For a video call, low latency matters most; for a large download, bandwidth matters most.
Measure latency with ping
ping sends a small packet and times the round trip (RTT).
time= values — that is your latency in milliseconds.
Common network devices¶
| Device | Purpose |
|---|---|
| NIC (Network Interface Card) | The adapter in a device that connects it to the network (wired or Wi-Fi). |
| Switch | Connects devices within a LAN and forwards frames by hardware (MAC) address. |
| Router | Connects different networks together and chooses paths between them (e.g. LAN to internet). |
| Access Point (AP) | Provides wireless (Wi-Fi) access, bridging wireless devices onto the wired LAN. |
| Firewall | Filters traffic by rules to allow or block connections for security. |
| Modem | Converts your ISP's signal (cable/DSL/fiber) into something your router understands. |
Switches operate at Layer 2 and routers at Layer 3 — see switching and VLANs and the OSI and TCP/IP models. In homes, the "router" box from your ISP usually combines a modem, router, switch, access point, and firewall in one unit.
A simple home/office network¶
Internet
|
[ Modem ]
|
[ Router ]----------[ Firewall rules ]
/ | \
/ | \
[Switch] | ((( Access Point )))
/ \ | / \
[PC] [Server] | (Laptop) (Phone)
wired wired | Wi-Fi Wi-Fi
[Printer]
Everything behind the router shares one private network and reaches the internet through the router.
Wired vs wireless¶
| Wired (Ethernet) | Wireless (Wi-Fi) | |
|---|---|---|
| Speed/stability | Generally faster and more stable | Varies with distance and interference |
| Mobility | Fixed by cable | Free to move |
| Security | Physical access needed | Must be secured with encryption (WPA2/WPA3) |
| Setup | Run cables | No cables; needs an access point |
Both can coexist on the same LAN — wired for stationary, high-throughput devices; wireless for mobility.
Public vs private networks¶
| Private network | Public network | |
|---|---|---|
| Addresses | Reserved ranges (e.g. 192.168.x.x, 10.x.x.x) |
Globally unique, internet-routable |
| Reachability | Not directly reachable from the internet | Reachable from anywhere |
| Example | Your home LAN behind the router | A web server's public IP |
Private addresses are reused everywhere and are translated to a public address by the router using NAT (Network Address Translation) — see routing and NAT. The reserved private ranges are detailed in IP addressing and subnetting.
See your own network
The Linux track covers this hands-on in networking basics.Verify your work¶
- Can you name the client and the server the last time you opened a web page?
- Is your home network a LAN, MAN, or WAN?
- Run
ping -c 4 8.8.8.8(Linux) orping 8.8.8.8(Windows). Which number is your latency? - Run
ip addroripconfig. Is your address in a private range (192.168.,10., or172.16–31.)? - Which device connects your LAN to the internet — a switch or a router?
Summary¶
- A network connects devices to share resources and communicate.
- Most traffic is client–server; some is peer-to-peer.
- Networks scale from LAN (one site) to MAN (a city) to WAN (large distances); the internet is a network of networks.
- Data travels as packets that are addressed, routed independently, and reassembled.
- Bandwidth is capacity per second; latency is delay — they are different things.
- Core devices: NIC, switch, router, access point, firewall (and modem at the edge).
- Wired is stable and fast; wireless is mobile but must be secured.
- Private addresses stay inside your LAN; public addresses are internet-routable, bridged by NAT.
Next, learn the structure behind all of this in the OSI and TCP/IP models.