The Reliable Data Transfer applet and the accompanying notes (such as How do I use the applet? and An Explanation of Reliable Data Transfer Protocols ) can be used as the basis of a series of laboratory experiments as shown below. Some of the experiments have questions to supplement the explanation.
Experiment One: Stop-and-Wait Protocol with No Loss
A family of protocols are used for ensuring reliable data transfer in computer networks. The same family is used at multiple protocol layers including the application layer, the transport layer, and the data link layer. Our discussion is motivated by how this family of protocols are used at the transport layer in the Transmission Control Protocol (TCP) which is the transport layer protocol used in the Internet when reliable data transfer is needed. This family of protocols are investigated in this laboratory by a series of experiments starting with the simplest case and then continuing to increasingly more complex cases.
This first experiment explores the simplest of this family of protocols, called the stop-and-wait protocol, and the simplest scenario which is that there are no losses.
In the applet among the protocol choices select the Stop-and-Wait radio button. Among the scenario choices select the No Loss radio button. Click the Start button and watch the simulation. A single data packet with the number one on it will leave the sender and reach the receiver. An acknowledgement packet, also with the number one on it, goes from the receiver to the sender as soon as the data packet arrives at the receiver. Both of these packets are moving diagonally because time is progressing to the right. When the acknowledgement reaches the sender, the sender sends another data packet which has the number two on it.
This simulation illustrates that a key aspect of these protocols is the idea that the receiver sends an acknowledgement if it receives a data packet that is not corrupted and is the packet the receiver is expecting. In this case, the acknowledgement has the same number as the data packet so that the sender knows which data packet the receiver is acknowledging. In the stop-and-wait protocol the sender stops and waits until the acknowledgement for the current outstanding packet arrives before sending the next packet. Thus, there is always at most one outstanding data packet.
Experiment Two: Stop-and-Wait Protocol and Lost Data Packet
Repeat experiment one except select the Lost Data radio button.
Experiment Three: Stop-and-Wait Protocol and Lost Acknowledgement
Repeat experiment two except select the Lost ACK radio button.
Experiment Four: Pipelined Protocol
As noted above, the stop-and-wait protocol does not have good utilization in many situations. The sender spends much of its time waiting instead of transmitting packets. The solution is pipelining which means that the sender can transmit another packet even when the acknowledgement for the previous packet has not yet arrived. Thus, there may be multiple outstanding data packets. This experiment illustrates the simplest case for a pipelined protocol: when there are no losses. Select the Pipelined radio button and the No Loss radio button and then click the Start button.
Experiment Five: Pipelined Protocol (Selective Repeat) and Lost Data Packet
There are two main approaches for how Pipelined reliable data transfer protocols handle losses. This applet illustrates the Selective Repeat approach. Repeat experiment four except select the Lost Data radio button. Which of the three data packets initially transmitted is lost is randomly chosen on each simulation. Consequently, you will want to repeat this experiment to see the differences in what happens depending on which data packet is lost.
Experiment Six: Pipelined Protocol (Selective Repeat) and Lost Acknowledgement
Repeat experiment four except select the Lost Data radio button. The first acknowledgement is always the one that is lost in the simulation.
Experiment Seven: Bandwidth, Packet Size, and
All of the above experiments assumed default values for the link bandwidth, the packet size, and the one way delay. The one way propagation delay is determined by the link length and the propagation speed of the media.