0% found this document useful (0 votes)
45 views13 pages

2-Data Link Layer and Media Access Control Revised

The Data Link Layer (DLL) is essential for reliable communication between network nodes, managing data framing, error detection, flow control, and media access control (MAC) protocols. It employs various error detection methods like parity bits, CRC, and Hamming Code, and flow control techniques such as Stop-and-Wait and Sliding Window protocols. Understanding Ethernet standards and switching techniques is critical for effective network design and implementation.

Uploaded by

ckmanish8
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)
45 views13 pages

2-Data Link Layer and Media Access Control Revised

The Data Link Layer (DLL) is essential for reliable communication between network nodes, managing data framing, error detection, flow control, and media access control (MAC) protocols. It employs various error detection methods like parity bits, CRC, and Hamming Code, and flow control techniques such as Stop-and-Wait and Sliding Window protocols. Understanding Ethernet standards and switching techniques is critical for effective network design and implementation.

Uploaded by

ckmanish8
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/ 13

Data Link Layer anD MeDia

access controL

The Data Link Layer (DLL) is a crucial component of the OSI


(Open Systems Interconnection) model, responsible for
providing reliable communication between adjacent
network nodes. It plays a pivotal role in managing how
data packets are framed, transmitted, and detected for
errors, ensuring that the data sent from one device
reaches another accurately and efficiently. This unit will
explore the functions of the data link layer, error detection
and correction methods, flow control protocols, media
access control (MAC) layer protocols, Ethernet standards,
and switching techniques.
1. Data Link Layer: Functions and Responsibilities
The primary functions of the Data Link Layer can be
categorized into several key areas:
a) Framing
Framing involves encapsulating network layer packets into
frames. A frame is a data packet at the Data Link Layer that
contains not only the payload (the actual data) but also
header and trailer information used for error checking and
addressing. This framing helps to identify the start and end
of each packet, facilitating the correct interpretation of the
transmitted data.
b) Error Detection and Correction
Data transmission is susceptible to errors caused by noise,
interference, or other factors. The Data Link Layer employs
various methods for error detection and correction to
ensure data integrity. The most common methods include:
Parity Bits: A simple error detection technique that adds
an extra bit (the parity bit) to the data. If the number of
1s in the data is odd, the parity bit is set to 1 to make it
even, and vice versa. However, parity checks can only
detect single-bit errors.
• Cyclic Redundancy Check (CRC): CRC is a more robust
error detection method that uses polynomial division to
detect changes to raw data. The sender calculates a CRC
value based on the data and appends it to the frame.
The receiver performs the same calculation and
compares the result with the received CRC to check for
errors.
• Hamming Code: Hamming Code is an error correction
technique that can detect and correct single-bit errors in
transmitted data. It adds redundancy bits at specific
positions in the data to enable the detection of errors
and their correction at the receiving end.
c) Flow Control
Flow control is crucial for managing the data transmission
rate between sender and receiver. It ensures that the
sender does not overwhelm the receiver with too much
data at once. Common flow control methods include:
• Stop-and-Wait Protocol: The sender transmits a single
frame and then waits for an acknowledgment (ACK)
from the receiver before sending the next frame. This
method is simple but can be inefficient over long
distances.
• Sliding Window Protocol: This method allows multiple
frames to be in transit before requiring an
acknowledgment. The sender maintains a "window" of
frames that can be sent without waiting for ACKs,
improving efficiency.
• Go-Back-N Protocol: The sender can send several frames
(up to a predetermined limit) before needing an
acknowledgment. If an error is detected in a frame, the
sender must go back and retransmit that frame and all
subsequent frames.
• Selective Repeat Protocol: Similar to Go-Back-N, but
only the erroneous frames are retransmitted, allowing
for more efficient use of bandwidth.

2. Media Access Control (MAC) Layer Protocols


