0% found this document useful (0 votes)
42 views22 pages

Congestion Control in Computer Networks

UNIT-5 Advance computer networks

Uploaded by

faize ahmed
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views22 pages

Congestion Control in Computer Networks

UNIT-5 Advance computer networks

Uploaded by

faize ahmed
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

UNIT – 5

Advance Computer Networks


Congestion control in computer networks refers to the techniques and mechanisms used to prevent or
alleviate congestion, which occurs when network resources (like bandwidth, buffers, or routers) are
overwhelmed by too much traffic. The goal is to keep the network operating efficiently and fairly under
varying load conditions.

✅ Why Congestion Control is Important


Without congestion control:

 Packet loss increases.


 Delays grow due to queuing.
 Network throughput decreases.
 Can lead to congestion collapse (when adding more traffic results in lower throughput).

🔁 Types of Congestion Control


1. Open-Loop Congestion Control

 Prevention-based.
 Controls congestion by design, before it occurs.
 Techniques:
o Traffic shaping (e.g., token bucket, leaky bucket).
o Admission control – decides whether to accept new traffic.

2. Closed-Loop Congestion Control

 Reactive-based.
 Monitors network state and takes corrective actions.
 Involves:
o Detection (e.g., packet loss, delays).
o Feedback (explicit or implicit signals).
o Adjustment (reducing sending rate, rerouting, etc.).

📶 Congestion Indicators
 Packet loss: Dropped packets due to full queues.
 Increased delay: Long queuing times.
 Retransmissions: Signal congestion to sender.
 ECN bits: Explicit signals from routers (if supported).
📦 Congestion Control in TCP (Transmission Control Protocol)
TCP uses end-to-end congestion control. The sender adjusts its data sending rate based on feedback from
the network.

🔑 Key Algorithms:

1. Slow Start

 Starts with a small congestion window (CWND).


 CWND doubles every RTT (Round Trip Time) until a threshold is reached.

2. Congestion Avoidance

 Once CWND exceeds threshold, it increases linearly to probe for available bandwidth.

3. Fast Retransmit

 Triggered by receiving 3 duplicate ACKs.


 Retransmits lost packet without waiting for timeout.

4. Fast Recovery

 Temporarily reduces CWND but avoids going back to slow start.


 Then increases CWND gradually.

5. AIMD (Additive Increase, Multiplicative Decrease)

 Additive Increase: Slowly increases CWND when network is not congested.


 Multiplicative Decrease: Halves CWND when congestion is detected.

🚦 Congestion Control Techniques in Routers


1. Active Queue Management (AQM)

Routers detect early signs of congestion and take action before queues fill.

 RED (Random Early Detection):


o Randomly drops/marks packets before the queue is full.
o Avoids global synchronization of TCP flows.
 ECN (Explicit Congestion Notification):
o Instead of dropping packets, marks them to inform sender to reduce rate.

Resource Allocation in Computer Networks

Resource allocation in computer networks refers to how network resources—such as bandwidth, buffer
space, processing power, and link capacity—are distributed among multiple users, devices, or
applications to ensure efficient, fair, and reliable data transmission.
🎯 Goals of Resource Allocation
 Efficiency: Maximize network utilization.
 Fairness: Ensure all users get an appropriate share of resources.
 Quality of Service (QoS): Meet application-specific requirements (e.g., low latency for video calls).
 Avoid congestion: Prevent overuse of resources that can degrade performance.

🚀 Key Network Resources


1. Bandwidth (link capacity)
2. Buffers (queue space in routers/switches)
3. CPU and memory (in end systems and routers)
4. Time (in scheduled access systems like TDMA)

⚙️Resource Allocation Techniques


1. Scheduling Algorithms

These determine which packet or flow is served next when multiple compete for a resource.

Algorithm Description

First-Come-First-Served (FCFS) Simple, but may starve time-sensitive flows.

Round Robin (RR) Each flow gets served in turn. Fair but not delay-sensitive.

Weighted Fair Queuing (WFQ) Allocates bandwidth fairly based on weights. Supports QoS.

Priority Queuing Higher priority traffic is served first (can starve low-priority flows).

2. Traffic Shaping (Policing)

Used at the network edge to control the rate at which traffic is sent into the network.

Technique Description

