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

Ece 3115

The document discusses data link layer protocols and flow control. It describes how flow control ensures a transmitter does not overflow the receiver's buffer. Two common flow control protocols are described: stop-and-wait and sliding window. Stop-and-wait allows transmission of one frame at a time, while sliding window allows transmitting multiple frames simultaneously through the use of sequence numbers and a sending window. The document analyzes the efficiency of each approach.

Uploaded by

Jobair Al Nahian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views

Ece 3115

The document discusses data link layer protocols and flow control. It describes how flow control ensures a transmitter does not overflow the receiver's buffer. Two common flow control protocols are described: stop-and-wait and sliding window. Stop-and-wait allows transmission of one frame at a time, while sliding window allows transmitting multiple frames simultaneously through the use of sequence numbers and a sending window. The document analyzes the efficiency of each approach.

Uploaded by

Jobair Al Nahian
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 26

Data Link Control

Objectives
 Data Link Layer Protocol
o Flow Control
Link Layer Services

 Frame synchronization
 Flow Control
 Error control
 Addressing
 Control and data on same link
 Link management
Link Layer Services

Frame synchronization
 Flow Control
 Error Detection
 Error Correction
 Addressing
 Control and data on same link
 Link management
Framing
 Frames are the packets of information at the Data Link Layer
 Frames contain
– Data
– Source address information
– Destination address information
Framing
 Frames are the packets of information at the Data Link Layer
 Frames contain
– Data
– Source address information
– Destination address information

Figure: A frame in a character-oriented protocol

Figure: A frame in a bit-oriented protocol


Link Layer Services

 Framing

Flow Control
 Error Detection
 Error Correction
 Control and data on same link
 Link management
Flow Control

 Flow Control is a technique for speed-matching of transmitter and


receiver.
 Flow control ensures that a transmitting station does not overflow a
receiving station with data.
 We will discuss two protocols for flow control:
o Stop-and-Wait
o Sliding Window
Frame Transmission

Error free transmission Transmission with Errors and Losses


Flow Control

 Flow Control is a technique for speed-matching of transmitter and


receiver.
 Flow control ensures that a transmitting station does not overflow a
receiving station with data.
 We will discuss two protocols for flow control:

o Stop-and-Wait
o Sliding Window
Stop-and-Wait

 Simplest form of flow control


 In Stop-and-Wait flow control, the receiver indicates its readiness to
receive data for each frame.
 The sender waits for an acknowledgment after every frame it sends.
Only when an acknowledgment has been received then the next frame is
sent.
 Operations:
1. Sender: Transmits a single frame
2. Receiver: After receiving Transmits acknowledgment (ACK)
3. If ACK is received by the sender the Goto 1; otherwise wait
Stop-and-Wait

Here Data and


ACK Both are
Frame

Sender waits for ACK after each frame transmission


Drawbacks of Stop-and-Wait Flow control

 Only one frame can be in transmission at a time.


 This leads to inefficiency if propagation delay is much longer than the
transmission delay.
 Inefficient for high data rates or long distance between sender and
receiver.
Drawbacks of Stop-and-Wait Flow control
Transmission delay: Propagation delay:
• R=link bandwidth (bps) • d = length of physical link
• L=packet length (bits) • s = propagation speed in medium
• time to send bits into link Tf = L/R • propagation delay a = d/s
Link Utilization
Link Utilization Factor
 Assume total processing and ACK time is negligible.

 Total time for a frame = Tf+2a ; where a is the propagation time and

Tf is the frame transmission time.

 Link efficiency U = frame transmission time/ total time

 Therefore U = Tf/(Tf+2a)

 If Tf=1 then U=1/(1+2a)


Flow Control

 Flow Control is a technique for speed-matching of transmitter and


receiver.
 Flow control ensures that a transmitting station does not overflow a
receiving station with data.
 We will discuss two protocols for flow control:
o Stop-and-Wait

oSliding Window
Sliding Window

 Allows transmission of multiple frames


 Assigns each frame a k-bit sequence number
 Range of sequence number is [0..2^k-1], i.e.,
frames are counted modulo 2^k
Operation of Sliding Window

 Sending Window:
o At any instant, the sender is permitted to send frames with sequence
numbers in a certain range (the sending window).
Operation of Sliding Window

 Receiving Window:
o The receiver maintains a receiving window corresponding to the
sequence numbers of frames that are accepted.
Operation of Sliding Window

 How is “flow control” achieved?


o Receiver can control the size of the sending window
o By limiting the size of the sending window data flow from sender to
receiver can be limited
 Interpretation of ACK message:
o Receiver acknowledges all packets it has received by sending an ACK
using the expected frame sequence number
Operation of Sliding Window example
Operation of Sliding Window example
Analysis of Sliding Window example
 If the window size is sufficiently large the sender can continuously
transmit frames

 W > 2a+1: Sender can transmit continuously

normalized efficiency =1

 W < 2a+1: Sender can transmit W frames every 2a+1 time units

normalized efficiency = W/(1+2a)


Operation of Sliding Window

 Piggybacking: If two stations exchange data, each needs to maintain


two windows, one for transmit and one for receive, and each side needs to
send the data and acknowledgments to the other.

 Each data frame includes a field that holds the sequence number of that
frame plus a field that holds the sequence number used for
acknowledgment
References
[1] William Stallings, Data and Computer Communications, Prentice Hall, New
Jersey, 6th ed, 2000, ISBN 0-13-086388-2.
[2] James F. Kurose and Keith W. Ross, Computer Networking A Top-Down
Approach Featuring the Internet, …………………………….

You might also like