15
fragmented in 5 frames. Frame 0 is corrupted, the ACK of frame 1 is corrupted, ACK of frame 4 arrived after the time of frame 4 expired. Show the flow of frames exchanged between the two nodes, and the status of the windows after the transmission/reception of each information/control frame, if the field of sequence number is three-bit-length, and the sender and receiver are using the maximum possible window size, for the following data link control techniques: • Simplest • Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

Embed Size (px)

DESCRIPTION

- PowerPoint PPT Presentation

Citation preview

Page 1: Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

Assume that a file is transferred from a node A to a node B. The file has been fragmented in 5 frames. Frame 0 is corrupted, the ACK of frame 1 is corrupted, ACK of frame 4 arrived after the time of frame 4 expired. Show the flow of frames exchanged between the two nodes, and the status of the windows after the transmission/reception of each information/control frame, if the field of sequence number is three-bit-length, and the sender and receiver are using the maximum possible window size, for the following data link control techniques:

• Simplest• Stop-And-Wait• Stop-and-wait ARQ• Go-back-N ARQ• Selective- Repeat ARQ

Page 2: Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

A B

f0

f1

f2

f3

f4

Simplest (ideal channel, no error)

Page 3: Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

Stop and Wait in ideal channel (no error)A B

f0

f1

ACK 0

f1

ACK 1

ACK 0

ACK 1

f0

Page 4: Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

Stop and Wait ARQA B

f0

f0

ACK 1

f1ACK 0

ACK 0

f1

Time out

Time out

f0

f1

ACK 1

f1ACK 0

accepted

accepted

discarded

accepted

accepted

discarded

Page 5: Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

Go-Back-N ARQA B

f0f1

ACK 1

ACK 2

ACK 4

f1

Time out

f4

f3

ACK 5

ACK 5

discarded

discarded

0 1 2 3 4 5 6 7 00 1 2 3 4 5 6 7 8

f2

discardedf0

0 1 2 3 4 5 6 7 80 1 2 3 4 5 6 7 0

f1

f2

0 1 2 3 4 5 6 7 8

f2discardeddiscarded

0 1 2 3 4 5 6 7 0

f4

0 1 2 3 4 5 6 7 8

Time out

Time out0 1 2 3 4 5 6 7 0

Page 6: Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

Duplex Communication with Stop-and-Wait ARQ

Assume that computer A and computer B communicate with each other. Each has 3 frames to send to the other. The three data frames sent by A are denoted as A1, A2, A3 and the frames from B are B1, B2, B3. They use duplex Stop-and-Wait ARQ for the communication, i.e., each data frame has a sequence # field and an Ack # field. Suppose each data frame needs 1 ms to transmit and each ack-only frame needs no time to transmit. The time-out value is set to be 5ms. The round trip time is always 2 ms. Use “A1, (0,1)” denote a frame with data A1 and sequence 0, ack 1.

Page 7: Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

Ideal channel without any error/lost or congestionA B

A1 A2 B1A3 B2 B3

Page 8: Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

11.8

Algorithm 11.5 Sender-site algorithm for Stop-and-Wait ARQ

(continued)

Page 9: Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

11.9

Algorithm 11.5 Sender-site algorithm for Stop-and-Wait ARQ(continued)

Page 10: Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

11.10

Algorithm 11.6 Receiver-site algorithm for Stop-and-Wait ARQ Protocol

Rn is the sequence number of the next packet expected

Page 11: Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

Stop-and-Wait ARQ Example

Assume that computer A sends 3 frames to computer B. The three data frames sent by A are denoted as A1, A2, A3. Suppose each data frame needs 1 ms to transmit and each ack frame needs no time to transmit. The time-out value is set to be 4ms. The round trip time is always 2 ms. Use “A1, 0” denote a frame with data A1 and sequence 0. Use “Ack 1” denote an ack frame with ack number 1.

Page 12: Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

Case 1: Ideal channel without any error/lost or congestion

A BA1 A2 A3

Page 13: Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

Case 2: second frame from A to B is lostA B

A1 A2 A3

Page 14: Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

Case 3: second frame from A to B uses 3 ms A B

A1 A2 A3

Page 15: Simplest Stop-And-Wait Stop-and-wait ARQ Go-back-N ARQ Selective- Repeat ARQ

Case 4: second ack frame from B to A uses 3ms A B

A1 A2 A3