Leaky Bucket Enforces a constant output rate regardless of burstiness.

Token Bucket Allows burstiness up to a limit, better suited for variable-rate traffic.

3. Admission Control

Decides whether to accept a new flow based on current network load and QoS requirements.

 Used in real-time traffic (e.g., VoIP, video conferencing).


 Common in Integrated Services (IntServ) model.
4. Quality of Service (QoS) Mechanisms

QoS mechanisms allocate resources based on traffic type or priority:

 Differentiated Services (DiffServ):


o Tags packets with DSCP values.
o Routers handle packets based on class.
 Integrated Services (IntServ):
o Uses RSVP to reserve resources per flow.
o Precise, but doesn't scale well to large networks.

5. Load Balancing

 Distributes traffic across multiple paths or servers.


 Improves resource utilization and reduces congestion.
 Used in data centers, cloud networks, and content delivery networks (CDNs).

🧠 Fairness in Resource Allocation


Common Fairness Models:

 Max-Min Fairness:
o No user can increase their allocation without decreasing someone with less or equal
allocation.
 Proportional Fairness:
o Balances throughput and fairness mathematically.
 Equal Share:
o Every user gets the same share of the resource (simple but not always optimal).

Congestion-Avoidance Mechanisms in Computer Networks

Congestion-avoidance mechanisms are proactive strategies designed to prevent network congestion before
it happens, rather than reacting to it after it has occurred. The goal is to maintain high throughput, low
delay, and fair resource sharing across the network.

🎯 Goals of Congestion-Avoidance
 Detect early signs of congestion.
 Reduce packet loss and queuing delays.
 Ensure fairness among multiple data flows.
 Avoid congestion collapse (where throughput drops as load increases).

⚙️Key Congestion-Avoidance Mechanisms


1. TCP-Based Mechanisms

TCP includes built-in congestion-avoidance mechanisms that adjust the sender's rate based on feedback
from the network.

🧮 Additive Increase / Multiplicative Decrease (AIMD)

 Core idea behind TCP congestion avoidance.


 Additive Increase: CWND (Congestion Window) is increased slowly (linearly).
 Multiplicative Decrease: CWND is halved upon detecting congestion (e.g., packet loss).

🔁 Effect: Helps TCP find the "sweet spot" between under-utilization and congestion.

🐢 TCP Slow Start & Congestion Avoidance Phase

 Slow Start: CWND grows exponentially at connection start to quickly probe for capacity.
 Once CWND reaches a threshold (ssthresh), it enters the congestion avoidance phase.
 In this phase, CWND grows linearly, making it more stable and less aggressive.

⚡ Fast Retransmit & Fast Recovery

 If duplicate ACKs (e.g., 3 in a row) are received, TCP assumes packet loss.
 Retransmits lost packet without waiting for timeout.
 Adjusts CWND using AIMD without re-entering slow start.

2. Active Queue Management (AQM) in Routers

Routers implement congestion-avoidance by managing queues intelligently and signaling congestion early.

🟠 Random Early Detection (RED)

 Begins to drop or mark packets randomly as the average queue size increases.
 Signals senders to slow down before the queue becomes full.
 Helps prevent global TCP synchronization (where many flows reduce rate simultaneously).

📈 RED Behavior:

 Low queue size: Accept packets.


 Moderate queue size: Randomly drop or mark.
 High queue size: Drop all incoming packets.

🟢 Explicit Congestion Notification (ECN)

 Works with RED.


 Instead of dropping packets, marks them with a congestion notification.
 Sender reduces transmission rate upon receiving marked packets.
 Requires ECN support at both sender and receiver.

3. Traffic Shaping and Policing

Although primarily used for resource allocation, traffic shaping indirectly helps avoid congestion:

Technique Description

Token Bucket Allows burstiness but limits average rate.

Leaky Bucket Forces a constant rate, smoothing out traffic.

These mechanisms control how much data enters the network and prevent senders from overwhelming it.

4. Quality of Service (QoS) & Differentiated Services (DiffServ)

 Prioritizes critical or time-sensitive traffic.


 Prevents congestion in high-priority flows.
 Implements class-based queue management and scheduling.

DEC Bit in Computer Networks

