0% found this document useful (0 votes)
10 views6 pages

Unit3 2 1

The Data Link Layer, the second layer of the OSI model, ensures reliable data transfer between connected nodes by organizing raw bits into structured data frames. It performs functions such as framing, addressing, error control, flow control, and access control, and includes sublayers like Logical Link Control (LLC) and Media Access Control (MAC). Common protocols include Ethernet and Wi-Fi, and various error detection and correction techniques like Parity Check, Checksum, CRC, and ARQ are employed to maintain data integrity during transmission.
Copyright
© © All Rights Reserved
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)
10 views6 pages

Unit3 2 1

The Data Link Layer, the second layer of the OSI model, ensures reliable data transfer between connected nodes by organizing raw bits into structured data frames. It performs functions such as framing, addressing, error control, flow control, and access control, and includes sublayers like Logical Link Control (LLC) and Media Access Control (MAC). Common protocols include Ethernet and Wi-Fi, and various error detection and correction techniques like Parity Check, Checksum, CRC, and ARQ are employed to maintain data integrity during transmission.
Copyright
© © All Rights Reserved
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/ 6

Data Link Layer Functions & Protocol

The Data Link Layer is the second layer in the OSI model, responsible for ensuring reliable data
transfer between directly connected nodes in a network. It bridges the Physical Layer (Layer 1) and
the Network Layer (Layer 3), organizing raw bits into structured data frames for error-free
transmission.

Func ons of the Data Link Layer


1. Framing:
 Converts raw data from the Network Layer into frames for transmission.
 Adds headers and trailers to data packets to define boundaries.
2. Addressing:
 Uses physical (MAC) addresses to iden fy source and des na on devices within a local
network.
3. Error Control:
 Detects and corrects errors during data transmission using techniques like checksums
or CRC (Cyclic Redundancy Check).
4. Flow Control:
 Manages data flow to prevent sender devices from overwhelming receivers.
5. Access Control:
 Regulates access to the shared communica on medium, avoiding collisions when
mul ple devices transmit simultaneously.

Sublayers of the Data Link Layer


1. Logical Link Control (LLC):
 Handles error detec on, flow control, and communica on with higher layers.
 Provides acknowledgment and retransmission services.
2. Media Access Control (MAC):
 Manages access to the physical medium.
 Responsible for addressing and organizing data frames for transmission.

Common Protocols
 Ethernet: Widely used in wired LANs.
 Wi-Fi (IEEE 802.11): For wireless communica on.
 HDLC (High-Level Data Link Control): Used in point-to-point connec ons.
 Frame Relay: For WAN communica ons.
In summary, the Data Link Layer ensures smooth, error-free communica on between devices on the
same local network by organizing, addressing, and managing data frames efficiently

Error Detection & Error Correction Techniques :


Errors in data transmission can occur due to noise, interference, or hardware issues. These errors need
to be detected and corrected to ensure reliable communica on. Below is an overview of common
techniques used for error detec on and error correc on.
Error Detec on Techniques
Error detec on iden fies whether an error has occurred during data transmission but does not correct
it. Common methods include:
1. Parity Check: A Parity Check is a simple error detec on method used in data transmission and
storage. It works by adding an extra bit, called the parity bit, to a set of binary data. This parity
bit helps determine whether the transmi ed data has errors.
How Parity Check Works
1. Parity Bit Addi on:
 A parity bit is added to the binary data before transmission.
 The parity bit ensures that the total number of 1s in the data (including the parity bit) is
either even or odd, depending on the chosen scheme.
2. Types of Parity:
 Even Parity: The parity bit is set so that the total number of 1s in the data becomes
even.
 Odd Parity: The parity bit is set so that the total number of 1s in the data becomes odd.

3. Error Detec on:


 When the receiver gets the data, it checks whether the total number of 1s matches the
expected parity (even or odd).
 If there’s a mismatch, it indicates an error occurred during transmission.

Example
 Suppose we transmit 1010 using even parity:
 The number of 1s is 2 (already even), so the parity bit added is 0.
 Transmi ed data: 10100.
 At the receiver end, if one bit flips (e.g., 10110), the total number of 1s becomes odd,
signaling an error.
Advantages
 Simplicity: Easy to implement and requires minimal computa onal resources
 Low Cost: Only one extra bit is added per data unit
 Useful for detec ng single-bit errors.
Disadvantages
 Cannot detect mul ple-bit errors (e.g., if two bits flip, parity remains unchanged)
 Does not iden fy which specific bit is incorrect.

Applica ons
 Used in hardware systems like RAM and communica on protocols for basic error
detec on
2. Checksum: A checksum is an error detec on technique used in data communica on to verify
the accuracy and integrity of transmi ed data. It ensures that the data received matches the
data sent by detec ng errors caused during transmission.
How Checksum Works
i. Data Division:
 The sender divides the data into smaller blocks (segments), each containing a fixed
number of bits.
ii. Sum Calcula on:
 All the blocks are added together using binary addi on.
 If there is a carry generated during addi on, it is added back to the sum.
