Online Labs

Sliding Window Protocol

 

                                    In the simplex, stop and wait protocols, data frames were transmitted in one direction only. In most practical solutions, there is a need for transmitting data in both directions. One way of achieving full-duplex data transmission is to have two separate communication channels and use each one for simplex data traffic. If this is done, we have two separate physical circuits, each with a “forward” channel (for data) and a” reverse” channel (for acknowledgements).In both cases the bandwidth of the reverse channel is almost wasted.

                    A better idea is to use same circuit for data in both directions. In this model data frames from A to B are intermixed with the acknowledgement frames from A to B.By looking at the kind field in the header of an incoming frame, the receiver can tell whether the frame is data or acknowledgement. When a data frame arrives, instead of immediately sending a separate control frame, the receiver retrains itself and waits until the network layer passes it the next packet. The acknowledgement is attached to the outgoing data frame. The technique of temporarily delaying outgoing acknowledgements so that they can be hooked onto the next outgoing data frame known as piggybacking. The principal advantage of using piggybacking over having distinct acknowledgement frames is a better use of the available channel bandwidth.

                         Bidirectional protocols that belongs to a class called sliding window protocols. They differ among themselves in terms of efficincy, complexity,and buffer requirements. All sliding window protocols ,each outbound frame contains a sequence number ,ranging from 0 up to some maximum. The essence of all sliding window protocols is that at any instant of time ,the sender maintains a set of sequence numbers corresponding to frames it is permitted to send . These frames are said to fall within the sending window, the receiver also maintains a receiving window corresponding to the set of frames it is permitted to accept.

 A One- Bit Sliding Window Protocol

                                    

                                A sliding window protocol with a maximum window size of 1.Such a protocol uses a stop-and-wait since the sender transmits a frame and waits for its acknowledgement before sending the next one. The starting machine fetches the first packet from its network layer, builds a frame from it, and sends it. The acknowledgement field contains the number of the last frame received without error. If this number agrees with the sequence number of the frame the sender is trying to send ,the sender knows it is done with the frame stored in buffer and can fetch the next packet from its network layer. If the sequence number disagrees, it must continue trying to send the same frame Whenever a frame is received, a frame also sent back. 

A Protocol Using Go Back N

 

                                      Two basic approaches are available for dealing with errors in the presence of pipelining. One way, called go back n ,is for the receiver simply to discard all subsequent frames ,sending no acknowledgements for the discarded frames. In other words, the data link layer refuses to accept any frame except the next one it must give to the network layer

 

A Protocol Using Selective Repeat        

 

                              In this protocol, both sender and receiver maintain a window of acceptable sequence numbers. The sender’s window size starts out at 0 and grows to some predefined maximum. The receiver’s window, in contrast, is always fixed in size and equal to maximum. The receiver has a buffer reserved for each sequence number within its fixed window. Whenever a frame arrives, its sequence number is checked by the function between to see if falls within the window. If so and if it has not already been received, it is accepted and stroed.This action is taken without regard to whether or not it contains the next packet expected by the network layer.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: