assignment 2 sol

2
Data Communication assignment 2 Submission Deadline: - Nov 10 2011 MidNight. Q1. Given the message M = 1010001101 (10 bits) and Divisor as 110101(6 bits) What would be the CRC? Ans:1110: Q2. The data traveling speed is equal to the speed of light. (a) Calculate the transmission delay 1. if host A sends a frame of size 500 bytes to host B. - A->B = 2. if host B sends a frame of size 125 bytes to host D. ans: Transmission Delay = Size of Transfer / Link Bandwidth A->B: Transmission Delay = (500/ ((4/8) x 106)) = 1ms B->D: Transmission Delay = (125/ (10/8) x 106) = 100 s (or 0.1ms) (b) Calculate the propagation delay 1. if host A sends a frame of size 500 bytes to host B. 2. if host B sends a frame of size 125 bytes to host D. Ans: Propagation Delay = Distance of link / Speed of light A-> B: Propagation Delay = 3000 / (3 x 105) = 10ms B->D: Propagation Delay = 900 / (3 x 105) = 3ms c) What would be the end-to-end delay for a frame of size 500 bytes going from host A to host D through host B. The host B will first receive the whole frame, store it, and then transmit it in the direction of host D. Ans: End to end delay between A->D = (Delay between A->B) + (Delay between B->D) Delay on a link = Transmission Delay + Propagation Delay Therefore, Delay between A->B = 1 + 10 = 11ms, and Delay between B->D = 0.4 + 3 = 3.4ms d) Host A has a file of size 5 MB to send to host B. But, the maximum size of the file that the host A can send at one time is 500 bytes. 1. How many frames should host A send to host B to complete the transmission? 2. How many maximum number of frames can be on the link at the maximum? 3. After how many frames, that host A has send, will host B start receiving the first frame? Ans: 1. #frames in a 5MB transfer = (5 x 106) / 500 = 10,000 2. Calcualt the bandwidth delay product = bandwidth * propagation-delay. 3. Same as 2, answer is also same. It is another way of asking the same question. e) Host A has a file of size 5 MB to send to host D. But, the maximum size of the file that the host A can send at one time is 500 bytes. 1. What is the total end-to-end delay?

Upload: h-k

Post on 05-Dec-2014

1.936 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Assignment 2 sol

Data Communication assignment 2Submission Deadline: - Nov 10 2011 MidNight.

Q1. Given the message M = 1010001101 (10 bits)and Divisor as 110101(6 bits)What would be the CRC? Ans:1110:

Q2.

The data traveling speed is equal to the speed of light.

(a) Calculate the transmission delay 1. if host A sends a frame of size 500 bytes to host B. - A->B = 2. if host B sends a frame of size 125 bytes to host D.

ans:Transmission Delay = Size of Transfer / Link Bandwidth A->B: Transmission Delay = (500/ ((4/8) x 106)) = 1ms B->D: Transmission Delay = (125/ (10/8) x 106) = 100 �s (or 0.1ms)

(b) Calculate the propagation delay1. if host A sends a frame of size 500 bytes to host B.2. if host B sends a frame of size 125 bytes to host D.

Ans:Propagation Delay = Distance of link / Speed of light A-> B: Propagation Delay = 3000 / (3 x 105) = 10ms B->D: Propagation Delay = 900 / (3 x 105) = 3ms

c) What would be the end-to-end delay for a frame of size 500 bytes going from host A to host D through host B. The host B will first receive the whole frame, store it, and then transmit it in the direction of host D. Ans:

End to end delay between A->D = (Delay between A->B) + (Delay between B->D)Delay on a link = Transmission Delay + Propagation Delay Therefore, Delay between A->B = 1 + 10 = 11ms, and Delay between B->D = 0.4 + 3 = 3.4ms

d) Host A has a file of size 5 MB to send to host B. But, the maximum size of the file that the host A can send at one time is 500 bytes.

1. How many frames should host A send to host B to complete the transmission?2. How many maximum number of frames can be on the link at the maximum?3. After how many frames, that host A has send, will host B start receiving the first

frame?Ans:

1.#frames in a 5MB transfer = (5 x 106) / 500 = 10,0002. Calcualt the bandwidth delay product = bandwidth * propagation-delay.3. Same as 2, answer is also same. It is another way of asking the same question.

e) Host A has a file of size 5 MB to send to host D. But, the maximum size of the file that the host A can send at one time is 500 bytes.

1. What is the total end-to-end delay?

Page 2: Assignment 2 sol

Ans: This is the most difficult question in this assignment.We know that, there would be 10,000 frames to send from A to B and then from B to D.

Delay for Frame 1: (Delay in A->B) + (Delay in B->D)Delay for Frame 2: (Delay in A->B) + (queuing delay at B) + (Delay in B->D)

queuing delay at B =( 1 – (Bandwidth of B->D/Bandwidth of A->B)) * transmission delay of B->D.Orqueuing delay at B = (1-(BB->D/BA->B)) * tdB->D

Delay for Frame 3 and susequence frames = same as Delay for Frame 2.

Total Delay = Delay for Frame1 + Delay for Frame 2+ …...+Delay for Frame 10,000Total Delay = Delay for Frame1 + 9999 * Delay for Frame 2.

Using the above equation, calculate the delay for Frame1, and Frame 2 and substitute in the equation for Total Delay to get the complete answer.

Hint for question 2

Question 2 above is meant to revise what you have studied about Transmission delay, propagation delay, bandwidth delay and end-to-end delay. If you can solve this exercise, it would be easier for you to understand Flow Control algorithms that we are going to start from next week. If you cannot answer these questions, you should see me and discuss with me before we begin the Flow Control.Few equations that you will need to solve the assignment are

Transmission delay (td) = size of frame / transmission speedPropagation delay (pd)= distance/speed of light.End-to-end delay (ed) = td + pd + qd queuing delay is the time that a frame spend waiting for a busy host.Queuing delay at B for a frame traveling from A to C is defined as follows. queuing delay = (1-(BB->C/BA->B)) * tdB->C

Before using the queuing delay equation, think if the 1st frame will wait for busy host B or subsequent frame will wait for busy host B.