The DEC Bit (short for Digital Equipment Corporation Bit) is an early mechanism for explicit
congestion notification in computer networks. It was introduced in DECnet Phase V and later influenced
modern congestion notification methods like ECN (Explicit Congestion Notification) in IP networks.

🧠 What is the DEC Bit?


 The DEC Bit is a 1-bit field in the packet header.
 Used by routers to signal congestion to end hosts.
 If a router experiences congestion (e.g., high queue levels), it sets the DEC Bit in packets it
forwards.
 The receiver echoes this bit back to the sender in acknowledgments (ACKs).
 The sender, upon seeing the bit set in ACKs, reduces its sending rate.

🔄 How It Works – Step-by-Step


1. Sender: Transmits packets with the DEC Bit cleared (value = 0).
2. Router:
o Monitors its queue.
o If queue exceeds a threshold → it sets the DEC Bit to 1 in the packet.
3. Receiver: Copies the DEC Bit from the packet and includes it in the acknowledgment.
4. Sender:
o Observes the returning ACKs.
o If it sees a certain percentage (e.g., >50%) of ACKs with the bit set, it reduces its congestion
window (CWND).
o Uses AIMD (Additive Increase/Multiplicative Decrease) to adjust rate.

📈 Key Characteristics
Feature Description

Type Explicit Congestion Notification

Bit Location 1-bit in packet header

Router Role Sets bit to signal congestion

Receiver Role Echoes bit back to sender in ACK

Sender Role Adjusts sending rate based on feedback

Congestion Response Multiplicative decrease

💡 Significance of the DEC Bit


 Proactive: Avoids congestion before buffers overflow.
 Lightweight: Only a single bit is needed in the header.
 Influential: Paved the way for modern ECN in TCP/IP networks.
 Fairness: Helps balance load among multiple users.

🔁 DEC Bit vs ECN (Explicit Congestion Notification)


Feature DEC Bit ECN

Origin DECnet Phase V TCP/IP (RFC 3168)

Bit Size 1-bit 2-bit field in IP + TCP flags

Router Action Sets bit in packet Marks packet instead of dropping

Receiver Action Echoes bit in ACK Echoes ECN-Echo (ECE) flag in TCP

Compatibility Proprietary (DECnet) Standardized in TCP/IP stack

🧪 Example Scenario
1. A sender sends 10 packets with DEC Bit = 0.
2. A congested router marks 6 of them by setting DEC Bit = 1.
3. Receiver sends ACKs, echoing the DEC Bit values.
4. Sender sees >50% marked and reduces its sending rate.
5. After stabilization, sender resumes additive increase.

📝 Summary
 The DEC Bit is a simple yet effective congestion-avoidance mechanism.
 It’s part of a closed-loop control system where routers provide explicit feedback to senders.
 Though not widely used today, it was foundational in the evolution of congestion control,
influencing modern protocols like ECN in TCP/IP.

Random Early Detection (RED) in Computer Networks

Random Early Detection (RED) is a congestion-avoidance mechanism used in routers and gateways to
manage queue lengths and avoid congestion before it becomes severe. RED is a part of Active Queue
Management (AQM) and helps improve the performance of TCP/IP networks.

🎯 Purpose of RED
 Prevent congestion before queues become full.
 Avoid global TCP synchronization (where many flows reduce rate simultaneously).
 Improve average queue delay, throughput, and fairness.

🔁 How RED Works


RED operates by monitoring the average queue size and reacting in stages:

1. When queue is small: All packets are accepted.


2. When queue is moderate: Packets are randomly dropped or marked (to signal early congestion).
3. When queue is large: All incoming packets are dropped.

📊 RED Thresholds and Behavior

Condition Action

Queue size < min_threshold Accept all packets (no drop)

min_threshold < Queue < max_threshold Drop packets randomly with a probability that increases linearly

Queue size > max_threshold Drop all packets (forceful congestion control)

📐 RED Parameters

Parameter Description
min_threshold Minimum average queue size to start dropping
Parameter Description

max_threshold Maximum average queue size before dropping all packets

max_p Maximum drop probability between thresholds

w_q Weight for calculating the exponential moving average of queue size

📈 RED Queue Behavior (Conceptual)


Drop Probability
|
max_p | /
| /
| /
| /
| /
| /
|_________________/__________
min_th max_th Queue Size

 Between min_th and max_th, drop probability increases linearly.


 Above max_th, drop rate = 100%.

