Error Correction and Flow Control Martin Weiss Objectives
Error Correction and Flow Control Martin Weiss
Objectives of this Meeting u Describe different flow control techniques u Describe the major error detection techniques 2
Review of the Last Meeting u Physical interfaces u Topologies u Asynchronous communications 3
Data Link Layer Issues u. Type u. Error detection and control u. Flow control 4
Types of DLC Protocols u. Byte-oriented protocols u. Bit-oriented protocols 5
Protocol Environments u. End-to-End u. Local 6
Structure of Byte-Oriented Protocols Sample Structure SYN SYN SOH Header STX Message. EOT SYN = Synchronization SOH = Start of Header STX = Start of Text EOT = End of Text 7
Structure of Bit-Oriented Protocols Sample Frame Structure Preamble Flag Header Message Trailer Flag Preamble: Used for Bit Synchronization Flag: Identifies Start and End of Message Trailer: Error Checking 8
Bit Stuffing u Example Transmission Direction 0100101111010101101110000010111110010101111110 Original Bit Stream Locations for Stuff Bits 010010111101010110111000001011111000101011111010 Transmitted Bit Stream 9
Design of Transmitter and Receiver Application Network Software Bit Stuffing Application Control Flag Insertion Transmitter Control Network Software Flag Detection Bit Destuffing Receiver 10
Vertical and Longitudinal Redundancy Checks Bit 1 Bit 2 Bit n. Parity Character 1 b 11 b 21 bn 1 R 1 Character 2 b 12 b 22 bn 2 R 2 Character mb 1 m b 2 m bnm Rm Parity Cn C 1 C 2 Cn+1 LRC 11 VRC
Cyclical Redundancy Check (CRC) u Based on polynomial division u Use standard divisor polynomials 12
Standard CRC Polynomials u. P is the bit pattern, or Generator Polynomial u. In the previous example, P = X 5 + X 4 + X 2 + 1 u. Standard CRC generator polynomials – CRC-12 = X 12 + X 11 + X 3 + X 2 + X + 1 – CRC-16 = X 16 + X 15 + X 2 + 1 – CRC-CCITT = X 16 + X 12 + X 5 + 1 13
Error Correction u. Automatic Response Request (ARQ) u. Forward error correction 14
Types of ARQ u Stop-and-Wait (Idle RQ) u Sliding Window (Continuous RQ) 15
Stop and Wait 1 2 Data 0 0 ACK 3 4 5 6 7 Data 1 1 NAC K Data 1 1 ACK Data 0 16
Stop and Wait (Long Channel) Data 0 1 2 0 ACK 3 4 Data 1 1 ACK Increasing bit rate D 0 1 2 0 A 3 4 D 1 1 A 17
Sliding Window u Transmitter may transmit several messages before awaiting response u The number of unacknowledged messages permitted is the Window Size 18
Sliding Window u If an error occurs – Transmitter resends everything since the error (Go-Back-N) – Only the errored packet (Selective Retransmission) 19
Sliding Window (n>3) 0 Data 0 1 Data 1 2 Data 2 3 0 ACK 2 20
Sliding Window (Go-Back-N) 4 Data 4 5 Data 5 6 Data 6 7 8 1 NACK 6 Data 4 9 Data 5 10 Data 6 21
Performance Issues u Stop and Wait – Error free – With errors 22
Performance Issues u Sliding window (Go-Back-N) 23
Performance Issues 1. 0 U 0. 8 Stop and Wait 0. 6 Sliding Window (N=7) P=10 -3 0. 4 0. 2 0 0. 1 1 10 1000 a 24
Forward Error Correction u Encode data so that errors can be corrected u Requires redundancy in message 25
Examples of Protocols u. Byte oriented protocol – Kermit – Bisync u. Bit oriented protocol: HDLC 26
Kermit Frame Structure SOH LEN SEQ TYPE data BCC CR 27
- Slides: 27