Beruflich Dokumente
Kultur Dokumente
ERROR CONTROL
OVERVIEW
Timers: Sender keeps a timer, if an ACK is not received before the timer expires, it resends
the frame. How large should the timer value be?
Need for sequence numbers for the frames: If a frame is properly received, but the ACK is
lost, then the sender will time-out and retransmit. This will result in the receiver receiving
duplicate frames. Hence frames need sequence numbers to allow the receiver to detect
duplicates.
Need for sequence numbers in the ACKs: If a frame 0 is sent, but the timer times-out before
the ACK is received, the sender will resend frame 0. If the ACK for the first frame 0 arrives
soon after the sender retransmitted frame 0, the sender will assume that the ACK was for the
retransmitted frame 0 and hence send frame 1. Now if frame 1 gets lost, but the receiver
sends another ACK for the retransmitted frame 0, the sender may mistakenly think this ACK
is for frame 1. If ACKs said what frames they were acknowledging (using their sequence
numbers), this problem would not arise.
Checkpointing: periodically sending ENQ (enquiries) to see what frames were received.
FEC (Forward Error Correction)
is a technique used for controlling errors in data transmission over unreliable or noisy
communication channels. The central idea is the sender encodes the message in
a redundant way by using an error-correcting code (ECC).
The redundancy allows the receiver to detect a limited number of errors that may
occur anywhere in the message, and often to correct these errors without
retransmission. FEC gives the receiver the ability to correct errors without needing
a reverse channel to request retransmission of data, but at the cost of a fixed,
higher forward channel bandwidth.
FEC is therefore applied in situations where retransmissions are costly or
impossible, such as one-way communication links and when transmitting to multiple
receivers in multicast. FEC information is usually added to mass storage devices to
enable recovery of corrupted data, and is widely used in modems.
Three Modes of Error Control
Selective ARQ:
Stop-and-wait: Send a frame, wait for an
ACK
source transmits single frame
waits for ACK by keeping a copy of the sent frame
no other data can be sent until destinations reply arrives
if frame received is damaged, discard it
transmitter has timeout
if no ACK within timeout, retransmit
if ACK is damaged, transmitter will not recognize
transmitter will retransmit
receiver gets two copies of frame
use alternate numbering and ACK0 / ACK1
ACKi means I am ready to receive frame i
Stop-and-wait: Send a frame, wait for
an ACK
Assume that, 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. If the system data frames are 1000 bits
in length, what is the utilization percentage of the link? Solution The system can
send 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 a high
bandwidth or long delay, the use of Stop-and-Wait ARQ wastes the capacity of the
link.
Stop-and-wait: Send a frame, wait for
an ACK
Stop-and-wait: Send a frame, wait for
an ACK
Go-back-N
Sender maintains a window of size Ws frames. after frame 0 is sent, transmitter
sends Ws -1 frames. This is the maximum number of frames that can be outstanding
(i.e., unacknowledged). Pipelining effect occurs improving the efficiency of the
protocol. Upon receiving a NAK (negative ACK), or experiencing a time-out, the
sender will retransmit. The sender keeps track of Srecent, which lies between Slast and
Slast + Ws -1, where Slast is the last transmitted and yet unacknowledged; Srecent is the
last one sent.
The receiver maintains a variable Rnext, which is the sequence number of the next
expected frame. Typically, this is the number that the receiver sends in an ACK. Go-
back-N is an example of a sliding-window protocol. The window size at the sender
should be less than 2m if m bits are used for the sequence number.If Ws = 2m then a
problem could arise. If m = 2 bits and the window size is 4, and frames 0, 1, 2, 3 are
sent and received properly, but all the ACKs are lost.
Then the sender goes back N and retransmits frame 0. When the receiver receives
this frame it is a duplicate, but the receiver does not know this; it thinks it is the next
set!
Go-back-N