🧠 Why Use RED Instead of Tail Drop?


Feature Tail Drop RED

Drop strategy Drops packets only when full Drops early and randomly

Congestion signal Abrupt Gradual

Global TCP sync Likely Reduced

Queue delay High (due to full buffer) Lower (due to early drops)

Fairness Lower Higher

🔗 RED and ECN (Explicit Congestion Notification)


 RED can mark packets instead of dropping them if ECN is enabled.
 This allows explicit congestion signaling without packet loss.

🧪 Example: How RED Helps TCP


1. TCP sender increases its congestion window (CWND) over time.
2. Without RED: queue fills up → all packets dropped → multiple TCP flows reduce CWND together
→ synchronization and underutilization.
3. With RED: some packets dropped early → only some TCP flows reduce CWND → smoother traffic
and better throughput.

📝 Summary of RED
Aspect Details

Type Active Queue Management (AQM)

Main goal Avoid congestion early, before buffer overflows

Works by Dropping/marking packets probabilistically

Benefits Lower latency, less packet loss, better fairness

Drawbacks Parameter tuning is sensitive and non-trivial

Source-Based Congestion Avoidance in Computer Networks

Source-based congestion avoidance is a technique where the sender (source) of data monitors and
controls its transmission rate to prevent or reduce network congestion—before it becomes critical.

Unlike router-based methods (e.g. RED), source-based approaches rely on end-hosts to detect early signs of
congestion using feedback mechanisms like ACKs, round-trip times (RTT), or explicit congestion signals.

🔁 How Source-Based Congestion Avoidance Works


 The sender adjusts its sending rate based on network feedback.
 It increases the rate when the network is uncongested and decreases it when congestion is suspected
or detected.
 The goal is to be proactive, preventing congestion from occurring instead of reacting after packet
loss.

🧠 Core Techniques Used in Source-Based Congestion Avoidance

1. TCP Congestion Avoidance (AIMD)

The most well-known example.

 Additive Increase: Slowly increases the congestion window (CWND) to probe for available
bandwidth.
 Multiplicative Decrease: Cuts CWND in half when congestion (e.g. packet loss) is detected.

This behavior helps avoid overwhelming the network.


2. Delay-Based Congestion Avoidance

 Uses increasing round-trip time (RTT) as a sign of congestion.


 If RTT grows, the sender reduces its sending rate before packet loss occurs.

🔧 Examples:

 TCP Vegas: Monitors RTT and adjusts CWND based on estimated queueing delay.
 FAST TCP: Similar delay-based strategy but more robust under high-speed networks.

3. Explicit Congestion Notification (ECN)

 Routers mark packets (instead of dropping them) when they detect congestion.
 The receiver echoes this mark back to the sender.
 The sender reacts by slowing down its transmission rate.

This is still source-controlled, though triggered by router feedback.

4. Application-Level Rate Control

In real-time applications (e.g., video streaming), the application itself can adjust its data rate based on:

 Network delay
 Jitter
 Loss rates

Example:

 Adaptive bitrate streaming (ABR): YouTube, Netflix dynamically adjust video quality based on
network performance.

📈 Benefits of Source-Based Congestion Avoidance


✅ Advantage 🌟 Description

Efficient congestion handling Avoids packet loss and delays by preventing congestion early

Scalable Works in large-scale networks without needing router support

Compatible with TCP/IP Integrated into most TCP variants

Fairness Helps maintain fair bandwidth allocation among flows

⚠️Challenges
❌ Limitation Explanation

Limited visibility End hosts may not detect congestion quickly or accurately

Sensitive to delay jitter Especially in wireless/mobile networks

Requires cooperation Works best when all sources implement it fairly

📌 Summary Table
Technique Key Idea Example

AIMD Gradual probing + sharp decrease on loss TCP Reno, NewReno

Delay-Based Use RTT to predict congestion TCP Vegas, FAST

ECN-Based Respond to marked packets from routers ECN-enabled TCP

App-Level Control Application adapts data rate Video streaming

🔄 Comparison: Source-Based vs Network-Based


Feature Source-Based Network-Based (e.g., RED)

Controlled by End host (sender) Routers/switches

