1. LPU MCA Semester 1
  2. CAP7001
  3. Unit 5

CAP7001 · Unit 5: Transport layer

Congestion control and quality of service

10 practice questions · in the ETE syllabus

Key points

  • Sender window = min(cwnd, receiver window)
  • Slow start doubles per RTT, avoidance adds one MSS per RTT
  • Timeout: ssthresh = cwnd / 2 and cwnd = 1
  • Token bucket permits bursts, leaky bucket smooths to a constant rate
  • QoS traits are reliability, delay, jitter and bandwidth

Congestion occurs when more traffic arrives than the network can carry. TCP reacts with a congestion window (cwnd), which limits the unacknowledged data in flight. The sender may have at most min(cwnd, receiver window) outstanding, so throughput is about window / RTT.

Phases. In slow start cwnd doubles each RTT (1, 2, 4, 8, 16, ...) until it reaches ssthresh. In congestion avoidance it grows by about one MSS per RTT. On a timeout, ssthresh becomes half of cwnd and cwnd drops to 1 MSS (Tahoe). On three duplicate acks, Reno halves cwnd and continues from ssthresh (fast recovery).

Worked example: after a timeout at cwnd 32, ssthresh = 16 and cwnd = 1. Counting RTT 1 with cwnd 1, the window first reaches 16 at RTT 5. With 10 segments of 1460 bytes and RTT 100 ms, throughput is 10 x 1460 x 8 / 0.1 = 1.168 Mbps.

Traffic shaping. A leaky bucket outputs at a constant rate. A token bucket lets a source save tokens and send a burst up to the bucket size: a 6-token bucket refilling at 2 per second passes 6 packets of a 10-packet burst at once and the last 4 after 2 seconds.

QoS describes a flow by reliability, delay, jitter and bandwidth. IntServ reserves resources per flow with RSVP, while DiffServ marks packets with a DSCP and routers apply per-hop behaviours without per-flow state.

Exam trap: a timeout restarts cwnd at 1, but triple duplicate acks do not.

Try two questions

Question 1 · Tier 3, Apply

cwnd is 10 segments of 1460 bytes each and the RTT is 100 ms. What is the approximate throughput?

  1. About 1.17 Mbps
  2. About 0.15 Mbps
  3. About 11.7 Mbps
  4. About 0.12 Mbps
Show the answer

A. 10 x 1460 x 8 = 116800 bits per 0.1 s, which is 1168000 bits per second.

Why not B: That forgets to convert bytes to bits.

Why not C: That treats the RTT as 10 ms.

Why not D: That forgets to divide by the RTT.

Question 2 · Tier 2, Understand

How does TCP grow cwnd during slow start and during congestion avoidance?

  1. Linearly in slow start, then exponentially in congestion avoidance
  2. By one segment per RTT in both slow start and avoidance
  3. Exponentially in slow start, then about one segment per RTT in avoidance
  4. It doubles in both phases until a packet loss is detected
Show the answer

C. Slow start doubles cwnd each RTT, and congestion avoidance adds one MSS each RTT.

Why not A: That reverses the two phases.

Why not B: That describes only congestion avoidance.

Why not D: That describes only slow start.