0% found this document useful (0 votes)
12 views8 pages

Networking P

The Go-Back-N (GBN) protocol is a sliding window method used in networking for reliable data transmission, allowing the sender to send multiple packets without waiting for individual acknowledgments. If a packet is lost, the sender must retransmit that packet and all subsequent packets, which can lead to inefficiencies in error-prone networks. GBN is simple to implement and performs well in low-error environments, but may waste bandwidth due to unnecessary retransmissions in cases of frequent errors.

Uploaded by

IAmCarlos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views8 pages

Networking P

The Go-Back-N (GBN) protocol is a sliding window method used in networking for reliable data transmission, allowing the sender to send multiple packets without waiting for individual acknowledgments. If a packet is lost, the sender must retransmit that packet and all subsequent packets, which can lead to inefficiencies in error-prone networks. GBN is simple to implement and performs well in low-error environments, but may waste bandwidth due to unnecessary retransmissions in cases of frequent errors.

Uploaded by

IAmCarlos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

 Sliding Window Protocol – Go Back N (GBN)

The Sliding Window Protocol is a method used in computer networks to


manage the flow of data between two devices, ensuring that data is sent
and received in the correct order. There are two types of sliding window
protocol Go-Back-N (GBN), and Selective Repeat (SR).
In Go-Back-N, the sender can send multiple data packets without waiting
for an acknowledgement for each one. However, it can only send a certain
number of packets (this is called the “window size”). If one packet is lost or
not acknowledged, the sender must go back and resend that packet and all
the packets that followed it, even if they were received correctly. For
example, if packets 1, 2, 3, 4, and 5 are sent and packet 3 gets lost, the
sender will have to resend packets 3, 4, and 5, even if 4 and 5 were
received. In this article, we will discuss the Go-Back-N (GBN) protocol in
detail.

 What is the Go Back N (GBN) Protocol?


The Go-Back-N (GBN) protocol is a sliding window protocol used in
networking for reliable data transmission. It is part of the Automatic Repeat
reQuest (ARQ) protocols, which ensure that data is correctly received and
that any lost or corrupted packets are retransmitted.
The three main characteristic features of GBN are:
1. Sender Window Size (WR)
 It is N itself. If we say the protocol is GB10, then Ws = 10. N should be always greater than 1 in order to
implement pipelining. For N = 1, it reduces to the Stop and Wait Protocol.

o Efficiency Of GBN = N/(1+2a)


where ,
a = Tp/Tt
Tp= Propogation Delay
Tt= Transmission Delay of sender

*What will be the efficiency if processing delay, queuing delay and transmission delay of acknowledgement is
not zero.

o Efficiency= N*(Useful time)/(Total Time)


where,
useful time=Tt

o Total time=Tt+2*Tp+Pr+Pq+Tt(ack)
where,
Tt=Transmission delay of sender side
Tp=Propogation Delay
Pr=Processing Delay
Pq=Queuing Delay
Tt(ack)=Transmission Delay of Acknowledgement

 If B is the bandwidth of the channel, then


o Effective Bandwidth or Throughput = Efficiency * Bandwidth
= (N/(1+2a)) * B
2. Receiver Window Size (WR)

 In the GB-N the receiver window size is one always. i.e. WR is always 1 in
GBN.

3. Acknowledgements

 In flow control, acknowledgments (ACKs) are signals sent by the receiver to


the sender to confirm that data packets have been successfully received.
When the sender transmits data, it waits for an acknowledgment before
sending more. This process helps ensure that data is received correctly. If
an acknowledgment isn’t received within a certain time, the sender assumes
the packet was lost and retransmits it.

 There are 2 kinds of acknowledgements namely:

 Cumulative Acknowledgement: One acknowledgement is used for many packets.


The main advantage is traffic is less. A disadvantage is less reliability as if one ack is
the loss that would mean that all the packets sent are lost.

 Independent Acknowledgement: If every packet is going to get acknowledgement


independently then the reliability is high here but a disadvantage is that traffic is also
high since for every packet we are receiving independent ack.
 Working of GB-N Protocol
 Now what exactly happens in GBN, we will explain with a help of example. Consider the
diagram given below. We have sender window size of 4. Assume that we have lots of
sequence numbers just for the sake of explanation. Now the sender has sent the packets
0, 1, 2 and 3. After acknowledging the packets 0 and 1, receiver is now expecting packet 2
and sender window has also slided to further transmit the packets 4 and 5. Now suppose
the packet 2 is lost in the network, Receiver will discard all the packets which sender has
transmitted after packet 2 as it is expecting sequence number of 2.

 On the sender side for every packet send there is a time out timer which will expire for
packet number 2. Now from the last transmitted packet 5 sender will go back to the packet
number 2 in the current window and transmit all the packets till packet number 5. That’s
why it is called Go Back N. Go back means sender has to go back N places from the last
transmitted packet in the unacknowledged window and not from the point where the packet
is lost.
 Relationship Between Window Size and Sequence Numbers

The window size and sequence numbers in a sliding window protocol, like Go-Back-N or
Selective Repeat, are closely related.
 The window size determines how many packets the sender can transmit without needing
an acknowledgment. It’s like a limit on how much data can be sent before the sender has to
stop and wait for confirmation.
 Sequence numbers are used to label packets so the receiver knows their order and can
detect any missing packets.
 The window size should be smaller than or equal to the range of available sequence
numbers. If the window size is too large compared to the sequence number range, the
receiver might get confused because the same sequence number could be reused before
the first one is acknowledged. This would make it hard to know if a packet is new or a
duplicate.

Relation between window size and sequence number is given by the formula:
Ws+WR<=ASN
where Ws is sender window size and W R is receiver window size, and ASN is available
sequence number.
Ws+1<=ASN because W R=1 in GB-N protocol
So minimum sequence numbers required in GBN = N + 1

Bits Required in GBN = ceil(log2 (N + 1))


The extra 1 is required in order to
avoid the problem of duplicate packets
as described below.
 Example: Consider an Example of GB4.

 Sender window size is 4 therefore we require a minimum of 4 sequence numbers to label


each packet in the window.
 Now suppose receiver has received all the packets(0, 1, 2 and 3 sent by sender) and
hence is now waiting for packet number 0 again (We can not use 4 here as we have only 4
sequence numbers available since N = 4).
 Now suppose the cumulative ack for the above 4 packets is lost in the network.
 On sender side, there will be timeout for packet 0 and hence all the 4 packets will be
transmitted again.
 Problem now is receiver is waiting for new set of packets which should have started from 0
but now it will receive the duplicate copies of the previously accepted packets.
 In order to avoid this, we need one extra sequence number.
 Now the receiver could easily reject all the duplicate packets which were starting from 0
because now it will be waiting for packet number 4 (We have added an extra sequence
number now).
Now Trying with one extra Sequence Number.

Now it is clear as to why we need an extra 1 bit in the GBN protocol.

 Advantages of GBN Protocol

o Simple to implement and effective for reliable communication.


o Better performance than stop-and-wait protocols for error-free or low-error networks.

 Disadvantages of GBN Protocol

o Inefficient if errors are frequent, as multiple frames might need to be retransmitted


unnecessarily.
o Bandwidth can be wasted due to redundant retransmissions.
 Conclusion

 In conclusion, the Go-Back-N protocol is a practical


and easy-to-understand method for reliable data
transfer. It allows sending multiple packets at once,
making it more efficient than simpler methods.
However, if there are frequent errors in the network,
GBN can become less efficient because it has to
resend multiple packets, even if only one is lost. It’s
best used in networks where errors are rare, offering a
good balance of reliability and performance.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy