[Computer Network] Chapter 3 Data Link Layer (Reliable Transmission)



insert image description here

Chapter 3 Data Link Layer

3.4 Reliable transmission

Reliable transmission means that in the process of data communication, it is ensured that the data can be transmitted to the receiver accurately and completely according to the intention of the sender, and that the receiver can receive and process the data correctly.

In reliable transmission, the following problems usually need to be solved:

Confirmation and Feedback: After sending the data, the sender needs to receive confirmation information from the receiver to confirm whether the data is received correctly. If the sender does not receive the confirmation message, it will retransmit the data to ensure the correctness of the data.

Sequence numbers and retransmissions: In order to ensure the orderly transmission of data and no loss, each data packet should have a unique sequence number. The receiver sorts the data packets according to the sequence number, and detects whether there is a lost data packet, and if so, requires the sender to retransmit.

timeout retransmission: The sender usually sets a timeout period. If no confirmation message is received from the receiver within the specified time, the data is considered lost and needs to be retransmitted.

flow control: In order to prevent the receiver from being unable to process a large amount of data in time, it is necessary to control the data transmission rate of the sender to ensure that the data transmission between the sender and the receiver remains balanced.

Error Detection and Correction: By using technologies such as error detection codes and error correction codes, errors generated during data transmission can be detected and corrected to improve the reliability of data transmission.

Common reliable transmission protocols include stop-and-wait protocol, continuous ARQ (Automatic Repeat Request) protocol, such as selective retransmission, fallback N frame protocol, and selective repeat request protocol. These protocols use the above mechanisms to achieve reliable transmission and ensure the accurate delivery of data during the communication process.



3.4.1 Basic concept of reliable transmission

Using error detection technology (Cyclic Redundancy Check CRC), the data link layer of the receiving side can detect whether a bit error (bit error) has occurred during the transmission of the frame.
According to the type of service provided upward by the data link layer:

  • Unreliable transport service : just discard frames with errors and do nothing else.
  • Reliable transmission service : Find a way to realize what the sender sends and the receiver receives.

Generally, the bit error rate of the wired link is relatively low. In order to reduce overhead, the data link layer is not required to provide reliable transmission services upwards. Even in the event of bit errors, the issue of reliable transmission is handled by its upper layers.
Wireless links are susceptible to interference and have a high bit error rate, so the data link layer must provide reliable transmission services to the upper layer.
Bit errors are just one type of transmission error.
From the perspective of the entire computer network architecture, transmission errors also include packet loss, packet out-of-order, and packet repetition.
The reliable transmission service is not limited to the data link layer, and other layers can choose to implement reliable transmission.


3.4.2 Realization Mechanism of Reliable Transmission - Stop-Wait Protocol

confirm and deny

timeout retransmission
send data band number

insert image description here

Note: temp
stop-wait channel utilization
example

insert image description here
Answer: D


If retransmission occurs, the channel utilization rate is lower.
In order to overcome the shortcoming of the low channel utilization rate of the stop-wait protocol, two other protocols are produced.


3.4.2 Realization Mechanism of Reliable Transmission - Fallback N-Frame Protocol

Concept map
cumulative confirmation
error condition
error condition

Summarize
example
Analysis of examples
image.png


3.4.3 Realization Mechanism of Reliable Transmission—Selection of Retransmission Protocol

Select the retransmission protocol In order to make the sender retransmit only the packets with errors, the receiver can no longer use cumulative confirmation, but needs to confirm each correctly received data packet one by one.
image.png
The size of the sending window and receiving window
Summarize
exampleAnalysis of examples

3.4.4 Significance of reliable transmission

Reliable transmission is of great significance in data communication, mainly including the following aspects:

data integrity: Reliable transmission can ensure that the data sent is not modified, damaged or lost during transmission. This is critical for many application scenarios, especially when critical data, file transfer or information exchange is involved, data integrity needs to be ensured.

data reliability: By using acknowledgment and feedback mechanisms, reliable transport ensures the correct delivery of data between sender and receiver. The sender will wait for the receiver's confirmation information, and if it does not receive the confirmation information or receives the wrong confirmation information, it will retransmit, thereby improving the reliability of data transmission.

exception handling: Reliable transmission can handle network abnormalities, such as network delay, congestion, packet loss, etc. By setting appropriate timeout retransmission and flow control mechanisms, reliable transmission can cope with these abnormal situations and recover to ensure that data can be transmitted successfully.

sequence: Reliable delivery usually also guarantees the in-order delivery of packets. This is very important for those applications that depend on the order of data packets, such as video streaming, audio streaming, etc., to ensure that the data is played or processed in the correct order.

performance optimization: Although reliable transmission may introduce some additional overhead (such as confirmation and retransmission mechanisms), it can improve the reliability of data delivery, thereby avoiding resending and processing due to data loss or errors, thereby improving overall performance and efficiency.



insert image description here

Guess you like

Origin blog.csdn.net/m0_60915009/article/details/131589132