Presentation is loading. Please wait.

Presentation is loading. Please wait.

Data Link Layer. Data Link Layer Topics to Cover Error Detection and Correction Data Link Control and Protocols Multiple Access Local Area Networks Wireless.

Similar presentations


Presentation on theme: "Data Link Layer. Data Link Layer Topics to Cover Error Detection and Correction Data Link Control and Protocols Multiple Access Local Area Networks Wireless."— Presentation transcript:

1 Data Link Layer

2 Data Link Layer Topics to Cover Error Detection and Correction Data Link Control and Protocols Multiple Access Local Area Networks Wireless LANs

3 Error Detection Why we need it ? – To avoid retransmission of whole packet or message What to do if error detected ? – Discard, and request a new copy of the frame: explicitly or implicitly – Try to correct error, if possible

4 Data can be corrupted during transmission. Some applications require that errors be detected and corrected. Note

5 Types of Errors Single Bit Error – In a single-bit error, only 1 bit in the data unit has changed. Burst Error  A burst error means that 2 or more bits in the data unit have changed.

6 Redundancy To detect or correct errors, we need to send extra (redundant) bits with data.

7 Error Detection

8 Simple Parity Check A simple parity-check code is a single-bit error-detecting code in which n = k + 1.

9 Example Let us look at some transmission scenarios. Assume the sender sends the dataword 1011. The codeword created from this dataword is 10111, which is sent to the receiver. We examine five cases: 1.No error occurs; the received codeword is 10111. The syndrome is 0. The dataword 1011 is created. 2.One single-bit error changes a1. The received codeword is 10011. The syndrome is 1. No dataword is created. 3.One single-bit error changes r0. The received codeword is 10110. The syndrome is 1. No dataword is created.

10 Example (contd.) 4. An error changes r0 and a second error changes a3. The received codeword is 00110. The syndrome is 0. The dataword 0011 is created at the receiver. Note that here the dataword is wrongly created due to the syndrome value. 5. Three bits—a3, a2, and a1—are changed by errors. The received codeword is 01011. The syndrome is 1. The dataword is not created. This shows that the simple parity check, guaranteed to detect one single error, can also find any odd number of errors.

11 Performance A Simple parity check can detect all single-bit errors. It can detect burst errors only if the total number of errors in each data unit is odd.

12 Two-dimensional Parity-check Code

13 Two-Dimensional Parity 01000111 01100011 01101111 01100000 10010011 01101100 11010100 0 1 1 0 1 1

14 Performance 2D parity check increases the likelihood of detecting burst errors. As we have seen in the example given in the previous slide, a redundancy of n bits can easily detect a burst error of n bits. There is, however, one pattern of errors that remains un-detectable. If 2 bits in one data unit are damaged and 2 bits in exactly in the same positions in another data unit are also damaged, the checker will not detect an error.

15 Data Link Layer Topics to Cover Error Detection and Correction Data Link Control and Protocols Multiple Access Local Area Networks Wireless LANs

16 Data Link Layer

17 Error Correction 1.By retransmission – flow and error control protocols 2.Forward Error Correction (FEC) – require more redundancy bits – should locate the invalid bit or bits – n-bit code word contains m data bits + r redundancy bits n=m+r – m+r+1 bits discoverable by r bits – 2 r >=m+r+1

18 Data and redundancy bits Number of data bits m Number of redundancy bits r Total bits m + r 1 23 2 35 3 36 4 37 5 49 6 410 7 411

19 Hamming Code Hamming codes provide for FEC using a “Block Parity” – i.e, instead of one parity bit send a block of parity bits Allows correction of single bit errors This is accomplished by using more than one parity bit Each computed on different combination of bits in the data

20 Hamming code (Contd.)

21 Positions of Redundancy Bits

22 Redundancy Bits Calculation

23 Example

24 Error Correction using Hamming Code

25 Burst Error Correction

26 Hamming Distance The Hamming distance between two words is the number of differences between corresponding bits. Let us find the Hamming distance between two pairs of words. 1. The Hamming distance d(000, 011) is 2 because 2. The Hamming distance d(10101, 11110) is 3 because

27 To guarantee the detection of up to s errors in all cases, the minimum Hamming distance in a block code must be d min = s + 1. Note

28 Example

29 To guarantee correction of up to t errors in all cases, the minimum Hamming distance in a block code must be d min = 2t + 1. Note

30 A code scheme has a Hamming distance d min = 4. What is the error detection and correction capability of this scheme? Solution This code guarantees the detection of up to three errors (s = 3), but it can correct up to one error. In other words, if this code is used for error correction, part of its capability is wasted. Error correction codes need to have an odd minimum distance (3, 5, 7,... ). Example


Download ppt "Data Link Layer. Data Link Layer Topics to Cover Error Detection and Correction Data Link Control and Protocols Multiple Access Local Area Networks Wireless."

Similar presentations


Ads by Google