Header—
address and control Data Trailer—
error control 8-bit
flag 8-bit
flag Physical layer provides means to transfer frames over a link:
Physical medium
Data transmission with electromagnetic waves
Line coding (low-pass channel)
Modulation (band-pass channel)
Synchronization
Remaining problems to be solved
Adapt sender to receiver rate
Errors in frames and lossage of frames should be detected and managed
...
Why Flow Control?
Problem: Sender can overload receiver
Frames arrive too fast
In many cases, the receiver is more complicated than the sender
Error detection, frame/packet analysis, adress lookup
Frames are stored in a buffer before they are processed
Receiver buffers can overflow and frames be lost
Prevent loss of frames
Combined mechanisms for flow control and error control
Based on retransmission
Flow Control
Control mechanisms
Stop and wait
Sliding window
(We don’t worry about frame errors and lossage for now)
Stop and Wait
Sender Receiver Time Frame Frame Acknowledgement Acknowledgement
Link Utilization
Sender Receiver Acknowledgement Frame Frame Acknowledgement Ttr Ttot Ttr U = Ttr /Ttot Ttot Transmission time
Link Utilization
Sender Receiver Acknowledgement Frame Frame Acknowledgement Transmission time Total time
Link Utilization
Sender Receiver Acknowledgement Frame Frame Acknowledgement Propagation time for frame Propagation time for acknowledgement
Utilization
How large part of the total time (Ttot) is used for transmission?
Ttr is the time to send a frame (transmission time)
Time between first and last bit of the frame
Given by the frame length (bits) divided by the link capacity (b/s)
Tpr is the propagation time of the link
Time to distribute a bit over the link
Given by the link length divided by the signal propagation speed
Approximately speed of light
Link is characterized by the parameter a= Tpr / Ttr
U = Ttr /Ttot = Ttr /( Ttr+ 2Tpr) = 1 / (1 + 2a)
Large a means poor link utilization
a
Parametern a
Förhållandet mellan länkens längd och ramens längd (mätt i meter)
Längden på en bit
Länkkapaciteten delad med ljushastigheten
Ljushastigheten är ca 2x108 m/s i optisk fiber
Exempel
1 kb/s: 200 km
1 Mb/s: 200 m
1 Gb/s: 20 cm
Link Utilization—Symmetrical Links
For symmetrical links:
Utilization
Tpr < Ttr (a < 1): max one frame fits on the link Tpr > Ttr (a >1): multiple frames on the link
Sliding Window
Sender Receiver Ttr Ttot Ttot Ttr Ttr Ttr Ttr Ttr
How Can Utilization Be Increased?
Send more than one frame before waiting for acknowledgement
Receiver must be able to buffer more than one frame
Need flow control mechanism
To prevent buffer overflow at the receiver
Sliding Window
Frame are numbered
Sequence number
The sender may send N frames before receiving an acknowledgment
N is the window size
The receiver acknowledges frames by sending the sequence number of the next expected frame
An acknowledgement means that the receiver is prepared to receive N more frames, starting from the sequence number specified in the acknowledgement
Optimization: acknowledge multiple frames with the same acknowledgement
How Does it Work?
0 1 2 3 4 5 6 7 Last frame sent Frames that may be sent Shrinks when frames are sent Grows when acknowledgements arrive At the sender (N = 4)
Comments