SlideShare a Scribd company logo
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.
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
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.
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.

More Related Content

PDF
Matlab bode diagram_instructions
PDF
Understanding GPS & NMEA Messages and Algo to extract Information from NMEA.
PDF
Yampa AFRP Introduction
PDF
Lecture set 5
PDF
Code matlab mô phỏng dung lượng kênh truy ền reyleght trong kĩ thuật mimo
PDF
Presentation of 'Reliable Rate-Optimized Video Multicasting Services over LTE...
Matlab bode diagram_instructions
Understanding GPS & NMEA Messages and Algo to extract Information from NMEA.
Yampa AFRP Introduction
Lecture set 5
Code matlab mô phỏng dung lượng kênh truy ền reyleght trong kĩ thuật mimo
Presentation of 'Reliable Rate-Optimized Video Multicasting Services over LTE...

What's hot (20)

PPSX
TRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTP
PPT
29 Multimedia
PPTX
A tabu search algorithm for the min max k-chinese postman problem
PPT
第四次课程 Chap8
PDF
Gq3511781181
PPTX
IOEfficientParalleMatrixMultiplication_present
PDF
Chroma from Luma Intra Prediction for AV1
PDF
Attacks on signature schemes based on the FFI problem
DOC
bask, bfsk, bpsk
PDF
Lecture04
PPT
Routing algorithm
PDF
Dynamic time warping and PIC 16F676 for control of devices
PDF
R04605106110
PDF
B0311219
PPT
4c Address Mapping, Error Reporting and Multicasting
PDF
Breaking the Softmax Bottleneck via Learnable Monotonic Pointwise Non-lineari...
PDF
Programming Actor-based Collective Adaptive Systems
DOCX
Mat lab for bplc
PPT
12 Multiple Access
PPTX
TRANSPORT LAYER - Process-to-Process Delivery: UDP, TCP and SCTP
29 Multimedia
A tabu search algorithm for the min max k-chinese postman problem
第四次课程 Chap8
Gq3511781181
IOEfficientParalleMatrixMultiplication_present
Chroma from Luma Intra Prediction for AV1
Attacks on signature schemes based on the FFI problem
bask, bfsk, bpsk
Lecture04
Routing algorithm
Dynamic time warping and PIC 16F676 for control of devices
R04605106110
B0311219
4c Address Mapping, Error Reporting and Multicasting
Breaking the Softmax Bottleneck via Learnable Monotonic Pointwise Non-lineari...
Programming Actor-based Collective Adaptive Systems
Mat lab for bplc
12 Multiple Access
Ad

Viewers also liked (13)

PDF
Assignment cn subnetting
 
PDF
Dm assignment1
 
PDF
Solution3
 
PDF
Dm assignment2
 
PDF
Violinphoenix
 
DOCX
Introduction
 
PDF
Solution2
 
PDF
Ie project
 
DOCX
Assignment3
 
PDF
Assignment4
 
PDF
Assignment 2 sol
 
DOCX
Mid-
 
PDF
Assignment uplaodfile
 
Assignment cn subnetting
 
Dm assignment1
 
Solution3
 
Dm assignment2
 
Violinphoenix
 
Introduction
 
Solution2
 
Ie project
 
Assignment3
 
Assignment4
 
Assignment 2 sol
 
Mid-
 
Assignment uplaodfile
 
Ad

Similar to Assignment sw solution (20)

PPT
Framming data link layer
PPTX
Chapter 11: Data Link Control
PPT
Computer network slides for easy prepration
PPT
CN_unit2.ppt Data Link Layer characteristics, categories
PPT
ch_11_edited.ppt you are you in the office and I will be there
PPT
Arq protocol part 2
PPT
Flow control main
PPT
DLL Part_1.ppt
PDF
PCCN DATA LINK LAYER UNIT 4 NOTES
PPT
8th lec flow and error control
PPT
Unit I Data Link Control.ppt
PDF
Flow control Cumputer network tropics study
PDF
ch11.pdf1111111111111111111111111111111111111111111111
PPT
computer_communication_Datalinklayer.ppt
PPT
computer networks data communication and networking
PPT
DATA LINK CONTROL and it's applications.
PPT
Data link CONTROL and it's functional programming
PPT
DATALINK CONTROL and it's functional programming
PPT
1 DATALINK CONTROL and it's applications
PPT
1 DATALINK CONTROL and it's applications
Framming data link layer
Chapter 11: Data Link Control
Computer network slides for easy prepration
CN_unit2.ppt Data Link Layer characteristics, categories
ch_11_edited.ppt you are you in the office and I will be there
Arq protocol part 2
Flow control main
DLL Part_1.ppt
PCCN DATA LINK LAYER UNIT 4 NOTES
8th lec flow and error control
Unit I Data Link Control.ppt
Flow control Cumputer network tropics study
ch11.pdf1111111111111111111111111111111111111111111111
computer_communication_Datalinklayer.ppt
computer networks data communication and networking
DATA LINK CONTROL and it's applications.
Data link CONTROL and it's functional programming
DATALINK CONTROL and it's functional programming
1 DATALINK CONTROL and it's applications
1 DATALINK CONTROL and it's applications

