Newest Viewed Downloaded

2G1316 Data Communications and Computer Networks

2G1316 Data Communications and Computer Networks

Illustrations in this material are collected from Behrouz A Forouzan, Data Communications and Networking, 3rd edition, McGraw-Hill.

Outline

Introduction Flow control Stop and wait Sliding window Error detection Parity Checksums Cyclic redundancy check (CRC) Error handling Error correction Retransmission (Automatic Repeat Request ARQ) Stop and wait Go-back-N Selective reject (selective repeat)

Data Link Layer: Background

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)

Example (N = 3)

Sender Receiver ACK4 F0 Window 0 1 2 3 4 5 6 7 F1 F2 0 1 2 3 4 5 6 7 ACK2 0 1 2 3 4 5 6 7 F3 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 ACK3

Example (N = 6)

Sender Receiver ACK4 F0 Window 0-5 F1 F2 3-5 ACK2 3-7 F3 4-7 4-8 4-9 1-5 2-5 ACK3

Showing 1 - 20 of 62 items Details

Name: 
F4-1
Author: 
N/A
Company: 
N/A
Description: 
2G1316 Data Communications and Computer Networks
Tags: 
frame | receiv | bit | error | number | data | acknowledg | ttr
Created: 
9/15/2004 1:05:54 PM
Slides: 
62
Views: 
14
Downloads: 
1
Rating: 
0


> Comment



Share this presentation
|

Comments

Share this presentation:

|
Sitemap