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

Data Link Layer.pptx-1

The Data Link Layer is the second layer of the OSI model, responsible for reliable data transmission between devices, error handling, and flow control. Key functions include framing, which organizes data into frames, and flow control methods like Stop-and-Wait and Sliding Window, which manage data transmission rates to prevent congestion. Sliding Window protocols, such as Go-Back-N and Selective Repeat, allow multiple frames to be sent before acknowledgment, improving efficiency but introducing complexity in error handling.

Uploaded by

soniapunia990
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)
3 views

Data Link Layer.pptx-1

The Data Link Layer is the second layer of the OSI model, responsible for reliable data transmission between devices, error handling, and flow control. Key functions include framing, which organizes data into frames, and flow control methods like Stop-and-Wait and Sliding Window, which manage data transmission rates to prevent congestion. Sliding Window protocols, such as Go-Back-N and Selective Repeat, allow multiple frames to be sent before acknowledgment, improving efficiency but introducing complexity in error handling.

Uploaded by

soniapunia990
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:

Framing, Flow
Control
Minakshi Sharma
• The Data Link Layer is the second layer
in the OSI (Open Systems

Data Interconnection) model,


• responsible for ensuring reliable
Link transmission of data across a physical link

Layer between two devices.


• It handles errors and controls data flow
between devices.
Key functions
Framing Error Control Medium Access Control
Flow Control:
• is the process of • The Data Link (MAC)
dividing data into is a technique used Layer is • The MAC (Medium Access
manageable units to manage the rate responsible for Control) sublayer of the Data
called frames of data
before transmission detecting and Link Layer manages access to
the shared transmission
transmission over between two correcting errors medium, ensuring that multiple
the network. devices to prevent that may occur devices can transmit without
congestion or during collisions.
overflow of data at
the receiver. transmission.
is the process of dividing data into manageable units called frames before transmission
over the network.
Framing • A frame typically contains the following:
• Header: Contains control information (such as source and destination addresses).
• Payload (Data): The actual data being transmitted.
• Trailer: Often used for error checking and detection (like CRC )

•Why is framing important?


•It marks the beginning and end of the transmitted data, allowing the
receiver to distinguish between different frames of data.
•It also helps in organizing and managing how data is sent and received,
especially in error-prone environments.
•Frames allow better synchronization and error detection mechanisms,
ensuring that data reaches its destination correctly.
The primary purpose of flow control is to
ensure that the sender does not overwhelm
the receiver with too much data at once.
Flow control can help prevent data loss,
Flow delay, or the need for retransmission due to
Control congestion or insufficient processing
capability at the receiver.
•Stop-and-Wait: After sending one frame, the sender waits for an
acknowledgment from the receiver before sending the next one.
Flow control This method can be slow but is simple and effective. used in
Connection-oriented communication and noiseless channels.
methods:
•Sliding Window: The sender can send multiple frames before
receiving an acknowledgment. The receiver sends
acknowledgments for a range of frames, allowing for continuous
data flow. This method improves efficiency over Stop-and-Wait.it
works in noisy channels
Stop-and-Wait Protocol Sender Receiver
Advantages
The main advantage of stop & wait
protocols is their accuracy. Data p
The next frame is transmitted only acket
when the first frame is
acknowledged. So there is no
chance of the frame being lost.
Drawbacks Acknowledg
it is inefficient. ement
It makes the transmission process
slow.
An individual frame travels from
source to destination in this Data p
acket lo
method, and a single st
acknowledgement travels from
destination to source.
As a result, each frame sent and
Ack
received uses the entire time Negative
needed to traverse the link.
Moreover, if two devices are a Data packet
distance apart, a lot of time is
wasted waiting for ACKs leading to
an increase in total transmission
time. Ack Lost
How it works:
•The receiver may indicate a buffer size (amount of memory available for
incoming data). The sender is then responsible for ensuring that no more data
Sliding is sent than the receiver can handle.
Window Window Size:
•The window size is the number of frames or packets that can be sent before
•The sender can send receiving an acknowledgment.
multiple frames before •In the sliding window protocol, both the sender and receiver maintain a
receiving an "window" of frames that are being transmitted.
acknowledgment. •The window "slides" across the sequence of frames, allowing the sender to
•The receiver sends send more data while waiting for acknowledgments.
acknowledgments for a •Sender Window:
range of frames, allowing for •The sender window controls how many frames can be sent before
continuous data flow. receiving an acknowledgment. It determines how much data the
• This method improves sender is allowed to transmit without waiting.
efficiency over •The sender keeps track of the frames that have been sent and waits for
Stop-and-Wait. acknowledgments before sending more.
•Receiver Window:
•The receiver window tells the sender how many frames it is capable of
receiving at a time without becoming overwhelmed.
•It ensures that the receiver has sufficient buffer space to handle
incoming data.
Types of Sliding Window Protocols
1.Go-Back-N ARQ (Automatic Repeat reQuest):
1. In this protocol, the sender can send several frames (N frames) without waiting for an
acknowledgment, but the receiver only expects frames in the correct order.
2. If a frame is lost or an error occurs, all subsequent frames after the lost one need to be
retransmitted.
3. The receiver does not accept out-of-order frames and will discard any frame received
out of order.

