22-Elec-B4 Information Technology Networks · May 2017
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Paper format. Engineers Canada / Professional Engineers of Ontario, National Examinations — May 2017, 16-Elec-B4 Information Technology Networks. Three hours, closed book, one approved Casio or Sharp 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.
Canadian context. The spectrum, licensing and equipment-certification framework assumed throughout is the Canadian one: Innovation, Science and Economic Development Canada (ISED) licenses the cellular bands under the Radiocommunication Act and publishes the Standard Radio System Plans (SRSP) that fix the duplex spacing referred to in Question 1(e), and Canadian carriers deploy the same 3GPP LTE numerology used in Question 1(b).
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) — TCP or UDP for video streaming over a mobile wireless link? For a live or interactive stream the answer is UDP, carrying RTP and a codec that tolerates loss. The reasoning turns on what the two transports do when a packet goes missing. TCP guarantees an ordered, complete byte stream, which it achieves by retransmitting; on a mobile link a retransmission costs at least one round-trip time, and the replacement frame arrives after its playout instant has passed, so it is useless to the decoder while simultaneously stalling every packet queued behind it — head-of-line blocking. Worse, as part (c) develops, TCP interprets a fading loss as congestion and halves its rate, so the picture quality falls at exactly the moment the radio channel recovers. UDP simply delivers what arrives: a lost slice degrades one macroblock region for a few frames, the decoder conceals it, and the stream keeps its timing.
The engineering trade is therefore timeliness against fidelity, and video is one of the few applications that prefers timeliness. The application must then supply what UDP does not: RTP sequence numbers and timestamps for reordering and jitter removal, a de-jitter buffer of 100–300 ms, forward error correction or a scalable codec layer for resilience, and RTCP feedback so the sender can rate-adapt — because an application that ignores congestion signals is not welcome on a shared network. The honest qualification: stored, non-interactive streaming (Netflix, YouTube) does the opposite and runs adaptive-bitrate HTTP over TCP, because a buffer of tens of seconds absorbs retransmission delay and fidelity then matters more than latency. The deciding question is the size of the playout buffer relative to the round-trip time.
Part (b) — why end-to-end congestion control is necessary when links differ in capacity. A packet network offers no admission control: a source may emit at any rate its own interface allows, and every router it traverses absorbs the mismatch in a finite buffer. Where capacities differ, the mismatch is structural rather than accidental, and only the end systems — which alone know the whole path — can resolve it.
Example. Two hosts, A and B, each attached by 1 Gbit/s Ethernet to a router R, which reaches the destination network over a single 10 Mbit/s wide-area link with a 250-packet buffer. A begins a bulk transfer and, without congestion control, sends at its line rate. R can drain only 10 Mbit/s, so the buffer fills in a few milliseconds and the queue then discards a hundred packets for every one it forwards. Three things now happen, and each of them is the reason end-to-end control exists:
With end-to-end control the first losses (or ECN marks) reach A within one round-trip time, A halves its congestion window, and the sending rate converges on the fair share of the 10 Mbit/s bottleneck. The general principle is that the bottleneck may be any link on the path, may change during the connection, and is invisible to every node except the ones that can measure the path end to end — which is the argument for placing the control loop in the transport layer.
Part (c) — why TCP is suboptimal over a wireless link. TCP's congestion control rests on one inference: that a lost segment means a full queue somewhere on the path. That inference was sound when the only lossy element was a router buffer, and it is false on a radio link, where the multipath fading of Question 1(d) destroys frames while every queue on the path is empty. TCP cannot tell the two apart — both present as a missing acknowledgement — so it applies the congestion remedy to a corruption problem: on three duplicate ACKs it halves the congestion window and the slow-start threshold; on a timeout it collapses the window to one segment and restarts slow start.
The penalty is severe and self-reinforcing. Throughput falls just when the channel is recovering, so the connection under-uses a link that is once again perfectly good; the loss rate seen by TCP is far higher than the residual rate a wired path would show, and since steady-state throughput varies roughly as $1/\sqrt{p}$ with loss probability $p$, a 1 percent frame-loss rate is enough to cripple a long connection. Recovery is slow because it proceeds one segment per round-trip time in congestion avoidance, and a link that fades every few hundred milliseconds may never leave the low-window region at all. The usual mitigations attack the false inference rather than TCP itself: link-layer ARQ and hybrid ARQ hide residual radio losses from the transport (this is what LTE's RLC layer does), split connections or performance-enhancing proxies terminate TCP at the base station, explicit congestion notification lets routers signal real congestion without dropping, and loss-differentiating or delay-based algorithms — TCP Westwood, Veno, and today BBR — estimate the bottleneck rate directly instead of reading every loss as congestion.
Part (d) — window evolution from 1 to beyond a threshold of 64.
Given. Initial congestion window $cwnd_0 = 1$ segment (MSS); slow-start threshold $ssthresh = 64$ segments; every transmitted segment is acknowledged, so no loss occurs; one window is sent per round-trip time.
Find. The congestion window in each successive transmission round, up to the threshold and beyond it.
Approach. Apply the two growth laws of TCP congestion control in turn — exponential (slow start) while $cwnd < ssthresh$, then linear (congestion avoidance) once the threshold is reached.
Written out, the example asked for is:
Round: 1 2 3 4 5 6 7 8 9 — cwnd: 1 2 4 8 16 32 64 65 66
Part (e) — the same example with a loss in the fourth window.
Check: which part is to be repeated. The printed question says “Repeat part b”, but part (b) contains no window example to repeat, whereas part (d) does, and the added conditions (“a packet in the fourth window is not acknowledged, and TCP enters slow start”) only make sense applied to it. It is read here as repeat part (d). The data of part (d) — initial window 1, threshold 64, one window per round — are carried over unchanged.
Given. $cwnd_0 = 1$ segment; initial $ssthresh = 64$ segments; a segment sent in the fourth window is lost, and the loss is discovered by retransmission timeout, so TCP re-enters slow start.
Find. The window sequence before and after the loss, identifying the new threshold and the point at which growth becomes linear.
Approach. Grow the window exponentially to the fourth round, apply the multiplicative decrease that a timeout triggers, then repeat the two growth laws against the new threshold.
The complete example is:
Round: 1 2 3 4 5 6 7 8 9 10 — cwnd: 1 2 4 8 (loss) 1 2 4 5 6 7
The features of TCP the question asks to be illustrated are all visible in that sequence: slow start (rounds 1–4 and 5–7, exponential); the slow-start threshold as the boundary between the two growth laws, and its adaptation from 64 to 4; multiplicative decrease at the loss and additive increase afterwards, the AIMD pair that makes TCP converge to a fair share; timeout-based loss detection, which is what forces the window all the way back to one; and self-clocking, since each round advances only when the previous window's acknowledgements return.
Check: timeout versus fast retransmit. The question states that TCP enters slow start, which is the response to a retransmission timeout, so the window is taken back to one segment as above. Had the loss instead been detected by three duplicate acknowledgements, TCP Reno's fast retransmit and fast recovery would set both $ssthresh$ and $cwnd$ to 4 and continue in congestion avoidance from there — sequence 1, 2, 4, 8, 4, 5, 6, 7 — without the return to one. Both readings share the same new threshold of 4.
| Quantity | Symbol / where | Value |
|---|---|---|
| Window sequence, no loss (rounds 1–9) | Q2(d) | 1, 2, 4, 8, 16, 32, 64, 65, 66 |
| Round at which cwnd reaches the threshold | Q2(d) | round 7 |
| Segments sent in the first 7 rounds | Q2(d) | 127 |
| Window at the loss | $cwnd_{loss}$, Q2(e) | 8 segments |
| New slow-start threshold after the loss | $ssthresh_{new}$, Q2(e) | 4 segments |
| Window sequence with loss (rounds 1–10) | Q2(e) | 1, 2, 4, 8, 1, 2, 4, 5, 6, 7 |
| Transport chosen for live wireless video | Q2(a) | UDP (with RTP/RTCP) |