Computer Network No.6 (cont... Data Link Control) From Apcoms

  • Uploaded by: Naveed
  • 0
  • 0
  • April 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Computer Network No.6 (cont... Data Link Control) From Apcoms as PDF for free.

More details

  • Words: 1,180
  • Pages: 3
CPS 422 Computer Networks

DATA LINK CONTROL ‰Elementary Data Link Control protocols are:

DATA LINK LAYER

o Stop-and-Wait ARQ. o Go-Back-N ARQ. o Selective-Repeat ARQ.

Faisal Amjad CPS 422

Faisal Amjad CPS 422

GO-BACK-N ARQ For efficient utilization of transmission medium, more than one frames should be allowed to remain outstanding at a time.

‰Upto W frames can be sent before the sender must wait for an acknowledgement. ‰Copy of these sent frames is maintained until Ack received. ‰All frames are sequentially numbered. ‰If m bits are allowed for sequence numbers in frame header, the sequence numbers can be from 0 to 2m - 1. (Repeated) ‰E.g. if m=3, sequence numbers will be 0,1,2,3,4,5,6,7,0 1,2,3,........

Faisal Amjad CPS 422

GO-BACK-N ARQ

Faisal Amjad CPS 422

Sender’s Sliding Window

Sender’s Sliding Window

‰To account for outstanding frames the concept of sliding “window” is used. ‰Imagine that all frames are stored in a buffer ‰The outstanding frames are enclosed in an imaginary window. ‰Frames to the left of the window have already been ack and can be purged. ‰Frames to the right of the window cannot be sent unless the window slides over them. ‰Whenever an ack received, the window slides. ‰Window size : At most 2m - 1 Faisal Amjad CPS 422

Window Size = 7 5

6

7

0

Frames already Acknowledged

1

2

3

4

5

6

7

0

Before Sliding Window Size = 7 5

6

7

0

1

2

3

4

5

6

7

0

After Sliding Frames 0 and 1 Acknowledged Faisal Amjad CPS 422

1

GO-BACK-N ARQ

Receiver’s Sliding Window

Receiver’s Sliding Window

Window Size = 1

‰Window size : always 1 ‰Receiver always expecting one frame of a specific seq number ‰Out of order frames discarded. ‰Sender has timer for each frame sent, receiver does not have any timer.

5

6

7

0

Frames 0 expected

1

2

3

4

5

6

7

0

6

7

0

Before Sliding

5

6

7

0

1

2

3

4

5

After Sliding Frames 0 is received Frames 1 expected

Faisal Amjad CPS 422

GO-BACK-N ARQ

(Contd…)

GO-BACK-N ARQ

Receiver

Sender

Normal Operation

1

2

3

0

1

0

1

2

3

0

1

2

0

1

2

3

0

1

2

0

1

2

3

0

1

Frame

2

0

Frame

2 ACK

1

Receiver

0

1

2

3

0

1

2

0

1

2

3

0

1

2

0

1

2

3

0

1

2

0

1

2

3

0

1

2

0

1

2

3

0

1

2

Frame

2

0

1

2

3

0

1

2

Frame

3

0

1

2

3

0

1

2

Frame

0

2

(Contd…)

Lost or damaged data frame

Sender

0

Faisal Amjad CPS 422

0

1

2

3

0

1

Frame

2 ACK

Frame Frame

2

Frame

Time-out

0 ACK

0

Frame

1

0

1

2

3

0

1

2

0

1

2

3

0

1

2

0

1

2

3

0

1

2

0

1

2

3

0

1

2

2 3

Frame 3 Discarded

2

0 0

1

2

3

0

1

2

Time

Time

Time

Faisal Amjad CPS 422

GO-BACK-N ARQ

2

0

Receiver

1

Frame

2

0

1

2

0

1

2

0

1

2

0

1

2

0

1

2

0

3

0

1

2

0

0

1

1 1 ACK

2 ACK Frame

2

Frame

0

1

2

0

1

0

2

0

1

2

0

1

2

0

1

2

0

1

2

(Contd…)

1

2

0

Receiver

1

