Error detection at data link layer is achieved by
Error detection at data link layer is achieved by cyclic redundancy codes.
Whenever a message is transmitted, it may get scrambled by noise or data may get corrupted. To avoid this, we use error-detecting codes which are additional data added to a given digital message to help us detect if any error has occurred during transmission of the message.
Cyclic redundancy codes:-
1) Unlike checksum scheme, which is based on addition, CRC is based on binary division.
2) In CRC, a sequence of redundant bits, called cyclic redundancy check bits, are appended to the end of data unit so that the resulting data unit becomes exactly divisible by a second, predetermined binary number.
3)At the destination, the incoming data unit is divided by the same number. If at this step there is no remainder, the data unit is assumed to be correct and is therefore accepted.
4) A remainder indicates that the data unit has been damaged in transit and therefore must be rejected.