Networking Homework 2 Solutions

1. Show the 4B/5B encoding for the following bit sequence:

     1101 1110 1010 1101 1011 1110 1110 1111


 11011 11100 10110 11011 10111 11100 11100 11101

2. Assuming a framing protocol that uses bit stuffing, show the bit sequence transmitted over the link when the frame contains the following bit sequence:


Mark the stuffed bits.


The stuffed bits (zeros) are in bold: 1101 0111 1100 1011 1110 1010 1111 1011 0

3. Consider an ARQ algorithm running over a 40-km point-to-point fiber link.

(a) Compute the one-way propagation delay for this link, assuming that the speed of light is 2 ◊ 108 m/s in the fiber.

(b) Suggest a suitable timeout value for the ARQ algorithm to use.

(c) Why might it still be possible for the ARQ algorithm to time out and retransmit a frame, given this timeout value?


(a) Propagation delay = 40 ◊ 103 m/(2 ◊ 108 m/s) = 200 μs.

(b) The roundtrip time would be about 400 μs. A plausible timeout time would be twice this, or 0.8 ms. Smaller values (but larger than 0.4 ms!) might be reasonable, depending on the amount of variation in actual RTTs. See Section 5.2.6 of the text.

(c) The propagation-delay calculation does not consider processing delays that may be introduced by the remote node; it may not be able to answer immediately.

4. Suppose you are designing a sliding window protocol for a 1-Mbps point-to-point link to the moon, which has a one-way latency of 1.25 seconds. Assuming that each frame carries 1 KB of data, what is the minimum number of bits you need for the sequence number?

Solutions: Bandwidth◊(roundtrip)delay is about 125KBps ◊ 2.5s = 312 KB, or 312 packets. The window size should be this large; the sequence number space must cover twice this range, or up to 624. 10 bits are needed (210 = 1028, smallest power of 2 over 624)

Topic revision: r1 - 2015-10-04 - JimSkon
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback