2017-02-11 structure reliable data transmission protocol, Sliding window protocol, bit alternation protocol, fallback N-Step protocol, and select retransmission protocol

Source: Internet
Author: User
Tags ack alternation

2017-02-11 structure reliable data transmission protocol, Sliding window protocol, bit alternation protocol, fallback N-Step protocol, and select retransmission protocol


1: Redundant data duplicate (packet), 2: Inverted count timer (countdown timer), 3: Bit alternating protocol (Alternating-bit Protocol), 4: Fallback N Step (GO-BACK-N,GBN) , 5:n is often referred to as window length (Windows size), 6: Sliding Window Protocol (Sliding-window protocol)


3.4.1: Transport Layer-"reliable data transmission principle-" Structured reliable data Transfer Protocol-"reliable data transmission via Kanenobu path with bit error: Rdt 3.0

We have the sender responsible for monitoring and recovering the packet loss work

Redundant data grouping (duplicate packet)

Inverted count timer (countdown timer)

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 pipelined Reliable Data Transfer Protocol-fallback N-step (GO-BACK-N,GBN)

The base ordinal (base) is defined as the ordinal of the oldest unacknowledged group.

The next ordinal (nextseqnum) is defined as the smallest unused ordinal, which is the ordinal of the next generation group.

[0,base-1] is a group that has been sent and confirmed

[Base,nextseqnum-1] A group that has been sent but not confirmed

[nextseqnum,base+n-1] can be used for those groups to be sent immediately is greater than or equal to the base+n sequence number is not used until the current pipeline is not confirmed in the group to be confirmed.

n is often referred to as window length (Windows size)

The GBN protocol is also often referred to as a 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.



3.4.4 Select retransmission


SR Sender's events and actions

1. Receive data from the upper layer. When the data is received from the upper layer, the SR sender checks the next ordinal number that can be used for the grouping. If the ordinal is within the sender's window, the data is packaged and sent, otherwise it is like in GBN, either caching the data or returning it to the upper layer for later transmission.

2: Timeout. Timers are again used to prevent loss of grouping. Each packet must then have its own logical timer, because only one grouping can be sent after the time-out occurs. You can use a single hardware timer to simulate the operation of multiple logic timers.

3. Receive an ACK. If an ACK is received, the SR sender marks the confirmed group as received if the grouping sequence number is within the window. If the ordinal of the grouping equals send_base, the window base sequence is moved forward to the unconfirmed group with the smallest ordinal. These groupings are sent if the window moves and there is an unsent grouping that falls within the window.


SR Receiver Events and actions

1. The group number within [Rcv_base,rcv_base+n-1] is correctly received. In this case, the received packet falls within the receiver's window, and an option ACK is sent back to the sender. If the group has not been previously received, the grouping is cached. If the ordinal of the grouping is equal to the base sequence number of the receiving window, then the grouping and sequential grouping of the previously cached ordinal are delivered to the upper layer. The Receive window then delivers these groupings upward by moving the grouped numbers forward.

2. The group number within [Rcv_base-n,rcv_base-1] is correctly received. In this case, an ACK must be generated, even if the group is a group that the receiver has previously confirmed.

3. Other circumstances. or slightly the grouping.

Of these 2 is very important, for which groups have been properly received, which are not, the sender and receiver do not always see the same results. For the SR protocol, this means that the sender and receiver windows are not always consistent.


Because the sequence number can be reused, it is known that the sender is "sure" that any previously sent group with the ordinal x is not in the network. This is done by assuming that a grouping "survives" in the network no longer than a fixed maximum amount of time.


The window length must be less than or equal to half the ordinal space size, or it may occur that a group cannot confirm retransmission or initial transmission.


A summary of reliable data transmission mechanism and its use

Inspection and: Used to detect bit errors in a transport packet

Timers: Used to timeout/retransmit a grouping, possibly because the packet (or its ACK) was lost in the channel. Because when a packet is delayed but not lost (prematurely timed out), or when a packet has been received by the receiver but the ACK from the receiver to the sender is lost, a timeout event may occur, so the receiver may receive multiple redundant copies of a packet.

Ordinal: Used to sequentially number the data grouping that flows from the sender to the receiving party. The void in the ordinal space of the received packet allows the receiver to detect the missing packet. Grouping with the same ordinal number allows the receiver to detect a redundant copy of a packet.

Acknowledgment: The receiver is used to tell the sender that a group or group of groupings has been properly dropped. A confirmation message usually carries an ordinal number of a recognized grouping or multiple groupings. Confirmation can be individual or cumulative, depending on the protocol.

Negative acknowledgment: The receiver is used to tell the sender that a packet was not received correctly. A negative acknowledgment message usually carries a sequence number that is not correctly received into the packet.

window, Pipeline: The sender may be limited to sending only those groupings that fall within a specified range. By allowing multiple packets to be sent at once but not confirmed, the sender's utilization can be increased on the basis of a stop-and-hold operation mode. We will soon see that the window length can be set based on the ability of the receiving party to receive the cache message, the degree of congestion in the network, or both.

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.