What is the Go-Back-N protocol?

The stop and wait protocol

The stop-and-wait protocol is ineffective because the sender can only send one packet at a time and will have to wait until the previous frame is acknowledged before transmitting the subsequent frame. This led to the introduction of the Go-Back-N protocol.

The Go-Back-N protocol is a data link layer and transport layer protocol that employs the sliding window approach to send data frames reliably and sequentially. We'll first look at the sliding window protocol and then review the Go-Back-N functions. The sliding window protocol enables sending numerous frames at once.

Note: For the data link layer, Go-Back-N is used for hop-to-hopIt means the transmission of packets from the network interface card (NIC) of the host to the interface of the router. communication, and transport layer protocol is used for end-to-end communication.

The 'N' in Go-Back-N specifies the size of the sender window. The number of frames transmitted while the sender waits for an acknowledgment is also determined by the value of N. The sender sends frames in sequential order. The receiver can only buffer one frame at a time since the size of the receiver window is equal to 1, but the sender can buffer N frames.

The Go-Back-N sender uses a retransmission timer to detect the lost segments. The Go-Back-N receiver uses both independent acknowledgment and cumulative acknowledgment.

Note: The size of the sender's window is calculated as 2m12^m−1, where mm is the number of bits required to represent the sequence number.

Rules

The Go-Back-N protocol entails the following rules:

Sender side
  • The frames are transmitted through a sliding window protocol.
  • Once the transmission buffer is done broadcasting frames, the sender must wait for the acknowledgment.
  • After receiving the acknowledgment, a Go-Back-N sender removes all acknowledged frames from the sending buffer and slides the window to send the next packet in the sequence.
Receiver side
  • Only frames that arrive in order are accepted.

  • Any out-of-order frames are discarded.

  • It always sends back an acknowledgment after receiving a DataFrame that includes the sequence number of the most recent frame it has received.

The following illustration assists in grasping the concept of the Go-Back-N protocol:

The sequence of events in case of successful data transmission

How it works

Now, with the aid of an illustration, we'll understand how Go-Back-N operates.

  • The sender's window has a size of 3 or Go-Back-3.

  • The sender has sent out packets 0, 1, and 2.

  • The receiver is now anticipating packet 1 after acknowledging packet 0.

  • Packet 1 is lost somewhere in the network.

Packet 1 is lost
  • Since it's waiting for the packet with sequence number 1, the receiver will ignore every packet the sender delivered after packet one.

  • On the sender's side, a retransmission timer is set to expire.

  • The sender will re-transmit all packets from one up to N, which is 3.

Re-transmission of the lost packets

Issue

The key benefit of the Go-Back-N is that it is easy to implement and performs well when only a small number of segments are lost. However, the performance rapidly falls when there is numerous packet loss.

Copyright ©2024 Educative, Inc. All rights reserved