A method of implementing reliable data transfer in Transport Layer Protocols. It works by letting a sender transmit less than N packets without waiting for an acknowledgement but have no more than N unacknowledged packets.
When an acknowledgement is received for the earliest unacknowledged packet (base of the window), then a new packet can be sent and the window of unacknowledged packets move. Therefore N is also called window size and GBN is referred to as a sliding-window protocol.

If an acknowledgement is not received within a certain time frame, there is a timeout and the sender resend all packets in the window. This approach can lead to unnecessary re-transmissions but ensures reliability in the presence of errors or packet loss.
GBN required that ACKs are received in order as it does not move the window on each ACK if the ACK is not for the base packet.
The window puts a constraint on the number of unacknowledged packets to control congestion. The window size is however not easy to determine, larger allows more packet transmissions to be pipelined but results in more packet re-transmissions on packet loss.
Examples
pkt2 is lost and the whole window from pkt2 to pkt5 is resend after a timeout.

Finite State Machine Description
For the Sender

For the Receiver