iii. Complementa on:
 The final sum is complemented (inverted) to generate the checksum value.
 This checksum is appended to the original data and sent to the receiver.
iv. Verifica on at Receiver:
 The receiver divides the received data (including the checksum) into blocks of equal
size.
 It adds all these blocks together, including the checksum, and complements the result.
 If the result is all zeros, it means there are no errors in transmission. Otherwise, an
error is detected.
Example
Suppose we want to send the following 8-bit data:
10101011 and 00110011.
 Step 1: Add the two blocks:
10101011+00110011=1110011010101011+00110011=11100110
 Step 2: Complement the sum:
Complement of 11100110=00011001Complement of 11100110=00011001
The checksum 00011001 is appended to the original data and sent.
 Step 3: At the receiver end, all blocks (including checksum) are added:
10101011+00110011+00011001=1111111110101011+00110011+00011001=11111111
 Step 4: Complement the result:
Complement of 11111111=00000000Complement of 11111111=00000000
Since the result is all zeros, no error occurred during transmission.
Advantages
 Simple to implement.
 Effec ve for detec ng single-bit or small burst errors.
 Requires minimal computa onal resources.
Disadvantages
 Cannot correct errors; only detects them.
 Less effec ve for detec ng mul ple-bit errors compared to more advanced techniques
like CRC (Cyclic Redundancy Check).
Applica ons
 Used in network protocols like TCP/IP, UDP, and IP.
 Commonly applied in file transfer protocols to ensure data integrity.
3. Cyclic Redundancy Check (CRC): Cyclic Redundancy Check (CRC) is a powerful error detec on
technique used in digital networks and storage devices to iden fy accidental changes in data
transmission. Here's a simplified explana on of how CRC works:
Basic Concept
1. Polynomial Division: CRC treats data as a large binary number and divides it by a
predetermined number called the "generator polynomial"24.
2. Remainder as Checksum: The remainder of this division becomes the CRC checksum3.
3. Appending Checksum: This checksum is added to the original data before transmission13.
How It Works
1. Sender's Side:
 The data is divided by the generator polynomial.
 The remainder (CRC) is appended to the original data.

2. Receiver's Side:
 The received data (including CRC) is divided by the same generator polynomial.
 If the remainder is zero, the data is considered error-free

Key Features
 Error Detec on: CRC is par cularly good at detec ng common errors caused by noise in
transmission channels
 Fixed Length: The CRC checksum has a fixed length, making it efficient for various data sizes
 Hardware Implementa on: CRC can be easily implemented in binary hardware

Advantages
 Simple to implement in hardware and so ware
 Effec ve in detec ng mul ple-bit errors
 Widely used in various network protocols and storage systems.

Example (Simplified)
Let's say we have data: 1010001101
Generator polynomial: 110101
1. Append zeros to data: 1010001101000
2. Divide by generator polynomial
3. Get remainder (e.g., 01110)
4. Append remainder to original data: 101000110101110
5. Transmit this new data
CRC is a crucial technique in ensuring data integrity in modern digital communica ons and storage
systems.
4. Automa c Repeat Request (ARQ): Automa c Repeat Request (ARQ) is an error-control
protocol used in data communica on to ensure reliable transmission. It works by detec ng
errors and automa cally reques ng retransmission of corrupted or lost data packets.
How ARQ Works
1. Acknowledgment (ACK):
 When the receiver successfully receives a data packet, it sends an acknowledgment
(ACK) back to the sender.
 This confirms that the packet was received correctly.

2. Nega ve Acknowledgment (NAK):


 If the receiver detects an error or does not receive the packet, it sends a nega ve
acknowledgment (NAK) to the sender.
 The sender then retransmits the corrupted or lost packet.

3. Timeout:
 If the sender does not receive an ACK within a predefined meout period, it assumes
the packet is lost and retransmits it.
4. Retransmission:
 The process con nues un l all packets are successfully received or a maximum number
of retransmissions is reached.
Types of ARQ Protocols
1. Stop-and-Wait ARQ:
 The sender transmits one frame at a me and waits for an ACK before sending the next
frame.
 Simple but inefficient for high-speed networks due to idle wai ng me.

2. Go-Back-N ARQ:
 The sender can transmit mul ple frames without wai ng for individual
acknowledgments.
 If an error occurs, all frames a er the erroneous one are retransmi ed.

3. Selec ve Repeat ARQ:


 Only the erroneous or lost frames are retransmi ed, while correctly received frames
are buffered.
 More efficient than Go-Back-N ARQ but requires more memory at the receiver.

Advantages
 Ensures reliable data transmission over unreliable channels.
 Reduces data corrup on and loss during communica on.

Disadvantages
 Retransmissions can increase network traffic and latency.
 Inefficient for channels with frequent errors or high-speed networks.
Applica ons
 Used in protocols like TCP/IP for reliable internet communica on.
 Found in wireless networks (e.g., IEEE 802.11), satellite communica on, streaming services,
and VoIP calls.

You might also like