2. 2
Today’s topic
• Data Link Layer Functions – making sense
of the data
• Framing
• Flow Control
• Error Control
• Link (Media) access
3. Flow control & Error control
Flow control refers to a set of procedures
used to restrict the amount of data that the
sender can send before waiting for
acknowledgment.
Error control in the data link layer is based
on automatic repeat request (ARQ), which
is the retransmission of data.
4. Flow control
To prevent the sender from overwhelming
the receiver
The receiver should control the flow of
data from the sender
Stop and wait flow control & ARQ
Sliding window flow control & ARQ
4
5. Stop and wait
Source sends data
Waits for acknowledgement from receiver
before sending the next frame of data
Very slow and wastes the network
bandwidth !!
5
9. Stop & wait – sequencing
In Stop-and-Wait ARQ, numbering frames
prevents the retaining of duplicate frames.
Numbered acknowledgments are needed if
an acknowledgment is delayed and the next
frame is lost.
12. Stop & wait - Delay
Round trip time (RTT) =
2 (Transmission time +
Propagation
delay)
Transmission time = Frame size / data
rate
Propagation delay = Link length /
Signal speed
Total time = No. of frames * RTT
13. Bandwidth utilization in S&W –
Example 1
In a Stop-and-Wait ARQ system, the
bandwidth of the line is 1 Mbps, and 1
bit takes 20 ms to make a round trip.
What is the bandwidth-delay product?
If the system data frames are 1000
bits in length, what is the utilization
percentage of the link?
14. Bandwidth utilization in S&W
The bandwidth-delay product is
1 106 20 10-3 = 20,000 bits
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%.
For this reason, for a link with high
bandwidth or long delay, use of Stop-and-
Wait ARQ wastes the capacity of the link.
15. Sliding window Flow control
Sender transmits upto n frames without
waiting for ACKs (n = window size )
As ACKs are received the window is
moved
Bandwidth is used efficiently by
choosing the value of “n” appropriately
(based on the delay-bandwidth product
& buffer size)
Sender and receiver decide the value
of “n”
15
17. Sliding window Flow control
….
Example : (n=4 say)
Sender transmits frames 0-3
Receiver sends ack for frame 0-1
Sender advances its window to 2-5
and can now send frames 2 to 5
23. Sliding window – error control
Go-back n ARQ
On error, go back and transmit n frames in
sequence. Frames accepted only in order
Selective repeat ARQ
Selectively retransmit erroneous frames
Accept frames in window – out of order
28. Selective repeat ARQ – window
size
In Selective Repeat ARQ, the size of the
sender and receiver window must be at
most one-half of the maximum
sequence no.
30. Sliding window – Link utilization
What is the utilization percentage of the
link in Example 1 if the link uses Go-
Back-N ARQ with a 15-frame sequence?
31. Sliding window – Link utilization
The bandwidth-delay product is still
20,000. The system can send up to 15
frames or 15,000 bits during a round
trip. This means the utilization is
15,000/20,000, or 75 percent.
Of course, if there are damaged frames,
the utilization percentage is much less
because frames have to be resent.
32. 32
Summary
Flow control & error control
Stop & wait ARQ
Operation & performance
Sliding window flow control
Go-back n ARQ
Operation & performance
Selective repeat ARQ
33. 33
Questions
1. Define flow control.
2. What are the two techniques used for
flow control ?
3. Why is stop and wait slow ?
4. How is sliding window better than stop
and wait ?
5. What is the idea behind sliding window
mechanism ?
34. Questions
6. What is the difference between go-back
n ARQ and selective repeat ARQ ?
7. What is the relationship between
sequence no. and window size in the
three ARQ schemes ?
8. What happens when an ACK is lost in
selective repeat ARQ ?
36. 36
Acknowledgement
Computer Networking: A Top Down Approach Featuring the
Internet,
2nd edition.
Jim Kurose, Keith Ross
Addison-Wesley, July 2002.
Computer Networks: A systems Approach, 4th edition,
David Peterson, Davie, Morgan Kauffman, 2004.
Thanks to the authors of the following books
for making the slides for their books freely
available. The slides for this course have
been adapted from these sources.