The Media Access Control (MAC) layer is responsible for
controlling how devices on a network gain access to the
communication medium. This layer manages contention
for the shared medium, ensuring that devices can send and
receive data without interference. Key MAC layer protocols
include:
a) Channel Allocation
Channel allocation strategies determine how multiple devices
share the communication channel. Common techniques
include:
• Time Division Multiple Access (TDMA): Divides the
channel into time slots, allowing each device to transmit
during its allocated time.
• Frequency Division Multiple Access (FDMA): Divides the
channel into different frequency bands, allowing
simultaneous transmission by multiple devices.
b) ALOHA Protocol
The ALOHA protocol is one of the simplest random access
methods. In ALOHA, a device transmits data whenever it
has data to send. If a collision occurs (two devices
transmitting simultaneously), each device waits a random
amount of time before attempting to retransmit. There are
two variants:
• Pure ALOHA: Allows transmission at any time and is
more prone to collisions, leading to lower efficiency
(approx. 18.4%).
• Slotted ALOHA: Divides time into slots, allowing
transmission only at the beginning of each time slot,
improving efficiency (approx. 36.8%).

c) Carrier Sense Multiple Access (CSMA)


CSMA protocols require devices to listen to the channel
before transmitting. If the channel is clear, the device
sends data. If a collision occurs, devices wait a random
period before retrying. Variants include:
• CSMA/CD (Collision Detection): Used in wired networks
(e.g., Ethernet). Devices detect collisions while
transmitting and stop immediately to retry after a
random time.
• CSMA/CA (Collision Avoidance): Used in wireless
networks (e.g., Wi-Fi). Devices wait for a clear channel
and send a request to send (RTS) before actual data
transmission, reducing the chance of collision.
3. Ethernet: Overview of IEEE 802.3 Standards
Ethernet is the most widely used networking technology,
primarily for local area networks (LANs). The IEEE 802.3
standard defines the physical and data link layer
specifications for Ethernet.

a) Ethernet Frame Structure


An Ethernet frame consists of several fields:
1. Preamble: A sequence of bits that prepares devices for
data reception.
2. Destination MAC Address: Identifies the recipient device
on the network.
3. Source MAC Address: Identifies the sending device.
4. Type/Length: Indicates the type of data carried in the
payload or the length of the data.
5. Data/Payload: The actual data being transmitted (up to
1500 bytes).
6. Frame Check Sequence (FCS): A CRC value used for error
detection.
b) MAC Address
Each device on an Ethernet network has a unique Media
Access Control (MAC) address, a 48-bit identifier. MAC
addresses are used to ensure that data frames reach the
correct destination on the network.
c) Collision Detection
In a CSMA/CD network, devices listen for collisions while
transmitting. If a collision is detected, devices stop
transmitting and wait for a random backoff time before
attempting to resend the data. This approach helps
minimize the chance of repeated collisions and maintains
efficient network performance.
4. Switching Techniques
Switching is a fundamental concept in networking that
determines how data is routed through a network. There
are three primary switching techniques:

a) Circuit Switching
In circuit switching, a dedicated communication path is
established between two devices for the duration of the
transmission. This method is commonly used in traditional
telephone networks. Key characteristics include:
• Dedicated Path: The entire bandwidth of the channel is
reserved for the communication session.
• Fixed Bandwidth: Guarantees a specific amount of
bandwidth for the duration of the call.
• Delay: Initial setup time is required to establish the
connection before data transmission begins.
b) Packet Switching
Packet switching breaks data into smaller packets that are
sent independently over the network. Each packet can take
different paths to reach the destination, where they are
reassembled. Key characteristics include:
• No Dedicated Path: Packets share the network
resources, allowing for efficient use of bandwidth.
• Dynamic Routing: Each packet can be routed
independently based on network conditions.
• Variable Delay: Packets may arrive out of order,
requiring reassembly at the destination.
c) Message Switching
In message switching, entire messages are sent from the
source to the destination. Intermediate nodes store and
forward the messages to the next node in the network. Key
characteristics include:
• Store-and-Forward: Messages are temporarily stored at
each intermediate node before being forwarded.
• No Fixed Path: Messages can take different routes to
reach the destination.
• Variable Delay: Similar to packet switching, as messages
are queued at each node.
Conclusion
The Data Link Layer and Media Access Control protocols are
foundational components of networking that ensure
reliable communication between devices. Understanding
the functions of the Data Link Layer, error detection and
correction methods, flow control protocols, and MAC
protocols is essential for effective network design and
implementation. Furthermore, knowledge of Ethernet
standards and switching techniques is crucial for
developing efficient and robust networking solutions in
various environments. As networking technologies
continue to evolve, a solid grasp of these concepts will
remain vital for students and professionals in the field of
computer applications.

You might also like