Module -5
1. *Describe any two Congestion Avoidance Mechanisms used in TCP/IP networks.*
two important congestion avoidance mechanisms used in TCP/IP networks are:
1. DECbit Congestion Avoidance
2. RED (Random Early Detection)
Introduction
Congestion avoidance refers to the techniques used to prevent network congestion before it
becomes severe. Instead of waiting for packet loss to occur, these mechanisms detect early signs of
congestion and reduce the sender's transmission rate, thereby improving network performance and
resource utilization.
1. DECbit Congestion Avoidance
Definition
DECbit (Digital Equipment Corporation Bit) is an early congestion notification mechanism in which
routers indicate impending congestion by setting a congestion indication bit in the packet header.
Working Principle
1. Every packet contains a DECbit in its header.
2. Routers continuously monitor their queue length.
3. If the queue begins to grow (indicating possible congestion), the router sets the DECbit = 1.
4. If the queue is normal, the router keeps the DECbit = 0.
5. The receiver copies the DECbit into the ACK packet.
6. The sender examines the ACKs:
o If half or more ACKs have DECbit = 1, the sender reduces its transmission rate.
o If most ACKs have DECbit = 0, the sender gradually increases its transmission rate.
Advantages
• Detects congestion before packet loss.
• Smooth traffic control.
• Improves network performance.
• Reduces congestion early.
2. RED (Random Early Detection)
Definition
Random Early Detection (RED) is a congestion avoidance mechanism used in routers. It prevents
congestion by randomly dropping or marking packets before the router's buffer becomes full.
Working Principle
1. Routers continuously monitor the average queue size.
2. If the queue is small, no packets are dropped.
3. If the queue size is between the minimum and maximum threshold, some packets are
randomly dropped or marked.
4. If the queue exceeds the maximum threshold, all incoming packets are dropped.
5. Random dropping acts as a warning to TCP senders to reduce their transmission rate.
Advantages
• Prevents congestion collapse.
• Maintains low queue delay.
• Provides fair bandwidth sharing.
• Prevents global synchronization.
• Improves network efficiency.
3. *Explain how an email is sent from a client to a recipient using SMTP and POP3/IMAP with a
neat diagram.*
Electronic Mail (E-mail) is one of the most widely used Internet services. Email communication uses
different protocols for sending and receiving messages.
• SMTP (Simple Mail Transfer Protocol) – Used to send emails.
• POP3 (Post Office Protocol Version 3) – Used to download emails from the mail server to
the receiver's device.
• IMAP (Internet Message Access Protocol) – Used to access and synchronize emails stored
on the mail server.
Thus, SMTP is used for sending, while POP3 or IMAP is used for receiving emails.
Email Sending Process
The email transmission process consists of the following steps:
Step 1: Compose the Email
• The sender writes the email using an email client (such as Gmail, Outlook, or Thunderbird).
• The sender enters the recipient's email address, subject, and message.
Step 2: SMTP Sends the Email
• The email client sends the message to the sender's SMTP server.
• SMTP transfers the email to the recipient's mail server through the Internet.
Step 3: Email Stored on Recipient Mail Server
• The recipient's mail server receives the email.
• The email is stored in the recipient's mailbox until it is accessed.
Step 4: POP3 or IMAP Retrieves the Email
• The recipient opens the email client.
• The client connects to the mail server using POP3 or IMAP.
• The email is downloaded (POP3) or synchronized (IMAP) and displayed to the recipient.
Role of SMTP
SMTP is responsible for:
• Sending emails from the sender.
• Transferring emails between mail servers.
• Delivering emails to the recipient's mail server.
• Using TCP for reliable communication.
Default Ports
• SMTP: 25
• SMTP Submission: 587
• SMTPS (Secure SMTP): 465
Role of POP3
POP3 retrieves emails from the mail server.
Features
• Downloads emails to the local computer.
• Emails may be removed from the server after download.
• Suitable for offline access.
• Simple and fast protocol.
Default Port
• POP3: 110
• POP3 Secure (POP3S): 995
Role of IMAP
IMAP allows users to access emails directly from the mail server.
Features
• Emails remain on the server.
• Synchronizes multiple devices.
• Supports folders and message organization.
• Ideal for accessing email from different devices.
Default Port
• IMAP: 143
• IMAPS (Secure IMAP): 993
3. *Explain the difference between HTTP/1.1 and HTTP/2.*
4. *Compare the DEC Bit Approach with TCP Congestion Control Mechanisms.*
DEC Bit Approach TCP Congestion Control Mechanisms
Developed by Digital Equipment
Used in the TCP/IP protocol suite.
Corporation (DEC).
Uses a congestion indication bit (DECbit) Uses network feedback such as packet loss, delay, or
in the packet header. explicit notifications.
Routers monitor the queue length. The sender monitors network conditions.
Router sets DECbit = 1 when congestion is The sender reduces its transmission rate when
likely. congestion is detected.
DEC Bit Approach TCP Congestion Control Mechanisms
The receiver copies the DECbit into the
The sender reacts based on the received feedback.
ACK packet.
If half or more ACKs contain DECbit = 1, If congestion is detected, the sender decreases its
the sender reduces its sending rate. sending rate; otherwise, it gradually increases it (AIMD).
Provides early congestion detection Controls congestion by adapting the sender's
before packet loss occurs. transmission rate.
Requires router support to set the Operates mainly at the sender using TCP congestion
congestion bit. control.
Uses explicit congestion notification
Uses feedback-based congestion control.
through the DECbit.
Main objective is to provide an early Main objective is to avoid congestion by dynamically
warning of congestion. controlling the transmission rate.
5. *Explain TCP Congestion Control, including Slow Start, Congestion Avoidance, Fast
Retransmit and Fast Recovery
TCP Congestion Control is a mechanism used to prevent and control congestion in computer
networks. It dynamically adjusts the Congestion Window (cwnd) according to network conditions to
improve throughput, reduce packet loss, and ensure reliable communication.
The four phases of TCP Congestion Control are:
• Slow Start
• Congestion Avoidance
• Fast Retransmit
• Fast Recovery
1. Slow Start
Definition
Slow Start is the initial phase of TCP Congestion Control in which the congestion window (cwnd)
starts with a small value (usually 1 MSS) and increases exponentially until it reaches the Slow Start
Threshold (ssthresh).
Working
• Initial congestion window = 1 MSS
• Each ACK increases cwnd by 1 MSS
• Congestion window doubles every Round Trip Time (RTT)
• Continues until ssthresh is reached or packet loss occurs
Advantages
• Quickly utilizes available bandwidth.
• Establishes the transmission rate safely.
• Reduces the possibility of immediate congestion.
2. Congestion Avoidance
Definition
After reaching ssthresh, TCP enters the Congestion Avoidance phase, where the congestion window
increases gradually.
Working
• Congestion window grows linearly
• Increase is approximately 1 MSS per RTT
• Sender continuously monitors network conditions
• On detecting congestion, the congestion window is reduced
Advantages
• Prevents sudden congestion.
• Provides stable network performance.
• Improves bandwidth utilization.
3. Fast Retransmit
Definition
Fast Retransmit enables TCP to retransmit a lost packet without waiting for the retransmission
timeout.
Working
• Receiver sends duplicate ACKs when a packet is missing.
• After receiving three duplicate ACKs, the sender assumes packet loss.
• The missing packet is retransmitted immediately.
Advantages
• Faster packet recovery.
• Reduces transmission delay.
• Improves throughput.
4. Fast Recovery
Definition
Fast Recovery follows Fast Retransmit and avoids restarting the Slow Start phase after packet loss.
Working
• Set ssthresh = cwnd / 2
• Set cwnd = ssthresh
• Continue transmission in the Congestion Avoidance phase
Advantages
• Avoids unnecessary Slow Start.
• Faster recovery after packet loss.
• Efficient utilization of network resources.