22-Elec-B4 Information Technology Networks · December 2017
Question 2 of 5: The Transport Layer
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
Paper format. Engineers Canada / Professional Engineers of Ontario, National Examinations — December 2017, 16-Elec-B4 Information Technology Networks. Three hours, closed book, a PEO-approved non-programmable calculator permitted. Five questions of 25 marks each; any four constitute a complete paper worth 100 marks, and the marks are printed in the left margin against every sub-part. All five questions are solved here, because this set is a study resource rather than an exam attempt.
Reference texts.
A. Leon-Garcia and I. Widjaja, Communication Networks: Fundamental Concepts and Key Architectures, 2nd ed., McGraw-Hill — the syllabus text for this paper (layering, transport, routing, switching).
J. F. Kurose and K. W. Ross, Computer Networking: A Top-Down Approach, 8th ed., Pearson — IP forwarding tables, TCP congestion control, packet versus circuit switching.
A. S. Tanenbaum and D. J. Wetherall, Computer Networks, 5th ed., Pearson — the OSI reference model and the TCP/IP layer stack.
D. Bertsekas and R. Gallager, Data Networks, 2nd ed., Prentice-Hall — shortest-path routing and Dijkstra's algorithm.
Canadian context. The addressing and numbering practice assumed throughout is the Canadian one: IPv4 and IPv6 blocks used by Canadian networks are allocated by ARIN, of which Canada is part, and the national research network CANARIE has run production IPv6 since the mid-2000s, which is why the IPv6 answer in Question 1(c) is the operational rather than the theoretical response. Circuit-switched telephony in Question 5 refers to the Canadian PSTN as regulated by the CRTC.
The printed paper writes part (d) as “the same setup as in part b”. Part (b) is the UDP question and states no setup; the setup — initial window 1, threshold 16 — is given in part (c), so the cross-reference is a typographical slip and part (d) is answered against part (c) here.
Part (a) — why congestion control is necessary. Congestion is a property of the network, not of the receiver. Where links have different capacities, traffic arriving on a fast link and leaving on a slow one queues at the router, and because the buffer is finite the queue eventually overflows and packets are discarded. Every discarded packet has already consumed capacity on every upstream link it crossed, so that work is wasted; worse, the sender's retransmission timer fires and it injects the same data again, adding load exactly when the network can least carry it. Without a control loop this positive feedback drives the network into congestion collapse, in which offered load keeps rising while useful throughput (goodput) falls toward zero and queueing delay grows without bound. Congestion control forces every sender to infer the state of the bottleneck — classically from packet loss, or from explicit marks or delay — and to hold its sending rate near the bottleneck capacity, which also apportions that capacity fairly among the competing flows. It must not be confused with flow control: flow control is the receiver-advertised window that stops a fast sender from overrunning a slow host, whereas congestion control protects the network between them, and TCP obeys the smaller of the two windows for exactly that reason.
Part (b) — why UDP can beat TCP for video streaming. Streaming media is loss-tolerant but delay-intolerant: a lost frame degrades one moment of picture, whereas a late frame is useless because its playout instant has passed. TCP is built for the opposite priority. It retransmits every lost segment and delivers bytes strictly in order, so one lost segment stalls delivery of every correctly received segment behind it — head-of-line blocking — and the retransmission cannot arrive sooner than one further round-trip time. Its congestion control also halves the sending rate on each loss, producing a sawtooth rate that maps badly onto a constant-bit-rate stream and shows up to the viewer as rebuffering. UDP simply hands each datagram to IP: there is no connection setup delay, no retransmission, no reordering buffer and no rate oscillation, so the application can keep a small playout buffer and control its own pacing. It also lets the application choose its own error strategy, such as forward error correction or concealment of a lost slice, and it supports multicast for a live stream to many viewers, which TCP cannot do. The price is that the application must supply for itself whatever sequencing, timing and rate adaptation it needs, which is what RTP over UDP provides in practice.
Part (c) — the two growth regimes. With an initial congestion window $\text{cwnd}_1 = 1$ segment and a slow-start threshold $\text{ssthresh} = 16$ segments, TCP grows the window once per round-trip time under two different rules. While $\text{cwnd} < \text{ssthresh}$ it is in slow start and increases the window by one segment for every acknowledgement received, which doubles it each round trip; once $\text{cwnd} \geq \text{ssthresh}$ it switches to congestion avoidance and adds one segment per round trip:
The first regime is exponential and finds the available capacity quickly; the second is linear and probes for extra capacity gently.
Tabulate the windows with every packet acknowledged. Doubling from 1 gives 1, 2, 4, 8, 16, so the threshold is reached at the fifth window, after which the growth is additive:
Two checks are worth making. The window at the start of round $n$ during slow start is $2^{\,n-1}$, so $\text{cwnd}_5 = 2^{4} = 16$ as tabulated, and the total number of segments offered over those five rounds is $1+2+4+8+16 = 31 = 2^{5}-1$. Growth beyond the threshold is one segment per round trip and continues until a loss occurs or the receiver's advertised window becomes the binding constraint.
Part (d) — what a lost packet in the third window does. The third window carries $\text{cwnd}_3 = 4$ segments. When one of them is not acknowledged and the retransmission timer expires, TCP (Tahoe behaviour, and the behaviour every implementation still uses after a genuine timeout) treats the loss as evidence of congestion and does two things at once: it halves the threshold to the window that caused trouble,
and it collapses the congestion window back to one segment and re-enters slow start. Doubling from 1 therefore stops at the new threshold of 2 after a single round trip, and growth is linear from there on.
Give the first eight windows. Applying that rule to the sequence of part (c):
If instead the loss is detected by three duplicate acknowledgements rather than by a timeout, a TCP Reno sender performs fast retransmit and fast recovery: it sets ssthresh to 2 as before but resumes from that value in congestion avoidance rather than from 1, giving 1, 2, 4, 2, 3, 4, 5, 6. The Tahoe sequence above is the answer expected here, because the question says only that a packet “is not acknowledged”, which is the timeout case.
Plot both cases on one axis. The figure below overlays the loss-free evolution of part (c) with the post-loss evolution of part (d); the circled point is the window in which the loss occurs.
Figure 2.1 — Congestion-window evolution. Blue: no loss (part c), doubling to the threshold of 16 at round 5 and then adding one per round. Red: a packet in the third window is lost (part d), so ssthresh falls to 2, cwnd restarts at 1, and growth becomes linear after round 5. The dashed line is the initial threshold of 16.
Quantity
Result
(a) Purpose of congestion control
Prevents buffer overflow at the bottleneck and the retransmission feedback that causes congestion collapse; distinct from receiver flow control
(b) UDP for streaming
No retransmission, no head-of-line blocking, no connection setup, no rate sawtooth; supports multicast and application-level FEC — timeliness beats reliability
(c) Windows, no loss
1, 2, 4, 8, 16, 17, 18, 19 segments (slow start to the threshold at round 5, then congestion avoidance)
(c) Segments sent in the first five rounds
$1+2+4+8+16 = 31$
(d) ssthresh after the loss
$\text{cwnd}/2 = 4/2 = 2$ segments
(d) First eight windows (timeout, Tahoe)
1, 2, 4, 1, 2, 3, 4, 5 segments
(d) Same loss detected by triple duplicate ACK (Reno)