Computer Communications Network (COMP312), 2003/04 Mid-term Test #1 Answer ALL THREE questions and each question carries equal weight. If there are multiple parts in a question, each part carries equal weight. Please do not use extra paper to answer the questions. Your name: __________________________________________________________ Student ID: __________________________________________________________ 1. From the textbook, you can see that a “smallest” CRC that is given by C(x) = x8 + x2 + x + 1. This question explores some of the properties of this CRC-8. (a) If the message to be protected by this CRC-8 consists of “1” (a single bit), what would be the message + the code word sent by the sender? Divide 100000000 by 100000111 and the code word is given by the remainder = 00000111. Therefore, the sender would send 100000111 to the receiver. The first bit is the message and the rest is the CRC code word. Incidentally, it is the same as C(x). (b) What is the minimum number of bit errors that this CRC cannot detect? Explain your answer in details. Since C(x) contains x + 1 as a factor, it can catch all odd number of bit errors. Moreover, if E(x) = C(x)G(x) for some nonzero G(x), then this C(x) cannot catch the errors as expressed in E(x). If E(x) contains 2 nonzero terms, i.e., double-bit errors, it is impossible to have only two nonzero terms in C(x)G(x). Therefore, this C(x) can catch all double-bit errors. However, for 4 nonzero terms in E(x), one may choose G(x) = 1, so that E(x) = C(x)G(x). Thus, the minimum number of bit errors that this CRC cannot detect is 4. (c) Give one example that the errors occurred to the message + code word in (a) cannot be detected by the receiver. From part (b), we know that the minimum number of bit errors required is 4. In this special case, there is only one possible 4-bit error---the errors occurred to the “1” bits in 100000111. The receiver therefore will receive 000000000 which is valid, because the CRC code word for “0” is 00000000. 1 2. Consider the sliding window ARQ protocol. Suppose that the protocol uses a very large sequence number space that would not wraparound, and it starts from 0. And the sender always has frames to send. The receiver always sends an ACK when receiving a CRC-validated data frame. Let SWS = 2 and RWS = 1. Moreover, we introduce a new retransmission scheme to the sender. In this scheme, the sender will immediately send the oldest unacknowledged frame if it receives an old ACK. An ACK is considered old if it has been received before or the value of the ACK is 0. Assume that this retransmission scheme always retransmits earlier than the case with timeout mechanism. (a) Draw a time-line diagram for the case where the first data frame (SN = 0) has bit errors and is dropped by the sender. All subsequent transmissions (data and ACK) are assumed to be errorfree. Draw the diagram until the receiver’s NFE (next frame expected) = 3. SN = 0 RN = 0 SN = 0 SN = 1 SN = 1 New retrans. Buffered ACK = 0 SN = 0 RN = 2 ACK = 2 SN = 2 SN = 2 RN = 3 ACK = 3 (b) Draw a time-line diagram for the case where the transmissions of the first data frame (SN = 0) and its ACK are error-free, but the second data frame (SN = 1) has bit errors and is dropped by the sender. All subsequent transmissions (data and ACK) are assumed to be error-free. Draw the diagram until the receiver’s NFE (next frame expected) = 3. SN = 0 RN = 0 SN = 0 SN = 1 SN = 1 ACK = 1 SN = 2 SN = 2 New retrans. RN = 1 Buffered ACK = 1 SN = 1 RN = 3 ACK = 3 2 3. Consider an Ethernet segment with 2 nodes only (A and B). A and B always have frames to send. Consider that A and B have detected frame collisions and started the exponential backoff for retransmission, i.e. a random selection of either 0 or 51.2μs to backoff. (a) What is the probability that either A or B can retransmit its frame successfully only in the second round of the exponential backoff, i.e., a random selection of 0, 51.2 μs, 102.4 μs, or 153.6 μs to backoff? (Hint: Prob[unsuccessful in the first round] Prob[successful in the second round]) The probability = Prob[unsuccessful in the first round] Prob[successful in the second round] = 1/2 (1- (1/2)(1/2)) = 3/8 (c) Suppose that A picks 0 and B picks 51.2μs in the first round. After retransmitting A’s frame successfully, their frames are collided again because they always have frames to transmit. Note that A considers this backoff as a new one (first round), but this is not the case with B. What is the probability that B is able to retransmit its data frame successfully this time? Since A wins the first round, it could retransmit successfully. After that, it transmits a new frame which is collided with B’s frame again. Since A considers the retransmission as the first round while B considers this as the second. B will win this time only when A picks 51.2 μs and B picks 0, which is the only case out of all 8 cases. Therefore, the probability is given by 1/8. 3