Reliability of Data link layer in computer network reading notes-----

Source: Internet
Author: User

This article is intended to elicit a reliable mechanism for TCP.

    • To stop waiting for an agreement:

In the early stage of computer network development, the transmission quality of communication network is not very good, so the error rate of data transmission is larger. Therefore, the data link layer must solve the problem of reliable transmission.

Stop waiting is the simplest and most basic data Link layer protocol
The working principle is as follows:
The sender stops sending after each frame is sent, waits for confirmation from the receiving end, and continues sending the next frame if it receives a confirmation frame from the receiving end.
At the receiving end, each error-free frame is delivered to the upper layer and a confirmation frame is returned to the sender.

If the receiving side receives the wrong frame, it silently discards the frame and does nothing else. The sender has not received the acknowledgement from the receiving end for a long time, it is believed that the packet was lost, and the packet will be re-transmitted. This is called a timeout retransmission.

To implement a time-out retransmission, set a time-out timer after each packet is sent, and if you receive an acknowledgement before the timeout timer, undo the timeout timer that has been set.

Note Three questions:
1, a in the sending of a packet, you must keep a copy, for the time-out retransmission when the preparation, when received B sent over the confirmation, will delete the copy just reserved.
2. Time-out retransmission takes longer than the average round trip time of data in packet transmission.
3, grouping and confirming the grouping must be numbered, so as to determine which sent out the group received confirmation, and which group did not receive confirmation.

confirmation of loss and confirmation of lateness:

Figure A shows that the acknowledgment sent by B is missing for the M1. So a in the set timeout retransmission time does not receive the confirmation, but can not know whether the packet sent by itself is wrong, lost or b sent packet loss, so after the timeout timer expires after retransmission M1. B received the M1 of a retransmission:

1、首先丢弃这个重复的分组,不向上层交付2、向A发送确认(因为上次发送的确认是丢失了)

Figure B illustrates a similar situation in which B's confirmation of M1 is not lost, but lags behind. But
B will receive the M1 that want to repeat, also discard the duplicate M1, re-transmit the confirmation packet, a will receive duplicate acknowledgment packet, a is discarded directly.

The advantage of this approach is simple, but the disadvantage is that channel utilization is too low.


TD is the time required to send the packet, RTT is the round trip time, and TA is the time for B to send a confirmation packet.
So channel utilization is

When the round trip time RTT is much larger than the packet delivery time TD, the channel rate will be greatly reduced.
In order to improve the transmission efficiency, the use of pipeline transmission,

The sender can send multiple groupings in succession without having to stop waiting for each other's confirmation after each packet, and the latter significantly improves the channel utilization.

    • Continuous ARQ Protocol:

Figure A indicates that 5 groups in the Send window can be sent out without waiting for confirmation
Figure B indicates that each sender receives a confirmation packet, and the window moves forward one.

The receiver generally adopts the method of cumulative confirmation:
That is, the receiver does not send an acknowledgment to each packet sent by the sender, but can send an acknowledgment to the last group that arrives sequentially after receiving several groupings. This means that all the groupings before the grouping are correctly received.
The benefit of the cumulative acknowledgement is that it is easy to implement and does not have to be re-transmitted even if the acknowledgment is lost.

However, it is obvious that the disadvantage is that you cannot like the sender to reflect all the grouped information that has been correctly received.
That is: If the sender sends the first 5 packets, the middle three is lost, the sender can not know the whereabouts of the next three groupings, so in the following three packets retransmission once, this method is also called Go-back-n
, which means that the n groupings that have been sent are required to be returned in order to retransmit.

Excerpt from: Computer network-fifth edition. Shehiren

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Reliability of Data link layer in computer network reading notes-----

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.