2017-02-10 reliable data transmission principle, reliable data transmission protocol, automatic retransmission request protocol, stop and wait protocol, redundant packet, bit alternation Protocol, sliding window protocol

Source: Internet
Author: User
Tags ack alternation fsm

2017-02-10 reliable data transmission principle, reliable data transmission protocol, automatic retransmission request protocol, stop and wait protocol, redundant packet, bit alternation Protocol, sliding window protocol

"Computer network-Top Down Method" (original book 6th edition)


3.4 Principle of reliable data transmission

Reliable Data Transfer Protocol (reliable data Transfer Protocol). This is a difficult task because the underlying protocol of the reliable data transfer protocol may not be reliable.

One-way data transfer (unidirectional data transfer) is the data transfer from the sending end to the receiving end.

Bidirectional data transfer (bidirectional data transfer) (i.e. full duplex data transfer)


3.4.1 structure reliable Data transmission protocol

First assume that the packets sent are received in the order in which they are sent, without losing the grouping

1: Reliable data transmission via a fully reliable channel

First we consider the simplest case, that the underlying channel is completely reliable.

Finite state machine (finite-state MACHINE,FSM)

2: Reliable data transmission via a bit error channel

Positive confirmation (positive acknowledgment)

Denial of confirmation (negative acknowledgment)

These control messages allow the receiver to let the sender know what is being received correctly, which content is being received incorrectly and therefore needs to be duplicated. In the computer network environment, the reliable data transmission protocol based on such retransmission mechanism is called automatic retransmission request (Automatic Repeat Request,arq) protocol, which requires error detection, receiver feedback and retransmission of three functions.

Stop (stop-and-wait) protocol: The next grouping is processed until the previous group has received the acknowledgement correctly. It has a fatal flaw. In particular, we did not consider the possibility of the ACK or NAK packet being compromised.

Consider the 3 possibilities of dealing with damaged ACK and NAK

The first is that the receiver continues to make incorrect feedback on the damaged ACK or NAK, and because the error feedback may be damaged again, it is possible to enter the dead loop.

The second is to add enough tests and bits so that the sender can not only detect errors but also restore errors. For a channel that produces errors but does not lose the packet, this can solve the problem directly.

Third: When the receiving party receives ambiguous ACK or NAK groupings, it is only necessary to retransmit the current data grouping. This method introduces a redundant grouping (duplicate packet) in the channel of the sender to the receiver. The fundamental difficulty with redundant grouping is that the receiver does not know whether the ACK or NAK he sent last was received correctly by the sender. So he could not know in advance whether the received groupings were new or re-transmitted.

For the third case, the simple way to solve this new problem is to add a field to the data grouping, let the sender group its data, and the sequence number of the packet that will send the data in the field.

3. Reliable data transmission via Kanenobu with bit error

Redundant data grouping (duplicate packet)

From the sender's point of view, retransmission is a panacea. The sender does not know whether a data packet is missing, an ACK is missing, or just the packet or ACK over-delay. In all these cases, the action is the same: retransmission.

Because the grouping sequence number alternates between 0 and 1, rdt3.0 is sometimes called the bit-alternating protocol (Alternating-bit protocol)




3.4.2 Pipeline Reliable Data Transfer Protocol

Pipelining (pipelining) pipelining technology has the following implications for reliable data transfer protocols:

1: The ordinal range must be increased, as each conveying group (not counting retransmission) must have a unique ordinal number, and there may be multiple unacknowledged messages in the transport.

2: Multiple groupings must be cached on both the sender and receiver sides of the protocol. The sender should at least be able to buffer those packets that have been sent but not confirmed. As discussed below, the receiver may also need to cache those packets that have been properly received.

3: The required ordinal range and the requirements for caching depend on how the data transfer Protocol handles lost, corrupted, and too-delayed groupings. There are two basic ways to resolve pipeline error recovery: Fallback N-Step (GO-BACK-N,GBN) and select retransmission (Selective REPEAT,SR).


3.4.3 Fallback n Step

Window length (Windows size), sliding window Protocol (Sliding-window protocol)

The ordinal space can be thought of as a 2-length K-square ring, where the ordinal 2 of the K-square minus 1 followed by the ordinal 0,tcp has a 32-bit ordinal field in which the TCP sequence number is counted by bytes in the byte stream, not by group count.

Event-based programming (event-based programming)


3.4.4 Select retransmission

The error of single grouping in GBN can cause GBN to retransmit a large number of groups, and many groups do not need retransmission at all.


1: Reliable data Transfer Protocol (reliable data Transfer Protocol), 2: Unidirectional data transfer (unidirectional data transfer), 3: Bidirectional data transfer (bidirectional data Transfer), 4: Finite state machine (Finite-state MACHINE,FSM), 5: Positive acknowledgment (positive acknowledgment), 6: Deny acknowledgement (negative acknowledgment), 7: Automatic retransmission request (Automatic Repeat Request,arq) protocol, 8: Stop (stop-and-wait) protocol, 9: Redundant grouping (duplicate packet), 10: Group ordinal (sequence number), 11: Bit alternating protocol (Alternating-bit protocol), 12: pipelining (pipelining), 13: Window length (Windows size), 14: Sliding Window Protocol (Sliding-window protocol), 15: Event-based programming (event-based programming)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.