SWP (Sliding Window Protocol) is a connection-less protocol in one direction between a pair of users. It allows data to be sent in one direction subject to a maximum number of unacknowledged messages. If SWP is operated with a window size of 1, it is equivalent to the Alternating Bit Protocol. The simulation below includes the users; the three-column version omits them.
The protocol has a maximum number of messages that can be sent without acknowledgement. If this window becomes full, the protocol is blocked until an acknowledgement is received for the earliest outstanding message. At this point the transmitter is clear to send more messages.
The following settings are adequate for a simple simulation. For a more advanced exploration, choose different options and click Change Settings. This may cause the simulation to restart.
The protocol simulation shows a time-sequence diagram with users A and B, protocol entities A and B that support them, and a communications medium that carries messages. Users request data transmissions with DatReq(DATAn), and receive data transmissions as DatInd(DATAn). Data messages are simply numbered DATA0, DATA1, etc. without explicit content. The transmitting protocol sends the protocol message DT(n) that gives only the sequence number, not the data. Once sequence numbers reach a maximum number (like 7), they wrap back round to 0. An acknowledgement AK(n) means that the DT message numbered n is the next one expected (i.e. all messages up to but not including this number have been received). Since sequence numbers wrap round, an acknowledgement with sequence number 1 refers to messages 0, 1, 7, 6, etc. Note that if a DT message is received again due to re-transmission, it is acknowledged but discarded.
Up one level to Protocol Simulators