22-Elec-B4 Information Technology Networks · December 2014
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Paper format. Professional Engineers of Ontario Annual Examinations, December 2014 — 07-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, with marks noted in the left margin. Candidates are urged to state any interpretive assumptions with their answers. All five questions are worked below, since the complete set is more useful as a study resource than any four of it.
Reference texts. A. Leon-Garcia and I. Widjaja, Communication Networks: Fundamental Concepts and Key Architectures, 2nd ed. (the EGBC/PEO syllabus reference for this code); J. F. Kurose and K. W. Ross, Computer Networking: A Top-Down Approach, 8th ed.; A. S. Tanenbaum and D. J. Wetherall, Computer Networks, 5th ed.; T. S. Rappaport, Wireless Communications: Principles and Practice, 2nd ed.; W. Stallings, Data and Computer Communications, 10th ed.
Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.
Part (a) — Congestion control in TCP. TCP controls two different things with two different windows. Flow control protects the receiver from being overrun and is handled by the advertised window carried in every acknowledgement. Congestion control protects the network from being overrun and is handled by a second window, the congestion window cwnd, which the sender maintains for itself. The number of unacknowledged bytes permitted at any instant is the smaller of the two. The difficulty TCP faces is that no router tells it how much capacity is available, so the protocol must discover the operating point by experiment: it increases its rate until the network signals distress, backs off, and repeats.
The signal it uses is packet loss, on the reasoning that on a wired network transmission errors are negligible and a lost segment therefore means a router queue overflowed. Four mechanisms implement the response. Slow start opens the connection with $cwnd = 1$ maximum segment size and doubles it every round-trip time, since each of the $cwnd$ segments returns an acknowledgement that admits two more; the growth is exponential and is called slow only relative to the alternative of starting at the receiver window. Congestion avoidance takes over once $cwnd$ reaches the slow-start threshold ssthresh, after which the window grows by roughly one segment per round trip — additive increase — probing gently for extra capacity. On a timeout, ssthresh is set to half the window in force, $cwnd$ drops to 1, and slow start begins again. On three duplicate acknowledgements, which indicate a single loss with later segments still arriving, TCP Reno performs fast retransmit and fast recovery: it re-sends the missing segment immediately without waiting for the timer and halves the window rather than collapsing it, since the pipe is evidently still flowing.
The result is the characteristic sawtooth of additive increase and multiplicative decrease, an algorithm that provably converges to a fair share among flows sharing a bottleneck. It is worth noting that this is end-to-end congestion control with no help from the network, which is what has kept the Internet stable since the congestion collapses of 1986; explicit congestion notification, and modern algorithms such as CUBIC and BBR, refine the signal but keep the same feedback structure.
Part (b) — Window sizes with no loss.
Given. Slow-start threshold $\mathit{ssthresh} = 64$ segments; initial congestion window $cwnd = 1$; every segment acknowledged; the first eight transmission rounds are required.
Find. The value of $cwnd$ in each of windows 1 to 8.
Approach. Double the window each round while it is below the threshold, then add one per round once the threshold is reached.
Part (c) — Window sizes with a loss in the third window.
Given. The same connection — $\mathit{ssthresh} = 64$, $cwnd$ starting at 1 — but a segment sent in the third window is not acknowledged, and TCP re-enters slow start in response.
Find. The eight window sizes and the final value of the congestion threshold.
Approach. Run slow start until the loss, halve the threshold to the window in force at the loss, restart at one, and grow again under the new threshold.
Part (d) — TCP or UDP for streaming to a wireless device? UDP is the better choice, and the wireless part of the question is what makes the answer decisive rather than merely conventional.
Streaming media is loss-tolerant but delay-intolerant. A frame of audio or video that arrives after its scheduled playout instant is worthless whether or not it is correct, so TCP’s guarantee of in-order reliable delivery buys nothing and costs a great deal: a single lost segment stalls delivery of everything behind it while the retransmission is fetched, producing exactly the rebuffering pause the user notices. Losing one packet outright, by contrast, costs a few milliseconds of concealed audio that most listeners never detect. UDP also allows the application to control its own timing and to layer RTP/RTCP on top for sequencing, timestamping and quality feedback, and it supports multicast, which TCP cannot.
The wireless link sharpens the argument. TCP infers congestion from loss, but on a radio channel most loss comes from fading, interference and handover, not from a full queue. TCP responds by halving its window anyway, so throughput collapses at the very moment the link recovers — the classic misinterpretation problem on wireless links. A streaming application over UDP simply carries on, and adapts its bit rate from its own measurements of loss and jitter.
The honest qualification, worth a sentence in an exam answer, is that much commercial streaming today runs over TCP through HTTP adaptive streaming such as MPEG-DASH, because a large client-side buffer of several seconds hides retransmission delay and TCP passes firewalls unhindered. That is a pragmatic choice for on-demand video with a deep buffer. For live or interactive streaming, where the buffer must stay small, UDP remains the right transport — which is why WebRTC, VoIP and QUIC-based real-time media all sit on it.
| Part | Quantity | Result |
|---|---|---|
| (b) | Congestion windows 1–8, no loss | 1, 2, 4, 8, 16, 32, 64, 65 |
| (b) | Segments delivered in 8 rounds | 192 |
| (b) | Final threshold | 64 (unchanged) |
| (c) | Congestion windows 1–8, loss in window 3 | 1, 2, 4, 1, 2, 3, 4, 5 |
| (c) | Final congestion threshold | 2 (half of the window of 4 at the loss) |
| (c) | Segments delivered in 8 rounds | 22 |
| (d) | Transport for wireless streaming | UDP |