More from H K (17)

PDF
Induction
 
PDF
Assignment4
 
PDF
Assignment4
 
PDF
Dm assignment3
 
PPT
Proof
 
PDF
Resolution
 
DOCX
Assignment description
 
PDF
Set
 
PPTX
Logic
 
PDF
Assignment sw
 
PDF
Assignment sw
 
PDF
Assignment cn tl
 
PDF
Dc assignment 2
 
PDF
Mid term exam
 
PDF
Week32
 
PPT
Week32
 
PPT
Week31
 
Induction
 
Assignment4
 
Assignment4
 
Dm assignment3
 
Proof
 
Resolution
 
Assignment description
 
Set
 
Logic
 
Assignment sw
 
Assignment sw
 
Assignment cn tl
 
Dc assignment 2
 
Mid term exam
 
Week32
 
Week32
 
Week31
 

Recently uploaded (20)

PDF
Commercial arboriculture Commercial Tree consultant Essex, Kent, Thaxted.pdf
PDF
oppenheimer and the story of the atomic bomb
PDF
MAGNET STORY- Coaster Sequence (Rough Version 2).pdf
PDF
Benben maam tess of the report on somthing
PDF
Ct.pdffffffffffffffffffffffffffffffffffff
PDF
How Old Radio Shows in the 1940s and 1950s Helped Ella Fitzgerald Grow.pdf
PPTX
the Honda_ASIMO_Presentation_Updated.pptx
PPTX
Hacking Movie – Best Films on Cybercrime & Digital Intrigue
PDF
Keanu Reeves Beyond the Legendary Hollywood Movie Star.pdf
PDF
TAIPANQQ SITUS MUDAH MENANG DAN MUDAH MAXWIN SEGERA DAFTAR DI TAIPANQQ DAN RA...
PDF
WKA #29: "FALLING FOR CUPID" TRANSCRIPT.pdf
PPTX
SPARSH-SVNITs-Annual-Cultural-Fest presentation for orientation
DOCX
Lambutchi Calin Claudiu had a discussion with the Buddha about the restructur...
PDF
EVs U-5 ONE SHOT Notes_c49f9e68-5eac-4201-bf86-b314ef5930ba.pdf
PDF
TAIPANQQ SITUS MUDAH MENANG DAN MUDAH MAXWIN SEGERA DAFTAR DI TAIPANQQ DAN RA...
PDF
High-Quality PDF Backlinking for Better Rankings
PPTX
continuous_steps_relay.pptx. Another activity
PPTX
wegen seminar ppt.pptxhkjbkhkjjlhjhjhlhhvg
PPTX
PRECISION AGRICULTURE- 1.pptx for agriculture
PDF
WKA #29: "FALLING FOR CUPID" TRANSCRIPT.pdf
Commercial arboriculture Commercial Tree consultant Essex, Kent, Thaxted.pdf
oppenheimer and the story of the atomic bomb
MAGNET STORY- Coaster Sequence (Rough Version 2).pdf
Benben maam tess of the report on somthing
Ct.pdffffffffffffffffffffffffffffffffffff
How Old Radio Shows in the 1940s and 1950s Helped Ella Fitzgerald Grow.pdf
the Honda_ASIMO_Presentation_Updated.pptx
Hacking Movie – Best Films on Cybercrime & Digital Intrigue
Keanu Reeves Beyond the Legendary Hollywood Movie Star.pdf
TAIPANQQ SITUS MUDAH MENANG DAN MUDAH MAXWIN SEGERA DAFTAR DI TAIPANQQ DAN RA...
WKA #29: "FALLING FOR CUPID" TRANSCRIPT.pdf
SPARSH-SVNITs-Annual-Cultural-Fest presentation for orientation
Lambutchi Calin Claudiu had a discussion with the Buddha about the restructur...
EVs U-5 ONE SHOT Notes_c49f9e68-5eac-4201-bf86-b314ef5930ba.pdf
TAIPANQQ SITUS MUDAH MENANG DAN MUDAH MAXWIN SEGERA DAFTAR DI TAIPANQQ DAN RA...
High-Quality PDF Backlinking for Better Rankings
continuous_steps_relay.pptx. Another activity
wegen seminar ppt.pptxhkjbkhkjjlhjhjhlhhvg
PRECISION AGRICULTURE- 1.pptx for agriculture
WKA #29: "FALLING FOR CUPID" TRANSCRIPT.pdf

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.