0% found this document useful (0 votes)
60 views3 pages

Computer Network No.4 (Data Link Layer) From APCOMS

The document discusses error detection techniques at the data link layer of computer networks. It describes common types of errors that can occur like single-bit and burst errors. It then explains various error detection mechanisms used at the data link layer including parity checks, cyclic redundancy checks (CRC), and checksums. Specific techniques covered are simple parity, two-dimensional parity, how CRC works by appending a remainder during binary division, and how checksums are generated by adding sections of a data unit.

Uploaded by

Naveed
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views3 pages

Computer Network No.4 (Data Link Layer) From APCOMS

The document discusses error detection techniques at the data link layer of computer networks. It describes common types of errors that can occur like single-bit and burst errors. It then explains various error detection mechanisms used at the data link layer including parity checks, cyclic redundancy checks (CRC), and checksums. Specific techniques covered are simple parity, two-dimensional parity, how CRC works by appending a remainder during binary division, and how checksums are generated by adding sections of a data unit.

Uploaded by

Naveed
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Faisal Amjad CPS 422

CPS 422 THE PERSPECTIVE


Computer Networks

DATA LINK LAYER DATA LINK LAYER

Packetizing Addressing

Media Access Control

Flow Control Error Control

Faisal Amjad CPS 422

Data can be corrupted during transmission, for ERROR DETECTION AND


reliable communication errors must be detected
and corrected CORRECTION

Faisal Amjad CPS 422 Faisal Amjad CPS 422

TYPES OF ERROR ERROR DETECTION


‰SINGLE – BIT ERRORS ‰One error detection mechanism could be
1-BIT ERROR
the transmission of all data units, TWICE.
0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 ‰Error detection uses the concept of
SENT RECEIVED “Redundancy”, which means adding extra
bits to data for detecting errors at dest.
‰BURST ERRORS
Length of Burst Error (5-bits)
‰The receiver puts the entire stream [data
SENT + redundancy] through a checking function
0 0 1 0 0 0 0 0 ‰If the bit stream passes checking criteria,
Bits corrupted by burst error the data unit is accepted and redundant
0 0 0 0 1 0 1 0 bits discarded.
RECEIVED
Faisal Amjad CPS 422 Faisal Amjad CPS 422

1
ERROR DETECTION (Contd…) Simple Parity Check
‰Types of error detection techniques ‰A redundant “Parity-bit” added to every
o Parity Check data unit
ƒ Simple ‰In “Even” parity, the total number of 1s
ƒ Two-Dimensional
including the parity bit must be even.
o Cyclic Redundancy Check (CRC)
o Checksum
‰In “Odd” parity, the total number of 1s
including the parity bit must be Odd

Faisal Amjad CPS 422 Faisal Amjad CPS 422

Original data

Two-Dimensional Parity Check 1 0 1 0 0 1 1 1 0 0 0 1 0 1 0 0 1 0 1 1 1 1 0 0 0 1 0 1

‰Block of bits is organized in a table (rows 1 0 1 0 0 1 1 0


and columns)

Row parity
1 0 0 0 1 0 1 1

‰Parity bits for each row and each column 0 0 1 0 1 1 1 0


calculated and appended to the end of 1 0 0 0 1 0 1 1
respective row/column. 1 0 0 0 1 0 0 0

Column parity

Transmitted data

1 0 1 0 0 1 1 0 1 0 0 0 1 0 1 1 0 0 1 0 1 1 1 0

1 0 0 0 1 0 1 1 1 0 0 0 1 0 0 0

Faisal Amjad CPS 422 Faisal Amjad CPS 422

Cyclic Redundancy Check (CRC) CRC – Process


‰A string of n 0s (zeros) appended to the data
‰Based on “binary Division” unit.
‰A sequence of redundant bits, called the CRC ‰The divisor is n+1 bits long.
Remainder or simply “CRC” is appended to the ‰Elongated data unit is divided by the divisor,
end of data unit. using binary division. Remainder of this process
‰Resulting data unit becomes exactly divisible is the CRC.
by a second, “predetermined” binary number ‰The CRC replaces the n 0s appended earlier at
called the “Divisor”. the beginning, and bit stream transmitted.
‰The CRC may consist of all 0s.
‰The receiver divides the received stream by
the Divisor. If remainder is all 0s, no error
occurred
Faisal Amjad CPS 422 Faisal Amjad CPS 422

2
CRC - Generation
Quotient
1 1 1 1 0 1
Pre-determined

CRC - Checking
Divisor 1 1 0 1 1 0 0 1 0 0 0 0 0 Extra 0s
1 1 0 1
1 0 0 0
1 1 0 1
1 0 1 0
1 1 0 1
Similar process – Remainder must be all 0s, for data to
1 1 1 0 be correct
1 1 0 1
0 1 1 0
0 0 0 0 CRC Divisor is represented as a polynomial e.g. in our
1 1 0 0 example its equivalent polynomial is x3 + x2 + 1 (1101)
1 1 0 1
0 0 1 Remainder / CRC

Original Data 1 0 0 1 0 0
Original Data + CRC 1 0 0 1 0 0 0 0 1

Faisal Amjad CPS 422 Faisal Amjad CPS 422

Faisal Amjad CPS 422

Checksum - Generation
CHECKSUM
‰Steps at Sender
Original data 1 0 1 0 1 0 0 0 0 1 1 1 0 0

o The unit is divided into k sections, each n bits long


Sender

1 0 1 0 1 0 0 1
o All sections are added using “1’s Compliment” 0 0 1 1 1 0 0 1

o The resulting sum is complemented which becomes 1 1 1 0 0 0 1 0 Sum

the “Checksum” 0 0 0 1 1 1 0 1 Checksum

o Checksum is transmitted with the data. Transmitted data


1 0 1 0 1 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 1
‰Steps at Receiver
o The unit is divided into k sections, each n bits long
o All sections are added using “1’s Compliment”
Receiver

1 0 1 0 1 0 0 1
o The resulting sum is complemented 0 0 1 1 1 0 0 1
0 0 0 1 1 1 0 1
o If the result is zero, data is accepted.
1 1 1 1 1 1 1 1 Sum
0 0 0 0 0 0 0 0 Complement
Faisal Amjad CPS 422

ASSIGNMENT # 2
‰Write a note on the performance of fol:
o Simple Parity check
o Two-Dimensional parity check
o CRC
o Checksum

Faisal Amjad CPS 422

You might also like