Overview
Protocols without any form of acknowledgement have reliability problems, but stop-and-wait and automatic request protocols suffer from very poor utilization. The solution is a type of protocol commonly known as a sliding window protocol. Most reliable protocols are sliding window protocols of one type or another, and they are very similar in structure.
Objectives
- Understand the structure of sliding window protocols.
- Be able to objectively evaluate the alternative ways of implementing sliding window protocols.
- Be able to calculate the utilization of a sliding window protocol.
- Understand the properties of byte-based sliding window protocols.
Preparation
Read section 2.5 in the text and the
notes.
Inquiry
- Why do we need something like a sliding window protocol?
- What exactly is the window in an SWP?
- What are the components of an SWP and how do they affect the packet format?
- How does an SWP handle each of the four reliability issues? Is there any of them that it cannot resolve completely?
- What are the issues in choosing a window size?
- What are the issues in choosing a sequence number size?
- What are the ways that error recovery can be handled in an SWP?
- How do byte-based SWP's differ from buffer-based SWP's?
- How would you implement an SWP?
Knowledge, Comprehension & Problem Solving
Terms
- Acknowledgement number
- Byte-based SWP
- Flight
- Go-back-N
- Last ack received
- Last frame acknowledge
- Last frame sent
- Maximum sequence number
- Next frame expected
- Piggybacking
- Selective repeat
- Sequence number
- Window size
- Sequence number wraparound
Questions
- Using a finite-state automata description, describe the protocol that you use to get a can of soda pop out of a machine. Is the protocol complete and consistent, so that it always recovers from any error and ends in reasonable state.
- Suppose that you have an SWP which uses 3 bit sequence numbers and a window size of 4 on each end. Simulate the behavior of this protocol for 10 packets where the following things happen:
- Message 0 has no problems
- Message 1 is lost once.
- The ACK for message 2 is lost.
- Message 3 is lost twice.
- Message 5 is delayed and doesn't arrive until after message 7.
- The ACK for message 6 is delayed and doesn't arrive until after the ACK for message 8.
- Start with a sender and receiver with 4-bit sequence numbers and window sizes of 4.
- The sender has LFS = 9, LAR = 6 and the timer for frame 7 expires. What does it do?
- The receiver has NFE = 14, LAS = 12 and a frame with sequence number 15 arrives. What does it do?
- The receiver has NFE = 14, LAS = 12 and a frame with sequence number 0 arrives. What does it do?
- The sender has LFS = 9, LAR = 6 and an ACK for frame 8 arrives. What does it do?
- The sender has LFS = 9, LAR = 6 and an ACK for frame 10 arrives. What does it do?
- The receiver has NFE = 14, LAS = 12 and a frame with sequence number 13 arrives. What does it do?
Analysis, Synthesis & Evaluation
- What do you gain by adding a NAK to an SWP (If a frame arrives with an error in it or out of order, send a NAK so that the sender hears about the problem sooner)? What do you lose?
- What are the advantages and disadvantages of the 1-buffer receiver model?
- What is the difference between an SWP operating at the Data Link Layer and one operating at the Transport Layer?
- Why would you choose Go-Back-N error recovery instead of Selective Repeat and vice versa?
- Is it reasonable for the receiver in an SWP to use a window of a single message buffer even though the sender is using a larger window? Explain?
- What are the advantages and disadvantages of using byte-based SWP?