Top Banner
Data link control
21

Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.

Dec 17, 2015

Download

Documents

Elmer Watson
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.

Data link control

Page 2: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.

Data Link Control

• Data Link Control – Flow Control

• how much data may sent

– Error Control • How can error be detected and corrected

Page 3: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.

Flow Control

• Flow control refers to a set of procedures used to restrict the amount of data the sender can send before wait for the ACK – Stop and Wait

• Send one frame at a time

– Sliding Window• send several frames at a time

Page 4: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.
Page 5: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.

Sliding Window• To keep tack of which frame have been transmitted and which received • In the sliding Window method of flow control , the sender can transmit several frames before needing an acknowledgment .• Frames from a sending station are numbered sequentially., • The sequence numbers range from 0 to 2m – 1• where m is the size of the sequence number field in bits.

Page 6: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.
Page 7: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.
Page 8: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.
Page 9: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.

Error Control

• Refers primarily to methods of error detection and retrasmisstion

• Automatic Repeat Request (ARq)– RETRAMISSION OF DATA IN THREE CASE

• damaged frame • Lost frame • Lost ack

Page 10: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.
Page 11: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.
Page 12: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.

ARQ Protocols

Page 13: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.

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.

• Sequence Numbers– the protocol specifies that frames need to be numbered.– For example, if we decide that the field is m bits long, the

sequence numbers start from 0, go to 2m - 1, and then are repeated.

• In Stop-and-Wait ARQ: we use sequence numbers to number the frames. The sequence numbers are based on modulo-2 arithmetic.

• In Stop-and-WaitARQ:the acknowledgment number always announces in modulo-2 arithmetic the sequence number of the next frame expected.

Page 14: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.

Range of sequence numbers(In stop and wait)

• Assume we have used x as a sequence number; we only need to use x + 1 after that. There is no need for x + 2.1. The frame arrives safe and sound at the receiver site; the

receiver sends an acknowledgment. The acknowledgment arrives at the sender site, causing the sender to send the next frame numbered x + 1.

2. If the acknowledgment is corrupted or lost. The sender resends the frame (numbered x) after the time-out. Note that the frame here is a duplicate. The receiver can recognize this fact because it expects frame x + I but frame x was received.

3. The frame is corrupted or never arrives at the receiver site; the sender resends the frame (numbered x) after the time-out.

Page 15: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.

Example

• Shows an example of Stop-and- Wait ARQ. Frame a 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 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.

Page 16: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.
Page 17: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.

Go back N ARQ

• To improve the efficiency of transmission , multiple frames must be in transition while waiting for acknowledgment.

• we keep a copy of these frames until the acknowledgments arrive .

• Sequence Numbers– Frames from a sending station are numbered

sequentially.– If the header of the frame allows m bits for the

sequence number, the sequence numbers range from 0 to 2m - 1

Page 18: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.

Sliding Window

• The sliding window is an abstract concept that defines the range of sequence numbers that is the concern of the sender and receiver.

• The range which is the concern of the sender is called the send sliding window.

• the range that is the concern of the receiver is called the receive sliding window

• The send window is an abstract concept defining an imaginarybox of size 2m - 1 with three variables: Sf Sn and Ssize

• The receive window is an abstract concept defining an imaginary box of size 1 with one single variable Rn.

• The receive window slideswhen a correct frame has arrived; sliding occurs one slot at a time.

Page 19: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.

Send Window for Go-Back-N ARQ

Page 20: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.

Receive window for Go-Back-N ARQ

Page 21: Data link control. Data Link Control –Flow Control how much data may sent –Error Control How can error be detected and corrected.

Selective Repeat Automatic Repeat Request

• In a noisy link a frame has a higher probability of damage, which means the resending of multiple frames.This resending uses up the bandwidth and slows down the transmission.

• There is another mechanism that does not resend N frames when just one frame is damaged; only the damaged frame is resent. This mechanism is called Selective RepeatARQ.