SlideShare a Scribd company logo
14
Most read
15
Most read
24
Most read
UNIT-2
DATA LINK LAYER
DATA LINK LAYER
• Data Link Layer is second layer of OSI Layered Model. This
layer is one of the most complicated layers and has complex
functionalities and liabilities.
• Data link layer hides the details of underlying hardware and
represents itself to upper layer as the medium to communicate.
Data link layer works between two hosts which are directly
connected in some sense.
• Data link layer is responsible for converting data stream to
signals bit by bit and to send that over the underlying hardware
• The main responsibility of the Data Link Layer is to transfer the
datagram across an individual link.
Data link layer has two sub-layers:
Logical Link Control:
It deals with protocols, flow control, and
error control.
Media Access Control:
It deals with actual control of media.
Functionality of Data-link Layer
Data link layer does many tasks on behalf of upper layer.
These are:
Framing
Data-link layer takes packets from Network Layer and
encapsulates them into Frames. Then, it sends each frame
bit-by-bit on the hardware. At receiver end, data link layer
picks up signals from hardware and assembles them into
frames.
Addressing
Data-link layer provides layer-2 hardware addressing
mechanism. Hardware address is assumed to be unique on
the link. It is encoded into hardware at the time of
manufacturing.
Synchronization
When data frames are sent on the link, both machines
must be synchronized in order to transfer to take place.
Error Control
Sometimes signals may have encountered problem in
transition and the bits are flipped. These errors are detected
and attempted to recover actual data bits. It also provides
error reporting mechanism to the sender.
Flow Control
Stations on same link may have different speed or capacity.
Data-link layer ensures flow control that enables both
machine to exchange data on same speed.
Multi-Access
When host on the shared link tries to transfer the data, it has
a high probability of collision. Data-link layer provides
mechanism such as CSMA/CD to equip capability
of accessing a shared media among multiple Systems.
ERROR DETECTION AND CORRECTION
Data-link layer uses some error control mechanism to ensure
that frames (data bit streams) are transmitted with certain
level of accuracy. But to understand how errors is controlled,
it is essential to know what types of errors may occur.
Error Detection
When data is transmitted from one device to another device,
the system does not guarantee whether the data received by
the device is identical to the data transmitted by another
device. An Error is a situation when the message received at
the receiver end is not identical to the message transmitted.
Types Of Errors
Errors can be classified into two categories:
Single-Bit Error
Burst Error
Single-Bit Error:
The only one bit of a given data unit is changed from 1 to
0 or from 0 to 1.
In the above figure, the message which is sent is corrupted as single-
bit, i.e., 0 bit is changed to 1.
Single-Bit Error does not appear more likely in Serial Data
Transmission.
Single-Bit Error mainly occurs in Parallel Data Transmission. For
example, if eight wires are used to send the eight bits of a byte, if one
of the wire is noisy, then single-bit is corrupted per byte.
Burst Error:
The two or more bits are changed from 0 to 1 or from 1 to 0 is known
as Burst Error.
The Burst Error is determined from the first corrupted bit to the last
corrupted bit.
The duration of noise in Burst Error is more than the duration of noise
in Single-Bit.
Burst Errors are most likely to occurr in Serial Data Transmission.
The number of affected bits depends on the duration of the noise and
data rate
Error Detecting Techniques:
The most popular Error Detecting Techniques are:
• Single parity check
• Two-dimensional parity check
• Checksum
• Cyclic redundancy check
Single Parity Check
•Single Parity checking is the simple mechanism and inexpensive
to detect the errors.
•In this technique, a redundant bit is also known as a parity bit
which is appended at the end of the data unit so that the number
of 1s becomes even. Therefore, the total number of transmitted
bits would be 9 bits.
•If the number of 1s bits is odd, then parity bit 1 is appended and
if the number of 1s bits is even, then parity bit 0 is appended at
the end of the data unit.
•At the receiving end, the parity bit is calculated from the
received data bits and compared with the received parity bit.
•This technique generates the total number of 1s even, so it is
known as even-parity checking.
COMPUTER NETWORKS UNIT 2
Drawbacks Of Single Parity Checking
• It can only detect single-bit errors which are very
rare.
• If two bits are interchanged, then it cannot detect the
errors.
• Performance can be improved by using Two-Dimensional
Parity Check which organizes the data in the form of a table.
• Parity check bits are computed for each row, which is
equivalent to the single-parity check.
• In Two-Dimensional Parity check, a block of bits is divided
into rows, and the redundant row of bits is added to the whole
block.
• At the receiving end, the parity bits are compared with the
parity bits computed from the received data.
Two-Dimensional Parity Check
Drawbacks Of 2D Parity Check
• If two bits in one data unit are corrupted and two bits exactly
the same position in another data unit are also corrupted, then
2D Parity checker will not be able to detect the error.
• This technique cannot be used to detect the 4-bit errors or more
in some cases.
Cyclic Redundancy Check (CRC)
CRC is a redundancy error technique used to determine
the error.
Following are the steps used in CRC for error detection:
• In CRC technique, a string of n 0s is appended to the data unit, and
this n number is less than the number of bits in a predetermined
number, known as division which is n+1 bits.
• Secondly, the newly extended data is divided by a divisor using a
process is known as binary division. The remainder generated from
this division is known as CRC remainder.
• Thirdly, the CRC remainder replaces the appended 0s at the end of
the original data. This newly generated unit is sent to the receiver.
• The receiver receives the data followed by the CRC remainder. The
receiver will treat this whole unit as a single unit, and it is divided
by the same divisor that was used to find the CRC remainder.
• If the resultant of this division is zero which means that it has
no error, and the data is accepted.
• If the resultant of this division is not zero which means that
the data consists of an error. Therefore, the data is discarded.
CRC Generator
• A CRC generator uses a modulo-2 division. Firstly, three zeroes
are appended at the end of the data as the length of the divisor is
4 and we know that the length of the string 0s to be appended is
always one less than the length of the divisor.
• Now, the string becomes 11100000, and the resultant string is
divided by the divisor 1001.
• The remainder generated from the binary division is known as
CRC remainder. The generated value of the CRC remainder is
111.
• CRC remainder replaces the appended string of 0s at the end of
the data unit, and the final string would be 11100111 which is sent
across the network.
COMPUTER NETWORKS UNIT 2
CRC Checker
• The functionality of the CRC checker is similar to the CRC
generator.
• When the string 11100111 is received at the receiving end,
then CRC checker performs the modulo-2 division.
A string is divided by the same divisor, i.e., 1001.
• In this case, CRC checker generates the remainder of zero.
Therefore, the data is accepted.
COMPUTER NETWORKS UNIT 2
Error Correction
Error Correction codes are used to detect and correct the errors when data
is transmitted from the sender to the receiver.
Error Correction can be handled in two ways:
Backward error correction:
Once the error is discovered, the receiver requests the
sender to retransmit the entire data unit.
Forward error correction:
In this case, the receiver uses the error-correcting code which
automatically corrects the errors.
A single additional bit can detect the error, but cannot correct it.
Data Link Controls
Data Link Control is the service provided by the Data Link Layer to
provide reliable data transfer over the physical medium. For
example, In the half-duplex transmission mode, one device can only
transmit the data at a time. If both the devices at the end of the links
transmit the data simultaneously, they will collide and leads to the
loss of the information. The Data link layer provides the coordination
among the devices so that no collision occurs.
The Data link layer provides three functions:
• Line discipline
• Flow Control
• Error Control
COMPUTER NETWORKS UNIT 2

