The document contains questions regarding the efficiency of stop-and-wait and sliding window protocols. It defines key terms like frame length, propagation delay, transmission delay, and efficiency. It then asks the reader to calculate efficiency for different scenarios based on these definitions, including varying frame sizes, data rates, propagation delays, and window sizes.
(TOP CLASS) Call Girls In Chengalpattu Phone 7427069034 Call Girls Model With...
Assignment sw solution
1. Q1.
The data rate of channel, that connects two hosts H1 and H2, is C bps.
Let, the time to travel from A to B is I.
The number of bits in the frame header be H
The number of bits in the frame is D.
Let A be the length of ACK frame.
(i) What is the total length of the frame? D+H bits
(ii) What is the transmission delay? (D+H) / C
I
(iii) What is the ratio of propagation delay and transmission delay? (D+ H )/C
(iv) What is the efficiency of Stop-and-Wait protocol, given above data?
Transmition strats at 0.
Transmission finish at (D+H)/C.
Last bit arrives at receiver in I + (D+H)/C sec.
Time to send ACK = A/C
Last bit of ACK arrives at sender = I + A/C
D+ H A
Total time spent = I + (D+H)/C + I + A/C = 2*I + C + C
Efficiency of a protocol is the maximum fraction of time when the protocl is trasmitting data i.e.
Efficiency = Time to sent Data / Total Time
( D+ H )/C
Efficiency = 2∗ I + ( D+ H )/C + A/C
Q2.
Let the round trip propagation delay be 270ms.
The data rate of channel, that connects two hosts H1 and H2, is 56kbps.
The total length of frame (including header) is 4000 bits
(i) What is the ratio of propagation delay and transmission delay? = refere to Q1
(ii) What is the efficiency of Stop-and-Wait protocol, given above data? = refer to Q1.
2. Q3. (Assume stop and wait protocol is used)
Let the data rate of Lan cable, that connects host A and B, is D bps.
Let the propagation speed, from A to B, is 200,000 Km/sec.
Let the length of the LAN cable, from A to B, is 10 Km.
The size of frame, sent from A to B, is 500 bits (including header)
You can assume that the length of ACK frames is negligible
(i) What is the ratio of propagation delay and transmission delay for D = 10 Mbps. – refer Q1
(ii) What is the ratio of propagation delay and transmission delay for D = 100 Mbps. – refer Q1
(iii) What is the efficiency of Lan for D = 10 Mbps – refer Q1
(iv) What is the efficiency of Lan for D = 100 Mbps – refer Q1
(v) What should be the size of frame in the Lan with D=10 Mbps to achieve an efficiency of 80%. – refer Q1
(vi) What should be the size of frame in the Lan with D=10 Mbps to achieve an efficiency of 100%. – refer Q1
Q4.
(i) Find the efficiency of Lan, given data in Q3, for Sliding Window Protocol and D = 10 Mbps and window size is 8.
(ii) Find the efficiency of Lan, given data in Q3, for Sliding Window Protocol and D = 100 Mbps and window size is 8.
Ans:
E = W/(1+2a), where a = PropagationTime/TransmissionTime, and W = window size
You know how to calculate propagation time and transmission time.
Q5. (Assume sliding window protocol is used)
Each frame contains a sequence number S.
The ACK number, K, acknowledges all frames up to K-1 and expects the next frame with sequence number K.
The sequence number is modulo W. i.e. S Modulo W returns the remainder when S is divided by W. This restrains the
value of S to stay between 0 and W-1. For ex: S=2 and W=8, S modulo W = 2. S=10 and W=8, S modulo W = 2.
a) How many frames a sender can send without getting an acknowledgment, if the initial sequence number is S,
and Window size is W. W-S
b) Assume windows size W= 8. The frames with sequence S = 5,6,7,0,1 are sent, but no ACK received yet. What
frames is sender allowed to send? Frame 2 ,3, 4
3. c) What is the situation in Q(b) on receiving a frame with
a. Acknowledgment frame with value 2 arrive: ACK 2, S = 2,3,4,5,6,7,0,1 and Next = 2
b. Acknowledgment frame with value 6 arrive: ACK 6, S = 6,7,0,1,2,3,4,5, and Next =6
c. Acknowledgment frame with value 5 arrive ACK 5, S = 5,6,7,0,1,2,3,4, and Next = 5
For each ACK, write the acknowledged frame and the state of window.
Q6. Fill in the numbers as explained below for the following illustrations.
4. Ans: Top Left: ACK 6.
Top Right: copies discarded
Bottom Left: ACK 3, Frames in Black are discarded.
Bottom Right : Frames in Black are discarded, NAK 2.
Above: Frames 3, 4, and 5 are not discarded but kept at receiver.