1. Introduction to Computer Networks
What is a Computer Network?
A computer network is a group of two or more computers or devices connected together so they can communicate, exchange data, and share resources.
For example, when your computer connects to a Wi-Fi router and accesses a website, your computer is communicating with other network devices and servers through a network.
Simple Example
Computer A ───┐ │ Computer B ───┼─── Router ─── Internet │ Computer C ───┘
Here:
- Computer A, B, C → Network devices
- Router → Connects devices/networks
- Internet → A huge interconnected network
- Connection → Allows devices to communicate
Why Do We Need Computer Networks?
Networks make it possible to share information and resources between devices.
1. Data Sharing
Computers can exchange files and information.
Example:
Computer A ─────── File ───────> Computer B
You can send documents, images, videos, etc.
2. Resource Sharing
Multiple computers can use the same resources.
For example:
PC 1 ──┐ PC 2 ──┼── Printer PC 3 ──┘
Instead of buying a separate printer for every computer, one printer can be shared through the network.
3. Internet Access
A network allows multiple devices to access the Internet through a router.
Laptop │ Phone ─── Wi-Fi Router ─── Internet │ ESP32
4. Communication
Networks allow users and devices to communicate.
Examples:
- Video calls
- Online meetings
- Chat applications
5. Centralized Management
Organizations can manage computers and resources from central servers.
For example:
Server / | \ PC1 PC2 PC3
A company can store employee information, applications, files, and authentication systems on servers.
Basic Components of a Network
A computer network generally consists of several important components.
1. Sender
The device that sends data.
Example:
Laptop → Server
The laptop is the sender.
2. Receiver
The device that receives data.
Laptop → Server ↑ Receiver
The server is the receiver.
3. Transmission Medium
The path through which data travels.
There are two major types:
Wired
- Ethernet cable
- Fiber optic cable
- Coaxial cable
Wireless
- Wi-Fi
- Bluetooth
- Radio waves
- Cellular networks
Example:
PC ─── Ethernet Cable ─── Router
or
Phone )))) Wi-Fi )))) Router
4. Network Devices
Devices help connect and manage networks.
Common devices include:
- Hub
- Switch
- Router
- Modem
- Access Point
- Repeater
- Bridge
- Firewall
You will study these devices in detail in the Network Devices topic.
5. Protocols
A protocol is a set of rules that defines how devices communicate.
Think of it like a language.
For example, humans need a common language to communicate:
Person A ── English ──> Person B
Similarly, computers need communication rules:
Computer A ── Protocol ──> Computer B
Examples:
- HTTP
- HTTPS
- TCP
- UDP
- IP
- DNS
- FTP
- SMTP
How Does Data Travel Through a Network?
Suppose you open:
https://example.com
Your computer needs to communicate with the web server.
A simplified process is:
Your Computer │ ↓ Router │ ↓ Internet │ ↓ Web Server │ ↓ Web Page
Behind the scenes, many things happen.
Step 1 — Your device connects to the network
Your laptop may connect using Wi-Fi or Ethernet.
Step 2 — Your device gets an IP address
For example:
192.168.1.10
This allows the device to be identified within the network.
Step 3 — DNS resolves the domain
You type:
example.com
DNS helps find the corresponding IP address.
Conceptually:
example.com ↓ DNS ↓ IP Address
Step 4 — Data is sent
Your device sends packets toward the destination server.
Computer ↓ Router ↓ ISP ↓ Internet ↓ Server
Step 5 — Server responds
The server sends the requested data back.
Server ↓ Internet ↓ Router ↓ Computer
Your browser then displays the website.
What is a Network?
A network can be as small as two devices:
PC ───── PC
or extremely large:
Millions/Billions of Devices │ ↓ Internet
The Internet itself is essentially a global network of interconnected networks.
Network Communication
Communication can happen in different ways.
Wired Communication
Data travels through physical cables.
Computer ───────── Switch Ethernet
Advantages:
- Usually stable
- High speed
- Lower interference
- Better for fixed systems
Wireless Communication
Data travels using electromagnetic/radio signals.
Laptop )))) Wi-Fi )))) Router
Examples:
- Wi-Fi
- Bluetooth
- 4G/5G
- NFC
Advantages:
- Mobility
- Easy installation
- No physical cable required
Data in a Network
Computers don't normally send a huge file as one giant piece across a network.
Data is divided into smaller units called packets.
For example:
Large File ↓ ┌─────┬─────┬─────┬─────┐ │ P1 │ P2 │ P3 │ P4 │ └─────┴─────┴─────┴─────┘
These packets travel through the network.
At the destination, they are processed/reassembled appropriately to recover the original data.
This packet-based communication is fundamental to modern networks.
Important Network Terms
Node
Any device connected to a network can be considered a node.
Examples:
- Computer
- Phone
- Printer
- Server
- IoT device
Host
A device that has an IP address and participates in network communication is commonly called a host.
Example:
Laptop Server Phone ESP32
Client
A device/application that requests a service.
Example:
Browser → Web Server Client Server
Your browser acts as a client when requesting a webpage.
Server
A computer/system that provides a service to clients.
Example:
Client ───── Request ─────> Server Client <──── Response ───── Server
Examples of servers:
- Web server
- DNS server
- File server
- Database server
- Mail server
Network Examples in Real Life
Home Network
Internet │ Router / | \ Phone Laptop TV
School/College Network
Internet │ Router │ Switch ┌───────┼───────┐ PC PC PC │ │ │ Printer Server Lab
IoT Network
Since IoT devices are also networked devices:
Temperature Sensor │ ↓ ESP32 │ Wi-Fi │ ↓ Router │ ↓ Internet │ ↓ Web Server │ ↓ User
For example, an ESP32 can send temperature data to a server, and you can view it from your phone.
Advantages of Computer Networks
- Resource sharing
- File and data sharing
- Internet sharing
- Fast communication
- Centralized management
- Remote access
- Backup and storage
- Scalability
- Collaboration
- IoT and automation
Disadvantages of Computer Networks
Networks also introduce some risks and challenges.
1. Security Risks
Attackers may attempt:
- Unauthorized access
- Malware attacks
- Data theft
- Denial-of-service attacks
2. Network Failure
If an important network device fails, communication may be interrupted.
3. Cost
Large networks require:
- Routers
- Switches
- Cables
- Servers
- Security devices
- Maintenance
4. Complexity
Large networks can become difficult to configure and manage.
5. Privacy Issues
Network traffic and stored data need proper protection.
Types of Networks
Networks can be categorized based on their geographical coverage.
PAN → LAN → MAN → WAN
PAN — Personal Area Network
Small network around an individual.
Example:
Phone ── Bluetooth ── Earbuds
LAN — Local Area Network
Covers a small area such as:
- Home
- Office
- Computer lab
- School
MAN — Metropolitan Area Network
Covers a larger area such as a city or metropolitan region.
WAN — Wide Area Network
Covers very large geographical areas.
Example:
Country → Multiple Countries → Worldwide
The Internet is the most famous example of a global interconnected network.
You will study these network types in detail in the next topic.
Key Concept to Remember
A network basically answers four questions:
WHO? ↓ Which devices are communicating? HOW? ↓ Through which medium? WHAT RULES? ↓ Which protocols are being used? WHERE? ↓ Where should the data go?
For example:
Laptop │ │ Wi-Fi ↓ Router │ │ IP + TCP/UDP ↓ Internet │ ↓ Server
In one sentence:
A computer network is a collection of interconnected devices that communicate and share data and resources using communication media and predefined protocols.
Topics you should understand before moving on
- What is a network?
- Why networks are needed
- Network components
- Wired vs wireless communication
- Client and server
- Packets
- Nodes and hosts
- Basic network devices
- Basic protocols
- LAN, PAN, MAN, WAN
- Basic Internet communication