More Related Content

PDF
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
PDF
Image Steganography using MATLAB
PPTX
Cryptography and applications
PPTX
Mathematics of Asymmetric cryptography
PDF
CRYPTOGRAPHY AND NETWORK SECURITY
PPTX
Osi security architecture in network.pptx
PPTX
Biometric security using cryptography
PPT
Authentication Protocols
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
Image Steganography using MATLAB
Cryptography and applications
Mathematics of Asymmetric cryptography
CRYPTOGRAPHY AND NETWORK SECURITY
Osi security architecture in network.pptx
Biometric security using cryptography
Authentication Protocols

What's hot (20)

PDF
Email security presentation
PPT
Network security cryptography ppt
PPTX
About Steganography
PPT
Symmetric and Asymmetric Encryption.ppt
PDF
E-Mail Security Protocol - 1 Privacy Enhanced Mail (PEM) Protocol
PPTX
Steganography
ODP
Email security
PPTX
Steganography
PPTX
Architecture of pentium family
PPT
13 asymmetric key cryptography
PPT
Stegnography
PPTX
Cryptography and Information Security
PPTX
MD5 ALGORITHM.pptx
PPTX
Operation of 8255A
PPT
Steganography
PPTX
Windows CE
PPT
Classical Encryption Techniques
PDF
Steganography
PPTX
MAC-Message Authentication Codes
PPTX
SEMINAR ON staganography
Email security presentation
Network security cryptography ppt
About Steganography
Symmetric and Asymmetric Encryption.ppt
E-Mail Security Protocol - 1 Privacy Enhanced Mail (PEM) Protocol
Steganography
Email security
Steganography
Architecture of pentium family
13 asymmetric key cryptography
Stegnography
Cryptography and Information Security
MD5 ALGORITHM.pptx
Operation of 8255A
Steganography
Windows CE
Classical Encryption Techniques
Steganography
MAC-Message Authentication Codes
SEMINAR ON staganography
Ad

