Error Correction and Flow Control
description
Transcript of Error Correction and Flow Control
![Page 1: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/1.jpg)
Error Correction and Flow Control
Martin Weiss
![Page 2: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/2.jpg)
Slide 2
Objectives of this Meeting
Describe different flow control techniques
Describe the major error detection techniques
![Page 3: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/3.jpg)
Slide 3
Review of the Last Meeting
Physical interfaces Topologies Asynchronous communications
![Page 4: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/4.jpg)
Slide 4
Data Link Layer Issues
Type Error detection and control Flow control
![Page 5: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/5.jpg)
Slide 5
Types of DLC Protocols
Byte-oriented protocols Bit-oriented protocols
![Page 6: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/6.jpg)
Slide 6
Protocol Environments End-to-End Local
![Page 7: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/7.jpg)
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
![Page 8: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/8.jpg)
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
![Page 9: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/9.jpg)
Slide 9
Bit Stuffing
Example
0100101111010101101110000010111110010101111110
Transmission Direction
Locations for Stuff Bits
010010111101010110111000001011111000101011111010
Original Bit Stream
Transmitted Bit Stream
![Page 10: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/10.jpg)
Slide 10
Design of Transmitter and Receiver
Application
NetworkSoftware
Bit Stuffing Flag Insertion
Control
Transmitter Receiver
Application
NetworkSoftware
Bit Destuffing
Control
Flag Detection
![Page 11: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/11.jpg)
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
![Page 12: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/12.jpg)
Slide 12
Cyclical Redundancy Check (CRC)
Based on polynomial division Use standard divisor polynomials
![Page 13: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/13.jpg)
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
![Page 14: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/14.jpg)
Slide 14
Error Correction Automatic Response Request
(ARQ) Forward error correction
![Page 15: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/15.jpg)
Slide 15
Types of ARQ
Stop-and-Wait (Idle RQ) Sliding Window (Continuous RQ)
![Page 16: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/16.jpg)
Slide 16
Stop and Wait
1 Data 0
2 ACK0
3 Data 1
4 NACK1
5 Data 1
6 ACK1
7 Data 0
![Page 17: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/17.jpg)
Slide 17
Stop and Wait (Long Channel)
1 Data 0
2 ACK0
3 Data 1
4 ACK1
Increasing bit rate
1 D 0
2 A0
3 D 1
4 A1
![Page 18: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/18.jpg)
Slide 18
Sliding Window
Transmitter may transmit several messages before awaiting response
The number of unacknowledged messages permitted is the Window Size
![Page 19: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/19.jpg)
Slide 19
Sliding Window
If an error occurs– Transmitter resends everything
since the error (Go-Back-N)– Only the errored packet (Selective
Retransmission)
![Page 20: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/20.jpg)
Slide 20
Sliding Window (n>3)
0 Data 0
1 Data 1
2 Data 2
3 ACK 20
![Page 21: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/21.jpg)
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
![Page 22: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/22.jpg)
Slide 22
Performance Issues
Stop and Wait– Error free
– With errors
att
tU
frameprop
frame
21
1
2
a
PU
21
1
![Page 23: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/23.jpg)
Slide 23
Performance Issues
Sliding window (Go-Back-N)
12
121
1
1221
1
aNNPPa
PN
aNaP
P
U
![Page 24: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/24.jpg)
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
Wait
P=10-3
![Page 25: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/25.jpg)
Slide 25
Forward Error Correction
Encode data so that errors can be corrected
Requires redundancy in message
![Page 26: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/26.jpg)
Slide 26
Examples of Protocols
Byte oriented protocol–Kermit–Bisync
Bit oriented protocol: HDLC
![Page 27: Error Correction and Flow Control](https://reader035.fdocuments.us/reader035/viewer/2022062323/56815749550346895dc4ecb1/html5/thumbnails/27.jpg)
Slide 27
Kermit Frame Structure
SOH LEN SEQ TYPE data BCC CR