Frame

2

0

1

2

0

Time-out

0

1

2

0

1

2

0

1

2

0

1

2

0 1

1

2

0

1

0

Frame

Frame

2

1

Frame

2 ACK

Frame 0 Discarded

2

0

0

1

2

0

1

2

Faisal Amjad CPS 422

Time

1

2

0

1

2

0

1

2

0

1

2

0

1

2

0

1

2

2

2

1 ACK

Time

0

Frame 0 Discarded

Frame0

Time

Faisal Amjad CPS 422

Sender

Frame

Time-out

2

Delayed Acknowledgement

Sender

1

Time

GO-BACK-N ARQ

(Contd…)

Lost Acknowledgement

0

1

3 ACK

Time

0

1

2

0

1

2

0

1

2

0

1

2

0

1

2

0

1

2

Faisal Amjad CPS 422

2

GO-BACK-N ARQ

GO-BACK-N ARQ

(Contd…)

Significance of Sender’s Window Size Sender 1

2

3

Frame

0

0

1

2

3

Frame

1

0

1

2

3

Frame

2

0

1

2

3

Frame

0

0 0

Time-out

Significance of Sender’s Window Size

Receiver

0

1

2

1

2

Sender

Receiver

0

1

2

3

0

Frame

0

0

1

2

3

0

Frame

1

0

1

2

3

0

Frame

2

0

1

2

3

0

Frame

3

3 3

0

1

2

3

0

1

2

3 Time-out

0

1

2

3

Frame

0

Time

Sender’s Window Size <

m=2 bits allowed for seq no

Time

2m

Faisal Amjad CPS 422

SELECTIVE REPEAT ARQ ‰Also called Selective Reject ARQ (Stallings). ‰G0-Back-N is inefficient in a noisy link. ‰In Selective Repeat Only damaged or lost frames are retransmitted ‰Which means Complex processing at the receiver. ‰Sender window is similar as in Go-Back-N ARQ. ‰However size of window is <= 2m-1 ‰ Receiver has a window of the same size as Sender. why?? ‰Because the receiver is looking for any frame within the same range of transmitted frames Faisal Amjad CPS 422

SELECTIVE REPEAT ARQ

(Contd…)

Significance of Window Size

Time-out

Receiver

0

1

2

3

Frame

0

1

2

3

Frame

1

0

1

2

3

0

1

2

3

Frame

0

0

1

2

3

0

1

1

2

3

0

0

1

2

3

0

0

1

2

3

0

0

1

2

3

0

0

1

2

3

0

Frame 0 Accepted Erroneously

Time

2m

Faisal Amjad CPS 422

SELECTIVE REPEAT ARQ

(Contd…)

Normal Operation Sender

Receiver

0

1

2

3

0

Frame

0

0

1

2

3

0

Frame

1

0

1

2

3

0

Frame

2

ACK 2

0

1

2

3

0

0

1

2

3

0

Frame

3

Frame

2

0

1

2

3

0

0

1

2

3

0

0

1

2

3

0

0

1

2

3

0

0

1

2

3

0

NACK 2

m=2 bits allowed for seq no

Time

Time

Window Size = 2m-1

Faisal Amjad CPS 422

SELECTIVE REPEAT ARQ

(Contd…)

Significance of Window Size

Sender 0

Time

Sender’s Window Size =

0

0

Frame 0 Discarded Correctly

m=2 bits allowed for seq no

(Contd…)

2

Sender

3

Frame 0 Discarded Correctly

Time-out

Receiver

0

1

2

3

Frame

0

0

1

2

3

Frame

1

0

1

2

3

Frame

2

0

1

2

3

Frame

0

0

1

2

3

0

1

2

3

0

1

2

3

0

1

0

1

2

3

0

1

Frame 0 Accepted Erroneously

m=2 bits allowed for seq no

Window Size = 2m-1

Time

m=2 bits allowed for seq no

Time

Faisal Amjad CPS 422

Window Size > 2m-1

Time

Time

Faisal Amjad CPS 422

3

Related Documents


More Documents from "Eko Kurniawan Khannedy"