Deployment ease Easy (end system only) Requires router support

Responsiveness May be slower (depends on feedback) Faster (routers see congestion directly)

Scalability Highly scalable Moderate scalability

The Domain Name System (DNS) in Computer Networks

The Domain Name System (DNS) is a hierarchical and distributed naming system used to resolve
human-readable domain names (like [Link]) into IP addresses (like [Link]) that
computers use to identify each other on networks like the Internet.

Without DNS, we would have to remember IP addresses instead of easy-to-read domain names.

🧠 Why DNS Is Important


 Makes the internet user-friendly.
 Supports scalability by distributing the name resolution process.
 Enables load balancing, redundancy, and email routing through records like CNAME, MX, etc.

🗂️Basic DNS Concepts


Term Description

Domain Name A human-readable name (e.g., [Link])

IP Address Numeric address assigned to a device (e.g., [Link])

DNS Server A server that stores DNS records and resolves queries

Zone A portion of the DNS namespace managed by a DNS server

Fully Qualified Domain Name (FQDN) Complete domain name, including all labels (e.g., [Link].)

🔗 DNS Hierarchy
DNS is structured like a tree, with the root at the top:

[ . ] <-- Root
|
+-------------+-------------+
com org net <-- Top-Level Domains (TLDs)
|
google example yahoo <-- Second-Level Domains
|
www, mail, etc. <-- Subdomains

📦 Common DNS Record Types


Record Type Purpose Example

A Maps a name to an IPv4 address [Link] → [Link]

AAAA Maps a name to an IPv6 address [Link] → 2001:db8::1

CNAME Alias of another domain name [Link] → [Link]

MX Mail exchange server for email routing [Link] → [Link]

NS Specifies authoritative name servers [Link] → [Link]

TXT Stores text info (e.g., SPF, verification) google-site-verification=...

PTR Reverse mapping (IP to domain) [Link] → [Link]

🔁 How DNS Resolution Works


Here's a simplified process when you visit [Link]:

1. Browser checks cache → If not found:


2. Asks the local DNS resolver (provided by your ISP or OS).
3. If the resolver doesn't have the answer:
o It queries root servers → finds TLD servers (.com).
o TLD servers return the authoritative name server for [Link].
o Authoritative server returns the IP address of [Link].
4. Resolver returns the IP to the browser.
5. Browser connects to the IP and loads the site.

✅ DNS responses are cached at each level to speed up future lookups.

⚙️DNS Components
Component Role

Resolver (Client) Sends queries to DNS servers on behalf of users

Recursive Resolver Performs full resolution steps, from root to answer

Root Servers Direct queries to correct TLD name servers

TLD Name Servers Manage domains under top-level domains (e.g., .com)

Authoritative Servers Provide actual DNS records for domains

🔐 Security in DNS
Feature Description

DNS Cache Poisoning Injecting false entries into DNS cache

DNSSEC Adds cryptographic signatures to DNS data to prevent spoofing

DoH / DoT DNS over HTTPS / TLS for encrypted queries

📝 Summary
Feature Details

Function Translates domain names to IP addresses

Structure Hierarchical, distributed

Key Servers Root, TLD, Authoritative

Query Types A, AAAA, MX, CNAME, NS, PTR, TXT, etc.

Security Tools DNSSEC, DoH, DoT

Electronic Mail (Email) in Computer Networks

Electronic Mail (Email) is a fundamental application-layer service that allows users to send, receive, and
store messages over computer networks, including the Internet. It's built on several protocols that handle
different aspects of the email process—from transmission to retrieval and formatting.
🔗 Core Email Protocols Overview
Protocol Full Name Role

SMTP Simple Mail Transfer Protocol Sending and forwarding emails

POP3 Post Office Protocol version 3 Downloading and deleting emails

IMAP Internet Message Access Protocol Managing and accessing emails on the server

MIME Multipurpose Internet Mail Extensions Handling non-text and multimedia content

✉️1. SMTP (Simple Mail Transfer Protocol)


 Used to send emails from a client to a mail server or between mail servers.
 Works over port 25 (or 587 for authenticated mail).
 Only handles sending, not retrieving email.

🔁 SMTP Process

1. Sender's email client sends the message to their SMTP server.


