SWP (Sliding Window Protocol) a connection-less protocol. It allows data to be sent in one direction between a pair of protocol entities, 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 does not include the users; see the five-column version for this.
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.
Optionally set the level of control that the simulator user needs over the medium:
Optionally set the maximum sequence number used by the protocol: this is one less than the modulus. Sequence numbers wrap round to zero when they pass the maximum. Optionally set the maximum window size permitted: this must not exceed the maximum sequence number. Changing either of these parameters will restart the simulation.
The protocol simulation shows a time-sequence diagram with transmitting and receiving protocol entities, and a communications medium that carries messages. The transmitter simply sends messages numbered DT(0), DT(1), etc. Once sequence numbers reach a maximum number (like 7), they wrap back round to 0. The content of messages is not explicitly identified. 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 Simulations