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