Data Link Control
Flow Control
- flow control is a technique for assuring that a transmitting station does not overwhelm a receiving station with data
- two flow control mechanisms
- stop-and-wait
- also referred as "alternating bit" or "send and wait"
- sliding window
- stop-and-wait
Stop and Wait
- source transmits frame
- destination receives frame and replies with acknowledgement (ACK)
- source waits for ACK before sending next
- 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
Pros and Cons
- simple
- inefficient use of resources (low utilization, especially for systems with long propagation delays)
Sliding window
- allows multiple numbered frames to be in transit
- receiver has buffer W long
- 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
- giving max window size of up to
- 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
Go back N
- based on sliding window
- if no error, ACK as usual, indicating next frame expected
- 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 retransmitted that frame and all subsequent frames
- Receiver detects error in frame
- Receiver sens rejection
- Transmitter gets rejection-
- Transmitter transmits frame and all subsequent frames
- Frame lost and no additional frame sent
- Receiver gets nothing and returns neither acknowledgement nor rejection
- Transmitter times out and sends acknowledgement frame with bit set to 1
- Receiver interprets this as command which it acknowledgement with the number of the next frame it expects (frame )
- Transmitter then retransmits frame
- Receiver gets frame and sends acknowledgement () which is lost
- Acknowledgements are cumulative, so next acknowledgement () may arrive before transmitter times out on frame
- if transmitter times out, it sends acknowledgement with bit set as before
- this can be repeated a number of times before a reset procedure is initiated
- NOTE: either damaged or lost, for sender is the same since it can't reconstruct the acknowledgement frame to be able to "read" it
Error Control
- error control techniques use some or all of these mechanisms
- Automatic repeat request
- error detection
- positive acknowledge
- retransmission after timeout
- negative acknowledgement and retransmission
- Automatic repeat request
- Some versions of ARQ
- Stop-and-Wait ARQ
- Go-back-N ARQ
- Selective-reject ARQ
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
- saves bandwidth
- useful for satellite links with long propagation delays