Presentation is loading. Please wait.

Presentation is loading. Please wait.

Exercises. Problem 1 The link delay is 270ms. Each data frame is 1000 bits. Data rate is 1Mbps. What is the link efficiency of the Stop&Wait protocol?

Similar presentations


Presentation on theme: "Exercises. Problem 1 The link delay is 270ms. Each data frame is 1000 bits. Data rate is 1Mbps. What is the link efficiency of the Stop&Wait protocol?"— Presentation transcript:

1 Exercises

2 Problem 1 The link delay is 270ms. Each data frame is 1000 bits. Data rate is 1Mbps. What is the link efficiency of the Stop&Wait protocol?

3 Problem 1 The link delay is 270ms. Each data frame is 1000 bits. Data rate is 1Mbps. What is the link efficiency of the Stop&Wait protocol? Answer. – Transmission delay: 1000/1000000 = 1ms. – The last bit of the frame reaches the receiver at time 271ms. ACK is received at the sender at 541ms. In 541ms, 1ms is used to send data. Link efficiency is 1/541.

4 Problem 2 Still the Stop&Wait protocol. The link length is 200m. Signal travels at a speed of 200000000m/s. The file is 1000000 bytes. The server divides the file into frames of 500 bytes. Data rate is 10Mbps. How long does it need for the server to send the entire file? (Assuming no frame loss.)

5 Problem 2 Still the Stop&Wait protocol. The link length is 200m. Signal travels at a speed of 200000000m/s. The file is 1000000 bytes. The server divides the file into frames of 500 bytes. Data rate is 10Mbps. How long does it need for the server to send the entire file? (Assuming no frame loss.) Answer. – Transmission delay: 500*8/10000000 = 400us. – The propagation delay is 200/200000000 = 1us. – The last bit of the frame reaches the receiver at time 401us. ACK is received at the sender at 402us. Every 402us, a data frame can sent, hence the total time is 402*2000 = 804000us.

6 Problem 3 Consider a link with propagation delay of 1ms and the transmission delay of 1ms. Assume Stop&Wait is used and assume that every one of four ACKs is lost. Assume the timeout the sender uses is 3ms. What is the link efficiency?

7 Problem 3 Consider a link with propagation delay of 1ms and the transmission delay of 1ms. Assume Stop&Wait is used and assume that every one of four ACKs is lost. Assume the timeout the sender uses is 3ms. What is the link efficiency? Answer. The first three frames are transmitted correctly using 3*3=9ms. At time 9ms, the sender started to send the fourth frame. Because the ACK was lost, the sender will timeout and retransmit at 13ms. This time it will go through. So the efficiency is 3/13, that is, every 13ms, three frames will go through.

8 Problem 4 Consider the Go-back-N protocol. Suppose the link delay is d seconds, the frame size is f bits and the data rate is r bit/s. Find the minimum window size such that the link efficiency is 100%, in the case that the frame never gets lost. Assume the ACK frame is very small.

9 Problem 4 Consider the Go-back-N protocol. Suppose the link delay is d seconds, the frame size is f bits and the data rate is r bit/s. Find the minimum window size such that the link efficiency is 100%, in the case that the frame never gets lost. Assume the ACK frame is very small. [Answer:] The time to send a frame is f/r. The minimum window size to achieve 100% efficiency should allow the sender keep on sending before getting the first ACK. If the sender sends at time 0, at time d+f/r, the receiver gets the frame and he immediately sends back ACK which will be received by the sender at time d+d+f/r. So the window size should be (2d+f/r)/(f/r) = 1+2dr/f.

10 Problem 5 An Ethernet has three stations, A, B, and C. A is at one end of the network, B and C are at the other end of the network. The propagation delay from one end to the other end is 10us. A, B, and C has data frame to send at 0, 5, and 15us, respectively. Each data frame is 40us. What happens?

11 Problem 5 An Ethernet has three stations, A, B, and C. A is at one end of the network, B and C are at the other end of the network. The propagation delay from one end to the other end is 10us. A, B, and C has data frame to send at 0, 5, and 15us, respectively. Each data frame is 40us. Answer. At time 0, A will send. At time 5, B will send, because the signal from A has not propagated to B yet. At time 10, B will notice the collision, and will send a jam signal, and stop sending. At time 15, A will notice the collision, and will send a jam signal, and stop sending. After sending the jam signal, what will happen is determined by the random numbers A and B pick. A and B will pick random numbers from {0,1}. If both picked 1, they will defer for 51.2us. In this case, C will eventually get to send. C will start to send 9.6us after the jam from A finishes (9.6us is the inter-frame interval of Ethernet.) There will be an another collision if either A or B picks 0 (which has become somewhat painful to analyze…).

12 http://www.erg.abdn.ac.uk/users/gorry/course/lan-pages/csma-cd.html

13 Problem 6 Consider the (7,4) Hamming code we discussed in the class. The parity checking matrix is shown below. Suppose the received vector is [1000111]. Which of the following statement is true? a)There is no error and the received vector is a codeword. b)There is one error bit and the original codeword is 1010110. c)There is one error bit and the original codeword is 1000101. d)None of the above

14 Problem 6 Consider the (7,4) Hamming code we discussed in the class. The parity checking matrix is shown below. Suppose the received vector is [1000111]. Which of the following statement is true? a)There is no error and the received vector is a codeword. b)There is one error bit and the original codeword is 1010110. c)There is one error bit and the original codeword is 1000101. d)None of the above Answer: C. The syndrome is 010.

15 Problem 7 In an Ethernet, suppose there are three stations very close to each other, A, B and C. Suppose at time 0, all of them have a frame to send, but the medium is busy. After the medium is free (for the inter-frame gap, 9.6us in some Ethernet), A, B, and C will all send, which results in a collision. They will perform the random back-off algorithm. What is the probability that they will collide again before a successful frame transmission? a)2/3. b)3/4. c)5/8. d)None of the above.

16 Problem 7 In an Ethernet, suppose there are three stations very close to each other, A, B and C. Suppose at time 0, all of them have a frame to send, but the medium is busy. After the medium is free (for the inter-frame gap, 9.6us in some Ethernet), A, B, and C will all send, which results in a collision. They will perform the random back-off algorithm. What is the probability that they will collide again before a successful frame transmission? a)2/3. b)3/4. c)5/8. d)None of the above. Answer: c. There are 8 possibilities and three will not cause collision – one selects 0, the other two selects 1.

17 Problem 8 Hypothetically, suppose it turns out that there cannot be more than 8 stations in any Ethernet. Which of the following statement is true? a)The minimum size of the Ethernet frame can be significantly reduced. b)The back-off algorithm should be modified. c)Both of the above. d)None of the above.

18 Problem 8 Hypothetically, suppose it turns out that there cannot be more than 8 stations in any Ethernet. Which of the following statement is true? a)The minimum size of the Ethernet frame can be significantly reduced. b)The back-off algorithm should be modified. c)Both of the above. d)None of the above. Answer: b. never has to choose a large window size.


Download ppt "Exercises. Problem 1 The link delay is 270ms. Each data frame is 1000 bits. Data rate is 1Mbps. What is the link efficiency of the Stop&Wait protocol?"

Similar presentations


Ads by Google