go back-n protocol

21
GO-BACK-N PROTOCOL DONE BY: STEFFY.D(140071601072) SHEREEN FATHIMA.A(140071601068) TASNIM TABASUM.R(140071601080) COMPUTER NETWORKS LAB B.S.ABDUR RAHMAN UNIVERSITY

Upload: steffy-d

Post on 07-Apr-2017

38 views

Category:

Engineering


2 download

TRANSCRIPT

Page 1: Go back-n protocol

GO-BACK-N PROTOCOLDONE BY:

STEFFY.D(140071601072)SHEREEN FATHIMA.A(140071601068)TASNIM TABASUM.R(140071601080)

COMPUTER NETWORKS LABB.S.ABDUR RAHMAN UNIVERSITY

Page 2: Go back-n protocol

CONTENTS

• ARQ

• Definition

• Why we need GBN?

• Sender window size.

• Receiver window size.

• Data packet is lost.

• Acknowledgement

• Advantages

Page 3: Go back-n protocol

Automatic Repeat Request(ARQ)

• Systems which automatically request the retransmission of missing packets or packets with errors are called ARQ systems.

Three common schemes are used:

• Stop & Wait

• Go Back N

• Selective Repeat

Page 4: Go back-n protocol

DEFINITION

• Go-Back-N ARQ is a specific instance of the automatic repeat request (ARQ) protocol, in which the sending process continues to send a number of frames specified by a window size even without receiving an acknowledgement(ACK) packet from the receiver.

• GBN is a practical approach of sliding window protocol.

Page 5: Go back-n protocol

Why we need GBN?

• To improve efficiency of transmission.

• To send more than one frames at a time.

• To reduce waiting time of the sender .

• (i.e.)Sender is waiting for an acknowledgement from the receiver.

Page 6: Go back-n protocol

Sender sliding Window

• Sender can transmit N frames before receiving ACK.• Its window size will be N.• Sender will maintain a copy of sent packets in sent buffer

until for the particular sent packets are acknowledged.• Sender will resend all packets if the timeout timer runs out.• Once data get acknowledged by the receiver, that particular

data will be removed from the buffer.

Page 7: Go back-n protocol

Receiver sliding window• Size of the window at the receiving site

is always 1 in this protocol.

• Receiver is always looking for a specific frame to arrive in a specific order.

• Any frame arriving out of order is discarded and needs to be resent.

• Receiver window slides as shown in fig. Receiver is waiting for frame 0 in part a.

Page 8: Go back-n protocol

Receiver sliding window• Receiver sends positive ACK if a frame arrived safe and in order.

• The silence of the receiver causes the timer of the unacknowledged frame to expire.

• Then the sender resends all frames, beginning with the one with the expired timer.

• For example, suppose the sender has sent frame 6, but the timer for frame 3 expires (i.e. frame 3 has not been acknowledged), then the sender goes back and sends frames 3, 4, 5, 6 again. Thus it is called Go-Back-N-ARQ

• The receiver does not have to acknowledge each frame received, it can send one cumulative ACK for several frames.

Page 9: Go back-n protocol

Sender window size.

• Sender window size in GBN is N itself.

• N value must be greater than 1

• If N value is equal to 1,then it is stop & wait protocol.

Representation: GBN=GB10=>N=10=>sender window size.

Page 10: Go back-n protocol

Receiver window size

• Receiver window size is always 1.Let us consider an example,GB4=>N=4=>sender window

size.

SENDER

RECEIVER

3 2 1 0 01

0

23

1 2 3

Ack0Ack1Ack2Ack3

Normal operation

Page 11: Go back-n protocol

Data packet is lost

0123

3 2 1 0SENDER

RECEIVER

Ack 0Ack 1T0 timer

23

0 1

Retransmission

45

45

54

10

23

Page 12: Go back-n protocol

Acknowledgement

• There are two types of acknowledgement used in GBN•Cumulative Acknowledgement•Independent Acknowledgement

Page 13: Go back-n protocol

COMPARISONCumulative Acknowledgement• Traffic is less

• Reliability is less

Independent Acknowledgement• Traffic is more

• Reliability is more

Page 14: Go back-n protocol

Graphical Representations

Cumulative Acknowledgement1 0

Independent Acknowledgement

0 101

Acknowledge

ment

01

Ack 0

Ack 1

1 0

senderReceiver

sender Receiver

0 1

Page 15: Go back-n protocol

Acknowledgement Timer

0

12

3Ack 2

Ack 4

3 2 1 0 0 1 2 3

Acknowledgement timer

sender

Page 16: Go back-n protocol

case: 1

Acknowledgement Timer is too big:

• ADVANTAGE :

More packets can be acknowledged at a time at the receiver side.

• DISADVANTAGE:

Timeout(To) timer runs out at the sender side.

Page 17: Go back-n protocol

Case : 2

Acknowledgement Timer is too small:

• DISADVANTAGE: Acknowledgement will be send by the receiver for every packets.

• So , Acknowledgement timer should not be too small or too big. It should be a timer with fixed size.

• Timeout timer must be greater than the Acknowledgement timer.

Page 18: Go back-n protocol

Relation between window size and sequence number3 2 1 0 0

01

2

3To

3 0 121

0123

2 3

Duplicate packets

Page 19: Go back-n protocol

ADVANTAGES

• The sender can send many frames at a time.

• Timer can be set for a group of frames.

• Only one ACK can acknowledge one or more frames.

• Efficiency is more.

• Waiting time is pretty low.

Page 20: Go back-n protocol

Points to be remembered

• Sender window size is N & N value must be greater than 1

• Receiver window size is always 1

• There are two types of acknowledgement in GBN

• Cumulative Acknowledgement

• Independent acknowledgement

Page 21: Go back-n protocol

THANK YOU