Computer networks connect multiple devices to share resources, exchange data, and communicate. From simple LANs in homes to the global Internet connecting billions of devices, networks form the backbone of modern computing.
Definition: A computer network is a collection of interconnected devices (computers, servers, printers, mobile phones, IoT devices) that communicate using shared communication protocols and media.
| Type | Range / Scope | Example |
|---|---|---|
| PAN | 1–10 m (personal) | Bluetooth, USB devices. |
| LAN | Building / campus | Office WiFi, home network. |
| MAN | City | Cable TV city network. |
| WAN | Country / global | Internet. |
| Device | Function |
|---|---|
| Router | Routing between networks (IP layer). |
| Switch | MAC‑based forwarding within LAN. |
| Hub | Simple broadcast on LAN. |
| Bridge | Connects LAN segments. |
| Topology | Structure | Pros / Cons |
|---|---|---|
| Bus | Single backbone cable. | Simple & cheap; one fault can break whole network. |
| Star | All devices → hub/switch. | Easy fault isolation; central point of failure. |
| Ring | Devices in circle, token‑passing. | Predictable; ring breaks with one link failure. |
| Mesh | Every device connected to many others. | Very reliable; complex and expensive. |
The Internet is a global network of networks using the TCP/IP protocol suite. It is decentralized and connects government, academic, corporate, and private networks.
Protocols are standardized rules for communication.
| Protocol | Layer | Purpose |
|---|---|---|
| Ethernet | Data Link | LAN communication (MAC addresses). |
| IP | Network | Logical addressing and routing. |
| TCP | Transport | Reliable, connection‑oriented delivery. |
| UDP | Transport | Unreliable, fast datagram transport. |
| HTTP | Application | Web browsing. |
The OSI model divides network communication into 7 conceptual layers:
Data flow: App Data → Segment → Packet → Frame → Bits (sending).
Receiving: Bits → Frame → Packet → Segment → App Data.
Internet actually uses TCP/IP model:
Addresses uniquely identify source and destination.
| Address Type | Layer | Scope | Example |
|---|---|---|---|
| MAC (Physical) | Data Link | LAN only | 00:1A:2B:3C:4D:5E |
| IP (Logical) | Network | Global | 192.168.1.10 |
| Port | Transport | Process | 80 (HTTP) |
| URL | Application | Resource | google.com/path |