-
Simplex Protocols
-
Description
- Allows you to not to worry about directional loading of a network
- But without some for of ACK, traffic can be lost without the
sender's knowledge.
-
But with some form of ACK, the sender knows about the traffic.
- The ACK messages can consume a large amount
of bandwidth with every little return on the investment.
-
Unrestricted
- Send All and Wait
- No flow control for one-way communication
-
Assumptions
- Error free data lines
-
Receiver is never process limited
- Can always process anything it is sent
-
Process
- Sender immediately dumps any input
from the network layer to the plysical layer
and assumes it will get to the receiver.
-
Stop-and-Wait
-
Description
- Send part and Wait
- Limited (one-way) flow control that takes
into account the receiver's buffer size.
-
Assumptions
- Error free data lines
- Receive's buffer size is know and never changes.
-
Process
- Sender checks to see if it has an 'all-clear' to send,
and if so, immediately dumps input from the network
layer to the physical layer up to the receiver's buffer size.
- The sender then waits for the receiver to reset its 'all-clear' flag
and then, sends the next buffer full data.
-
Noisy channel
- Send part and a tag, wait for the tag
- A positive ACK with retransmission protocol
-
Assumptions
- Receiver can always ACK in sequence order.
-
Process
- Sender checks to see if it has an 'all-clear' to send, and if so,
it adds a seq number to the network layer data (packet or part of a packet)
and dumps it to the physical layer.
-
Sender waits for an ACK (with the correct seq number)
from the receiver.
- If it gets one, it increments the seq number and sends the
next packet (or part of packet).
- If it times out, it resends the seq number and packet.
-
Duplex Protocols
-
Description
- Forces you to consider directional loading.
- Allows you to save bandwidth by bundling the ACK with
the data of return messages.
- Frames are numbered modulo-n from 0 to n-1
-
Terminology
-
SWS
- Sender's Window Size
-
RWS
- Receiver's Window Size
-
ACK
- Acknowledgement
-
NAK
- Non-Acknowledgement
-
SEQ NO
- Sequnce Number
-
LFA
- Last frame Acknowledged
-
LAF
- Largest Acceptable Frame
-
LFR
- Last Frame Received
-
Sliding Window Protocol
-
Description
- Sender keeps copies of the transmitted frames until
all of them are acknowldeged.
- In addition to ACK frames, receiver also has an option of NAK frames,
if the data has been received damaged.
-
Sliding window is a continuous transmission mechanism,
both ACK and NAK frames must be numbered for identification.
- ACK frames carry the number of the next frame expected.
- Ex: ACK(5) tells sender that all frames upto
frame 5 are received.
- NAK frames carry the number of the damaged frame itself.
- Ex: If frame 4 and 5 are damaged, NAK(4) and NAK(5)
must be sent
- Requires to send data frames sequentially.
-
Window size is controlled by:
- Number of bits.
- Number of slots.
- Sender can use same number
or more than receiver.
- Window size = BW * RTT / Data Size
- Constraints on Window Size
- For n bits seq number; SWS + RWS <= 2^n
-
Protocols
-
One-Bit Protocol
- Description
- SWS = RWS = 1
- Both sender and receiver use a windows size of one.
- Assumptions
- No transmission latency.
- Advantages
- Simple
- Small SEQ NO size (1 bit)
- Disadvantages
- Both sides must be in lock step.
- i.e. A sends then B sends and then A sends...
- End up in sending a lot of dummy messages or
you wait around for the other side to have something
useful to send.
-
Go Back N
- Description
- Sender uses an N size window.
- Receiver use a window size one.
- SWS = N
RWS = 1
- The sender keeps transmitting until the number of
unacknowledged frames equals its window size, then
starts re-sending everything in the window.
- If one frame is lost or damaged, all frames sent since the LFA are re-transmitted.
- Assumptions
- A pipeline is a good idea.
- Continuing to send frames when the past
frames have not yet been acknowledged.
- Advantages
- Fairly simple and fast.
- Frames are always received in order.
- Disadvantages
- When the pipeline breaks, a lot of retransmission is needed.
- You need a lot of timers.
- Can be solved with multiple virtual timers.
-
Selective Repeat
- Description
- Both sender and receiver use a window size of > 1
- SWS > 1
RWS > 1
- Sender Keeps transmitting until it gets and a NAK, then
starts re-sending everything not acknowledged.
- The Receiver can buffer (and reorder) frames after sending NAK.
If so, it can skip forward to the ack message for the end of the buffer.
- This causes the sender not to resend the buffered frames.
- Only specific damaged or lost frame is re-transmitted.
- ACK number is the acknowledgement of the frame received,
rather than the next expected frame.
- Assumptions
- Pipeline is a good idea.
- Unique SEQ NO can be generated and sent.
- Advantages
- Very fast
- When pipeline breaks, less retransmission is needed.
- Disadvantages
- Frames are not always received in order.
- Need to control the way the SEQ NO's are used.
-
Description
-
Ensuring the sending entity does not
overwhelm the receiving entity.
- Preventing buffer overflow
-
Transmission time
- Time taken to emit all bits into medium.
-
Propagation time
- Time for a bit to traverse the link.