Error Correction and Flow Control Martin Weiss. Slide 2 Objectives of this Meeting u Describe...

Post on 18-Jan-2018

219 views 0 download

description

Slide 3 Review of the Last Meeting u Physical interfaces u Topologies u Asynchronous communications

transcript

Error Correction and Flow Control

Martin Weiss

Slide 2

Objectives of this Meeting Describe different flow control

techniques Describe the major error detection

techniques

Slide 3

Review of the Last Meeting

Physical interfaces Topologies Asynchronous communications

Slide 4

Data Link Layer Issues Type Error detection and control Flow control

Slide 5

Types of DLC Protocols Byte-oriented protocols Bit-oriented protocols

Slide 6

Protocol Environments End-to-End Local

Slide 7

Structure of Byte-Oriented Protocols

SYN SYN SYN HeaderSOH STX Message EOT

Sample Structure

SYN = SynchronizationSOH = Start of HeaderSTX = Start of TextEOT = End of Text

Slide 8

Structure of Bit-Oriented Protocols

Preamble Flag Header Message Trailer Flag

Sample Frame Structure

Preamble: Used for Bit SynchronizationFlag: Identifies Start and End of MessageTrailer: Error Checking

Slide 9

Bit Stuffing Example

0100101111010101101110000010111110010101111110

Transmission Direction

Locations for Stuff Bits010010111101010110111000001011111000101011111010

Original Bit Stream

Transmitted Bit Stream

Slide 10

Design of Transmitter and Receiver

Application

NetworkSoftware

Bit Stuffing Flag Insertion

Control

Transmitter Receiver

Application

NetworkSoftware

Bit Destuffing

Control

Flag Detection

Slide 11

Vertical and Longitudinal Redundancy Checks

Bit 1 Bit 2 Bit n Parity

Character 1

Character 2

Character m

Parity

b11

b1m

C1

b2m

C2

bnm Rm

Cn Cn+1

b21 bn1 R1

b12 b22 bn2 R2

LRC

VRC

Slide 12

Cyclical Redundancy Check (CRC)

Based on polynomial division Use standard divisor polynomials

Slide 13

Standard CRC Polynomials P is the bit pattern, or Generator

Polynomial In the previous example, P = X5 + X4

+ X2 + 1 Standard CRC generator polynomials

–CRC-12 = X12 + X11 + X3 + X2 + X + 1–CRC-16 = X16 + X15 + X2 + 1–CRC-CCITT = X16 + X12 + X5 + 1

Slide 14

Error Correction Automatic Response Request

(ARQ) Forward error correction

Slide 15

Types of ARQ Stop-and-Wait (Idle RQ) Sliding Window (Continuous RQ)

Slide 16

Stop and Wait1 Data 0

2 ACK0

3 Data 1

4 NACK1

5 Data 1

6 ACK1

7 Data 0

Slide 17

Stop and Wait (Long Channel)

1 Data 0

2 ACK0

3 Data 1

4 ACK1

Increasing bit rate1 D 0

2 A0

3 D 1

4 A1

Slide 18

Sliding Window Transmitter may transmit several

messages before awaiting response

The number of unacknowledged messages permitted is the Window Size

Slide 19

Sliding Window If an error occurs

– Transmitter resends everything since the error (Go-Back-N)

– Only the errored packet (Selective Retransmission)

Slide 20

Sliding Window (n>3)0 Data 0

1 Data 1

2 Data 2

3 ACK 20

Slide 21

Sliding Window (Go-Back-N)4 Data 4

5 Data 5

6 Data 6

7 NACK 61

8 Data 4

9 Data 5

10 Data 6

Slide 22

Performance Issues Stop and Wait

– Error free

– With errorsatt

tU

frameprop

frame

211

2

aPU21

1

Slide 23

Performance Issues Sliding window (Go-Back-N)

12

1211

1221

1

aNNPPa

PN

aNaPP

U

Slide 24

Performance IssuesU

0

0.2

0.4

0.6

0.8

1.0

0.1 1 10 100 1000a

Sliding Window(N=7)Stop and

WaitP=10-3

Slide 25

Forward Error Correction Encode data so that errors can be

corrected Requires redundancy in message

Slide 26

Examples of Protocols Byte oriented protocol

–Kermit–Bisync

Bit oriented protocol: HDLC

Slide 27

Kermit Frame Structure

SOH LEN SEQ TYPE data BCC CR