2. SMTP server looks up the recipient domain's mail server (via DNS/MX).
3. Forwards the message to the recipient's mail server using SMTP.
4. The message is stored in the recipient's mailbox.

💬 SMTP Commands (simplified)

Command Function

HELO Identify the sender

MAIL FROM: Specifies sender email

RCPT TO: Specifies recipient email

DATA Starts the message content

QUIT Ends the session

📥 2. POP3 (Post Office Protocol v3)


 Used to retrieve emails from a remote server to a local device.
 Downloads messages and deletes them from the server by default.
 Works over port 110 (or 995 for POP3S with SSL).

✅ Features

 Simple protocol, low server storage.


 Suitable for single-device access.
 Offline access after download.
📥 3. IMAP (Internet Message Access Protocol)
 Used to access and manage email directly on the mail server.
 Messages remain on the server; you can access them from multiple devices.
 Works over port 143 (or 993 for IMAPS with SSL).

✅ Features

 Supports folders, flags, labels.


 Allows partial downloads (e.g., headers only).
 Ideal for modern multi-device usage (e.g., smartphones, webmail).

🧾 4. MIME (Multipurpose Internet Mail Extensions)


 An extension of SMTP to support:
o Non-ASCII characters.
o Attachments (e.g., images, documents, audio).
o Multiple parts (e.g., HTML + plain text).
 Without MIME, email could only support 7-bit ASCII text.

🗂️MIME Headers (examples)

Header Description

Content-Type Type of data (e.g., text/plain, image/jpeg)

Content-Transfer-Encoding Specifies encoding method (e.g., base64)

Content-Disposition How to display (inline or attachment)

🧠 Email System Architecture


[User A] [Mail Server A] [Mail Server B] [User
B]
| | | |
|----SMTP SEND---------->| | |
| |----SMTP RELAY--------------->| |
| | |-----IMAP/POP3--------->|

 SMTP: Used between clients and servers (sending).


 POP3/IMAP: Used by recipients to retrieve email.
 MIME: Formats the content of the email (attachments, HTML, etc.).

📊 Protocol Comparison
Feature SMTP POP3 IMAP

Use Case Sending emails Download & delete Sync & manage remotely
Feature SMTP POP3 IMAP

Data Stays On Server ❌ ❌ (by default) ✅

Multiple Devices ❌ ❌ ✅

Port (default) 25 / 587 (TLS) 110 / 995 (SSL) 143 / 993 (SSL)

📝 Summary
Component Function

SMTP Sends email to server or recipient’s server

POP3 Downloads email and usually deletes it from server

IMAP Views and manages email on the server

MIME Allows emails to carry attachments and rich content

World Wide Web (WWW) and HTTP in Computer Networks

The World Wide Web (WWW) is a system of interlinked hypertext documents and multimedia content
accessed via the Internet. It allows users to view web pages using web browsers, and its foundation lies in
the HTTP protocol.

