In-depth understanding of computer networks-10 Transport Layer 3

Table of contents

 

1. Flow control

2. Session Multiplexing

3. Crash recovery


 

1. Flow control

The transport layer protocol uses a window mechanism for credit CDT allocation (the data link layer flow control scheme uses a sliding window mechanism with a fixed window size), and the CDT value in the transport layer changes continuously with the transmission process.

There is a CDT field (equivalent to the "window size" field) in the CR\CC\AK TPDU header of the transport layer. The receiving end uses this field to notify the sending end of the number of TPDUs that can currently be received, that is, the receive buffer size. The sending end sends an appropriate amount of TPDU according to the current receiving buffer capacity.

When establishing a connection, both parties notify each other of their initial window sizes, that is, the initial credit amount, through the CDT field in CR TPDU and CC TPDU.

During the data transmission process, the sending end sends a certain amount of data according to the CDT value of the AK TPDU sent back by the receiving end; the receiving end can dynamically adjust the receiving window size according to the usage of the receiving buffer, and when sending the AK TPDU for confirmation Notify the window size to the sender.

The sender will adjust the send window size according to the new receive window size, and the receiver will also use the new receive window size to verify the acceptability of newly arrived data packets.

bc0070cec8b84ceb96fa05acea5773f5.png

Note: Only DT TPDU and ED TPDU have the "TPDU sequence number" field, and other TPDUs do not.

Appropriately adjusting the window size can not only match the rates of the receiving end and the sending end, but also make full use of existing bandwidth resources and improve transmission efficiency. For example, CDT is adjusted to 3. Then the sender can send 3 consecutive DT TPDUs for the first time and then stop and wait for one or more confirmation messages from the receiver, and the receiver will also stop. However, the sender and the receiver are not able to send 3 TPDUs continuously every time. It depends on the number of confirmation TPDUs returned by the other party. In fact, it depends on the size of the currently available cache space of the other party.

215c51ed47b043efa10699b0cb4877f4.png

One principle: How many confirmation TPDUs the sending host A receives from the receiving host B can continue to send as many DT TPDUs. The sending window size is not fixed.

 

2. Session Multiplexing

Mainly used to improve the utilization of transmission connections.

Can be divided into 2:

One is upward multiplexing where multiple transmission connections reuse the same network connection (implemented through different port numbers used by different transmission connections);

The second is downward multiplexing in which one transmission connection is cyclically transmitted on multiple network connections (in the case of a virtual circuit, the bandwidth required for transmission exceeds the bandwidth that a certain virtual circuit can provide, so this transmission connection needs to be The data flow is distributed to different network connections in a polling manner).

75ab5cbb45ae48568f4ab7e4cf1fa6c7.png

 

3. Crash recovery

Crash: The host or router cannot work properly during the transmission connection, causing the TPDU transmission process to be interrupted.

Crash recovery is to restore to a crash-resistant working state and continue TPDU transmission. That is, it must be resolved whether the last TPDU sent before the crash needs to be retransmitted.

In summary, recovery from layer N crashes can only be accomplished by layer N+1, and only when sufficient state information is left in layer N+1.

 

 

Guess you like

Origin blog.csdn.net/hongdi/article/details/126133198