Alternating bit protocol: Difference between revisions

Content deleted Content added
m Typo/general fixing, replaced: vice-versa → vice versa using AWB
Line 1:
'''Alternating bit protocol''' (ABP) is a simple [[network protocol]] operating at the [[data link layer]] that retransmits lost or corrupted messages. It can be seen as a special case of the [[Sliding window protocol]] where a simple timer restricts the order of messages to ensure receivers send messages in turn while using a window of 1 bit. <ref>{{cite book|last=Tel|first=Gerard|title=Introduction to distributed algorithms|year=2000|publisher=Cambridge|isbn=0521794838|pages=85}}</ref>
 
[[Message]]s are sent from [[transmitter]] A to [[receiver (Information Theory)|receiver]] B. Assume that the [[channel (communications)|channel]] from A to B is initialized and that there are no messages in transit. Each message from A to B contains a data part and a one-bit sequence number, i.e., a value that is 0 or 1. B has two [[acknowledge character]]s that it can send to A: ACK0 and ACK1.
Line 5:
When A sends a message, it resends it continuously, with the same sequence number, until it receives an acknowledgment from B that contains the same sequence number. When that happens, A [[Negation|complements]] (flips) the sequence number and starts transmitting the next message.
 
When B receives a message that is not corrupted and has sequence number 0, it starts sending ACK0 and keeps doing so until it receives a valid message with number 1. Then it starts sending ACK1, etc.
 
This means that A may still receive ACK0 when it is already transmitting messages with sequence number one. (And vice- versa.) It treats such messages as [[negative-acknowledge character]]s (NAKs). The simplest behaviour is to ignore them all and continue transmitting.
 
The protocol may be initialized by sending bogus messages and acks with sequence number 1. The first message with sequence number 0 is a real message.
Line 21:
{{FOLDOC}}
{{Reflist}}
 
 
{{Telecomm-stub}}
 
{{DEFAULTSORT:Alternating Bit Protocol}}
[[Category:Network protocols]]
 
 
{{Telecomm-stub}}