🧭 What Is the World Wide Web?


 Invented by Tim Berners-Lee in 1989.
 It’s not the same as the Internet—it’s a service that runs on top of the Internet.
 Uses URLs (Uniform Resource Locators) to locate resources (e.g.,
[Link]
 Provides access to:
o Web pages (HTML)
o Images, audio, video
o Forms, interactive applications

⚙️Core Components of the Web


Component Description

Web Browser Client software (e.g., Chrome, Firefox) that displays web pages

Web Server Hosts web pages and responds to HTTP requests

URL Address used to identify a resource on the web

HTML Standard markup language for web content

HTTP/HTTPS Protocols used to request and transfer web content


Component Description

🔗 HTTP – Hypertext Transfer Protocol


HTTP (Hypertext Transfer Protocol) is the application-layer protocol used by web browsers and servers
to communicate and exchange resources.

Feature Description

Type Request-response protocol

Default Port 80 for HTTP, 443 for HTTPS (secure version)

Stateless Each request is independent (no memory of previous ones)

🔁 Basic HTTP Transaction


1. Browser (client) sends an HTTP request to a web server.
2. Server processes the request and sends an HTTP response with the requested resource.

✉️Example HTTP Request:


GET /[Link] HTTP/1.1
Host: [Link]
User-Agent: Mozilla/5.0

📦 Example HTTP Response:


HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 1256

<html>
<head><title>Example</title></head>
<body>Hello, world!</body>
</html>

🔄 Common HTTP Methods


Method Purpose

GET Retrieve a resource

POST Submit data to a server (e.g., forms)

PUT Update or create a resource

DELETE Remove a resource

HEAD Retrieve only headers


📡 HTTP Status Codes
Code Meaning Description

200 OK Request succeeded

301 Moved Permanently Resource has moved

400 Bad Request Invalid client request

403 Forbidden Access denied

404 Not Found Resource not found

500 Internal Server Error Server-side problem

🔐 HTTPS – Secure HTTP


 HTTPS = HTTP + TLS/SSL encryption.
 Encrypts communication between client and server.
 Prevents eavesdropping, tampering, and man-in-the-middle attacks.
 Uses port 443.

📉 HTTP vs HTTPS
Feature HTTP HTTPS

Secure? ❌ No ✅ Yes (encrypted via TLS)

Port 80 443

Data Privacy Vulnerable Protected

Use Case Non-sensitive content Banking, login, e-commerce

🕸️Summary of WWW and HTTP


Concept Description

WWW System of interlinked documents over the Internet

HTTP Protocol for transferring web content

URL Address used to locate resources on the web

Web Browser Software that displays web pages

Web Server Stores and serves web content

HTTPS Secure version of HTTP using encryption


Concept Description

What is Network Management?


Network Management involves monitoring, maintaining, and optimizing computer networks to ensure
their smooth operation. It covers:

 Fault management (detecting and fixing issues)


 Performance management (monitoring throughput, latency)
 Configuration management (setting up devices)
 Security management (access control, audits)
 Accounting management (usage tracking)

🔍 What is SNMP?
SNMP (Simple Network Management Protocol) is a widely used application-layer protocol for
managing devices on IP networks, such as routers, switches, servers, printers, and more.

It provides mechanisms to:

 Monitor network devices (status, performance)


 Configure devices remotely
 Receive alerts (called traps) for network events

⚙️How SNMP Works


SNMP operates with these main components:

Component Description

Managed Devices Network elements (routers, switches, etc.) that support SNMP

Software on managed devices that collects info and responds to SNMP


Agent
requests

Network Management System


Central system that queries agents and processes info
(NMS)

🔁 SNMP Operation Modes


1. Polling: NMS periodically sends requests to agents to gather data.
2. Traps: Agents asynchronously send alerts to NMS when certain events occur.
📂 SNMP Data Structure: MIB
 Managed data is organized in a Management Information Base (MIB).
 MIB is a hierarchical database of network objects, each identified by an Object Identifier (OID).
 Example OIDs represent info like interface status, traffic counters, CPU load.

📝 SNMP Versions
Version Description Security

SNMPv1 Original, basic functions Minimal security (community strings)

SNMPv2c Improved performance and additional features Same security as v1

SNMPv3 Enhanced security (authentication, encryption) Strong security and privacy

🔧 Basic SNMP Operations (Protocol Data Units - PDUs)


Operation Purpose

GET Request value of a MIB object

SET Modify value of a MIB object

GETNEXT Retrieve next object in MIB tree

GETBULK Retrieve large blocks of data (v2/v3)

TRAP Unsolicited alert from agent to NMS

INFORM Confirmed trap with acknowledgment (v2/v3)

🔑 SNMP Security (Especially in v3)


 Authentication: Verify identity of users/devices.
 Privacy: Encrypt SNMP messages to prevent snooping.
 Access Control: Define who can access what data.

🌐 SNMP Workflow Example


1. NMS sends GET request to router’s SNMP agent asking for interface status.
2. Agent responds with current status.
3. If router detects a fault (e.g., interface down), agent sends a TRAP alert to NMS.
4. Network admin uses NMS console to analyze and resolve the issue.
📊 Use Cases of SNMP
 Monitoring network device health
 Gathering traffic statistics
 Configuring device parameters remotely
 Receiving alarms for faults or security breaches

📝 Summary Table

Aspect Description

Purpose Monitor and manage network devices

Protocol SNMP (UDP-based, usually ports 161/162)

Components Managed devices, agents, NMS

Data Store MIB (hierarchical database)

Security Improved in SNMPv3 with auth and encryption

You might also like