100 likes | 106 Views
Overview. All data can be corrupted, for reliable communications we must be able to detect and correct errors implemented at the data link and transport layers of the OSI model. Detection. Redundancy - adding extra bits that indicate information about the data without repeating it types
E N D
Overview • All data can be corrupted, for reliable communications we must be able to detect and correct errors • implemented at the data link and transport layers of the OSI model
Detection • Redundancy - adding extra bits that indicate information about the data without repeating it • types • vertical • longitudinal • cyclical • checksum
Error Detection • Vertical Redundancy Check(VRC, or simply, Parity Check) • Longitudinal Redundancy Check (LRC) • Cyclic Redundancy Check (CRC)
Parity Check (Vertical Redundancy Check) • Redundant bit is appended to each data unit • Evenparity: the bit is set to 1 if number of 1s in the data is an odd number, thus making total number of 1s transmitted an even number • Odd parity: the bit is set to 1 if number of 1s in the data is an even number, thus making total number of 1s transmitted an odd number
Longitudinal • Checks parity the same way as the vertical method but checks the data “horizontally” as well • data is organized into columns and rows, each column is checked and given a parity bit, LRC is attached to the end of the data • greatly increases the possibility of catching burst errors
Cyclical Redundancy Check(CRC) • Common in data link protocols (CRC) • data is binary divided (divisor is predetermined) remainder is appended to the data • remainder is appended so that the data can be evenly divided by a second binary number • remainder is 1 bit less than the divisor
Checksum • Used in hardware and files • at the sender, the data is divided into equal chunks of the same length • the chunks are added together using one’s compliments so that the total is the same length as a chunk • the total is then complimented and the result is added to the data
Checksum con’t • The receiver chops the data up into the same size chunks and adds them using the one’s compliment • the total is summed with the checksum and if the result has a compliment that is all 0’s then the data is assumed to be O.K. • detects all odd and most even bit errors – can still have errors
Hamming Code • Redundancy bits do not have to come at the end of the data: • d d d r8 d d d r4 d r2 r1 • places a series of redundancy bits within the data, each r bit checks the parity on a different group of bits • r1: 1,3,5,7,9,11 • r2: 2,3,6,7,10, 11 • r4: 4,5,6,7 • r8: 8,9,10,11
Hamming Code • Receiver recalculates the VRC using the same bit sets and the parity (r) bits • it assembles the parity values into a binary number in order of position • r8, r4, r2, r1 • this binary number gives the position of the bit in error • multiple bit errors require much more overhead