Flowand Error Control 2
Flowand Error Control 2
Flowand Error Control 2
11.1
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Figure A frame in a character-oriented protocol
11.2
FLOW AND ERROR CONTROL
11.3
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.
11.4
Flow and Error Control
If the buffer begins to fill up, the receiver must be able to tell
the sender to halt transmission until it is once again able to
receive.
11.5
Taxonomy of protocols discussed in this chapter
11.6
NOISELESS CHANNELS
11.7
The design of the simplest protocol with no flow or error control
11.8
1-Simplest Protocol
• Our first protocol, which we call the Simplest Protocol, is one that
• The data link layer of the receiver immediately removes the header
from the frame and hands the data packet to network layer, which
Flow diagram
11.10
Algorithm 1.1 Sender-site algorithm for the simplest protocol
11.11
Algorithm Receiver-site algorithm for the simplest protocol
11.12
2. Stop-and-Wait Protocol
• If the data frames arrive at the receiver site faster than they can be
processed, the frames must be stored until their use. Normally, the
• The sender sends one frame, stops until it receives agreement the
11.13
still have unidirectional communication for data frames, but
Algorithm 3 Sender-site algorithm for Stop-and-Wait Protocol
11.14
Algorithm Receiver-site algorithm for Stop-and-Wait Protocol
11.15
Stop-and-Wait Protocol fig 1
11.16
NOISY CHANNELS
11.17
Error correction in Stop-and-Wait ARQ is done by
keeping a copy of the sent frame and retransmitting of
the frame when the timer expires.
Types of Errors:
- Frame Corrupted
- Frame Lost
- Acknowledgement Lost
11.18
Design of the Stop-and-Wait ARQ Protocol
11.19
Note
11.20
Algorithm 5 Sender-site algorithm for Stop-and-Wait ARQ
(continued)
11.21
Algorithm Sender-site algorithm for Stop-and-Wait ARQ (continued)
11.22
Algorithm Receiver-site algorithm for Stop-and-Wait ARQ Protocol
11.23
Figure Flow diagram for Example 2
11.24
Example
Solution
The bandwidth-delay product is
11.25
Example (continued)
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.
11.26
Example
Solution
The bandwidth-delay product is still 20,000 bits. The
system can send up to 15 frames or 15,000 bits during a
round trip.
11.31
Figure Send window for Go-Back-N ARQ
11.32
The send window is an abstract concept defining an
imaginary box of size 2m − 1 with three variables: Sf,
Sn, and Ssize.
11.34
Figure Receive window for Go-Back-N ARQ
11.35
Figure Design of Go-Back-N ARQ
11.36
Figure Window size for Go-Back-N ARQ
11.37
In Go-Back-N ARQ, the size of the send
window must be less than 2m;
the size of the receiver window
is always 1.
11.38
Algorithm Go-Back-N sender algorithm
(continued)
11.39
Algorithm Go-Back-N sender algorithm (continued)
11.40
Algorithm Go-Back-N receiver algorithm
11.41
Example
• Figure shows an example of Go-Back-N. This is an example of a
case where the forward channel is reliable, but the reverse is not.
No data frames are lost, but some ACKs are delayed and one is
lost.
11.43
Example 5
11.45
Figure 11.17 Flow diagram for Example 5
11.46
Note
11.47
Figure Send window for Selective Repeat ARQ
11.48
Figure Receive window for Selective Repeat ARQ
11.49
Figure Design of Selective Repeat ARQ
11.50
Figure 21 Selective Repeat ARQ, window size
11.51
Note
11.52