Data Link Layer Protocols - Networking - Part II


📌Highlights: In this post we cover data link layer protocols such as One bit sliding window protocol, Go back 'n' protocol, Selective repeat protocol and also cover problems arise with these protocols, We also discuss about there solution. We explain with the help of diagrams so that it is easily understandable.

Refer Data link Protocol #1,#2,#3

Protocol #4 : One bit sliding window protocol :

Features:

1. Data traffic is duplex hence concept of piggybacking is used.

2. Channel is noisy.

3. Both sender and receiver has one buffer each.

4. Receiver has finite and limited processing speed.

Note: Why this protocols is known as sliding window?

Let we understand,



In previous protocols such as Protocols(1,2,3), At the sender (S) end there is one buffer which store the frame which is send by network layer.Suppose this buffer can store the S0 frame until the frame will be successfully transmitted and send to the network layer of receiver end and then next frame is stored from network layer.



But if we have four buffer we can transmit four frame one after another  (S0-S3) When S3 is transmitted and if acknowledge of S0 will come then S4 frame will transmitted at that time previous stored frame i.e S0 will removed and S4 is store in buffer in the same way S5,S6,S7 will stored and S1,S2,S3 will remove from buffer. After receiving the acknowledgement of S1,S2,S3 here we take sequence bit of 2-bit such as (00,01,10,11) and same procedure is done in same frames.

In this scheme efficiency or utilisation of channel will increased because it transfer four frame at a time instead of one frame.Here waiting time and delay will reduce.

Now understand how this 4-bit buffer works:

It is just like a window whose one end is known as trained edge (T) and second end is known as leading edge (L).This window or disk will be rotated in clockwise direction.



How let we see:

Window is basically a buffer which initially contain S0,S1,S2,S3 frames.If sender will receive acknowledgement of S0 successfully the S0 will removed from window or disk or 4-bit buffer and new frame S4 will inserted and the direction of disk or window will change.In the same way when acknowledgement of S1 was successfully received then S1 will removed and S5 will inserted with change the direction of disk or window. Same procedure is done with all frames and the disk will rotate in clockwise direction.

Note:

Concept of Piggybacking: 

In this concept send sequence number , Acknowledgement , and Data in a single frame.So here no extra acknowledgement is need. We know protocol 4 is duplex so S & R both are sander and receiver.

Just like:




Protocol #5 : Go back 'n' Protocol.

Features:

1. Data traffic is Duplex hence concept of piggybacking is used.

2. Channel is noisy.

3. Sender has a large number of buffers and receiver has one buffer.

4. Receiver has sufficient processing speed.

Note: 

here, Sender has a large number of buffers and receiver has one buffer.

So, suppose sender have 8 buffer for transmission + 1 buffer for receiver = 9 buffer for each S and  R.

Go Back -2 mean error comes in 2nd transmission.

Go Back -4 mean error comes in 4th transmission.

Go Back -n mean error comes in nth transmission.


In this case error will occur in 2nd frame but S will transmit 3,4,5,6,7 frame and R will discard these frame after error because receiver has only one buffer.

When the acknowledgement of 2nd will not come with in time limit than again 2,3,4,5,6,7 frames will re-transmitted.


Protocol #6 : Selective Repeat Protocol.

Features:

1. Data traffic is duplex and piggybacking is used.

2. Channel is noisy.

3. Both sender and receiver have large and equal number of buffer.

4. Receiver has finite but sufficient speed.


Suppose:

We have S and R both 36 buffer each so total buffers will be (36+36) 72 buffers.

S has 16 buffer for sending and 16 buffer  for receiving so, total 32 buffers.

R has 16 buffer for sending and 16 buffer  for receiving so, total 32 buffers.


Here if in 2nd frame error will occur than it will store rest of frames after 2nd frame in buffer because receiver has large number of buffers.

Suppose if time is out of 2nd frame after 8th frame and ACK is not come from receiver end then we again send 2nd 3rd, 4th, .. frame and suppose after second frame ACK of 8th frame will come the we discard 3rd,4th,5th,..... frames because these frames are already stored in receiving buffer. Now we transmit 9,10,11,12,13,14,15 frames.

here we will not send 3rd to 8th frame to network layer because error occurred in 2nd frame but  these frames are stored in memory/buffer.When sender will get ACK of 8th frame then all stored frame is accesses form memory and send it to network layer.This process is very fast because these frames are stored in local memory.

Note: Here Selective means we will transmit those frame which have error not all. just like 2nd frame.

Now friends it is the end of this post and all about Data Link Layer Protocols.I hope it is useful for you.We will meet with new post till read !

Refer Data link Protocol #1,#2,#3


No comments:

Post a Comment