DATA LINK LAYER
The main concept in the detection of error is redundancy, but to be able to detect or correct the errors some extra bits are needed and these bits are called the redundant bit that are added by the sender and removed by the receiver.
Error detection versus correction
In case of error detection one has to check whether an error has occurred or not the answer lies in a yes or no.
Whereas in case of error correction one needs to know the number of errors, location of errors, location from which the message has been received and also the error has to be fixed.
Forward error correction, retransmission
There are basically two main methods of error correction-:
- Forward error correction method
- Correction by retransmission
The forward error correction method is one in which the receiver tries to guess the message using the redundant bit.
Where as the correction by retransmission the receiver detects the occurrence of the error and asks the sender to resend the information.
In the modular arithmetic we use the integer having the range of 0 to n-1.
For example –
In case of modulo 2 arithmetic
- N is 2
- Use of 0 and 1 can be done only
- Implementation in xor only
In case of block coding message is divided into blocks where each block is of k bit size called as the data bit, here r is called as the redundant bit which is added to each block and here the resulting n bit blocks are called the code words where n= k+r.
Error detection by the block coding method
The detection of the error through the block coding can be done if and only if the following conditions can be achieved-:
- The receiver is able to find the list of all the valid code word.
- The original code word has been converted to an invalid code word.
Error correction using block coding
For error correction by this method the receiver needs to find the original code word that has been sent.
The hamming distance refers to the distance between two words of same size which is the difference between the corresponding bits.
As we know that any coding scheme needs the basic three parameters -:
- Code word size(n)
- Data word size (k)
The hamming distance in the block code should be -:
Minimum hamming distance
When dmin >s ,
Linear block code
Almost every block codes which is being used today belong to linear block code, basically a linear block code is one in which the x –or operation of two valid cross word creates another valid code .
These are the special linear block codes having extra property of that is if one crossword is shifted cyclically having left and right shift.
For eg- if 1011000 is cyclically having left shift then 1100010 is the result.
Cyclic redundancy check
It is known as the polynomial pole used in atm, hdlc ,lans.
It has two bits- D bit and the R bit, where D bit is called data bit and R bit is crc bit.
Polynomial method is thebest way to understand the cyclic codes and can be analyzed properly .
For eg- 1000011 can be represented as 1x^6+0x^5+0x^4+0x^3+0x^2+1x^1+1x^0.
questions and answers
1.what is data link layer?
ans- The Data Link Layer of OSI reference model provides service of error detection and control to higher layers.
2.what is data link control protocol?
ans-:A unidirectional protocol with no flow or error control, where data frames are traveling in only one direction, from the sender to the reciever.