Computer Network - Transport Layer to achieve reliable data transmission

A transport layer Why can not achieve reliable data transmission

Two transport layer protocol is a TCP (reliable transport protocol), is a UDP (unreliable transport protocol).
The five model, the transport layer is the network layer receives data, i.e. the data (segment) received by the TCP IP transmission, and the IP service only provides unreliable transport, the transport layer without intervention a case where the received data is not reliable

Second, how reliable data transport layer for transmission

Here Insert Picture Description
About the confirmation mechanism, the receiver receives the data packet sender, sends ACK packet has been received indicates otherwise transmitting the NCK (generally not used), as FIG.
Here Insert Picture Description

Third, reliable transport protocol - stop - other agreements

Here Insert Picture Description

1. About + ACK packet retransmission error detection +

ACK acknowledgment packet data itself, bit transitions can occur, it is necessary to add error detection. If errors are found, according to the wrong inference, the sender will retransmit the data packets

2. For just a bit as the serial number

The characteristics of stop-peer protocol, each sender sends a packet transmission stops, waits to receive confirmation, therefore, the order of 0 and 1 satisfy this demand, so just for a bit number.

3. With regard to repeatedly send ACK + sequence number instead of NCK

As mentioned above, in practice is not to use the NCK, repeatedly transmits ACK + sequence number may be used, as shown
Here Insert Picture Descriptionwherein data PKT0 or represents, or represents ACK0 acknowledgment packets
when the PKT1 error detection, the receiver discards this packet, and transmits ACK0, the sender will resend the time PKT1

4. With regard to the retransmission data packet PKT

(1) transmits a data packet loss PKT
Here Insert Picture Descriptionpacket loss exceeds the time set by the timer, the sender retransmits PKT1

(2) the sender does not receive acknowledgment packets ACK
Here Insert Picture Description
(3) receive a confirmation packet receiving side after the timeout
Here Insert Picture Descriptiontime the receiver will receive and discard duplicate packets

Fourth, reliable data transfer protocol - Protocol Pipeline

Here Insert Picture Description

4.1 pipeline agreement - sliding window protocol

Here Insert Picture Description
When the sliding window?
Either the sender or receiver window window, are the left-most (based ordinal number) to obtain confirmation or submit a sliding window in the window

4.1.1 Protocol sliding window protocol --GBN

Here Insert Picture Description
Characterized by the largest number of the receive window to a buffer, it does not receive data packets arrive out of order will be discarded.

4.1.2 Protocol sliding window protocol --SR

Here Insert Picture Description
SR protocol independent packet acknowledgment, this mechanism has confirmed that avoids retransmission of data packets

Write it twice, no computer is really flawed, and finally Thank you for reading

He published 198 original articles · won praise 94 · views 90000 +

Guess you like

Origin blog.csdn.net/shang_0122/article/details/104324099