Presentation is loading. Please wait.

Presentation is loading. Please wait.

DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL.

Similar presentations


Presentation on theme: "DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL."— Presentation transcript:

1 DATA LINK CONTROL

2 DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL

3 FRAMING The data link layer needs to pack bits into frames, so that each frame is distinguishable from another.

4 A frame in a bit-oriented protocol

5 Flow control refers to a set of procedures used to restrict the amount of data that the sender can send before waiting for acknowledgment.

6 Error control in the data link layer is based on automatic repeat request, which is the retransmission of data.

7 Figure 1

8 NOISELESS CHANNELS Let us first assume we have an ideal channel in which no frames are lost, duplicated, or corrupted. We introduce two protocols for this type of channel. Simplest Protocol Stop-and-Wait Protocol Topics discussed in this section:

9 Simplest protocol  It is a unidirectional protocol in which data frames are traveling in one direction- from the sender to receiver. We assume that receiver can immediately handle the frames with the processing time that is small enough to be negligible.

10 Figure 3 shows an example of communication using this protocol. It is very simple. The sender sends a sequence of frames without even thinking about the receiver. To send three frames, three events occur at the sender site and three events at the receiver site. Example

11 Figure 3 Flow diagram

12 STOP AND WAIT protocol  If data frames arrive at the receiver site faster than they can be processed, the frames must be stored until their use. Normally receiver does not have enough storage space, especially if it is receiving data from many resources. This may result in discarding of frames.  To prevent this the receiver from becoming overburdened with frames, we need to tell the sender to slow down. there must be feedback from the receiver.  For this the protocol has been designed and it is know as stop and wait protocol.

13 Figure 5 shows an example of communication using this protocol. It is still very simple. The sender sends one frame and waits for feedback from the receiver. When the ACK arrives, the sender sends the next frame. Example

14 Figure 5 Flow diagram for Example 11.2

15 NOISY CHANNELS NOISY CHANNELS Although the Stop-and-Wait Protocol gives us an idea of how to add flow control to its predecessor, noiseless channels are nonexistent. We discuss three protocols in this section that use error control.  Stop-and-Wait Automatic Repeat Request(one bit sliding window protocol)  Sliding window protocols)  Go-Back-N Automatic Repeat Request  Selective Repeat Automatic Repeat Request Topics discussed in this section:

16 STOP AND WAIT ARQ  Error correction in Stop-and-Wait ARQ is done by keeping a copy of the sent frame and retransmitting of the frame when the timer expires.  In Stop-and-Wait ARQ, we use sequence numbers to number the frames.

17 Figure 7 shows an example of Stop-and-Wait ARQ. Frame 0 is sent and acknowledged. Frame 1 is lost and resent after the time-out. The resent frame 1 is acknowledged and the timer stops. Frame 0 is sent and acknowledged, but the acknowledgment is lost. The sender has no idea if the frame or the acknowledgment is lost, so after the time-out, it resends frame 0, which is acknowledged. Example

18 Figure 7 Flow diagram for example

19 DELAYS A positive acknowledgement protocol introduces a number of delays because it delays sending a new packet until it receives an acknowledgement for the previous packet.

20 SLIDING WINDOW To solve the problem, we use the sliding window approach to decouple transmissions from reception of acknowledgements.

21 SLIDING WINDOW APPROACH

22 SLIDING WINDOW EXAMPLE

23 KEY CONCEPTS OF SLIDING WINDOW  Every packet sent by the sender, must be acknowledged by the receiver. The sender maintains a timer for every packet sent, and any packet unacknowledged in a certain time, is resent.  The sender may send a whole window of packets before receiving an acknowledgement for the first packet in the window.  The Receiver advertises a window size that tells the sender how much data it can receive, in order for the sender not to fill up the receivers buffers.

24 GO-BACK-N ARQ PROTOCOL  Go-Back-N ARQ is a specific instance of sliding window Protocol, in which the sending process continues to send a number of frames specified by a window size even without receiving an ACK packet from the receiver.

25  Once the sender has sent all of the frames in its window, it will detect that all of the frames since the first lost frame are outstanding, and will go back to sequence number of the last ACK it received from the receiver process and fill its window starting with that frame and continue the process over again.frames frame  Go-Back-N ARQ is a more efficient use of a connection than Stop-and-wait ARQ, since unlike waiting for an acknowledgement for each packet, the connection is still being utilized as packets are being sent.Stop-and-wait ARQ

26 Drawback of Go-Back-N protocol  this method also results in sending frames multiple times -- if any frame was lost or damaged, or the ACK acknowledging them was lost or damaged, then that frame and all following frames in the window (even if they were received without error) will be re-sent. To avoid this, Selective Repeat ARQ can be used.

27 SELECTIVE REPEAT ARQ PROTOCOL  The receiver process keeps track of the sequence number of the earliest frame it has not received, and sends that number with every ACK it sends.frameACK  If a frame from the sender does not reach the receiver, the sender continues to send subsequent frames until it has emptied its window.frame frames  The receiver continues to fill its receiving window with the subsequent frames, replying each time with an ACK containing the sequence number of the earliest missing frame.framesframe  Once the sender has sent all the frames in its window, it re-sends the frame number given by the ACKs, and then continues where it left off.frame

28 At the receiver site we need to distinguish between the acceptance of a frame and its delivery to the network layer. At the second arrival, frame 2 arrives and is stored and marked, but it cannot be delivered because frame 1 is missing. At the next arrival, frame 3 arrives and is marked and stored, but still none of the frames can be delivered. Only at the last arrival, when finally a copy of frame 1 arrives, can frames 1, 2, and 3 be delivered to the network layer. There are two conditions for the delivery of frames to the network layer: First, a set of consecutive frames must have arrived. Second, the set starts from the beginning of the window. Example 11.8 (continued)

29 Flow diagram for Example


Download ppt "DATA LINK CONTROL. DATA LINK LAYER RESPONSIBILTIES  FRAMING  ERROR CONTROL  FLOW CONTROL."

Similar presentations


Ads by Google