go back-n protocol
TRANSCRIPT
GO-BACK-N PROTOCOLDONE BY:
STEFFY.D(140071601072)SHEREEN FATHIMA.A(140071601068)TASNIM TABASUM.R(140071601080)
COMPUTER NETWORKS LABB.S.ABDUR RAHMAN UNIVERSITY
CONTENTS
• ARQ
• Definition
• Why we need GBN?
• Sender window size.
• Receiver window size.
• Data packet is lost.
• Acknowledgement
• Advantages
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
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.
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.
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.
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.
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.
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.
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
Data packet is lost
0123
3 2 1 0SENDER
RECEIVER
Ack 0Ack 1T0 timer
23
0 1
Retransmission
45
45
54
10
23
Acknowledgement
• There are two types of acknowledgement used in GBN•Cumulative Acknowledgement•Independent Acknowledgement
COMPARISONCumulative Acknowledgement• Traffic is less
• Reliability is less
Independent Acknowledgement• Traffic is more
• Reliability is more
Graphical Representations
Cumulative Acknowledgement1 0
Independent Acknowledgement
0 101
Acknowledge
ment
01
Ack 0
Ack 1
1 0
senderReceiver
sender Receiver
0 1
Acknowledgement Timer
0
12
3Ack 2
Ack 4
3 2 1 0 0 1 2 3
Acknowledgement timer
sender
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.
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.
Relation between window size and sequence number3 2 1 0 0
01
2
3To
3 0 121
0123
2 3
Duplicate packets
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.
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
THANK YOU