0% found this document useful (0 votes)
2 views

Data Link Layer

The Data Link Layer is the second layer of the OSI model, responsible for reliable communication over physical transmission mediums by organizing data into frames and managing error detection, correction, and flow control. It consists of two sublayers: Logical Link Control (LLC) and Media Access Control (MAC), which handle protocol identification and device access to the network medium, respectively. Key protocols include CSMA/CD for wired networks and CSMA/CA for wireless networks, each with distinct methods for managing data transmission and collision handling.

Uploaded by

Awais Rana
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Data Link Layer

The Data Link Layer is the second layer of the OSI model, responsible for reliable communication over physical transmission mediums by organizing data into frames and managing error detection, correction, and flow control. It consists of two sublayers: Logical Link Control (LLC) and Media Access Control (MAC), which handle protocol identification and device access to the network medium, respectively. Key protocols include CSMA/CD for wired networks and CSMA/CA for wireless networks, each with distinct methods for managing data transmission and collision handling.

Uploaded by

Awais Rana
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Data Link Layer

The Data Link Layer is the second layer of the OSI (Open Systems Interconnection) model. It plays a crucial role
in providing reliable communication over the physical transmission medium by organizing data into frames and
ensuring that errors and flow are controlled. This layer essentially acts as an intermediary between the raw
physical medium and higher-level network functions.

Overview of the Data Link Layer

The Data Link Layer is responsible for moving frames from one device to another over a physical link. It ensures
that the data is error-free by managing how devices on the same network segment communicate and share the
physical medium. This layer deals with framing, addressing, error detection, correction, and flow control.

The Data Link Layer can be divided into two sublayers:

1. Logical Link Control (LLC): Responsible for identifying network protocols, error detection, and flow
control.

2. Media Access Control (MAC): Handles how devices access the network medium and manage physical
addressing (MAC addresses).

Functions of the Data Link Layer

1. Framing: Data from the Network Layer is divided into frames (1500 bytes) , which are structured units of
data that the Data Link Layer can manage. Each frame includes a header, data payload, and a trailer
(with error-checking information).

2. Addressing: The Data Link Layer uses MAC (Media Access Control) addresses to identify devices on the
same local network. Each network interface card (NIC) is assigned a unique MAC address.

3. Error Detection and Correction:

o Error Detection: The Data Link Layer checks for errors in frames using methods like Cyclic
Redundancy Check (CRC) or parity bits. It detects transmission errors that might occur due to
interference or noise in the physical medium.

o Error Correction: Some protocols at this layer implement mechanisms to correct errors. If an
error is detected, the frame may be retransmitted.

4. Flow Control: This ensures that the sender does not overwhelm the receiver by sending data too
quickly. Flow control manages the pace at which frames are sent, ensuring that both sides can handle
the amount of data being transmitted.

5. Access Control: In networks where multiple devices share the same medium, such as Ethernet or Wi-Fi,
the Data Link Layer handles when and how devices can transmit data. This avoids collisions in a shared
medium.

6. Physical Addressing: While the Network Layer deals with logical addressing (e.g., IP addresses), the Data
Link Layer uses physical (MAC) addresses. When a frame is sent, the MAC address of both the sender
and the receiver is included in the frame header.
7. Medium Access Control: This is a protocol sublayer that determines how devices can access and share
the communication medium. In a broadcast medium (like Ethernet), it ensures that devices avoid
collisions when sending data simultaneously.

Key Protocols in the Data Link Layer

In networking, managing how multiple devices share the same communication channel is crucial for maintaining
smooth and efficient data transfer. There are two key protocols designed to handle this task are Carrier Sense
Multiple Access with Collision Detection (CSMA/CD) and Carrier Sense Multiple Access with Collision Avoidance
(CSMA/CA). CSMS/CD is used for wired networks where CSMA/CA used in wireless networks.

Carrier Sense Multiple Access with Collision Detection (CSMA/CD)

• When a frame is ready, the sender checks whether the transmission link is idle or busy. For this, it
continuously senses transmissions from other nodes.
• If it senses that the carrier is free, it sends the data. Otherwise, it waits for the link to become idle.
• Once sender transmits its frame on the link. CSMA/CD does not use an ‘acknowledgment’ system. It
checks for successful and unsuccessful transmissions through collision signals. During transmission, if a
collision signal is received by the node, transmission is stopped. The station then transmits a jam signal
onto the link and waits for random time intervals before it resends the frame. After some random time,
it again attempts to transfer the data and repeats the above process.
• If no collision was detected in propagation, the sender marks it successful frame transmission.
• Although CSMA/CS detects collisions, it does not have a mechanism to reduce the number of collisions.
Hence, it is not appropriate for large networks, as the performance degrades exponentially when more
stations are added.

Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA)

• When a frame is ready, the sender checks whether the channel is idle or busy.

• If the channel is not clear, the node starts to wait for a random amount of time before checking to see if
it is clear. This waiting period of time is known as the "back off time".

• If the channel is idle, it sends the frame.

• The sender then waits for acknowledgement from the receiver. If it receives the acknowledgement
before expiry of timer, it marks a successful transmission.

• Otherwise, it waits for a back-off time period and restarts the algorithm.

Difference between CSMA/CD and CSMA/CA


CSMA/CD CSMA/CA

Whereas CSMA / CA is effective before a


CSMA/CD is effective after a collision.
collision.

Whereas CSMA / CA is commonly used in


CSMA / CD is used in wired networks.
wireless networks.

It only reduces the data recovery Whereas CSMA/ CA minimizes the possibility
time. of collision.

CSMA/CD resends the data frame CSMA/CA first transmit the intent to send for
whenever a conflict occurs. data transmission.

CSMA / CD is used in 802.3 standard. While CSMA / CA is used in 802.11 standard.

You might also like