0% found this document useful (0 votes)
10 views36 pages

Net - Lec. 5 - Fall 2024

The document outlines key concepts in Data Link Control, focusing on line discipline, flow control, and error control mechanisms. It discusses various flow control methods including Stop and Wait, Sliding Windows, and Go Back N, along with their advantages and disadvantages. Additionally, it covers error control techniques such as Automatic Repeat Request (ARQ) and Selective Reject, highlighting their operational principles and use cases.

Uploaded by

david1milad1982
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views36 pages

Net - Lec. 5 - Fall 2024

The document outlines key concepts in Data Link Control, focusing on line discipline, flow control, and error control mechanisms. It discusses various flow control methods including Stop and Wait, Sliding Windows, and Go Back N, along with their advantages and disadvantages. Additionally, it covers error control techniques such as Automatic Repeat Request (ARQ) and Selective Reject, highlighting their operational principles and use cases.

Uploaded by

david1milad1982
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Faculty of Engineering

Department of Electronics and Communications Engineering

Fall, 2024

COMPUTER NETWORKS

Lec. 5

Prof. Ahmed Salah EL-Din Mohamed Ali


Data Link Control

• Line Discipline
• Flow Control
• Error Control
Data Link Layer
ENQ/ACK
ENQ/ACK
Multipoint Discipline
Select
Poll
Model of Frame Transmission
Stop and Wait
 Source transmits frame.
 Destination receives frame and replies with
acknowledgement (ACK).
 Source waits for ACK before sending next
frame.
 Destination can stop flow by not send ACK.
 Works well for a few large frames.
 Stop and wait becomes inadequate if large
block of data is split into small frames.
Stop and Wait
Sliding Windows Flow Control
 Allows multiple numbered frames to be in transit.
 Receiver has buffer space for W frames.
 Transmitter sends up to W frames without ACK.
 ACK includes number of next frame expected.
 Sequence number is bounded by size of field (k),
 frames are numbered modulo 2k
 giving max window size of up to 2k - 1
 Receiver can ack frames without permitting further
transmission (Receive Not Ready).
 Must send a normal acknowledge to resume.
 If have full-duplex link, can piggyback ACKs.
Sliding Window
Sender Sliding Window
Receiver Sliding Window
Sliding Window Diagram
Sliding Window Example
Sender
Receiver
Error Control
 Detection and correction of errors such as:
 Lost frames.
 Damaged frames.

 Common techniques use:


 Error detection.
 Positive acknowledgment.
 Retransmission after timeout.
 Negative acknowledgement & retransmission.
Automatic Repeat Request
(ARQ)

 Collective name for such error control


mechanisms, including:
 Stop and wait.
 Go back N.
 Selective reject (selective retransmission).
Stop and Wait

 Source transmits single frame


 Wait for ACK
 If received frame damaged, discard it,
 Transmitter has timeout
 If no ACK within timeout, retransmit
 If ACK damaged, transmitter will not recognize it,
 Transmitter will retransmit the last frame.
 Receiver gets two copies of frame.
 Use alternate numbering: ACK 0 / ACK 1.
Stop and Wait

 Example with both


types of errors.

 Pros and cons:


 simple
 inefficient
Go Back N

 Based on sliding window.


 If no error, ACK as usual.
 Use window to control number of outstanding
frames.
 If error, reply with rejection,
 Discard that frame and all future frames until error
frame received correctly.
 Transmitter must go back and retransmit that frame
and all subsequent frames.
Go Back N - Handling
 Damaged Frame
 Error in frame i so receiver rejects frame i .
 Transmitter retransmits frames starting from i .

 Lost Frame
 Frame i lost and either,
• Transmitter sends i+1 and receiver gets frame i+1 out of
sequence and rejects frame i .
• Or transmitter times out and send ACK with P bit set
which receiver responds to with ACK i .
 Transmitter then retransmits frames starting from i .
Go Back N - Handling
 Damaged Acknowledgement
 Receiver gets frame i, sends ACK (i+1) which is lost
 ACKs are cumulative, so next ACK (i+n) may arrive before
transmitter times out on frame i.
 If transmitter times out, it sends ACK with P bit set.
 Can be repeated a number of times before a reset.
procedure is initiated.

 Damaged Rejection
 Reject for damaged frame is lost.
 Handled as for lost frame when transmitter times out.
Damaged Frame
Lost Frame
Lost ACK
Selective Reject

 Also called selective retransmission.


 Only rejected frames are retransmitted.
 Subsequent frames are accepted by the receiver
and buffered.
 Minimizes retransmission.
 Receiver must maintain large enough buffer.
 More complex logic in transmitter.
 Hence less widely used.
 Useful for satellite links with long propagation
delays.
Selective Reject
Go Back N
vs
Selective
Reject

You might also like