Alternating Bit Protocol

alpharithms fallback 1

Alternating Bit Protocol (ABP) is a data reliability measure that is implemented in reliable data transfer protocols on the network layer protocol stack. It requires data receivers to send acknowledgments (ACKs) to the receiver along with a single-bit value representing a sequence number of the last received transmission unit.

The basic premise of the ABP is that a sender should retransmit data until it receives an acknowledgment from the recipient. A typical sequence of data transfer using the ABP may unfold as such:

  1. The sender sends data segment A with SEQ 0, starts a timer;
  2. The Receiver receives data segment A with SEQ 0;
  3. The receiver sends a packet back to the sender with ACK0;
  4. The Sender stops the timer for SEQ0 packet; waits for application input to transmit SEQ1;
  5. The receiver receives data segment B, but determines data corruption, sends ACK0 (for last valid received data);
  6. Sener receives an ACK for the wrong SEQ number, knows to re-transmit previous data.

In this sequence, a sender sends data across the network, receives a positive response, sends more data, and then receives a negative response. This signals to the sender that the data was not well-received and should be re-transmitted.

This protocol provides error/loss/corruption detection by alternating bit values between 1 and 0 for use as sequence numbers. The advantage offered is data reliability however, the disadvantage is the restriction of the number of packets that can be transmitted at any given time.

Zαck West
Full-Stack Software Engineer with 10+ years of experience. Expertise in developing distributed systems, implementing object-oriented models with a focus on semantic clarity, driving development with TDD, enhancing interfaces through thoughtful visual design, and developing deep learning agents.