22-Elec-B4 Information Technology Networks · May 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, May 2013. Three hours, closed book, one PEO-approved non-programmable calculator. Marks are shown in the left margin of the original paper; the cover page states that four questions constitute a complete paper worth 100 marks. Every question and every sub-part is answered below, because the set is intended as a study resource rather than as a sat examination.
Check: question count. The cover page of the paper says “There are 5 questions on this exam. Any 4 questions constitute a complete paper”, yet six numbered questions are printed (Questions 1 to 5 at 25 marks each on pages 2 to 4, and Question 6 at 20 marks on page 5), for 145 marks in total. Four 25-mark questions do give exactly the stated 100 marks, so the cover note is consistent with the five 25-mark questions and Question 6 appears to be a carry-over that the cover page was never updated for. All six are solved here.
Reference texts. A. Leon-Garcia and I. Widjaja, Communication Networks: Fundamental Concepts and Key Architectures, 2nd ed. — the reference listed by the EGBC/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, Data and Computer Communications, 10th ed. Normative documents cited: RFC 791 and RFC 8200 (IPv4 and IPv6), RFC 1918 and RFC 4193 (private address space), RFC 5681 (TCP congestion control), IEEE 802.3 (CSMA/CD) and IEEE 802.11 (RTS/CTS).
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 CRC system with generator polynomial $g(x) = x^{2}+1$ and information polynomial $i(x) = x^{5}$, all arithmetic being modulo 2 over the field GF(2). For the efficiency comparison of part (d) the worked link is 1 Mbit/s carrying 1000-bit frames over a geostationary satellite hop of one-way propagation delay 270 ms.
Find. How a CRC detects errors, the codeword produced by the given encoder, the operation of stop-and-wait and go-back-N ARQ, and which of the two is more efficient when propagation delay dominates.
Part (a) — how a CRC detects errors. A CRC treats a block of $k$ information bits as the coefficients of a polynomial $i(x)$ of degree $k-1$ over GF(2), where addition and subtraction are both the exclusive-OR. Sender and receiver agree in advance on a generator polynomial $g(x)$ of degree $r$. The sender shifts the message left by $r$ places, forming $x^{r}i(x)$, divides that by $g(x)$ using modulo-2 long division, and appends the $r$-bit remainder $R(x)$ as the check bits. The transmitted codeword is $$T(x) = x^{r}i(x) + R(x)$$ and because subtracting the remainder in GF(2) is the same as adding it, $T(x)$ is by construction exactly divisible by $g(x)$. The receiver divides the whole received block by the same $g(x)$: a zero remainder means the block is a valid codeword and is accepted, and any non-zero remainder proves an error. Writing the received block as $T(x) + E(x)$, where $E(x)$ has a one in every corrupted position, the remainder depends only on $E(x)$, so an error escapes detection if and only if $g(x)$ divides $E(x)$ exactly. This is what makes the choice of generator an engineering decision rather than an arbitrary one. A generator with at least two non-zero terms detects every single-bit error, since $E(x) = x^{j}$ cannot be divisible by it; a generator containing the factor $(x+1)$ detects every error affecting an odd number of bits; and a generator of degree $r$ detects every burst of length $r$ or less, because such a burst is $x^{j}$ times a polynomial of degree below $r$, which cannot be a multiple of $g(x)$. Standard generators such as the 32-bit CRC of Ethernet are chosen to have all of these properties at once, and the whole computation reduces in hardware to a shift register of $r$ stages with exclusive-OR taps at the non-zero coefficients of $g(x)$, which is why a CRC can be computed at line rate.
Part (c) — the operation of ARQ. Automatic repeat request is the family of protocols that turns an unreliable link into a reliable one using three ingredients: an error-detecting code such as the CRC above, an acknowledgement returned by the receiver, and a timer at the sender. The receiver checks each frame and acknowledges only those that pass; the sender retains a copy of every unacknowledged frame and retransmits it when the timer expires. Sequence numbers are what make this safe, because an acknowledgement can itself be lost and the resulting retransmission would otherwise be accepted as new data. In stop-and-wait ARQ the sender transmits one frame and then waits: it sends nothing further until the acknowledgement arrives or the timer expires. A single-bit sequence number alternating 0 and 1 suffices, since only one frame is ever outstanding, and the acknowledgement carries the number of the frame expected next so that a duplicate can be discarded. The protocol is trivial to implement and needs one frame buffer at each end, but it leaves the link idle for a whole round trip after every frame. In go-back-N ARQ the sender may have up to $N$ frames outstanding, a sliding window that advances as acknowledgements arrive; acknowledgements are cumulative, so an acknowledgement of frame $j$ implicitly acknowledges everything before it. The receiver keeps a window of one and simply discards any frame arriving out of order, which is why an error is expensive: when frame $j$ is lost or damaged, the receiver rejects $j+1, j+2, \ldots$ as well, and on timeout the sender goes back and retransmits frame $j$ and every frame after it. That keeps the receiver simple at the cost of retransmitting up to $N$ frames per error, and it requires the sequence number modulus to exceed the window, so $m$-bit sequence numbers permit $N \le 2^{m}-1$. Selective-repeat ARQ is the third member of the family: it buffers out-of-order frames at the receiver and retransmits only the frame actually lost, which is more efficient on a high error rate link but needs a receiver window, a reassembly buffer, and a modulus of at least $2N$.
| Quantity | Result |
|---|---|
| (b) Check bits (remainder R(x) = x) | 10 |
| (b) CRC encoder output T(x) = x7 + x | 10000010 |
| (b) Quotient q(x) | x5 + x3 + x |
| (d) Normalised delay a = τ/Tf | 270 |
| (d) Stop-and-wait efficiency 1/(1+2a) | 0.185 % (1.85 kbit/s) |
| (d) Go-back-N efficiency, N = 7 | 1.29 % (12.9 kbit/s) |
| (d) More efficient scheme | go-back-N |