Pages

Tuesday 3 September 2024

Elementary data link protocols

Protocols in the data link layer are designed so that this layer can perform its basic functions: 
  • Framing
  • Error control 
  • Flow control
Framing is the process of dividing bit - streams from physical layer into data frames whose size ranges from a few hundred to a few thousand bytes. 

Error control mechanisms deals with transmission errors and retransmission of corrupted and lost frames. 

Flow control regulates speed of delivery and so that a fast sender does not drown a slow receiver.

Types of Data Link Protocols
Data link protocols can be broadly divided into two categories, depending on whether the transmission channel is noiseless or noisy.
Simplex Protocol
The Simplex protocol is hypothetical protocol designed for unidirectional data transmission over an ideal channel, i.e. a channel through which transmission can never go wrong. It has distinct procedures for sender and receiver. The sender simply sends all its data available onto the channel as soon as they are available its buffer. The receiver is assumed to process all incoming data instantly. It is hypothetical since it does not handle flow control or error control.

Stop – and – Wait Protocol
Stop – and – Wait protocol is for noiseless channel too. It provides unidirectional data transmission without any error control facilities. However, it provides for flow control so that a fast sender does not drown a slow receiver. The receiver has a finite buffer size with finite processing speed. The sender can send a frame only when it has received indication from the receiver that it is available for further data processing.
Efficiency of Stop and Wait Protocol :In which the sender sends one packet and waits for the receiver to acknowledge and then it will send the next packet. In case if the acknowledgement is not received, the sender will retransmit the packet. This is the simplest one and easy to implement. but the main disadvantage is the efficiency is very low.
Where 
Tt(data) : Transmission delay for Data packet (Tt = L/BW)
Tp(data) : propagation delay for Data packet (Tp = d/v)
Tq: Queuing delay
Tpro: Processing delay
Tt(ack): Transmission delay for acknowledgment
Tp(ack) : Propagation delay for acknowledgment  

Total time taken to send one packet is given by 

Total time = Tt(data) + Tp + Tq + Tpro + Tt(ack) + Tp
Total time = Tt(data) + Tp + 0 + 0 + Tt(ack) + Tp [since Queuing delay Tq = 0 and Processing delay Tpro = 0 ]
Total time = Tt(data) + Tp + 0 + 0 + 0 + Tp [Since, Tt(ack) << Tt(data).
So we can neglect Tt(ack)]

Hence Total time = Tt + 2 * Tp 

We know that the Efficiency (η),
= Useful time / Total cycle time.

= Tt / (Tt + 2*Tp)
= 1 / (1+2*(Tp/Tt))
= 1 / (1+2*a) where, a = Tp / Tt 

Throughput : Number of bits send per second, which is also known as Effective Bandwidth or Bandwidth utilization.

Throughput=Length of frame/Total Cycle time
= L/(Tt + 2*Tp)
= ((L/BW)*BW)/(Tt + 2*Tp)
= Tt/(Tt + 2*Tp) * BW
= 1/(1 + 2a) * BW

Hence, Throughput = η * BW where BW : BandWidth,  L : Size of Data packet 

Factors affecting Efficiency:

n = 1/(1 + 2*(Tp/Tt)
= 1/(1 + 2*(d/v)*(BW/L))

where,
d = distance between source and receiver 
v = velocity 
Lets see an example. Example: Given,
Tt = 1ms   
Tp = 2ms   
Bandwidth = 6 Mbps

Efficiency(η) 
= 1/(1 + 2*a)
= 1/(1 + 2*(2/1))
= 1/5  
= 20 %

Throughput 
= η * BW
= (1/5) * 6 
= 1.2 Mbps

Stop – and – Wait ARQ
Stop – and – wait Automatic Repeat Request (Stop – and – Wait ARQ) is a variation of the above protocol with added error control mechanisms, appropriate for noisy channels. The sender keeps a copy of the sent frame. It then waits for a finite time to receive a positive acknowledgement from receiver. If the timer expires or a negative acknowledgement is received, the frame is retransmitted. If a positive acknowledgement is received then the next frame is sent.

Go – Back – N ARQ
Go – Back – N ARQ provides for sending multiple frames before receiving the acknowledgement for the first frame. It uses the concept of sliding window, and so is also called sliding window protocol. The frames are sequentially numbered and a finite number of frames are sent. If the acknowledgement of a frame is not received within the time period, all frames starting from that frame are retransmitted.

Selective Repeat ARQ
This protocol also provides for sending multiple frames before receiving the acknowledgement for the first frame. However, here only the lost frames are retransmitted, while the good frames are received and buffered.

No comments:

Post a Comment

OSPF Using CPT

OSPF (Open Shortest Path First)  is a common networking protocol used for routing within an autonomous system and is widely used due to its ...