Similar to COMPUTER NETWORKS UNIT 2 (20)

PPTX
computer network-unit 2
PPTX
III_UNIT_ErrorCorrecting.pptx
PPT
Unit 2 [autosaved]
PDF
Error detection and correction
PPTX
Error Detection in Data link layer or Transport layer
PPTX
Error Detection and Correctiouionvn.pptx
PDF
اسس شبكات الفصل الثاني اسسس الشبكات الفصل الثاني.
DOCX
Osi model detail description
PPT
CODING.ppt
DOCX
data link layer to print
PDF
07 Data Link LayerError Control.pdf
PPTX
data link layer - Chapter 3
PPTX
ACchapter 3-Part I Data Communication.pptx
PPTX
MOD 5 - Data link layer.pptx. .
DOC
Report on data link layer
PPTX
Data Communications- Unit-4.pptx
PPTX
M3 Error detection & correction in data communication.pptx
PDF
IRJET- Resolve Error with Detection & Correction Techniques in Computer Networks
computer network-unit 2
III_UNIT_ErrorCorrecting.pptx
Unit 2 [autosaved]
Error detection and correction
Error Detection in Data link layer or Transport layer
Error Detection and Correctiouionvn.pptx
اسس شبكات الفصل الثاني اسسس الشبكات الفصل الثاني.
Osi model detail description
CODING.ppt
data link layer to print
07 Data Link LayerError Control.pdf
data link layer - Chapter 3
ACchapter 3-Part I Data Communication.pptx
MOD 5 - Data link layer.pptx. .
Report on data link layer
Data Communications- Unit-4.pptx
M3 Error detection & correction in data communication.pptx
IRJET- Resolve Error with Detection & Correction Techniques in Computer Networks
Ad

More from BON SECOURS COLLEGE FOR WOMEN (7)

PPTX
COMPUTER NETWORKS UNIT 1
PPT
COMPUTER NETWORKS UNIT 5
PPT
COMPUTER NETWORKS UNIT 4
PPTX
COMPUTER NETWORKS UNIT 3
PPTX
COMPUTER NETWORK - Chapter - 3
PPTX
Computer Network - Chapter 2
PPTX
COMPUTER NETWORK - Chapter 1
COMPUTER NETWORKS UNIT 1
COMPUTER NETWORKS UNIT 5
COMPUTER NETWORKS UNIT 4
COMPUTER NETWORKS UNIT 3
COMPUTER NETWORK - Chapter - 3
Computer Network - Chapter 2
COMPUTER NETWORK - Chapter 1

