Sie sind auf Seite 1von 2

LAN KIT - STOP & WAIT AND SLIDING WINDOW PROTOCOLS

Stop-and-Wait Protocol

Background :

Consider sending frames from a fast machine to a slow machine. What happens if the slow machine is reading the data at half of the rate that the fast machine is sending it? Eventually the sent data will be lost,never to be received. For this reason it is important to provide some kind of flow control. The Stop-and-Wait protocol requires the receiver to send an acknowledge in return for every frame received .Such an acknowledgment is often denoted as ACK. The sender will wait for the ACK before sending the next frame. However, if it does not receive the ACK within the time-out period, it retransmits the data packets.

Sliding Window Protocol

Background :

The basic idea of sliding window protocol is that both sender and receiver keep a “window'' of acknowledgment. The sender keeps the value of expected acknowledgment; while the receiver keeps the value of expected receiving frame. When it receives an acknowledgment from the receiver, the sender advances the window. When it receives the expected frame, the receiver advances the window. The senders and receivers each maintain a window of messages for which no ACKs have been received: a window is essentially a sequence of message IDs, starting with a low water mark and bounded by a high water mark. Whenever an ACK is received, the low and high water marks are advanced by 1, this allows 1 more ACK to be received, therefore sliding the window 1 to the right. When the window is full, an ACK is either discarded, or some kind of flow control is used to throttle the sender until there is more space available.

Objective:

Provide reliable data transfer between two nodes over an unreliable network using the Sliding Window protocol and Stop-and-Wait protocol.

Equipment:

BENCHMARK LAN trainer kit

Procedure:

Setup two nodes and the Network Unit. With the BER(bit-error rate) set to 0, transmit a number of packets from one node to the other using the Stop-and-Wait mechanism. Note the total time taken. Calculate the transmission time of the data packet and the acknowledgment.

Now, set the BER to some non-zero value. You should observe timeouts and retransmissions and hence a reduction in throughput. Repeat the experiment for several BER values. Try to correlate the number of retransmissions with the BER. Repeat the above with different packet lengths and timeout values. Plot throughput versus BER for different packet lengths and timeouts values. Repeat the above procedure for the Sliding Window Protocol also.

Expected Things In The Report:

timeouts

1. Plots showing the throughput versus BER for different packet lengths and in both Sliding Window and Stop-and Wait protocols.