What is a Computer Network Model?
A Computer Network Model is a structured framework that explains how data
moves from one device to another over a network.
Instead of handling all networking functions together, network models
divide communication into multiple layers. Each layer performs a specific
task and provides services to the layer above it.
This layered approach simplifies network design, implementation,
troubleshooting, and maintenance.
Real-World Analogy
Consider sending a parcel through a courier service:
- You pack the item.
- The courier company labels it.
- The package is transported through different routes.
- It reaches the destination city.
- The parcel is delivered to the recipient.
Each step has a specific responsibility. Similarly, network communication
is divided into layers where each layer performs a particular task.
What is Layered Architecture?
Layered Architecture is a design approach in which network communication is
divided into smaller and manageable layers.
Each layer:
- Performs a specific function
- Provides services to the layer above
- Receives services from the layer below
- Hides implementation details from other layers
This separation makes network systems easier to develop, understand, and
maintain.
Basic Elements of Layered Architecture
1. Service
A service is a function provided by one layer to the layer above it.
Example:
The Transport Layer provides reliable data delivery services to
applications.
2. Protocol
A protocol is a set of rules that governs communication between
corresponding layers on different devices.
Example:
TCP defines rules for reliable data transmission.
3. Interface
An interface defines how one layer communicates with another layer within
the same device.
Example:
The Application Layer sends data to the Transport Layer through a defined
interface.
How Data Travels in a Layered Architecture
A common misconception is that Layer 4 on one device directly communicates
with Layer 4 on another device.
In reality:
- Data moves down through all layers on the sender's device.
- It is transmitted across the physical network.
- Data moves up through all layers on the receiver's device.
Each layer adds its own information called a header before passing data to
the next layer. This process is known as Encapsulation.
At the receiving end, headers are removed layer by layer. This process is
called Decapsulation.
Why Do We Need Layered Architecture?
1. Divide and Conquer
Complex networking tasks are broken into smaller manageable tasks.
2. Modularity
Each layer can be designed independently.
3. Easy Maintenance
Changes in one layer usually do not affect other layers.
4. Simplified Testing
Each layer can be tested separately.
5. Standardization
Different vendors can build compatible networking equipment by following
standard protocols.
Advantages of Layered Architecture
Modularity
Makes systems easier to understand and maintain.
Interoperability
Allows devices from different manufacturers to communicate.
Scalability
Supports network growth and new technologies.
Easier Troubleshooting
Network issues can be isolated to specific layers.
Reusability
Protocols and services can be reused across multiple applications.
Disadvantages of Layered Architecture
Increased Complexity
Multiple layers can make systems more complex.
Performance Overhead
Each layer adds headers and processing requirements.
Maintenance Challenges
Large layered systems may require frequent updates.
Over-Engineering
Too many layers can introduce unnecessary complexity.
OSI Model (Open Systems Interconnection Model)
The OSI Model is a conceptual framework developed by ISO (International
Organization for Standardization) to standardize network
communication.
It divides communication into seven layers, each responsible for a specific
function.
Layer 1: Physical Layer
The Physical Layer is responsible for transmitting raw bits (0s and 1s)
across the communication medium.
It deals with:
- Cables
- Connectors
- Signals
- Voltage levels
- Wireless transmission
Functions
Bit Synchronization
Synchronizes sender and receiver clocks.
Bit Rate Control
Determines transmission speed.
Physical Topology
Defines network layout such as:
- Bus
- Star
- Ring
- Mesh
Transmission Modes
Simplex
Communication occurs in one direction only.
Example: Keyboard to Computer
Half-Duplex
Communication occurs in both directions, but one at a time.
Example: Walkie-Talkie
Full-Duplex
Communication occurs simultaneously in both directions.
Example: Mobile Phone Call
Layer 2: Data Link Layer
The Data Link Layer ensures error-free communication between directly
connected devices.
Data at this layer is called a Frame.
Functions
Framing
Organizes raw bits into frames.
Physical Addressing
Adds MAC addresses.
Error Detection and Correction
Detects transmission errors.
Access Control
Determines which device can use the communication channel.
Example
When your laptop communicates with a Wi-Fi router, MAC addresses are used
at this layer.
Layer 3: Network Layer
The Network Layer is responsible for routing data between different
networks.
Data at this layer is called a Packet.
Functions
Routing
Determines the best path from source to destination.
Logical Addressing
Uses IP addresses to identify devices.
Example
When you open a website hosted in another country, routers use IP addresses
to forward packets across the Internet.
Layer 4: Transport Layer
The Transport Layer provides end-to-end communication between
applications.
Data at this layer is called a Segment.
Important Protocols
TCP (Transmission Control Protocol)
Provides:
- Reliable delivery
- Error recovery
- Flow control
- Ordered data transmission
UDP (User Datagram Protocol)
Provides:
- Faster communication
- Low overhead
- No delivery guarantee
Used in:
- Online gaming
- Live streaming
- Video conferencing
Functions
Segmentation and Reassembly
Breaks large data into smaller segments and reassembles them.
Port Addressing
Uses port numbers to identify applications.
Example:
HTTP → Port 80
HTTPS → Port 443
FTP → Port 21
Layer 5: Session Layer
The Session Layer manages communication sessions between
applications.
Functions
Session Establishment
Creates communication sessions.
Session Maintenance
Keeps sessions active.
Session Termination
Ends sessions when communication is complete.
Dialog Control
Supports:
- Half-Duplex communication
- Full-Duplex communication
Example
Video conferencing applications use session management to maintain
communication between participants.
Layer 6: Presentation Layer
The Presentation Layer acts as a translator between applications and the
network.
Functions
Data Translation
Example:
ASCII ↔ Unicode
ASCII ↔ EBCDIC
Encryption and Decryption
Protects sensitive information.
Example:
HTTPS encrypts website communication.
Compression
Reduces data size before transmission.
Example:
Compressed image files consume less bandwidth.
Layer 7: Application Layer
The Application Layer is the closest layer to the end user.
It provides network services directly to applications.
Functions
Network Virtual Terminal (NVT)
Allows remote login.
File Transfer
Transfers files between systems.
Mail Services
Supports email communication.
Directory Services
Provides information lookup services.
Example
When you access a website through a browser, the browser interacts with the
Application Layer.
Advantages of the OSI Model
Standardized Framework
Provides a common networking reference.
Easier Troubleshooting
Problems can be isolated by layer.
Improved Interoperability
Supports communication between different systems.
Scalability
Can adapt to various network environments.
Enhanced Security
Security measures can be implemented at multiple layers.
TCP/IP Model
The TCP/IP Model is the practical networking model used on the Internet
today.
It was developed by the U.S. Department of Defense and forms the foundation
of modern Internet communication.
Unlike the OSI Model's seven layers, TCP/IP uses four layers.
1. Application Layer
Combines the functions of:
- Application Layer
- Presentation Layer
- Session Layer
Protocols include:
- HTTP
- HTTPS
- FTP
- SMTP
- DNS
2. Transport Layer
Provides end-to-end communication.
Protocols:
- TCP
- UDP
Functions:
- Error control
- Flow control
- Segmentation
- Reliability
3. Internet Layer
Equivalent to the OSI Network Layer.
Functions:
- Routing
- Logical addressing
- Packet forwarding
Protocols:
- IP
- ICMP
- ARP
4. Network Access (Link) Layer
Combines the OSI Physical and Data Link Layers.
Functions:
- Framing
- Physical transmission
- MAC addressing
Real-World Example: Loading a Website
Suppose you open www.example.com in a web browser.
Application Layer
Browser creates an HTTP request.
Transport Layer
TCP divides data into segments.
Network Layer
IP assigns source and destination addresses.
Data Link Layer
Frames are created using MAC addresses.
Physical Layer
Bits travel through cables or Wi-Fi signals.
At the destination server, the process is reversed until the website data
reaches the web application.
Challenges of Network Models
Implementation Complexity
Theoretical models may be difficult to implement completely.
Adapting to New Technologies
Emerging technologies such as:
- 5G
- Cloud Computing
- IoT
- Edge Computing
require more flexible architectures.
Security Concerns
A weakness in one layer can affect the entire network.
Scalability Issues
Very large networks require advanced optimization.
Protocol Dependency
Certain models depend heavily on specific protocols.
Interoperability Challenges
Different systems may use different standards and implementations.