TCP to ensure reliable transmission of

We know that the most important transport layer provides two protocols, TCP and UDP, TCP which is to ensure reliable transmission, why did he do to ensure reliable transmission, IP, said: Of course I can not, I can only offer best-effort service is not guaranteed you can not be delivered, no guarantee can not be properly delivered, can not guarantee order delivery. Otherwise why should you guarantee it. That's good sense, I chuckled.

Less reliable data transmission in the end what can guarantee it?

1. Yes: it is the transmission of data packets without error

2. Do not lose: the transmission of data packets are not lost

3. chaos: packet transmission order to maintain the correct delivery.

 

Reliable Transport Protocol what basis can make such a guarantee?

1. Error detection: TCP test and it will keep the header and data. This test is an end and the aim of detecting any change in the data transmission process. If you receive a section of the test and an error, TCP discards this segment and do not acknowledge receipt of this segment (want to start a timeout and retransmits).

2. timeout retransmission and acknowledgment mechanism: When TCP sends a segment, it starts a timer and wait for the destination to acknowledge receipt of this segment. If you can not receive a confirmation, it will retransmit this segment. When a TCP acknowledgment is received from the bottom of the other end of the TCP connection data, it will send.

3. cache mechanism: each packet will have a sequence number, in the case of the first arrival of a packet sequence number, the receiver will first cache, a wait before reaching the sequence number, and then delivered along the top.

 

Highlight some lines reliable transport protocol, in fact, it is a sliding window problem.

For pipeline reliable transport protocol, if packet loss, damage or time-out which method would appear to address them? Two methods: Press-Back-N (Go-Back-N, GBN) and ARQ (Selective Repeat, SR)

 

GBN protocol

This maintained a transmitting end of the sliding window of length N, you can also be understood as an array.

1. The window contains a packet is sent but not received confirmation, and the remaining bits pit available, if one is available pit position, the upper needs to send data, transmitted directly, or whether the person returned to the upper cache.

2. adopt a cumulative acknowledgment receiving end, that is, when an acknowledgment number is transmitted by the receiving terminal 100, which is in front of the serial number are received,

3. If the acknowledgment time-out is not received, the sender will retransmit all packets sent but not acknowledged. Only a timer used to record the forefront of the window, which is the first packet sent.

4. Because this protocol is used for cumulative acknowledgment, so all of the packets arrive out of order it will be discarded.

 

ARQ

1. The transmitting end and the receiving end will maintain a window of size N.

2. Each of the receiving end receives a packet sends an acknowledgment, and will not arrive in order of packet buffer

3. The transmitting end will mark a packet has been confirmed, when the first window value is confirmed, the window is slid rearward. Each packet for this purpose its own timer.

4. When a packet is timed out, only the packet retransmission timeout.

 

 

Window length must be less than or equal to half the size of the sequence number space.

 

TCP is a reliable transport protocol and SR are mixed GBN

1. He is based on the cumulative confirmed,

2. But he is cached without dropping packets out of order,

3. Only a timer, a record of the time of the packet transmitting side unacknowledged window, a first time-out packet transmission.

Guess you like

Origin www.cnblogs.com/daijiabao/p/10930024.html