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
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 0
1
0
2
3
1 2 3
Ack0
Ack1
Ack2
Ack3
Normal operation
Data packet is lost
0
1
2
3
3 2 1 0
SENDER RECEIVER
Ack 0
Ack 1
T0 timer
2
3
0 1
Retransmission
45
4
5
5
4
1
0
2
3
Acknowledgement
• There are two types of acknowledgement used in GBN
•Cumulative Acknowledgement
•Independent Acknowledgement
COMPARISON
Cumulative Acknowledgement
• Traffic is less
• Reliability is less
Independent Acknowledgement
• Traffic is more
• Reliability is more
Graphical Representations
Cumulative Acknowledgement
1 0
Independent Acknowledgement
0 1
0
1
0
1
Ack 0
Ack 1
1 0
sender
Receiver sender Receiver
0 1
Acknowledgement Timer
0
1
2
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
number
3 2 1 0
0
0
1
2
3To
3 0 121
0
1
2
3
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
Go back-n protocol

Go back-n protocol

  • 1.
    GO-BACK-N PROTOCOL DONE BY: STEFFY.D(140071601072) SHEREENFATHIMA.A(140071601068) TASNIM TABASUM.R(140071601080) COMPUTER NETWORKS LAB B.S.ABDUR RAHMAN UNIVERSITY
  • 2.
    CONTENTS • ARQ • Definition •Why we need GBN? • Sender window size. • Receiver window size. • Data packet is lost. • Acknowledgement • Advantages
  • 3.
    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
  • 4.
    DEFINITION • Go-Back-N ARQis 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.
  • 5.
    Why we needGBN? • 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.
  • 6.
    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.
  • 7.
    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.
  • 8.
    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.
  • 9.
    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.
  • 10.
    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 0 1 0 2 3 1 2 3 Ack0 Ack1 Ack2 Ack3 Normal operation
  • 11.
    Data packet islost 0 1 2 3 3 2 1 0 SENDER RECEIVER Ack 0 Ack 1 T0 timer 2 3 0 1 Retransmission 45 4 5 5 4 1 0 2 3
  • 12.
    Acknowledgement • There aretwo types of acknowledgement used in GBN •Cumulative Acknowledgement •Independent Acknowledgement
  • 13.
    COMPARISON Cumulative Acknowledgement • Trafficis less • Reliability is less Independent Acknowledgement • Traffic is more • Reliability is more
  • 14.
    Graphical Representations Cumulative Acknowledgement 10 Independent Acknowledgement 0 1 0 1 0 1 Ack 0 Ack 1 1 0 sender Receiver sender Receiver 0 1
  • 15.
    Acknowledgement Timer 0 1 2 3Ack 2 Ack4 3 2 1 0 0 1 2 3 Acknowledgement timer sender
  • 16.
    case: 1 Acknowledgement Timeris 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.
  • 17.
    Case : 2 AcknowledgementTimer 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.
  • 18.
    Relation between windowsize and sequence number 3 2 1 0 0 0 1 2 3To 3 0 121 0 1 2 3 2 3 Duplicate packets
  • 19.
    ADVANTAGES • The sendercan 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.
  • 20.
    Points to beremembered • 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