Data Link Protocol
1.stop-wait
Sender stops after sending a frame, waits for
Receiver receives a frame and returns a feedback
Sender waits until feedback to pass the next frame.
What if feedback lost it?
Sender will re-send the same frame after timeout, receiver receives duplicate frames, causing error
FIX: Each frame gives a sequence number,0-1-0-1-0-1 ...
Disadvantage: Low channel utilization, calculation formula see textbook P99
2. Sequential receive pipelining protocol
See the picture of Tananbaum book P254
In order to increase the utilization rate, the sender is allowed to send a lump of frame,receiver in the case of confiscation of feedback. by Seq Num in order, the order of the wrong direct throw away
Piggyback: In two-way transmission, feedback and receiver pass data bound to Sender
What if something went wrong in the middle of the frame? Can cause a lot of retransmission.
The buffer capacity of the go-back-n:receiver is only 1. That is, the wrong order is all thrown away
Improved: Selective-repeat (large buffer version of Go-back-n)
Receiver sent a strange Feedback:nak, indicating that the frame was wrong. Then ignore it, then receive the back. However, the frame from the dislocation after the first place in a buffer, not to the network layer.
Sender received Nak found that frame error, and then retransmission that frame.
Receiver receives that frame and gives it to the network layer, and then to a feedback, saying that I have received it in buffer without retransmission.
Sender knows and then the frame inside the buffer is transmitted again.
3.sliding-window protocol
If the seq num field has n bit, the SEQ Num range is 0--(2^n)-1,
Receiver has a buffer that can save 2^n frames.
In sender's Sliding-window, when the SEQ num conforms to the new frame from the network layer to enter the head, the head pointer + +. When the trailing frame is confirmed by receiver, the tail pointer + +.
Some of the previous protocol can be considered as a special case of Sliding-window. See Textbook P105
Data-link Layer Protocol