Network and Data Communications · Unit 6
Congestion Control and Traffic Management
Exam-focused notes for Congestion Control and Traffic Management (Network and Data Communications, BIT254): what the TU syllabus asks and how it has actually been tested, with 7 solved past questions from this unit.
Congestion Control and Traffic Management in short
When too many packets enter a network, queues grow, delay rises and packets are lost. This chapter explains congestion, the ways to control it, and how Quality of Service is kept.
What this unit covers
- Congestion control definition
- Open-loop congestion control
- Closed-loop congestion control
- Leaky-bucket algorithm
- Token bucket algorithm
- Acknowledgement policy
- Discarding policy
- Quality of Service
Token bucket algorithm
Congestion control definition
2080 · 10 marks
What is Congestion Control? How can it be handled? Explain acknowledgement policy and discarding policy[10]
Show solved answerHide answer
Congestion Control
Definition
Congestion in a network occurs when the number of packets being transmitted through the network approaches the packet handling capacity of the network. Congestion control refers to the mechanisms and techniques used to control or prevent congestion so that network performance does not degrade.
Note: No specific reference notes were found for this topic; the answer below is based on standard networking curriculum (Forouzan / Tanenbaum) as taught in BSc CSIT.
Why Congestion Occurs
When too many packets are present in a part of the network, network performance degrades. This happens because:
- Routers have limited buffer (queue) space
- Links have limited bandwidth
- Processors in routers have limited processing speed
If the load exceeds capacity, packets are dropped, retransmissions increase, and the situation worsens -- leading to congestion collapse.
How Congestion Can Be Handled
Congestion control approaches are broadly classified as:
1. Open Loop Congestion Control (Prevention)
Policies are applied before congestion occurs -- at the design stage.
| Policy Point | Technique |
|---|---|
| Source | Retransmission policy, Windowing policy |
| Destination | Acknowledgement policy |
| Router/Switch | Discarding policy, Scheduling policy |
2. Closed Loop Congestion Control (Reaction)
Policies are applied after congestion is detected.
- Back pressure: A congested node sends a signal to the upstream node to slow down.
- Choke packet: A special packet is sent by the router to the source to reduce its transmission rate.
- Implicit signaling: Source detects congestion from delays or dropped packets (e.g., TCP timeout).
- Explicit signaling: Router explicitly marks packets to inform source/destination of congestion (e.g., ECN -- Explicit Congestion Notification).
Open Loop Congestion Control Policies (Detailed)
A. Acknowledgement Policy
The acknowledgement (ACK) policy at the receiver side can greatly affect congestion.
How it works:
- If the receiver sends an acknowledgement for every packet received, it encourages the sender to keep sending packets rapidly, which can contribute to congestion.
- By delaying acknowledgements, the receiver can slow down the sender and reduce network load.
Techniques:
| Technique | Description |
|---|---|
| Cumulative ACK | Receiver sends one ACK for multiple received packets instead of one ACK per packet. This reduces ACK traffic and slows the sender. |
| Delayed ACK | Receiver waits for a short time (e.g., up to 500 ms) before sending an ACK, hoping to piggyback it on a data packet or combine multiple ACKs. |
| Selective ACK (SACK) | Receiver acknowledges only specific packets, avoiding unnecessary retransmissions. |
Effect on Congestion:
- Fewer ACKs mean the sender's window advances more slowly.
- This reduces the rate at which new packets are injected into the network.
- Thus, acknowledgement policy directly helps in preventing congestion at the source.
B. Discarding Policy
The discarding policy is applied at routers/switches. When a router's buffer is full or near full, it must decide which packets to drop.
Approaches:
1. Tail Drop (Default / Simple)
- When the buffer is full, the router simply drops all incoming packets (from the tail of the queue).
- Problem: Can cause global synchronization -- many TCP connections reduce their window simultaneously, then increase together, causing oscillation.
2. Random Early Detection (RED)
- The router monitors its average queue length.
- When the queue length exceeds a minimum threshold (min_th), it starts randomly dropping packets with increasing probability.
- When the queue length exceeds a maximum threshold (max_th), all packets are dropped.
Queue Length:
0 -------- min_th -------- max_th -------- Max Buffer
| |
Start random Drop all
dropping packets
- Advantage: Prevents global synchronization; notifies individual connections early.
- Advantage: Maintains low average queue length and low delay.
3. Priority-Based Discarding
- Packets are assigned priority levels.
- When congestion occurs, lower priority packets are dropped first.
- Higher priority packets (e.g., real-time voice/video) are protected.
4. Weighted RED (WRED)
- Extension of RED where different traffic classes have different drop probabilities.
- Higher priority traffic has a lower drop probability.
Summary Table
| Policy | Applied At | Purpose |
|---|---|---|
| Acknowledgement Policy | Receiver (Destination) | Slow down sender by reducing ACK frequency |
| Discarding Policy | Router/Switch | Decide which packets to drop when buffer is full |
| Retransmission Policy | Sender (Source) | Avoid unnecessary retransmissions |
| Scheduling Policy | Router | Decide which packet to send next (e.g., FIFO, WFQ) |
Conclusion
Congestion control is essential for maintaining network performance and reliability. Open loop methods like acknowledgement policy and discarding policy prevent congestion proactively, while closed loop methods react to congestion after it is detected. Together, these mechanisms ensure fair and efficient use of network resources.
0 · 5 marks
List one difference between open-loop and closed-loop congestion control. Explain acknowledgement policy and discarding policy [5]
Leaky-bucket algorithm
0 · 10 marks
Explain leaky-bucket algorithm. Illustrate with an example. What are its advantages and disadvantages?[10]
Show solved answerHide answer
Leaky Bucket Algorithm
Definition and Concept
The Leaky Bucket Algorithm is a traffic shaping and congestion control mechanism used in computer networks to control the rate at which data packets are transmitted into the network. It smooths out bursty traffic and converts it into a steady, uniform stream of packets.
The name comes from the analogy of a bucket with a small hole at the bottom:
- Water (packets) poured into the bucket at any rate
- Water leaks out from the bottom at a constant, fixed rate
- If the bucket overflows, excess water (packets) is discarded
How It Works
The algorithm operates as follows:
- Incoming packets are placed into a FIFO queue (the bucket) of fixed capacity.
- Packets are transmitted (leak out) at a fixed rate, regardless of the input rate.
- If the bucket (queue) is full, any new incoming packets are discarded (dropped).
- If the bucket is empty, no packets are sent (output is idle).
Key Parameters:
| Parameter | Description |
|---|---|
| Bucket Size (B) | Maximum number of packets the queue can hold |
| Output Rate (r) | Fixed rate at which packets leave the bucket |
| Input Rate | Variable (bursty) rate at which packets arrive |
Algorithm Steps
1. Initialize bucket with capacity B and output rate r.
2. For each time slot:
a. Receive incoming packets.
b. If (current packets in bucket + new packets) <= B:
Add packets to bucket.
Else:
Discard excess packets (overflow).
c. If bucket is not empty:
Transmit r packets from the bucket.
Illustration with Example
Setup:
- Bucket size (B) = 10 packets
- Output rate (r) = 3 packets per time slot
Simulation Table:
| Time Slot | Packets Arriving | Packets in Bucket (Before Output) | Packets Sent | Packets Remaining | Packets Dropped |
|---|---|---|---|---|---|
| 1 | 5 | 0 + 5 = 5 | 3 | 2 | 0 |
| 2 | 8 | 2 + 8 = 10 | 3 | 7 | 0 |
| 3 | 6 | 7 + 6 = 13 > 10 | 3 | 7 | 3 |
| 4 | 0 | 7 + 0 = 7 | 3 | 4 | 0 |
| 5 | 2 | 4 + 2 = 6 | 3 | 3 | 0 |
| 6 | 0 | 3 + 0 = 3 | 3 | 0 | 0 |
Observations from the Example:
- At Time Slot 2, the bucket fills to exactly 10 (no drop).
- At Time Slot 3, 13 packets would be needed but bucket holds only 10, so 3 packets are dropped.
- Output is always a constant 3 packets/slot, regardless of input bursts.
- The bursty input is converted to a smooth, uniform output stream.
Diagram:
Bursty Input
||| |||| ||||||
| |
v v
+------------------+
| B U C K E T | <-- Fixed capacity (B)
| (FIFO Queue) |
+------------------+
|
| Fixed rate (r packets/slot)
v
Smooth Output
||| ||| ||| |||
Advantages of Leaky Bucket Algorithm
-
Traffic Smoothing: Converts bursty, irregular traffic into a smooth, constant-rate output stream, reducing network congestion.
-
Simplicity: The algorithm is simple to understand and easy to implement in hardware or software.
-
Congestion Control: Prevents network congestion by ensuring no host can send packets faster than the allowed output rate.
-
Predictable Output: The output rate is always fixed and predictable, making it easy for the network to plan bandwidth allocation.
-
Fairness: Ensures that no single host monopolizes network bandwidth by enforcing a strict rate limit.
Disadvantages of Leaky Bucket Algorithm
-
Packet Loss: When the bucket is full, incoming packets are simply dropped, which may be unacceptable for certain applications (e.g., real-time video, VoIP).
-
Inflexibility: The output rate is always fixed, even when the network is idle and has spare capacity. It cannot take advantage of available bandwidth.
-
Does Not Handle Bursts Well: Legitimate short bursts of traffic are not accommodated. Even if the network can handle a burst, the algorithm still enforces the fixed rate.
-
Delay: Packets may experience variable queuing delays inside the bucket before being transmitted.
-
No Differentiation: All packets are treated equally; there is no priority mechanism for urgent or important packets.
-
Wasteful During Low Traffic: If the input rate is lower than the output rate, the bucket remains partially empty and the full bandwidth is not utilized.
Comparison: Leaky Bucket vs Token Bucket
| Feature | Leaky Bucket | Token Bucket |
|---|---|---|
| Output rate | Always fixed | Variable (up to a maximum) |
| Burst handling | Not allowed | Allowed (up to token limit) |
| Packet drop | On overflow | On no token available |
| Flexibility | Less flexible | More flexible |
Summary
The leaky bucket algorithm is a fundamental traffic policing and shaping technique that enforces a constant output rate regardless of input burstiness. While it is simple and effective for smoothing traffic and preventing congestion, its rigidity in not accommodating bursts and its packet-dropping behavior are notable limitations. For applications requiring burst tolerance, the Token Bucket Algorithm is often preferred.
Quality of Service
2079 · 5 marks
Describe Quality of Service. What are its practical significances? [5]
Open-loop congestion control
Make Unit 6 stick
Practice BIT254 with flashcards & quizzes