Recently uploaded (20)

PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Trump Administration's workforce development strategy
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Updated Idioms and Phrasal Verbs in English subject
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
What if we spent less time fighting change, and more time building what’s rig...
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
RMMM.pdf make it easy to upload and study
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Chinmaya Tiranga quiz Grand Finale.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
01-Introduction-to-Information-Management.pdf
Module 4: Burden of Disease Tutorial Slides S2 2025
Trump Administration's workforce development strategy
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Weekly quiz Compilation Jan -July 25.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Microbial diseases, their pathogenesis and prophylaxis
Updated Idioms and Phrasal Verbs in English subject
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
What if we spent less time fighting change, and more time building what’s rig...
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
RMMM.pdf make it easy to upload and study
Paper A Mock Exam 9_ Attempt review.pdf.
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx

COMPUTER NETWORKS UNIT 2

  • 2. DATA LINK LAYER • Data Link Layer is second layer of OSI Layered Model. This layer is one of the most complicated layers and has complex functionalities and liabilities. • Data link layer hides the details of underlying hardware and represents itself to upper layer as the medium to communicate. Data link layer works between two hosts which are directly connected in some sense. • Data link layer is responsible for converting data stream to signals bit by bit and to send that over the underlying hardware • The main responsibility of the Data Link Layer is to transfer the datagram across an individual link.
  • 3. Data link layer has two sub-layers: Logical Link Control: It deals with protocols, flow control, and error control. Media Access Control: It deals with actual control of media.
  • 4. Functionality of Data-link Layer Data link layer does many tasks on behalf of upper layer. These are: Framing Data-link layer takes packets from Network Layer and encapsulates them into Frames. Then, it sends each frame bit-by-bit on the hardware. At receiver end, data link layer picks up signals from hardware and assembles them into frames. Addressing Data-link layer provides layer-2 hardware addressing mechanism. Hardware address is assumed to be unique on the link. It is encoded into hardware at the time of manufacturing.
  • 5. Synchronization When data frames are sent on the link, both machines must be synchronized in order to transfer to take place. Error Control Sometimes signals may have encountered problem in transition and the bits are flipped. These errors are detected and attempted to recover actual data bits. It also provides error reporting mechanism to the sender. Flow Control Stations on same link may have different speed or capacity. Data-link layer ensures flow control that enables both machine to exchange data on same speed. Multi-Access When host on the shared link tries to transfer the data, it has a high probability of collision. Data-link layer provides mechanism such as CSMA/CD to equip capability of accessing a shared media among multiple Systems.
  • 6. ERROR DETECTION AND CORRECTION Data-link layer uses some error control mechanism to ensure that frames (data bit streams) are transmitted with certain level of accuracy. But to understand how errors is controlled, it is essential to know what types of errors may occur.
  • 7. Error Detection When data is transmitted from one device to another device, the system does not guarantee whether the data received by the device is identical to the data transmitted by another device. An Error is a situation when the message received at the receiver end is not identical to the message transmitted. Types Of Errors Errors can be classified into two categories: Single-Bit Error Burst Error
  • 8. Single-Bit Error: The only one bit of a given data unit is changed from 1 to 0 or from 0 to 1. In the above figure, the message which is sent is corrupted as single- bit, i.e., 0 bit is changed to 1. Single-Bit Error does not appear more likely in Serial Data Transmission. Single-Bit Error mainly occurs in Parallel Data Transmission. For example, if eight wires are used to send the eight bits of a byte, if one of the wire is noisy, then single-bit is corrupted per byte.
  • 9. Burst Error: The two or more bits are changed from 0 to 1 or from 1 to 0 is known as Burst Error. The Burst Error is determined from the first corrupted bit to the last corrupted bit. The duration of noise in Burst Error is more than the duration of noise in Single-Bit. Burst Errors are most likely to occurr in Serial Data Transmission. The number of affected bits depends on the duration of the noise and data rate
  • 10. Error Detecting Techniques: The most popular Error Detecting Techniques are: • Single parity check • Two-dimensional parity check • Checksum • Cyclic redundancy check
  • 11. Single Parity Check •Single Parity checking is the simple mechanism and inexpensive to detect the errors. •In this technique, a redundant bit is also known as a parity bit which is appended at the end of the data unit so that the number of 1s becomes even. Therefore, the total number of transmitted bits would be 9 bits. •If the number of 1s bits is odd, then parity bit 1 is appended and if the number of 1s bits is even, then parity bit 0 is appended at the end of the data unit. •At the receiving end, the parity bit is calculated from the received data bits and compared with the received parity bit. •This technique generates the total number of 1s even, so it is known as even-parity checking.
  • 13. Drawbacks Of Single Parity Checking • It can only detect single-bit errors which are very rare. • If two bits are interchanged, then it cannot detect the errors.
  • 14. • Performance can be improved by using Two-Dimensional Parity Check which organizes the data in the form of a table. • Parity check bits are computed for each row, which is equivalent to the single-parity check. • In Two-Dimensional Parity check, a block of bits is divided into rows, and the redundant row of bits is added to the whole block. • At the receiving end, the parity bits are compared with the parity bits computed from the received data. Two-Dimensional Parity Check
  • 15. Drawbacks Of 2D Parity Check • If two bits in one data unit are corrupted and two bits exactly the same position in another data unit are also corrupted, then 2D Parity checker will not be able to detect the error. • This technique cannot be used to detect the 4-bit errors or more in some cases.
  • 16. Cyclic Redundancy Check (CRC) CRC is a redundancy error technique used to determine the error. Following are the steps used in CRC for error detection: • In CRC technique, a string of n 0s is appended to the data unit, and this n number is less than the number of bits in a predetermined number, known as division which is n+1 bits. • Secondly, the newly extended data is divided by a divisor using a process is known as binary division. The remainder generated from this division is known as CRC remainder. • Thirdly, the CRC remainder replaces the appended 0s at the end of the original data. This newly generated unit is sent to the receiver. • The receiver receives the data followed by the CRC remainder. The receiver will treat this whole unit as a single unit, and it is divided by the same divisor that was used to find the CRC remainder.
  • 17. • If the resultant of this division is zero which means that it has no error, and the data is accepted. • If the resultant of this division is not zero which means that the data consists of an error. Therefore, the data is discarded.
  • 18. CRC Generator • A CRC generator uses a modulo-2 division. Firstly, three zeroes are appended at the end of the data as the length of the divisor is 4 and we know that the length of the string 0s to be appended is always one less than the length of the divisor. • Now, the string becomes 11100000, and the resultant string is divided by the divisor 1001. • The remainder generated from the binary division is known as CRC remainder. The generated value of the CRC remainder is 111. • CRC remainder replaces the appended string of 0s at the end of the data unit, and the final string would be 11100111 which is sent across the network.
  • 20. CRC Checker • The functionality of the CRC checker is similar to the CRC generator. • When the string 11100111 is received at the receiving end, then CRC checker performs the modulo-2 division. A string is divided by the same divisor, i.e., 1001. • In this case, CRC checker generates the remainder of zero. Therefore, the data is accepted.
  • 22. Error Correction Error Correction codes are used to detect and correct the errors when data is transmitted from the sender to the receiver. Error Correction can be handled in two ways: Backward error correction: Once the error is discovered, the receiver requests the sender to retransmit the entire data unit. Forward error correction: In this case, the receiver uses the error-correcting code which automatically corrects the errors. A single additional bit can detect the error, but cannot correct it.
  • 23. Data Link Controls Data Link Control is the service provided by the Data Link Layer to provide reliable data transfer over the physical medium. For example, In the half-duplex transmission mode, one device can only transmit the data at a time. If both the devices at the end of the links transmit the data simultaneously, they will collide and leads to the loss of the information. The Data link layer provides the coordination among the devices so that no collision occurs. The Data link layer provides three functions: • Line discipline • Flow Control • Error Control