Categories: Computer Networks

Go Back N Sliding Window Protocol

 

Go back N protocol

GO back N protocol is one of the applications of pipeline protocol. In Go back N protocol, packets should be delivered in sequence to the application layer. To better understand the working GBN protocol, you first need to understand how the sender and receiver work to execute GBN protocol.

 

Sender Side of GBN Protocol:

  1. Invocation from application layer.
  2. Receipt of acknowledgement packet.
  3. A time out event.

 

 

The application layer provides chunks of data to the transport layer. Transport layer places this data into its buffer and starts sending the data in bulk to the receiver. Once the packet have been send in a pipelined fashion to the receiver, then the sender, either get acknowledgement of the packets or a time out may occur. In case of time out, the sender re-transmits the data packet.

 

 

Receiver Side of GBN Protocol

  1. Acknowledgement of ordered packets.
  2. Drop packet.

 

At the receiver end we have two options, either send an acknowledgement to the sender on receiving ordered packets or discard the packet received. The packets will only be acknowledged by the receiver, if its sequence number is “N+1” that is last received packet + 1, as the main restriction of Go Back N protocol is “Order delivery of packets to upper layer”. If the sequence number of the received packet is not in sequence with the previous one then the packet will be dropped and the acknowledgement of the most recent in ordered packet is resend again.

 

 

TCP sliding window protocol

Data in sender buffer are sent in chunks instead of the entire data in buffer. Why? Suppose the sender buffer has the capacity of 1 MB and the receiver buffer has the capacity of 512KB, then 50 % of the data will be lost at the receiver end and this will unnecessarily cause re-transmission of packets from the sender end. Therefore, the sender will send data in chunks less than 512. This will be decided by the help of window size. Window size caters the capacity of the receiver. Flow control is the receiver related problem, we do not want the receiver to be overwhelmed, thus in order to avoid overwhelming situation, we need to control the flow by using window size “N”.

 

 

The above figure shows the buffer at the sender end.

“Base” indicates the sequence number of the packet that has not been acknowledged (the first unacknowledged packet).

Window shifts when the packets starting from the base gets acknowledged and it starts moving, this process continues till all acknowledgements are received, so it is also known as sliding window protocol. When window size is reached the packet will not be sent further till the window slides further.

How will the sender be aware of the size of the receiver’s buffer or what should be the window size at the sender end?

Before the data is transmitted from one host to another, a connection is first established between the two. During this establishment, such kind of information are share between the two hosts, like window size, buffer size, etc. After which the data transmission begins.

Related Post

 

 

Question: Suppose an application at node A wants to transfer 500K data in 10K segments to a receiver at node B. Using Go Back N transport layer protocol. Draw a timing diagram if window size is 4. Suppose RTT = 150 msec.

 

 Case # 1: If no packets are dropped in GBN Protocol(timing diagram)

 

This means that there are 500/10 = 50 segments to be sent in total with 4 at a time. Since there is no packet loss, therefore below diagram shows the movement of segments:

 

 

 Case # 2: If there is a packet loss at 5 (timing diagram)

 

 

 Disadvantage of Go Back N Protocol

Suppose the window size is very big and bandwidth is greater as well, as shown in the below figure:

 

 

In the above case, if a packet is delivered then acknowledgement will be received after 600 msec. This means while we will fill the gap with more packets during 600 msec and if 1st packet drops then we need to send all packets again, so this is the performance penalty for GBN. Therefore, if bandwidth delay product and N (Window size) are very big or greater then GBN will not be efficient.

Go Back N protocol has one timer that is used for all packets, however, Selective Repeat protocol uses single timer for each packet.

 

For Further Read

 

 




  • Mikel

    Recent Posts

    Heart Attack Causes and its Solution

    What is the Main Cause of a Heart Attack? What is its Solution? A heart attack is the blockage of… Read More

    12 months ago

    Understanding the Debt Ceiling: Its Impact, Importance, and Implications

    In the vast economic arena, one term that often takes center stage, inciting extensive debates and discussions, is the "debt… Read More

    1 year ago

    De-Dollarization: The New World Order of Currency and Its Global Impact

    De-Dollarization: The Changing Face of Global Finance The financial landscape is in a state of flux, with an intriguing economic… Read More

    1 year ago

    Unstoppable Bayern Munich: The Story Behind Their 11th Consecutive Bundesliga Title

    The curtains closed on a dramatic Bundesliga season with Bayern Munich standing tall once again, clinching their 11th straight title.… Read More

    1 year ago

    Celine Dion Cancels Concert Tour Due to Deteriorating Stiff-Person Syndrome

    The Unfolding Story of Celine Dion's Health In recent news that has left fans across the globe stunned, iconic singer… Read More

    1 year ago

    Navigating the Crossroads: LeBron James, Anthony Davis, and the LA Lakers’ Uncertain Future

    As the echoes of the recent NBA season start to fade, the attention of enthusiasts is firmly glued to one… Read More

    1 year ago