CN- Notes
CN- Notes
Question 1: What is a Computer Network? Discuss its Advantages and Explain Various Network
Topologies.
Introduction
A computer network is a collection of two or more computers and other devices connected together
through communication links for the purpose of exchanging information and sharing resources.
These resources may include hardware devices, software programs, files, databases, and Internet
connections.
In a network, devices communicate with each other using a set of rules known as protocols. The
computers connected to a network are called nodes, and the communication medium may be wired
or wireless.
Today, computer networks have become an essential part of modern communication systems and
are widely used in homes, offices, industries, educational institutions, and banks.
Before networking, every computer worked independently. Sharing information and resources was
difficult and expensive. Computer networks were developed to:
Facilitate communication.
1. Resource Sharing
One of the main advantages of networking is the sharing of resources. Expensive devices such as
printers, scanners, storage devices, and software can be shared among multiple users.
Example:
A single printer can serve all computers in an office instead of purchasing separate printers for each
computer.
2. Data Sharing
Networks allow users to share files and information easily. Data can be accessed and transferred
quickly from one computer to another.
Example:
3. Communication
Video conferencing
Voice calls
Instant messaging
4. Cost Reduction
Since resources are shared among users, the overall cost of hardware and software is reduced.
Example:
Instead of buying software licenses for every computer, a centralized server can provide services to
multiple users.
5. Reliability
In a network, data can be stored at multiple locations. If one system fails, information can still be
retrieved from another device.
6. Centralized Management
Network administrators can manage data, software, and security from a central location.
7. Scalability
New computers and devices can easily be added to an existing network without affecting its
operation.
8. Remote Access
Users can access files and services from distant locations using the Internet.
Example:
Employees can work from home and access office servers remotely.
Network Topologies
Definition
Network topology refers to the physical or logical arrangement of computers and communication
links in a network. It determines how devices are connected and how information flows between
them.
1. Bus Topology
2. Star Topology
3. Ring Topology
4. Mesh Topology
5. Tree Topology
6. Hybrid Topology
1. Bus Topology
Definition
In bus topology, all devices are connected to a single communication cable called the backbone cable
or bus.
Structure
A -----|
C -----|
D -----|
Working
Whenever a computer sends data, the signal travels along the bus and reaches all nodes. The
intended receiver accepts the data, while other devices ignore it.
Advantages
Easy to extend.
Disadvantages
Applications
Small LANs
Temporary networks
2. Star Topology
Definition
Structure
Working
Data transmitted by one device first reaches the central hub or switch, which forwards it to the
destination device.
Advantages
Easy installation and maintenance.
Better performance.
Disadvantages
Applications
Ethernet LANs
Office networks
3. Ring Topology
Definition
In ring topology, every device is connected to exactly two neighboring devices, forming a closed loop.
Structure
A ----- B
| |
D ----- C
Working
Data travels in one direction around the ring until it reaches the destination.
Advantages
No collisions.
Disadvantages
Failure of one node affects the entire network.
Troubleshooting is difficult.
Applications
4. Mesh Topology
Definition
Structure
Working
Advantages
Highly reliable.
Disadvantages
Expensive.
Installation is complex.
Applications
Military networks
Banking systems
Internet backbone
5. Tree Topology
Definition
Tree topology is a combination of bus and star topologies arranged in a hierarchical form.
Structure
Root
/ \
Hub1 Hub2
/ \ / \
A B C D
Advantages
Easy expansion.
Disadvantages
Applications
Universities
Large companies
6. Hybrid Topology
Definition
Hybrid topology combines two or more different topologies to obtain their advantages.
Example
Advantages
Flexible.
Reliable.
Easily expandable.
Disadvantages
Complex design.
Expensive.
Applications
Large enterprises
Industrial networks
Comparison of Topologies
Introduction
A computer network is formed by combining various hardware devices and software components.
Hardware provides the physical means for communication, whereas software provides the rules and
programs that control the operation of the network.
Both hardware and software are essential for establishing reliable communication and ensuring
efficient transfer of information between devices.
Network Hardware
Definition
Network hardware refers to the physical devices and transmission media used to establish
communication among computers and other devices in a network.
These devices are responsible for transmitting, receiving, and processing data.
1. Nodes
3. Repeater
4. Hub
5. Bridge
6. Switch
7. Router
8. Gateway
9. Modem
1. Nodes
Nodes are the devices connected to the network. A node can be a computer, printer, server,
smartphone, or any other device capable of sending or receiving data.
Functions
Send data.
Receive data.
Process information.
Examples
Desktop computers
Laptops
Mobile phones
Printers
Definition
A Network Interface Card (NIC) is a hardware component that enables a computer to connect to a
network.
Every NIC has a unique physical address called the MAC Address.
Functions
Receives incoming signals and converts them back into digital data.
Types
3. Repeater
Definition
As signals travel over long distances, they become weak. A repeater amplifies and retransmits these
signals to extend communication distance.
Functions
Regenerates signals.
Applications
Telephone networks
4. Hub
Definition
Working
When a hub receives data from one device, it broadcasts that data to all connected devices
regardless of the destination.
Only the intended receiver accepts the frame, while others discard it.
Advantages
Easy to install.
Disadvantages
Low security.
Poor performance.
5. Bridge
Definition
Functions
Advantages
Improves performance.
Reduces collisions.
Disadvantages
6. Switch
Definition
A switch is an intelligent networking device that connects multiple devices within a LAN and forwards
data only to the intended destination.
Working
The switch maintains a MAC address table.
When a frame arrives, the switch checks the destination MAC address and sends the frame only to
the corresponding device.
Advantages
High efficiency.
Disadvantages
Hub Switch
7. Router
Definition
Functions
Working
Routers examine IP addresses and determine the most suitable route for packet transmission.
Advantages
Efficient routing.
Applications
Internet communication.
Wireless networks.
Enterprise networks.
8. Gateway
Definition
Functions
Protocol conversion.
Example
9. Modem
Definition
It converts digital signals into analog signals during transmission and converts analog signals back
into digital form during reception.
Functions
Types
DSL Modem
Cable Modem
Wireless Modem
10. Transmission Media
Advantages
Low cost.
Easy installation.
Disadvantages
Limited bandwidth.
Susceptible to noise.
Applications
Telephone systems.
LAN networks.
Advantages
Applications
Cable TV.
Broadband Internet.
Advantages
Very high bandwidth.
High speed.
Disadvantages
Expensive.
Difficult installation.
Applications
Internet backbone.
Long-distance communication.
Types
Radio Waves
Microwaves
Infrared Waves
Network Software
Definition
Network software consists of programs and protocols that control the operation and communication
of the network.
2. Protocol Software
3. Application Software
1. Network Operating System (NOS)
Definition
A Network Operating System manages network resources and controls communication among
connected devices.
Functions
User authentication.
File sharing.
Device management.
Security management.
Examples
Windows Server
Linux
UNIX
2. Protocol Software
Definition
They determine:
Examples
IP (Internet Protocol)
3. Application Software
Examples
Web browsers
E-mail applications
Functions
Exchange information.
Support communication.
Network hardware provides the physical infrastructure, while network software provides the
intelligence required for communication.
Without hardware, no physical connection exists, and without software, devices cannot understand
each other.
Thus, both hardware and software work together to enable efficient and reliable network
communication.
Conclusion
Network hardware and software are the two fundamental components of a computer network.
Hardware establishes physical connectivity, whereas software provides communication rules and
services. Their combined operation enables resource sharing, communication, and efficient data
transfer across modern networks.
Introduction
Switching is the process of selecting a path through which data is transmitted from the sender to the
receiver.
In simple words, switching is responsible for determining how information travels from one device
to another.
Significance of Switching
Communication channels are shared among many users, resulting in better bandwidth utilization.
2. Reduced Cost
3. Reliable Communication
5. Improved Performance
1. Circuit Switching
2. Message Switching
3. Packet Switching
4. Hybrid Switching
1. Circuit Switching
Definition
Example:
After the connection is established, data flows continuously through the reserved path.
After communication is completed, the path is disconnected and resources are freed.
Fixed bandwidth.
Connection-oriented.
1. Reliable Communication
2. No Packet Loss
4. In-order Delivery
4. Expensive
Applications
Telephone networks
ISDN
Video conferencing
2. Message Switching
Definition
In message switching, the entire message is treated as one unit and transmitted from one node to
another using the store-and-forward technique.
Working
A→B→C→D
2. Stores it temporarily.
Characteristics
No dedicated path.
Store-and-forward mechanism.
Advantages
Disadvantages
1. Large Delay
Applications
Telegraph systems
Email systems
3. Packet Switching
Definition
Packet switching is a technique in which a message is divided into smaller units called packets, and
each packet is transmitted independently through the network.
It is the most widely used switching technique and forms the basis of the Internet.
Working
HELLO WORLD
Packet1
Packet2
Packet3
Packet4
Source address
Destination address
Sequence number
Error-checking information
Data
Packets may travel through different paths and are reassembled at the destination.
Characteristics
No dedicated path.
In this method:
Example
Here:
Example
ATM networks.
2. High Reliability
Failure of one path does not stop communication because alternate routes may exist.
3. Suitable for Bursty Traffic
4. Cost Effective
Disadvantages
3. Complex Processing
Applications
Internet
LANs
Wireless networks
Definition
Hybrid switching combines the features of two or more switching techniques to achieve better
performance and efficiency.
It attempts to utilize the advantages of circuit switching and packet switching while minimizing their
disadvantages.
Characteristics
Provides flexibility.
Advantages
High efficiency.
Better reliability.
Flexible communication.
Reduced delay.
Applications
ATM Networks
Conclusion
Switching techniques are fundamental to data communication. Circuit switching provides dedicated
communication, message switching uses store-and-forward transmission, packet switching offers
efficient resource utilization and forms the basis of the Internet, while hybrid switching combines the
advantages of multiple techniques to improve performance.
Question: Explain the Internet in Detail. Discuss its Architecture, Working, Services, and
Applications.
This topic is important because understanding the Internet forms the foundation for studying the
TCP/IP Protocol Suite and Application Layer protocols. Questions related to Internet and its services
have appeared in previous papers.
Introduction
The Internet is a worldwide collection of interconnected computer networks that communicate with
one another using the TCP/IP protocol suite. It is often called a "network of networks" because it
connects millions of private, public, academic, and business networks around the world.
Through the Internet, users can exchange information, access resources, communicate with others,
and utilize various online services irrespective of geographical location.
Today, the Internet has become one of the most important technologies and has revolutionized
communication, education, business, entertainment, and scientific research.
Definition
Internet is a global system of interconnected computer networks that uses the TCP/IP protocol
suite to exchange information and provide communication services to users worldwide.
The Internet evolved from a research project called ARPANET (Advanced Research Projects Agency
Network) developed by the U.S. Department of Defense in the late 1960s.
Important Milestones
1969 – ARPANET
1970s
1983
1990
1991
Present
1. Global Connectivity
2. Decentralized Structure
3. Packet-Switched Network
6. Scalability
Architecture of Internet
Examples:
Computers
Smartphones
Servers
Tablets
2. Communication Links
Examples:
Optical fiber
Coaxial cables
Wireless communication
3. Packet Switches
Packet switches are responsible for forwarding packets from source to destination.
Examples:
Routers
Switches
Examples:
Airtel
Jio
BSNL
Local ISP
Regional ISP
National ISP
Application Layer
Transport Layer
Internet Layer
Working of Internet
Example:
[Link]
Example:
[Link] → 142.250.x.x
Source address
Destination address
Sequence number
Control information
Step 4: Routing
Step 5: Reassembly
Step 6: Response
The requested web page is sent back to the user.
Internet Services
The WWW enables users to access information in the form of web pages.
It uses:
HTTP
HTML
Web browsers
Examples:
Wikipedia
Examples:
Gmail
Outlook
3. File Transfer
4. Remote Login
Telnet
SSH
Supports:
Video conferencing
Examples:
Zoom
Skype
Examples:
Amazon
Flipkart
Net banking
7. Social Networking
Examples:
X (Twitter)
8. Cloud Computing
Examples:
Google Drive
OneDrive
Advantages of Internet
1. Fast Communication
2. Information Availability
4. Online Services
6. Remote Access
Disadvantages of Internet
1. Security Threats
2. Privacy Issues
3. Internet Addiction
4. Spread of Misinformation
Applications of Internet
Education
Online learning
Digital libraries
Business
E-commerce
Online transactions
Communication
Video conferencing
Entertainment
Streaming services
Online gaming
Research
Scientific databases
Healthcare
Telemedicine
Online consultation
Introduction
The TCP/IP Protocol Suite is a collection of communication protocols used to connect computers and
devices over the Internet. It specifies how data should be transmitted, addressed, routed, and
received.
IP (Internet Protocol)
The TCP/IP model was developed by the Department of Defense (DoD) as part of the ARPANET
project and later became the standard protocol suite for the Internet.
It follows a layered architecture in which each layer performs specific functions and provides services
to the layer above it.
Application Layer
Transport Layer
Internet Layer
1. Application Layer
Introduction
The Application Layer is the highest layer of the TCP/IP model. It provides services directly to users
and application programs.
This layer combines the functions of the Application, Presentation, and Session layers of the OSI
model.
1. User Interface
Examples:
Web browsers
Email applications
2. File Transfer
Example:
FTP
3. Web Access
Example:
HTTP
HTTPS
4. Remote Login
Example:
Telnet
SSH
5. Name Resolution
Example:
DNS
Examples:
SMTP
POP3
IMAP
Protocol Function
This layer acts as an interface between the user and the network. Without this layer, users would not
be able to access network services such as web browsing, email, and file transfer.
2. Transport Layer
Introduction
The Transport Layer provides process-to-process communication and ensures reliable delivery of
data.
It is responsible for dividing data into segments and reassembling them at the receiver.
1. Segmentation
2. Process-to-Process Delivery
Data is delivered from one application process to another using port numbers.
3. Flow Control
4. Error Control
5. Reliable Communication
Features
Connection-oriented.
Error control.
Flow control.
Sequencing of packets.
Acknowledgment mechanism.
Applications
Web browsing
File transfer
Features
Faster transmission.
No acknowledgment.
No flow control.
Less overhead.
Applications
Video streaming
Online gaming
DNS
The Transport Layer ensures that communication between applications is reliable and error-free.
3. Internet Layer
Introduction
The Internet Layer is responsible for delivering packets from source to destination across different
networks.
1. Logical Addressing
Example:
[Link]
2. Routing
3. Packet Forwarding
4. Fragmentation
Two versions:
IPv4
IPv6
Example:
Ping command
The Internet Layer is responsible for connecting multiple networks and ensuring that packets reach
the correct destination.
Introduction
This layer combines the functions of the Data Link Layer and Physical Layer of the OSI model.
1. Physical Transmission
3. Error Detection
4. MAC Addressing
Hub
Switch
NIC
Cables
Technologies Used
Ethernet
Wi-Fi
Fiber optics
Token Ring
Encapsulation in TCP/IP
When data moves from upper layers to lower layers, each layer adds its own header.
Application Layer
Transport Layer
↓
Internet Layer
(Adds IP Header)
Physical Medium
At the receiver side, the reverse process called Decapsulation takes place.
1. Open Standard
2. Scalable
3. Reliable
4. Supports Routing
5. Flexible
1. Complex Design
Before the development of standard networking models, different manufacturers used their own
communication standards. Devices from different vendors often faced compatibility problems,
making communication difficult.
To overcome these problems, the International Organization for Standardization (ISO) developed
the OSI Reference Model in 1984.
The OSI model provides a standard framework for communication between different computer
systems by dividing the communication process into seven layers, where each layer performs a
specific function and provides services to the layer above it.
Definition
The OSI Reference Model is a seven-layer conceptual framework developed by ISO for standardizing
network communication and enabling interoperability among heterogeneous systems.
7. Application Layer
6. Presentation Layer
5. Session Layer
4. Transport Layer
3. Network Layer
1. Physical Layer
Data moves from the Application Layer to the Physical Layer at the sender side and follows the
reverse path at the receiver side.
Introduction
The Physical Layer is the lowest layer of the OSI model. It is responsible for transmitting raw bits from
one device to another through the communication medium.
1. Transmission of Bits
2. Mechanical Specifications
Defines:
Cable types
Connectors
Pin configurations
3. Electrical Specifications
Defines:
Voltage levels
Signal timing
Data rates
4. Physical Topology
Specifies how devices are physically connected.
Examples:
Bus
Star
Ring
Hub
Repeater
Transmission Media
Examples
Ethernet cables
Optical fiber
Wireless transmission
Introduction
The Data Link Layer provides reliable node-to-node communication and converts raw bits into
frames.
1. Framing
2. Physical Addressing
3. Error Detection
5. Access Control
Sublayers
Switch
Bridge
Examples
Ethernet
PPP
HDLC
Introduction
The Network Layer is responsible for delivering packets from source to destination across multiple
networks.
1. Logical Addressing
[Link]
2. Routing
3. Packet Forwarding
4. Fragmentation
Router
Protocols
IP
ICMP
IGMP
Introduction
The Transport Layer provides process-to-process communication and ensures reliable delivery of
data.
1. Segmentation
2. Process-to-Process Delivery
Uses port numbers to identify applications.
3. Flow Control
4. Error Control
5. Sequencing
6. Multiplexing
Protocols
TCP
UDP
Introduction
The Session Layer establishes, manages, and terminates communication sessions between
applications.
1. Session Establishment
2. Session Maintenance
Keeps communication active.
3. Session Termination
4. Synchronization
Examples
NetBIOS
Introduction
The Presentation Layer is responsible for the syntax and semantics of information exchanged
between systems.
1. Data Translation
Example:
ASCII ↔ Unicode
2. Encryption
3. Decryption
4. Compression
Reduces the size of data to improve transmission efficiency.
Examples
JPEG
MPEG
GIF
SSL
Introduction
The Application Layer is the topmost layer and provides network services directly to users.
1. File Transfer
2. Email Services
3. Remote Login
4. Web Browsing
5. Name Resolution
Protocols
HTTP
HTTPS
FTP
DNS
SMTP
POP3
Telnet
SSH
Application Layer
Presentation Layer
Session Layer
Transport Layer
Network Layer
Physical Layer
(Transmits Bits)
At the receiver side, headers are removed layer by layer through decapsulation.
1. Standardization
Provides a universal communication framework.
2. Modular Design
3. Easier Troubleshooting
4. Interoperability
5. Independent Development
1. Complex Architecture
2. Layer Overhead
3. Mostly Theoretical
The Internet actually follows the TCP/IP model rather than the OSI model.
Top to Bottom
Application
Presentation
Session
Transport
Network
Data Link
Physical
Bottom to Top
Physical
Data Link
Network
Transport
Session
Presentation
Application
Transmission Control
Full Form Open Systems Interconnection Model
Protocol/Internet Protocol Model
Session and
Present as separate layers Included in Application Layer
Presentation Layers
Development Model developed first, then protocols Protocols developed first, then
Basis of Comparison OSI Model TCP/IP Model
Approach model
Mainly used for understanding and Widely used in the Internet and
Usage
teaching networking concepts real-world networks
Complexity More complex due to seven layers Simpler due to fewer layers
Layer-wise Comparison
Question: Explain the Application Layer and Discuss the Services Provided by It.
Introduction
The Application Layer is the topmost layer of both the OSI model and the TCP/IP protocol suite. It
acts as an interface between the user and the network and provides various services that allow users
to access network resources.
Unlike lower layers, the Application Layer is directly visible to the user and supports applications such
as web browsers, email systems, file transfer utilities, and remote login services.
In simple words, the Application Layer enables communication between application programs
running on different computers.
Definition
The Application Layer is the layer responsible for providing network services directly to end users
and application processes.
The Application Layer allows users to remotely log into another computer and access its resources.
Example
Telnet
SSH
The Application Layer provides mechanisms for transferring files between computers and managing
those files.
Example
Users can:
Upload files
Download files
Rename files
Delete files
Example
SMTP
POP3
IMAP
It allows users to access web pages and websites through web browsers.
Example
HTTP
HTTPS
Applications:
Google Chrome
Mozilla Firefox
Microsoft Edge
The Application Layer provides name resolution services through DNS, which converts domain names
into IP addresses.
Example
[Link]
[Link]
6. Directory Services
Directory services maintain information about users, devices, and network resources.
7. Resource Sharing
Printers
Files
Databases
Storage devices
User authentication
Access control
Secure communication
Example
HTTPS
SSH
1. Web Service
Protocols Used
HTTP
HTTPS
Protocol Used
FTP
Protocols Used
SMTP
POP3
IMAP
Protocols Used
Telnet
SSH
Protocol Used
DNS
6. Multimedia Service
Applications
Video conferencing
Streaming services
Protocol
SNMP (Simple Network Management Protocol)
Protocol Purpose
User-friendly interface.
Facilitates communication.
The Application Layer is the topmost layer of the networking architecture and provides services
directly to users and application programs. It enables web browsing, file transfer, electronic mail,
remote login, and name resolution, making it one of the most important layers in computer
networking.
The Client-Server Paradigm is one of the most widely used communication models in computer
networks. In this architecture, one computer called the client requests services, while another
computer called the server provides those services.
The client and server communicate through a network using various protocols. Most Internet
applications such as WWW, email, file transfer, and online banking are based on the client-server
model.
Definition
The Client-Server Paradigm is a network architecture in which a client sends requests for services or
resources, and a server processes those requests and provides the required response.
1. Client
Functions
Sends requests.
Receives responses.
Examples
Web browser
Mobile applications
Email clients
2. Server
A server is a powerful computer or software program that provides resources and services to clients.
Functions
Examples
Web server
File server
Database server
Mail server
Step 1
Example:
Step 2
Step 3
Step 4
Diagram
Request
Types of Servers
1. Web Server
Example:
Apache
Nginx
2. File Server
3. Database Server
Example:
MySQL
Oracle
4. Mail Server
Example:
Gmail server
5. Application Server
Request-response communication.
Centralized management.
Supports scalability.
Advantages
1. Centralized Control
2. Better Security
3. Easy Maintenance
4. Resource Sharing
5. Scalability
Disadvantages
2. High Cost
3. Network Dependency
Performance may degrade when many clients access the server simultaneously.
Email systems
Online banking
E-commerce websites
Cloud computing
Introduction
The World Wide Web (WWW), commonly known as the Web, is a system of interconnected web
pages and documents that can be accessed through the Internet using a web browser.
The WWW was proposed by Tim Berners-Lee in 1989 while working at CERN. It was developed to
facilitate the sharing of information among researchers.
Today, the World Wide Web is one of the most widely used services available on the Internet.
Definition
The World Wide Web (WWW) is a collection of interlinked hypertext documents, multimedia
resources, and web pages that are accessed through the Internet using web browsers.
Internet
WWW
Example
Think of the Internet as a road network and the WWW as the vehicles traveling on those roads.
The Internet can exist without the Web, but the Web cannot exist without the Internet.
Components of WWW
Example Elements
Headings
Paragraphs
Images
Tables
Hyperlinks
Example
[Link]
A URL specifies:
Protocol
Domain name
Resource location
HTTP is the communication protocol used between web browsers and web servers.
Architecture of WWW
Components
Client
Examples:
Google Chrome
Mozilla Firefox
Microsoft Edge
Server
Examples:
Apache Server
Nginx Server
Architecture
User
↓ HTTP Request
Web Server
↓ HTTP Response
Web Browser
Working of WWW
Example:
[Link]
The browser contacts a DNS server to obtain the IP address corresponding to the domain name.
Example:
[Link]
[Link]
The browser establishes a connection with the web server using TCP/IP protocols.
Example:
GET /[Link]
The server processes the request and locates the required web page.
The browser interprets the HTML code and displays the page to the user.
Features of WWW
1. Hypertext Based
2. Distributed System
3. Multimedia Support
Supports:
Text
Images
Audio
Video
Animation
4. Platform Independent
5. User Friendly
Advantages of WWW
2. Global Connectivity
3. Multimedia Support
4. Resource Sharing
5. Supports E-Commerce
Limitations of WWW
1. Security Risks
3. Information Overload
4. Dependence on Internet
WWW vs Internet
WWW Internet
HTTP is an important Application Layer protocol and questions related to the HTTP model, its role,
and functions have appeared in previous year papers.
Definition
HTTP (HyperText Transfer Protocol) is an Application Layer protocol used for transferring web pages
and other resources between a web browser (client) and a web server.
It follows the request-response model and forms the foundation of the World Wide Web (WWW).
HTTP Architecture
HTTP follows the Client-Server Architecture.
Components
1. Client
The client is usually a web browser that sends requests for web pages.
Examples:
Google Chrome
Mozilla Firefox
Microsoft Edge
2. Server
Examples:
Apache Server
Nginx
Architecture
HTTP Request
HTTP Response
Request-Response Model
Step 1
Example:
Step 2
Step 3
The server sends an HTTP response containing:
Status code
Headers
Requested resource
Step 4
HTTP Messages
It consists of:
Request line
Header fields
Blank line
Example
Host: [Link]
It contains:
Status line
Header fields
Blank line
Message body
Example
HTTP/1.1 200 OK
Content-Type: text/html
HTTP Methods
1. GET
Example
2. POST
Example
3. PUT
4. DELETE
5. HEAD
6. OPTIONS
1xx – Informational
100 Continue
2xx – Success
Examples:
200 OK
201 Created
3xx – Redirection
Examples:
302 Found
Examples:
401 Unauthorized
403 Forbidden
Examples:
Conclusion
HTTP is an Application Layer protocol that enables communication between web browsers and web
servers. It follows the client-server architecture and request-response model and uses various
methods and status codes to manage the exchange of web resources.
FTP (File Transfer Protocol) is an Application Layer protocol used for transferring files between
computers connected through a network. It follows the client-server model in which the client
requests files and the server provides file transfer services. FTP allows users to upload files from a
local machine to a remote server and download files from the server to the local machine.
Architecture
FTP follows the client-server architecture. An FTP client establishes a connection with an FTP server
to perform file transfer operations. The communication is carried out through two separate
connections: a control connection and a data connection. The control connection is used for sending
commands and responses between the client and the server, while the data connection is used for
transferring the actual files. This separation enables FTP to manage commands and data
simultaneously.
Control Connection
Data Connection
Working
The working of FTP begins when a client establishes a connection with the FTP server. After the
connection is established, the user provides authentication information such as username and
password. Once the server verifies the user, the client can request various operations such as
uploading, downloading, renaming, or deleting files. The requested file is transferred through the
data connection while commands and responses continue through the control connection. After the
transfer is completed, the connection is terminated.
Ports Used
FTP uses two port numbers for communication. Port 21 is used for establishing the control
connection and exchanging commands between the client and the server. Port 20 is used for
transferring the actual data or files. Thus, FTP uses separate channels for control information and
data transfer, making file communication more efficient.
1. Telnet
Definition
Telnet (Telecommunication Network) is an Application Layer protocol that allows a user to remotely
access and control another computer over a network. It provides a command-line interface through
which a user can execute commands on a remote machine as if working locally.
Working
When a Telnet client initiates a connection, it establishes communication with the Telnet server
running on the remote machine. After successful authentication, the user can enter commands
through the local system, which are executed on the remote computer. The results are then sent
back to the user.
Port Used
Limitation
Since Telnet transmits usernames, passwords, and data in plain text, it is considered insecure and is
rarely used today.
Definition
SSH (Secure Shell) is an Application Layer protocol used for secure remote login and communication
between computers. It was developed as a secure replacement for Telnet.
Working
An SSH client establishes a secure encrypted connection with the SSH server. After authentication,
the user can remotely execute commands and transfer files securely. All information exchanged
between the client and server is encrypted, protecting it from unauthorized access.
Port Used
Telnet SSH
Definition
The Domain Name System (DNS) is an Application Layer protocol that translates human-readable
domain names into their corresponding IP addresses. It acts like a directory service of the Internet
and enables users to access websites using names instead of numerical IP addresses.
Example
[Link]
[Link]
Computers communicate using IP addresses, but it is difficult for humans to remember numerical
addresses. DNS solves this problem by providing meaningful domain names that are easier to
remember.
Architecture of DNS
Working of DNS
When a user enters a domain name in a web browser, the request is first sent to the local DNS server.
If the required IP address is not available locally, the query is forwarded to the root server, then to
the top-level domain server, and finally to the authoritative server. The authoritative server returns
the corresponding IP address, which is then sent back to the user. Using this IP address, the browser
establishes communication with the desired web server.
Advantages
Question: Explain Peer-to-Peer (P2P) Networks and Distributed Hash Table (DHT).
Definition
A Peer-to-Peer (P2P) network is a network architecture in which all computers, called peers, have
equal capabilities and responsibilities. Unlike the client-server model, there is no dedicated central
server. Each peer can act both as a client and as a server, sharing resources directly with other peers.
Architecture
In a P2P network, every node communicates directly with other nodes without depending on a
central server.
Peer A
/ \
\ /
Peer D
Working
When a peer requires a resource such as a file, it sends a request to other peers in the network. A
peer possessing the requested resource responds and transfers the data directly to the requesting
peer. Thus, all participating nodes contribute resources and services to the network.
Features
No central server.
Advantages
Highly scalable.
Disadvantages
Definition
A Distributed Hash Table (DHT) is a decentralized data structure used in P2P networks to efficiently
store and locate information. It distributes data among participating peers using key-value pairs.
Working
In a DHT system, each piece of data is assigned a unique key using a hash function. The key
determines which peer will store the corresponding value. When a node requests a resource, the
DHT mechanism locates the peer responsible for storing that data and retrieves it efficiently.
For example,
Key → Value
101 → File A
205 → File B
310 → File C
Different peers store different key-value pairs, and together they form a distributed database.
Features
Decentralized architecture.
Advantages
SECTION – B
Question 1: Explain the Transport Layer and Discuss the Services Provided by It.
This is the first major question of Section B and forms the basis for understanding UDP, TCP, flow
control protocols, and congestion control. Several questions in PYQs are directly or indirectly based
on the Transport Layer.
Introduction
The Transport Layer is the fourth layer of the OSI model and the second layer of the TCP/IP model. It
acts as an interface between the upper layers (Application Layer) and the lower layers (Network
Layer).
Its primary responsibility is to provide end-to-end or process-to-process communication between
applications running on different hosts.
While the Network Layer is concerned with delivering packets from one host to another, the
Transport Layer ensures that data reaches the correct application process in a reliable and orderly
manner.
The Network Layer only provides host-to-host delivery and does not guarantee:
Reliable communication.
Error-free delivery.
Flow control.
The Transport Layer performs several important functions to ensure reliable communication.
1. Process-to-Process Delivery
Unlike the Network Layer, which delivers packets from one host to another, the Transport Layer
delivers data from one process (application) to another process.
For example, a web browser communicating with a web server involves process-to-process
communication.
This is achieved using port numbers, which uniquely identify application processes.
Examples:
HTTP → Port 80
FTP → Port 21
DNS → Port 53
Application layer messages are usually very large and cannot be transmitted directly.
Therefore, the Transport Layer divides the message into smaller units called segments.
For example:
Browser
Email client
The Transport Layer combines data from different applications before transmission. This process is
called multiplexing.
At the receiving end, the Transport Layer separates incoming data and delivers it to the correct
application. This process is called demultiplexing.
4. Connection Control
Connection-Oriented Service
Before transmitting data, a logical connection is established between sender and receiver.
Characteristics:
Reliable communication.
Ordered delivery.
Error recovery.
Example:
TCP
Connectionless Service
Characteristics:
Faster communication.
No guarantee of delivery.
Example:
UDP
5. Flow Control
The sender may transmit data faster than the receiver can process it.
Flow control prevents the receiver from being overloaded by regulating the amount of data sent.
6. Error Control
Packet loss.
Corrupted data.
Duplicate packets.
The Transport Layer detects such errors and ensures reliable transmission through:
Sequence numbers.
Acknowledgments.
Retransmissions.
Checksums.
7. Sequencing
The Transport Layer assigns sequence numbers to segments so that the receiver can rearrange them
in the correct order.
8. Congestion Control
Network congestion occurs when too much data is injected into the network.
The Transport Layer controls congestion by adjusting the transmission rate and preventing excessive
traffic.
Flow control is one of the most important functions of the Transport Layer. It ensures that the sender
does not transmit data at a rate faster than the receiver can process. Flow control protocols regulate
the transmission of frames between sender and receiver to achieve reliable communication.
1. Stop-and-Wait Protocol
2. Go-Back-N Protocol
1. Stop-and-Wait Protocol
Introduction
The Stop-and-Wait protocol is the simplest flow control protocol. In this method, the sender
transmits one frame at a time and waits for an acknowledgment from the receiver before sending
the next frame.
Working
3. After receiving the acknowledgment, the sender transmits the next frame.
Operation
Sender Receiver
Frame 0 ------------>
<--------- ACK
Frame 1 ------------>
<--------- ACK
Frame 2 ------------>
<--------- ACK
Advantages
Simple to implement.
Reliable transmission.
Disadvantages
Low throughput.
2. Go-Back-N Protocol
Introduction
Go-Back-N is a sliding window protocol in which the sender can transmit multiple frames without
waiting for acknowledgments.
The receiver accepts frames only in sequence. If a frame is lost or damaged, all subsequent frames
are discarded and retransmitted.
Working
Operation
Sender Receiver
0 ---------------------->
1 ---------------------->
2 ----X (Lost)
3 ---------------------->
ACK0 <--------------------
ACK1 <--------------------
Retransmit 2 ------------>
Retransmit 3 ------------>
Characteristics
Advantages
Higher throughput.
Disadvantages
Introduction
Selective Repeat is an advanced sliding window protocol in which only the lost or damaged frames
are retransmitted instead of retransmitting all subsequent frames.
Working
Operation
Sender Receiver
0 ----------------------->
1 ----------------------->
2 ----X (Lost)
3 ----------------------->
Frame 3 stored
Retransmit 2 ------------->
Characteristics
Advantages
High throughput.
Less retransmission.
Disadvantages
In practical communication systems, data transfer often takes place in both directions
simultaneously. To improve efficiency and reduce overhead, mechanisms such as Bi-directional
Protocol and Piggybacking are used.
Bi-directional Protocol
Definition
A Bi-directional Protocol is a communication protocol in which both stations can transmit and
receive data simultaneously. Thus, each station acts as both a sender and a receiver.
Unlike one-way communication, data flows in both directions, resulting in better utilization of the
communication channel.
Working
Operation
Advantages
Higher throughput.
Piggybacking
Definition
Piggybacking is a technique used in bi-directional communication in which the acknowledgment for a
received frame is attached to the next outgoing data frame instead of sending a separate
acknowledgment frame.
Working
3. Instead of immediately sending an ACK, B waits until it has its own data to send.
Operation
Without Piggybacking:
With Piggybacking:
Advantages
Reduces overhead.
Increases efficiency.
Disadvantage
If a station has no data to send, it cannot delay the acknowledgment indefinitely. In such cases, a
separate ACK frame must be transmitted after a timeout period.
Introduction
User Datagram Protocol (UDP) is a connectionless Transport Layer protocol that provides process-to-
process communication without establishing a connection between the sender and receiver.
Unlike TCP, UDP does not provide error recovery, flow control, or congestion control. Therefore, it
offers faster communication with minimum overhead.
1. Process-to-Process Communication
2. Connectionless Service
5. Error Detection
UDP uses checksum for detecting errors, although it does not provide error correction.
UDP Datagram
The data unit used in UDP is called a datagram. A UDP datagram consists of two parts:
1. Header
2. Data
The UDP header contains four fields.
--------------------------------
--------------------------------
--------------------------------
--------------------------------
--------------------------------
| Data |
--------------------------------
Length
It specifies the total length of the UDP datagram including both header and data.
Checksum
Characteristics of UDP
Connectionless protocol.
No acknowledgment mechanism.
No flow control.
No congestion control.
Applications of UDP
UDP is used for DNS queries because quick responses are required.
2. Video Streaming
Applications like YouTube and Netflix use UDP since occasional packet loss is acceptable.
Examples:
Skype
WhatsApp Calling
4. Online Gaming
5. Live Broadcasting
Advantages of UDP
Simple protocol.
Disadvantages of UDP
No guarantee of delivery.
No retransmission mechanism.
No flow control.
No congestion control.
TCP UDP
Connection-oriented Connectionless
Reliable Unreliable
Slower Faster
Transmission Control Protocol (TCP) is a connection-oriented Transport Layer protocol that provides
reliable, ordered, and error-free delivery of data between two communicating processes.
Before transmitting data, TCP establishes a connection between the sender and the receiver and
ensures that all data reaches the destination correctly and in sequence.
1. Process-to-Process Communication
TCP provides communication between application processes using port numbers.
2. Connection-Oriented Service
A connection is established before data transmission begins and is terminated after communication
is completed.
TCP ensures that lost or corrupted segments are retransmitted, thereby providing reliable
communication.
4. Full-Duplex Communication
5. Flow Control
TCP prevents the sender from overwhelming the receiver by controlling the rate of transmission.
6. Error Control
TCP detects errors and retransmits lost segments using acknowledgments and sequence numbers.
7. Congestion Control
Features of TCP
Connection-oriented protocol.
Full-duplex communication.
End-to-end communication.
TCP Segment
The unit of data transmitted by TCP is called a segment. A TCP segment consists of a header and a
data field.
The TCP header contains several fields that help in ensuring reliable communication.
---------------------------------------------------
---------------------------------------------------
---------------------------------------------------
Sequence Number
---------------------------------------------------
Acknowledgment Number
---------------------------------------------------
Header Length
---------------------------------------------------
Control Flags
---------------------------------------------------
Window Size
---------------------------------------------------
Checksum
---------------------------------------------------
Urgent Pointer
---------------------------------------------------
Options
---------------------------------------------------
Data
---------------------------------------------------
Fields of TCP Segment
Sequence Number
It specifies the position of data in the transmission and helps in maintaining proper order.
Acknowledgment Number
It indicates the next byte expected from the sender and is used for reliable delivery.
Header Length
Control Flags
SYN (Synchronize)
ACK (Acknowledgment)
FIN (Finish)
RST (Reset)
PSH (Push)
URG (Urgent)
Window Size
It specifies the number of bytes that can be transmitted before receiving an acknowledgment.
Checksum
Options
Working of TCP
1. Connection Establishment
A logical connection is established between sender and receiver using the three-way handshake.
2. Data Transfer
Segments are exchanged between the two hosts with acknowledgments ensuring reliable delivery.
3. Connection Termination
Applications of TCP
Examples include:
HTTP
HTTPS
FTP
SMTP
POP3
Telnet
SSH
Advantages of TCP
Reliable communication.
Ordered delivery of segments.
Disadvantages of TCP
Higher overhead.
Step 1: SYN
The client initiates the connection by sending a segment with the SYN flag set and enters the SYN-
SENT state.
The server acknowledges the request and sends a segment with both SYN and ACK flags set. The
server enters the SYN-RECEIVED state.
Step 3: ACK
The client sends an acknowledgment to the server. Both the client and server enter the ESTABLISHED
state, and data transmission can begin.
Three-Way Handshake
Client Server
CLOSED LISTEN
| |
| |
| |
| |
ESTABLISHED ESTABLISHED
Step 1
Step 2
Step 3
When the receiver finishes transmitting its remaining data, it sends its own FIN segment.
Step 4
The sender acknowledges the FIN segment with an ACK, and the connection is closed.
Four-Way Handshake
Client Server
FIN ------------------------------->
<------------------------------- ACK
<------------------------------- FIN
ACK ------------------------------->
During connection establishment and termination, TCP passes through several states.
1. CLOSED
Initial state.
No connection exists.
2. LISTEN
3. SYN-SENT
4. SYN-RECEIVED
5. ESTABLISHED
6. FIN-WAIT-1
One side has sent a FIN segment and is waiting for acknowledgment.
7. FIN-WAIT-2
8. CLOSE-WAIT
One side has received FIN and is preparing to close the connection.
9. LAST-ACK
10. TIME-WAIT
Waits for sufficient time to ensure delayed packets have disappeared from the network.
11. CLOSED
+--------+
| CLOSED |
+--------+
+--------+
| LISTEN |
+--------+
+------------+
| SYN-SENT |
+------------+
+---------------+
| SYN-RECEIVED |
+---------------+
+---------------+
| ESTABLISHED |
+---------------+
+---------------+
| FIN-WAIT-1 |
+---------------+
+---------------+
| FIN-WAIT-2 |
+---------------+
+---------------+
| TIME-WAIT |
+---------------+
+--------+
| CLOSED |
+--------+
Introduction
TCP uses a sliding window mechanism to control the number of bytes that can be transmitted
before receiving an acknowledgment.
The window represents the amount of data that the sender is allowed to send without waiting for an
acknowledgment.
Thus, multiple segments can be transmitted simultaneously, improving throughput and bandwidth
utilization.
Sender Window
--------------------------------------
--------------------------------------
As acknowledgments arrive, the window slides forward, allowing transmission of new segments.
Receiver Window
The receiver window specifies how much buffer space is available at the receiver.
The receiver advertises this value to the sender through the Window Size field present in the TCP
header.
Introduction
Flow control is a mechanism that prevents the sender from sending data faster than the receiver can
process.
Without flow control, the receiver's buffer may overflow, resulting in packet loss.
2. It informs the sender about the available buffer space using the receiver window.
4. As data is processed, acknowledgments are sent, and the window slides forward.
Example
The sender cannot transmit more than 5000 bytes until acknowledgments are received.
Introduction
Loss of segments.
Corrupted data.
Duplicate segments.
Out-of-order arrival.
1. Sequence Numbers
Each byte transmitted by TCP is assigned a sequence number.
2. Acknowledgments
The receiver sends an acknowledgment (ACK) indicating the next expected byte.
Example:
ACK = 1001
3. Retransmission
If an acknowledgment is not received within a specified time, the sender assumes that the segment
has been lost and retransmits it.
4. Checksum
Sender Receiver
Segment 1 -------------------->
ACK 2 <------------------------
Segment 2 ----X (Lost)
ACK 3 <-----------------------
TCP provides congestion control mechanisms to regulate the amount of data entering the network
and prevent congestion.
TCP maintains a variable called the Congestion Window (cwnd), which determines the maximum
amount of data that can be transmitted without receiving acknowledgments.
where:
1. Slow Start
2. Congestion Avoidance
3. Fast Retransmit
4. Fast Recovery
1. Slow Start
Initially, TCP assumes that the network conditions are unknown. Therefore, it starts with a small
congestion window.
Working
Suppose:
cwnd = 1 MSS
1 → 2 → 4 → 8 → 16
Thus, the transmission rate increases rapidly until a threshold value called ssthresh is reached.
Advantages
2. Congestion Avoidance
Once the congestion window reaches the threshold value, TCP enters the congestion avoidance
phase.
Growth Pattern
16 → 17 → 18 → 19 → 20
This slower growth helps prevent congestion and provides stable network performance.
3. Fast Retransmit
Normally, TCP waits for a timeout before retransmitting a lost segment.
If the sender receives three duplicate acknowledgments, it assumes that a segment has been lost
and immediately retransmits that segment without waiting for timeout.
4. Fast Recovery
After Fast Retransmit, TCP does not return to the beginning of Slow Start.
In this phase:
Slow Start
Congestion Avoidance
Packet Loss
Fast Retransmit
Fast Recovery
Congestion Avoidance
TCP Timers
A timer is used to determine how long the sender should wait for a particular event before taking
corrective action.
TCP mainly uses four timers:
1. Retransmission Timer
2. Persistence Timer
3. Keepalive Timer
4. Time-Wait Timer
1. Retransmission Timer
Definition
Working
If the acknowledgment is received before the timer expires, the timer is stopped.
If the timer expires before receiving the acknowledgment, the segment is retransmitted.
2. Persistence Timer
Definition
The Persistence Timer prevents deadlock situations caused by lost window update messages.
Working
Suppose the receiver advertises a window size of zero, indicating that it cannot receive more data.
If the subsequent window update message is lost, the sender may wait indefinitely.
To avoid this, TCP uses the Persistence Timer. When the timer expires, the sender sends a probe
segment to determine whether the receiver is ready to accept data again.
3. Keepalive Timer
Definition
The Keepalive Timer is used to detect whether an idle connection is still active.
Working
4. Time-Wait Timer
Definition
Working
After sending the final acknowledgment, TCP waits for a specified amount of time before completely
closing the connection.
This waiting period ensures that delayed or duplicate segments present in the network are discarded.
TCP Options
TCP options provide additional features and improve the efficiency of communication.
1. Window Scaling
2. Timestamp
1. Window Scaling
In high-speed networks, the normal TCP window size may not be sufficient.
Window Scaling increases the effective window size, allowing more data to be transmitted before
receiving acknowledgments.
2. Timestamp
It helps in:
Normally, TCP acknowledges data cumulatively. If a segment is lost, several correctly received
segments may have to be retransmitted.
Selective Acknowledgment allows the receiver to inform the sender exactly which segments have
been received successfully.
As a result, only the missing segments are retransmitted, improving efficiency and reducing
unnecessary retransmissions.
SECTION – C
Question 1: Explain the Network Layer and discuss the services provided by it. Explain Packet
Switching and IPv4 Addressing.
Introduction
The Network Layer is the third layer of the OSI model and is responsible for delivering packets from
the source host to the destination host across multiple interconnected networks.
Unlike the Data Link Layer, which provides node-to-node communication, the Network Layer
provides host-to-host communication. It determines the best route for packet transmission and
ensures that packets reach the correct destination.
The major protocol used at this layer is the Internet Protocol (IP).
1. Logical Addressing
Example:
[Link]
2. Routing
The Network Layer determines the most suitable path for transmitting packets from source to
destination.
Routers use routing algorithms and routing tables to select the best path.
3. Packet Forwarding
Once the route is determined, routers forward packets from one network to another until they reach
the destination.
If a packet is larger than the Maximum Transmission Unit (MTU), the Network Layer divides it into
smaller fragments. These fragments are reassembled at the destination.
5. Internetworking
The Network Layer enables communication among heterogeneous networks, thereby making the
Internet possible.
Packet Switching
Definition
Packet Switching is a technique in which a message is divided into smaller units called packets. These
packets are transmitted independently through the network and are reassembled at the destination.
o Source address
o Destination address
o Sequence number
o Data
Message
↓
Packet 1
Packet 2
Packet 3
Packet 4
Network
Destination
Reliable communication.
IPv4 Protocol
Introduction
IPv4 (Internet Protocol Version 4) is the most widely used Network Layer protocol. It provides logical
addressing and packet delivery between hosts.
IPv4 is a connectionless and best-effort protocol, meaning it does not guarantee reliable delivery.
IPv4 Datagram
1. Header
2. Data
---------------------------------
Version
Header Length
Type of Service
Total Length
---------------------------------
Identification
Flags
Fragment Offset
---------------------------------
Protocol
Header Checksum
---------------------------------
Source IP Address
---------------------------------
Destination IP Address
---------------------------------
Options
---------------------------------
Data
---------------------------------
Version
Total Length
Indicates the total size of the datagram including header and data.
Specifies the maximum number of routers through which the packet can pass.
Examples:
TCP → 6
UDP → 17
ICMP → 1
Source Address
Destination Address
IPv4 Addressing
Definition
An IPv4 address is a 32-bit logical address used to uniquely identify a device on a network.
Example:
[Link]
192 . 168 . 1 . 10
Thus,
Class A
First bit = 0
Range:
[Link] – [Link]
Class B
Range:
[Link] – [Link]
Class C
Range:
[Link] – [Link]
Class D
Range:
[Link] – [Link]
Class E
Range:
[Link] – [Link]
IP Packet Forwarding
Introduction
Packet forwarding is the process of moving a packet from one network to another until it reaches its
destination. This operation is performed by routers using information stored in routing tables.
The router examines the destination IP address and determines the next hop through which the
packet should be sent.
Routing Table
Destination network.
Next-hop address.
Example:
Next-Hop Forwarding
Instead of storing the complete path to the destination, routers store only the address of the next
router.
Thus, each router forwards the packet to the next hop, and eventually the packet reaches the
destination.
6. This process continues until the packet reaches the destination host.
Operation
Source Host
Router A
↓
Router B
Router C
Destination Host
Introduction
ICMPv4 is a companion protocol of IPv4 used for reporting errors and providing diagnostic
information. It does not carry user data but assists IP in detecting problems during packet delivery.
Functions of ICMPv4
1. Error-Reporting Messages
2. Query Messages
1. Error-Reporting Messages
These messages are generated whenever a problem occurs during packet delivery.
2. Query Messages
These messages are used for obtaining information and performing diagnostics.
Example:
Ping [Link]
Working of ICMPv4
Suppose a packet cannot reach its destination because the network is unavailable.
Thus, ICMP provides feedback about problems encountered during packet transmission.
Applications of ICMPv4
Ping
Traceroute
Network Diagnostics
Unicast Routing
Definition
Unicast routing is a routing technique in which data packets are transmitted from a single source to a
single destination. Each router maintains routing information and forwards packets toward the
destination using the best available route.
Introduction
Distance Vector Routing is a dynamic routing algorithm in which each router maintains a routing
table containing:
Destination network.
Routers periodically exchange their routing tables with neighboring routers and update their own
tables based on the received information.
Working
Example
Suppose Router A can reach Router B in 1 hop and Router B can reach Router C in 2 hops.
Characteristics
Simple implementation.
Advantages
Easy to implement.
Disadvantages
Slow convergence.
Introduction
Path Vector Routing is an advanced routing algorithm used mainly between autonomous systems on
the Internet.
Instead of storing only the distance, each router stores the complete path (sequence of autonomous
systems) to reach the destination.
Thus, routing decisions are based on the entire path rather than merely the distance.
Working
Example
Destination Network
Characteristics
Highly scalable.
Advantages
Disadvantages
More complex.
Both are Interior Gateway Protocols (IGPs), but they differ significantly in their operation and
performance.
RIP (Routing Information Protocol) is a distance vector routing protocol that uses hop count as its
routing metric. It is one of the oldest routing protocols and is suitable for small networks.
The maximum hop count allowed in RIP is 15 hops. A network requiring more than 15 hops is
considered unreachable.
Working
Characteristics
Advantages
Simple to configure.
Easy implementation.
Disadvantages
Slow convergence.
Introduction
OSPF (Open Shortest Path First) is a link-state routing protocol designed for large and complex
networks. It determines the shortest path using Dijkstra's Shortest Path Algorithm.
Unlike RIP, OSPF does not use hop count. Instead, it uses cost as the routing metric.
Working
Characteristics
Fast convergence.
Advantages
Fast convergence.
Loop-free routing.
Disadvantages
RIP OSPF
Introduction
Border Gateway Protocol Version 4 (BGP4) is an Exterior Gateway Protocol (EGP) used for
exchanging routing information between different Autonomous Systems (AS). It is based on the Path
Vector Routing Algorithm and is widely used for inter-domain routing on the Internet.
BGP4 enables routers belonging to different organizations or Internet Service Providers (ISPs) to
communicate and determine the best route for packet transmission.
Examples:
Airtel Network
Jio Network
BSNL Network
Working of BGP4
4. Routers select the most appropriate path based on routing policies and path information.
Example
Characteristics of BGP4
Highly scalable.
Types of BGP
eBGP is used for communication between routers belonging to different Autonomous Systems.
Example:
iBGP is used for communication between routers within the same Autonomous System.
Example:
(Same AS)
Advantages of BGP4
Supports scalability.
Disadvantages of BGP4
Complex configuration.
Question 6: Explain Framing, Error Control and Flow Control in the Data Link
Layer.
The Data Link Layer is the second layer of the OSI model and is responsible for reliable node-to-node
delivery of data. It performs functions such as framing, error control, and flow control to ensure
efficient and error-free communication.
Framing
Introduction
The Network Layer passes a packet to the Data Link Layer. The Data Link Layer divides the stream of
bits into manageable units called frames. This process is known as framing.
Framing helps the receiver identify the beginning and end of each frame.
Types of Framing
In this method, a field in the header specifies the number of characters present in the frame.
Example:
Count = 5
ABCDE
The receiver uses the count field to determine the frame boundary.
2. Byte Stuffing
Special characters are used to indicate the beginning and end of a frame.
If these characters appear inside the data, an extra escape character is inserted before them.
3. Bit Stuffing
01111110
Error Control
Introduction
During transmission, frames may be corrupted or lost because of noise and interference. Error
control mechanisms are used to detect and recover from such errors.
1. Error Detection
Parity Check
Checksum
2. Error Correction
Once an error is detected, the receiver may request retransmission of the frame.
Sequence Numbers
Retransmissions
ARQ Protocols
Examples:
Stop-and-Wait ARQ
Go-Back-N ARQ
Flow Control
Introduction
Flow control ensures that the sender does not transmit frames faster than the receiver can process
them.
Without flow control, the receiver's buffer may overflow, resulting in frame loss.
In this method, the sender transmits one frame and waits for its acknowledgment before sending the
next frame.
The sender maintains a window that specifies how many frames may be sent without waiting.
Reliable communication.
1. Random Access
2. Controlled Access
3. Channelization
1. Random Access
Introduction
In random access methods, all stations have equal access to the channel. A station transmits data
whenever it has frames to send. If two or more stations transmit simultaneously, collisions may
occur.
(a) ALOHA
ALOHA is the simplest random access protocol. Whenever a station has data to send, it transmits
immediately without checking whether the channel is busy or not.
If a collision occurs, the station waits for a random amount of time before retransmitting.
Types of ALOHA
Pure ALOHA
Slotted ALOHA
Time is divided into slots, and transmission is allowed only at the beginning of a slot.
Advantages
Simple implementation.
Disadvantages
Low efficiency.
Working
2. If idle, transmit.
5. Retransmit.
Advantages
Application
Standard Ethernet.
Working
3. Transmit data.
Application
2. Controlled Access
Introduction
In controlled access methods, stations obtain permission before transmitting. Therefore, collisions
are avoided.
(a) Reservation
Advantage
Collision-free communication.
(b) Polling
Working
Advantages
No collisions.
Orderly communication.
Disadvantage
Advantages
Collision-free communication.
Applications
3. Channelization
Introduction
In channelization methods, the available bandwidth is divided among users so that multiple stations
can communicate simultaneously without collisions.
In FDMA, the available frequency spectrum is divided into several frequency bands, and each user is
assigned a separate band.
Applications
Radio broadcasting.
Television transmission.
Advantage
In TDMA, all users share the same frequency but are assigned different time slots.
Applications
Advantage
The receiver uses the corresponding code to recover the desired signal.
Applications
Advantages
High capacity.
Better security.
Resistance to interference.
Introduction
The IEEE 802 Project is a set of standards developed by the Institute of Electrical and Electronics
Engineers (IEEE) for Local Area Networks (LANs) and Metropolitan Area Networks (MANs).
It mainly specifies the functions of the Physical Layer and Data Link Layer of the OSI model.
Standard Description
Standard Ethernet
Introduction
Standard Ethernet is based on the IEEE 802.3 standard and uses the CSMA/CD (Carrier Sense
Multiple Access with Collision Detection) access method.
Characteristics
Uses CSMA/CD.
Advantages
Easy installation.
Widely used.
Fast Ethernet
Introduction
Fast Ethernet was developed to provide higher speed than Standard Ethernet.
It supports a transmission speed of 100 Mbps, which is ten times faster than Standard Ethernet.
Characteristics
Advantages
Higher speed.
Better performance.
Introduction
Gigabit Ethernet was introduced to meet the increasing demand for bandwidth.
Characteristics
Advantages
High throughput.
10 Gigabit Ethernet
Introduction
10 Gigabit Ethernet provides a transmission speed of 10 Gbps and is mainly used in backbone
networks and data centers.
Characteristics
Advantages
Introduction
A Virtual LAN (VLAN) is a logical grouping of devices within a network, regardless of their physical
location.
It allows devices belonging to different physical LAN segments to communicate as if they are part of
the same network.
Working
Using switches, devices are divided into separate logical groups called VLANs. Communication
between devices belonging to the same VLAN is possible directly, while communication between
different VLANs requires routing.
Advantages
Improved security.
Increased flexibility.
Applications
Corporate networks.
Educational institutions.
Network management ensures that the network operates efficiently, faults are detected quickly,
performance is maintained, and security is provided.
Introduction
The ISO has defined five major functional areas of network management, commonly known as the
FCAPS model.
They are:
1. Configuration Management
2. Fault Management
3. Performance Management
4. Security Management
5. Accounting Management
1. Configuration Management
Introduction
Configuration Management deals with the installation, setup, and maintenance of network devices
and software.
Functions
2. Fault Management
Introduction
Fault Management is responsible for detecting, isolating, and correcting network failures.
Functions
Detecting faults.
Isolating problems.
Correcting errors.
Example
3. Performance Management
Introduction
It ensures that the network operates with acceptable speed and reliability.
Functions
Measuring throughput.
Monitoring delay.
Analyzing traffic.
Identifying bottlenecks.
Bandwidth
Throughput
Response time
Packet loss
Utilization
Example
4. Security Management
Introduction
Security Management protects the network and its resources from unauthorized access and attacks.
Functions
User authentication.
Access control.
Encryption.
Example
5. Accounting Management
Introduction
Accounting Management keeps track of network resource usage and allocates costs to users or
departments.
Billing users.
Allocating costs.
Example
FCAPS Model
F → Fault Management
C → Configuration Management
A → Accounting Management
P → Performance Management
S → Security Management
Minimizes downtime.
Enhances security.
SNMP is an Application Layer protocol used for managing and monitoring network devices in TCP/IP
networks.
Introduction
SNMP (Simple Network Management Protocol) is an Application Layer protocol that enables
network administrators to monitor, configure, and control network devices from a central location.
Routers
Switches
Servers
Printers
Hubs
Firewalls
SNMP Architecture
1. Managed Devices
2. Agent
(NMS)
SNMP Messages
------------------------------------------
| | |
| | |
Managed devices are the network devices whose information is monitored and controlled using
SNMP.
Examples include:
Routers
Switches
Servers
Printers
These devices contain management information about their operation and performance.
2. Agent
Thus, the agent acts as an interface between the managed device and the manager.
The Network Management Station is a central management system that monitors and controls
network devices.
Functions
Receives responses.
Detects faults.
Examples:
SolarWinds
Cisco Prime
HP OpenView
4. Management Information Base (MIB)
Device status
Traffic statistics
Memory usage
Interface information
Error counts
Working of SNMP
2. The agent accesses the MIB and retrieves the required information.
SNMP Operations
1. GET
The GET operation is used by the Network Management Station to retrieve information from a
managed device.
Example:
2. SET
Example:
The RESPONSE operation is sent by the agent to provide the requested information to the manager.
4. TRAP
TRAP messages are generated automatically by agents when important events occur.
Examples:
Device failure.
Link failure.
Advantages of SNMP
Performance monitoring.
Introduction
Network Security refers to the protection of network resources and information against
unauthorized access, misuse, modification, and attacks. It ensures that data is transmitted securely
and reaches the intended destination without alteration.
Security Goals
The primary objectives of network security are:
1. Confidentiality
Example
2. Integrity
Example
3. Availability
Availability ensures that network resources and services remain accessible to authorized users
whenever required.
Example
4. Authentication
Example
5. Non-Repudiation
Example
Security Attacks
1. Passive Attacks
2. Active Attacks
1. Passive Attacks
In passive attacks, the attacker monitors or observes communication without modifying the data.
Characteristics
Difficult to detect.
Affects confidentiality.
2. Active Attacks
Characteristics
Easier to detect.
Security Services
Security services are mechanisms designed to provide protection against security attacks.
1. Authentication Service
5. Non-Repudiation Service
6. Availability Service
Security Techniques
Security techniques are methods used to implement security services and protect information.
1. Encryption
2. Digital Signatures
4. Authentication Techniques
Examples:
Passwords
Biometrics
5. Firewalls
6. Cryptographic Techniques
Security Goals
Security Services
Security Techniques
Protection Against
Security Attacks
Introduction
A Symmetric Key Cipher is a cryptographic technique in which the same key is used for both
encryption and decryption.
The sender and receiver must share a common secret key before communication begins.
Working
3. The receiver uses the same secret key to decrypt the ciphertext and recover the original
message.
Operation
Plaintext
↓
Encryption
(Secret Key)
Ciphertext
Transmission
Decryption
Plaintext
Characteristics
Advantages
High speed.
Simple implementation.
Disadvantages
Examples
Triple DES
Introduction
An Asymmetric Key Cipher is a cryptographic technique that uses two different keys:
Public Key
Private Key
The public key is known to everyone, while the private key is kept secret by the owner.
Working
1. The sender encrypts the message using the receiver's public key.
3. The receiver decrypts the message using the corresponding private key.
Operation
Plaintext
Encryption
(Public Key)
Ciphertext
Transmission
Decryption
(Private Key)
Plaintext
Characteristics
Computationally intensive.
Advantages
Better security.
Disadvantages
Examples
RSA
Diffie-Hellman
ElGamal
Same key for encryption and Different keys for encryption and decryption
decryption
Suitable for bulk data encryption Suitable for secure communication and authentication
Digital Signature
Introduction
A Digital Signature is an electronic equivalent of a handwritten signature that is used to verify the
authenticity and integrity of a message. It provides authentication and prevents the sender from
denying the transmission of a message.
1. The sender generates a hash value (message digest) from the original message.
5. The receiver decrypts the signature using the sender's public key.
Operation
Sender
Message
Hash Function
Message Digest
↓
Digital Signature
Message + Signature
-------------------------->
Receiver
Digital Signature
Message Digest
Authentication
Data Integrity
Non-repudiation
Advantages
Firewall
Introduction
A Firewall is a hardware device, software program, or combination of both that protects a network
from unauthorized access. It acts as a barrier between a trusted internal network and an untrusted
external network such as the Internet.
It monitors incoming and outgoing traffic and permits or blocks communication based on predefined
security rules.
Working of Firewall
When data packets enter or leave a network, the firewall examines them and decides whether to
allow or block them according to the security policy.
Internet
Firewall
Internal Network
Thus, firewalls protect the network from malicious users and attacks.
Types of Firewalls
This firewall examines packet headers and filters packets based on:
Source address
Destination address
Port number
Protocol type
Advantages of Firewalls
Applications of Firewalls
Corporate networks.
Banking systems.
Educational institutions.
Data centers.
Internet-connected organizations.