Data link layer
Flow control protocols –
--> Noiseless Channels
--> Noisy Channels
Noisy Channels
Stop and wait ARQ
Sliding window protocols:
Go-back-n ARQ
Selective Repeate ARQ
**Sliding window : more than one frame i.e. multiple frames can be sent at a time
Stop and wait ARQ (Automatic Repeate Request)
If ack is not received in certain period of time then sender’s time is out
then sender will reshare the original data/frame to receiver
automatically.
In this protocol we use sequence number i.e. 0 and 1 for frame.
Ack will always sent for next expected frame i.e. if 0th frame is received
then receiver send the ack for 1th frame.
Stop and wait ARQ -
Drawback –
1. One frame at a time
share
2. Low utilization of
bandwidth
Example :
The system can send 20,000 bits during the time it takes
for the data to go from the sender to the receiver and
then back again. However, the system sends only 1000
bits. We can say that the link utilization is only
1000/20,000, or 5 percent. For this reason, for a link with a
high bandwidth or long delay, the use of Stop-and-Wait
ARQ wastes the capacity of the link.
Round trip time (RTT)= 2*Tp
Where Tp is propogation time
Timer time = 2*RTT
Go-Back-N ARQ
N is window size of Sender
EX. N=5 then senders window size is 5 i.e. 5 frames can be sent at a time
before expecting acknowledgement (ack)
∞ Sequence no.= 2^m
frame allows m bits for the sequence number, the sequence numbers range
from 0 to 2^m - 1.
For example, if m is 4, the only sequence numbers are 0 through 15
inclusive. However, we can repeat the sequence. So the sequence numbers
are 0, 1,2,3,4,5,6, 7,8,9, 10, 11, 12, 13, 14, 15,0, 1,2,3,4,5,6,7,8,9,10, 11, ...
∞ Sender’s window size = (2^m)-1 i.e( 2^2)-1=3
∞ Receiver's window size = 1
∞ In order packets/frames will be accepted by receiver.
Sf(send window, the first
outstanding frame),
Sn (send window, the
next frame to be sent),
Rn (receiver, next frame
expected)
Example - receiver
accepts in-order
delivery of frames
Commutative ack
M=3
2^3=8 (0-7)
Drawback – since go-
back-N protocol
accepts the in-order
frames then it will wait
for the frame 1
Will not accept frame 2
and 3 whether it will
arrives first and discard
them
Selective repeat ARQ
Sender’s window size = 2^(m-1)
Receiver’s window size = 2^(m-1)
Ex. M=3
Sender’s window size = 2^(3-1 ) = 4
While sequence no. is (2^3)-1 i.e. 7 (0-7)
Accepts out order packets/frames.
Use NAK (Negative ack) for lost frame.
NAK for frame 1
then sender will
resend the frame 1
1. Station A need to send a message consisting of 9 packets
Numerical on Go-back-N : to station B using window size 3 and go-back-n error
control strategy. All packets are ready and immediately
available for transmission. If every 5th packet that A
transmits gets lost (but no ack from B ever get lost) then
what is the no. of packets that A will transmit for sending
the message B?
Given :
Message size = 9
Window size = 3
Every 5th packet gets lost
2. Host A wants to send 10 frames to host B .The host agreed
Numerical on Go-back-N :
to go with go-back-4 . How many no. of frames are
transmitted by host A if every 6th frame that is transmitted by
host A is either corrupted or lost?
1. In SR protocol , suppose frames through 0 to 4 have been
transmitted . Now, Imagine that 0 times out , 5 (a new
Numerical on selective
repeat :
frame) is transmitted , 1 times out , 2 times out and 6
(another ne frame) is transmitted. At this point , what will
be the outstanding packets in sender’s window?
2. Host A wants to send 10 frames to host B . The host
agreed to go with SR ARQ. How many no. of frames are
transmitted by host A if every 6th packet that is
transmitted by host A will lost? Also compare the no. of
transmission of SR ARQ with go-back-4 ARQ.
Reference book
Data communication and networking :
McGraw-Hill Forouzan Networking Series
Computer Networks : ANDREW S. TANENBAUM