2. Selective Repeat ARQ:


1. In Selective Repeat, the sender can also send multiple frames before receiving an
acknowledgment, but the receiver can accept frames out of order.
2. If a frame is lost or an error occurs, only that specific frame is retransmitted (not all frames
after it, like in Go-Back-N).
3. The receiver uses the sequence number to identify missing or erroneous frames and requests
only those to be retransmitted.
Example of Sliding Window

Scenario: Go-Back-N Protocol


Assume the sender's window size is 4 and there are 10 frames to be sent. The frames
are numbered 0 to 9.
•Window size = 4: The sender can transmit frames 0, 1, 2, and 3.
•The sender waits for an acknowledgment of frame 0 before sliding the window.
•When the sender gets an acknowledgment for frame 0, it slides the window to include
frames 1, 2, 3, and 4.
•This process continues until all frames are sent.
If frame 2 is lost or corrupted, the receiver will not acknowledge it.

The sender will then have to resend frame 2 (and all frames after it in Go-Back-N).

In contrast, Selective Repeat would only require the retransmission of frame 2


without affecting the other frames.
Advantages Disadvantages
1. Increased Efficiency: By
sending multiple frames Complexity: The protocol,
without waiting for each especially in Selective
acknowledgment, the protocol Repeat, requires more
utilizes the bandwidth more
effectively, resulting in higher complex mechanisms for
Sliding throughput. tracking and managing
sequence numbers and
Window 2. Reduced Latency: The sliding
window helps reduce idle time acknowledgments.
because the sender doesn't Error Handling: In
have to wait for each individual
acknowledgment. Go-Back-N, if one frame is
lost, all subsequent frames
3. Flow Control: It helps manage need to be resent, which can
the flow of data, ensuring that
the receiver isn’t overwhelmed be inefficient in cases of high
by too many frames. packet loss.
Refernce
https://www.google.com/imgres?q=sliding%20window%20protocol%20go%20back&imgurl=https%3A%2F%2Ftechdifferences.com%2Fwp-content%2Fuploads%2F2016%2F05%2FGo-Back-N.jpg&imgrefurl=https%3A%2F%2Ftechdifference
s.com%2Fdifference-between-go-back-n-and-selective-repeat-protocol.html&docid=rAB3VNDpgVyL4M&tbnid=g9OIdxt3Jac0dM&vet=12ahUKEwiyqInm28eMAxUsWGwGHb0ACKkQM3oECFsQAA..i&w=500&h=362&hcb=2&ved=2ahUKEwiy
qInm28eMAxUsWGwGHb0ACKkQM3oECFsQAA

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy