Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
20 views

Lecture - Error Control in Communication

Uploaded by

phuc.phan246
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Lecture - Error Control in Communication

Uploaded by

phuc.phan246
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Error Control in Communication

Error and Flow Control in Communications

System Architecture

Sensor Nodes

2
Error and Flow Control in Communications

Communication Protocol
▪ The combination of framing, flow control, and error
control to achieve the delivery of data from one node to
another.

▪ The protocols are normally implemented in software


by using one of the common programming languages.

3
Error and Flow Control in Communications

Classification of Protocols

4
Error and Flow Control in Communications

NOISELESS CHANNELS
▪ No frames are lost, duplicated, or corrupted

▪ Simplest Protocol – has no flow or error control

▪ Stop-and-Wait Protocol – sender sends one frame,


stops until it receives agree from receiver and then sends
the next frame

5
Error and Flow Control in Communications

Simplest Protocol
▪ Unidirectional protocol: data frames are traveling in
only one direction-from the sender to receiver.

▪ The receiver can immediately handle any frame it


receives with a processing time that is small enough
to be negligible.

▪ The data link layer of the receiver immediately removes


the header from the frame and hands the data packet to
network layer, which can also accept the packet
immediately.

6
Error and Flow Control in Communications

Simplest Protocol Design


message

7
Error and Flow Control in Communications

Implementation

8
Error and Flow Control in Communications

Example
Propagation delay

▪ The sender sends a sequence of frames without even


thinking about the receiver
▪ There is no error handler
▪ There is no synchronization (the receiver processing time
is slower than the transmission speed)
9
Error and Flow Control in Communications

Stop and Wait Protocol


▪ If data frames arrive at the receiver site faster than they
can be processed, the frames must be stored until
their use
▪ Normally, the receiver does not have enough
storage space, especially if it is receiving data from
many sources
▪ The sender sends one frame, stops until it receives
agreement the receiver (okay to go ahead), and then
sends the next frame
▪ ACK frames (simple tokens of acknowledgment) travel
from the other direction

10
Error and Flow Control in Communications

Stop and Wait Protocol Design

11
Error and Flow Control in Communications

Example

▪ The sender sends one frame and waits for feedback from the
receiver before sending the next frame

▪ Four events at the Sender and two events at the Receiver


12
Error and Flow Control in Communications

NOISY CHANNELS
▪ Although the Stop-and-Wait Protocol gives us an idea of
how to add flow control to its predecessor, noiseless
channels are nonexistent.

▪ Stop-and-Wait Automatic Repeat Request(ARQ)


▪ Go-Back-N Automatic Repeat Request
▪ Selective Repeat Automatic Repeat Request

13
Error and Flow Control in Communications

Stop and Wait ARQ Principles


▪ A copy of a frame (sent to the receiver) is kept in the
buffer

▪ Retransmitting this frame when the timer expires,


meaning that ACK is not received

▪ Sequence numbers are used to index the frames.

▪ The acknowledgment number always announces the


sequence number of the next frame expected

14
Error and Flow Control in Communications

Stop and Wait ARQ Protocol

15
Error and Flow Control in Communications

Example

▪ Frame is lost

▪ ACK is lost
▫ Duplicate reception at the receiver
16
Error and Flow Control in Communications

Go-Back-N Automatic Repeat Request

▪ Multiple frames must be in transition while waiting


for acknowledgment to maximize the efficiency

▪ Protocol principles:
▫ Several frames are sent before receiving ACKs
▫ A copy of these frames are kept until the ACKs arrive

17
Error and Flow Control in Communications

Send Windows for Go Back N (m=4)

18
Error and Flow Control in Communications

Definitions
▪ Sf: the sequence number of the first (oldest) outstanding
frame
▪ Sn: the sequence number that will be assigned to the
next frame to be sent.
▪ Ssize: the size of the window, which is fixed in our
protocol.

▪ Sf can slide one or more slots when a valid ACK


arrives.

19
Error and Flow Control in Communications

Receive Windows for Go Back N

▪ The window slides one slot when a correct frame has


arrived;

20
Error and Flow Control in Communications

Go Back N Design

21
Error and Flow Control in Communications

Selective Repeat Automatic Repeat Request


▪ In a noisy link a frame has a higher probability of
damage, which means the resending of multiple
frames. This resending uses up the bandwidth and slows
down the transmission

▪ Selective Repeat ARQ: does not resend N frames


when just one frame is damaged

▪ It is more efficient for noisy links, but the processing at


the receiver is more complex compared to Go Back N

22
Error and Flow Control in Communications

Selective Repeat ARQ


▪ Two windows are used: a send window and a receive
window as Go Back N
▪ The size of the sending window is smaller: 2m-1
▪ The received window is the same size as the send
window (in Go Back N, the size is only 1).

▪ For example, if m = 4, the sequence numbers go from 0


to 15, but the size of the window is just 8 (it is 15 in the
Go-Back-N Protocol). The smaller window size means
less efficiency in transmission, but the fact that there
are fewer duplicate frames.

23
Error and Flow Control in Communications

Sending Windows (m=4)

24
Error and Flow Control in Communications

m-1
Received Windows (size 2 )
▪ Many frames can be arrived out of order and be kept
until there is a set of in-order frames to be delivered
to the network layer

▪ All the frames in the send frame can arrive out of order
and be stored until they can be delivered.

25
Error and Flow Control in Communications

Design of Selective Repeat ARQ

26

You might also like