Download presentation
Presentation is loading. Please wait.
1
Chapter 10 Data Link Control
Line Discipline Flow Control Error Control
2
Application Presentation Data Link Layer Session Transport Line discipline Network Flow Control Data Link Error Control Physical
3
Data Link Control Line Discipline Flow Control Error Control
Who should send now ? How much data may be sent ? How can error be corrected
4
Line Discipline Oversee the establishment of links.
Determine who should send. Makes sure that no device will transmit until the intended receiver is ready.
5
Line discipline ENQ / ACK Poll / Select
6
Enquiry/Acknowledgement (ENQ/ACK)
Used in peer-to-peer communication. Coordinates which device may start and whether or not the receiver is ready and enabled.
8
How it works Initiator transmits an ENQ frame.
Receiver answers either with an ACK frame if it is ready or a NAK frame if it is not. If neither ACK nor NAK is received within a certain time limit, the initiator sends a replacement. After three attempts have failed, it disconnects and retries again at another time.
9
If the response is ACK, the sender starts sending its data and the receiver responds to each successful reception by ACK frame. When finished, the sender sends an EOT frame
10
ENQ/ACK
11
Multipoint Discipline
12
Poll/Select All exchanges must be made through the primary device.
The primary is always the initiator of a session. Secondary stations are not allowed to transmit data unless asked. Polling: The primary wants to receive data, it asks the secondary stations if they have anything to send.
13
Selecting: The primary wants to send data, it asks the target secondary to get ready to receive.
Each secondary device has a unique address. If the transmission is from a secondary, the address indicates the originator.
14
Select
15
Poll
16
Flow Control A set of procedures that tells the sender how much data it can transmit before it must wait for an acknowledgement from the receiver. Two issues: The flow of data must not be allowed to overwhelm the receiver. As frames come in, they are acknowledged, either frame by frame or several frames at a time. If a frame arrives damaged, the receiver sends an error message (NAK) frame.
17
Flow control Stop and wait Sliding window Send one frame
at time Send several frames at a time
18
Stop and Wait
19
Stop and Wait The sender sends one frame and waits for an acknowledgement before sending the next frame. Advantage: simplicity. Disadvantage: inefficiency especially if the distance between the sender and the transmitter is long.
20
Sliding Window Several frames can be in transit at a time.
Window is a buffer with a maximum size of n-1. The window size provides an upper limit on the number of frames that can be transmitted before requiring an ACK. Frames are numbered modulo n.
21
Window
22
the right frame by frame, several frames at a time
Sender Sliding Window This wall moves to the right frame by frame, when a frame is sent This wall moves to the right the size of several frames at a time when ACK is received
23
Receiver Sliding Window
This wall moves to the right frame by frame, when a frame is received This wall moves to the right the size of several frames at a time when ACK is sent
24
Sliding Window Example
Data 0 Data 1 ACK 2 Data 2 ACK 3 Data 3 Data 4 Data 5 ACK 6
25
Sender Data 0 Data 1 ACK 2 Data 2 ACK 3 Data 3 Data 4 Data 5 ACK 6
26
Receiver Data 0 Data 1 ACK 2 Data 2 ACK 3 Data 3 Data 4 Data 5 ACK 6
27
Error Control Error control is based on Automatic Repeat Request (ARQ), which means retransmission of data in three cases: damaged frames, lost frames, and lost acknowledgement .
28
Error control Stop-and-wait ARQ Sliding window ARQ Go-back-n
Selective-reject
29
Stop-and-Wait ARQ Four features are added to the basic algorithm:
The sending device keeps a copy of the last frame transmitted until it receives and ACK. Both data frames and ACK frames are numbered alternatively 0 and 1. A data i frame is acknowledged by ACKi frame.
30
If an error is discovered in a data frame, A NAK frame is returned to tell the transmitter to retransmit the last frame sent. The sending device is equipped with a timer. If an expected ACK is not received within a certain time, the sender retransmits the last frame.
31
Damaged Frame
32
Lost Frame
33
Lost ACK
34
Sliding Window ARQ Three functions are needed to extend the algorithm:
The sending device keeps copies of all transmitted frames until they have been acknowledged. The receiver transmits NAK frames which carry the number of the damaged frames. The sending device is equipped with a timer to handle lost acknowledgements.
35
Go-Back-n ARQ If one frame is lost or damaged, all frames sent since the last frame acknowledged are retransmitted. NAK i tells the transmitter that all frames received before data i have arrived intact. It also indicates that data i has arrived damaged.
36
Go-Back-n Damaged Frame
37
Go-back-n Lost Frame
38
Go-back-n Lost ACK
39
Selective-Reject ARQ - Only the specific damaged or lost frame is retransmitted. It needs the following functions: The receiving device must contain a sorting logic to reorder out of sequence frames. The sender must contain a searching mechanism to select the requested frame.
40
A buffer in the transmitter must keep all previously received frames on hold until they are sorted.
ACK numbers refer to the frame received. Maximum window size is (n+1)/2.
41
Selective Reject
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.