22-Elec-B4 Information Technology Networks · December 2013
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Paper format. Professional Engineers of Ontario annual examination, 07-Elec-B4 Information Technology Networks, December 2013. Three hours, closed book, one PEO-approved non-programmable calculator permitted. Marks are printed in the left margin; the cover page states that there are five questions and that any four constitute a complete paper worth 100 marks. All five questions and every sub-part are answered below, because this set is intended as a study resource rather than as a sat examination.
Reference texts. A. Leon-Garcia and I. Widjaja, Communication Networks: Fundamental Concepts and Key Architectures, 2nd ed. — the text listed by the Engineers Canada syllabus for this examination 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.; W. Stallings, Wireless Communications and Networking, 2nd ed.; T. S. Rappaport, Wireless Communications: Principles and Practice, 2nd ed. Normative documents cited: IEEE 802.11 (wireless LAN), IEEE 802.15.1 (Bluetooth), IEEE 802.3 (CSMA/CD), 3GPP TS 45.002 (GSM multiplexing), RFC 5681 (TCP congestion control), RFC 768 (UDP) and ISO/IEC 7498-1 (the OSI reference model).
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.
Given. A TCP sender whose congestion window starts at $cwnd_0 = 1$ segment with a slow-start threshold of $ssthresh = 16$ segments, on a path where every segment is acknowledged and no segment is lost. Time is counted in round-trip times, and the window is expressed in maximum-segment-size units.
Find. The evolution of the congestion window round trip by round trip, up to the threshold and beyond it.
Approach. Apply the two growth laws of RFC 5681 in turn — multiplicative increase while $cwnd \lt ssthresh$, additive increase once $cwnd \ge ssthresh$ — and tabulate one row per round trip.
| Round trip | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|---|
| cwnd (segments) | 1 | 2 | 4 | 8 | 16 | 17 | 18 | 19 | 20 |
| Phase | slow start (window doubles) | congestion avoidance (+1 per RTT) | |||||||
TCP’s congestion control rests on an inference that was sound when it was designed and is false on a radio link: that the network layer discards packets only when a queue overflows, so a lost segment means the path is congested. There is no other loss signal in the protocol, because the wired networks TCP grew up on had bit-error rates low enough that corruption was negligible. When the real cause of loss is a fade — a brief, purely local dropout of the radio channel with no queue anywhere near full — TCP applies the congestion remedy to a problem that is not congestion, and every step of the remedy is counterproductive.
The immediate cost is the reaction itself. A fade of a few tens of milliseconds destroys a handful of segments; TCP responds by halving the congestion window on a fast retransmit, or by collapsing it to one segment and re-entering slow start if the loss burst is long enough to lose the duplicate acknowledgements as well and force a retransmission timeout. The link, meanwhile, has recovered and is idle. Because congestion avoidance rebuilds the window by only one segment per round trip, the recovery from a single fade takes as many round trips as the window had segments — on a long path this is seconds of deliberate under-utilisation caused by a dropout that lasted milliseconds.
The damage compounds when fades recur, which is exactly what mobility produces. If the interval between fades is shorter than the time the window needs to climb back, the sender never reaches the window the link could support, and average throughput settles far below capacity: the connection spends its life on the rising edge of the sawtooth. Repeated timeouts also double the retransmission timer at each attempt, so after a burst the sender may sit silent for seconds while a perfectly good channel goes unused. Two further effects make it worse. The round-trip-time samples taken across a fade are wildly variable, which inflates the estimated deviation and therefore the timeout, and link-layer retransmission — the usual local fix — itself adds delay variation that TCP reads as more evidence of trouble. TCP is also unable to distinguish a loss from a long delay, so a link-layer recovery that takes longer than the timeout produces a spurious retransmission and a spurious window reduction on top of everything else.
The remedies all amount to keeping the wireless hop’s losses out of the end-to-end control loop, or telling the sender the truth about them: local link-layer retransmission with a tuned persistence (as in 802.11 and in radio-link protocols); split-connection or performance-enhancing proxies that terminate TCP at the base station; snoop agents that cache segments at the wireless edge and suppress the duplicate acknowledgements that would trigger a needless window reduction; selective acknowledgement so a burst of losses costs one recovery rather than several; and explicit loss notification or explicit congestion notification, which give the sender a signal that distinguishes corruption from queue overflow. Each attacks the same root cause — an inference that no longer holds.
The two protocols occupy the same layer and differ in what they promise. First, TCP is connection-oriented and reliable while UDP is connectionless and unreliable: TCP performs a three-way handshake, numbers every byte, acknowledges, retransmits what is lost and delivers the byte stream to the application in order and without duplicates, whereas UDP simply prepends an eight-byte header to a datagram and hands it to the network layer, with no handshake, no sequence numbers, no acknowledgement, no retransmission and no ordering guarantee. Second, TCP performs flow control and congestion control while UDP performs neither: a TCP sender is limited both by the receiver’s advertised window and by the congestion window of part (a), so it adapts its rate to the slowest element in the path, whereas a UDP sender transmits at whatever rate the application chooses and will happily overrun both the receiver and the network.
A third difference worth a sentence is that TCP is a byte-stream service with no message boundaries, so the receiver may read the data in units unrelated to the sender’s writes, while UDP preserves datagram boundaries exactly. The trade-off explains the division of labour in practice: file transfer, mail and the web use TCP because correctness matters more than delay, while real-time voice, video, DNS queries and network management use UDP because a late packet is worthless anyway and the application can do its own, lighter recovery.
| Part | Quantity | Result |
|---|---|---|
| (a) | Window over round trips 0–8 (segments) | 1, 2, 4, 8, 16, 17, 18, 19, 20 |
| (a) | Segments delivered during slow start | 31 |
| (a) | Window after a fast retransmit at cwnd = 20 | 10 segments |
| (b) | Root cause of the poor performance | TCP infers congestion from loss; a fade is loss without congestion |
| (b) | Recovery cost of one fade | one RTT per segment of window, because congestion avoidance adds only 1 per RTT |
| (c) | Two differences | connection-oriented and reliable versus connectionless and unreliable; flow and congestion control versus none |