How Reliable Transport Works

Table of contents

Characteristics of ideal transfer conditions

stop waiting agreement

pipelining 

Sequential ARQ protocol

Comparison of continuous ARQ protocol and stop-and-wait protocol


Characteristics of ideal transfer conditions

Ideal transfer conditions have the following two characteristics:

1. The transmission channel does not generate errors

2. No matter how fast the sender sends data, the receiver always has time to process the received data

Under such ideal transmission conditions, reliable transmission can be achieved without taking any measures. However, the actual network does not meet the above two ideal conditions. Some reliable transmission protocols must be used to achieve reliable transmission over unreliable transmission channels

stop waiting agreement

"Stop waiting" is to stop sending every time a packet is sent, waiting for the confirmation of the other party. Send the next packet after receiving an acknowledgment

A sets a timeout timer for each sent packet.
As long as A receives the corresponding confirmation before the timeout timer expires, it cancels the timeout timer and continues to send the next packet M2.
If A does not receive B's acknowledgment within the time specified by the timeout timer, it considers that the packet is wrong or lost, and resends the packet.

Problem: If the packet arrives at B correctly, but the acknowledgment returned by B is lost or delayed, and A does not receive B's acknowledgment, it will timeout and resend. B may receive a duplicate M1, how does B know that it has received a duplicate packet and needs to discard it?
Solution: Number
A numbers each sent packet, if B receives a packet with the same number, it is considered received Repeat the packet, discard the repeated packet, and send back the confirmation
B also number the sent confirmation, indicating which group the confirmation is for.
A can determine which group it is for according to the confirmation and its number, avoiding duplication If it is a duplicate confirmation, it will be discarded

 

 

Using the above-mentioned acknowledgment and retransmission mechanism, reliable communication can be achieved on an unreliable transmission network.
This transmission protocol is often called Automatic Repeat reQuest (Automatic Repeat reQuest), which means that the retransmission request is performed automatically. The receiver does not require the sender to retransmit an erroneous packet

The advantage of the stop-and-wait protocol is that it is simple, but the disadvantage is that the channel utilization is too low

 When the round-trip time RTT is selected to be greater than the packet transmission time TD, the channel utilization rate is very low, and if retransmission occurs, it will be even lower

Summarize:

 

pipelining 

In order to improve the transmission efficiency, the sender may not use the low-duplex rate stop-and-wait protocol, but use pipeline transmission. Pipeline transmission
means that the sender can continuously send multiple packets without having to stop and wait for the confirmation from the other party every time a packet is sent. In this way, there is always data transmitted on the channel without interruption.
Since there is always data transmitted on the channel without interruption, this transmission method can obtain high channel utilization.

Sequential ARQ protocol

Basic idea:

  • The sender can send multiple packets at a time
  • Use the sliding window protocol to control the number and number of packets that the sender and receiver can send and receive
  • Each time an acknowledgment is received, the sender slides the sending window forward. The receiver generally adopts the method of cumulative confirmation
  • Use the Go-Back-N method for retransmission

The receiver generally adopts the method of cumulative confirmation. That is, it is not necessary to send acknowledgments to the received packets one by one, but to send acknowledgments to the last packet that arrives in order, which means: all packets up to this packet have been received correctly. Advantages: easy to implement, even if the acknowledgment is
lost Retransmission
Disadvantage: It cannot reflect to the sender the information of all the packets that the receiver has received correctly

Rollback N means that you need to roll back and retransmit the N packets that have been sent 

Comparison of continuous ARQ protocol and stop-and-wait protocol

 

Guess you like

Origin blog.csdn.net/zy1183747231/article/details/124231834