Automatic Repeat-reQuest (ARQ) was one of the error correction protocol in the data link layer and transmission layer of the OSI model. It used confirmation and time-out mechanisms to achieve reliable information transmission on the basis of unreliable services. If the sender does not receive an acknowledgment frame after a period of time, it will usually resend. ARQ includes the stop-and-wait ARQ protocol and the continuous ARQ protocol: - Stop and Wait ARQ protocol: Stop sending after sending a packet and wait for the other party to confirm (reply with an ACK). If no acknowledgment is received after the time limit, the transmission will be considered a failure and the next packet will be sent again until the acknowledgment is received. In the case of no error, the sender sends the packet, the receiver receives and replies with an acknowledgment within a specified time, and then the sender sends it again. In the case of an error (overtime re-transmission), as long as the acknowledgment is not received after the specified time, the previously sent packet will be re-transmitted. In addition, if the receiver receives a duplicate packet, it will be discarded, but an acknowledgment will be sent. The advantage of this protocol was its simplicity, but the disadvantage was its low channel utilization and long waiting time. - Continuous ARQ protocol: The sender maintains a sending window, and the packets within the sending window can be sent continuously without waiting for the other party's confirmation. The receiver usually uses a cumulative acknowledgment to send an acknowledgment to the last packet that arrives in order, indicating that all the packets to this packet position have been received correctly. In addition, there were three other types of ARQ, which were wait-type ARQ, N-step backward ARQ, and selective repeat ARQ. Among them, ARQ could be used as a protocol for message unit transmission and acknowledgment. The sending process would continuously send a number of frames according to a specified window size, and even if there was a frame loss during the sending process, it would continue to send. The receiving process would continue to receive and acknowledge frames after an error occurred. Most practical ARQ systems use linear block codes. Choosing the appropriate linear codes can make the undetectable error probability reach the required error index. The main advantage of ARQ was its simple error detection method, which could adjust the transmission rate according to the channel quality. Its main constraints were that it required a reliable feedback channel, would cause a long and unfixed transmission delay, and required the transmission system to control the source. It was mainly used in data transmission that did not have strict requirements for delay but had high requirements for error performance. "Choose" was equally exciting. Everyone was welcome to read it!
The automatic repeat request (ARQ) protocol mainly included the stop-and-wait ARQ protocol and the continuous ARQ protocol. The continuous ARQ protocol also included the N-frame backward ARQ protocol and the selective repeat ARQ protocol. The work flow of the stop-and-wait ARQ protocol was as follows: the transmitting station must wait for an acknowledgment signal after sending out a frame, and then continue to send the next frame after receiving an acknowledgment signal, and then resend the frame after receiving a negative acknowledgment signal, and must resend the frame even if no acknowledgment signal is received within a certain time interval. The continuous ARQ protocol meant that the sender maintained a sending window of a certain size, and all the packets within the sending window could be sent out continuously without waiting for the other party's confirmation. Every time the sender received a confirmation, the sending window would slide forward by one packet. In the ARQ protocol that sent back N frames, after the sender sent a frame, it did not have to stop and wait for the other party's response. It could send several frames in a row. If it received a positive response from the receiver during the sending process, it could continue to send. If it received a negative response to a previous frame, all subsequent frames starting from that frame would be retransmitted. The selective repeat ARQ protocol can be used as a protocol for the transmission and acknowledgment of a message unit. When used as a protocol to transmit a message unit, the sending process continuously sends a number of frames according to a window of a specified size. Even if the frame is lost during the process, it will continue to send. The receiving process continued to receive and acknowledge frames even after the error. "Choose" was equally exciting. Everyone was welcome to read it!
The automatic repeat request (ARQ) protocol was a technique used for error control in data communication. When the receiver detected an error, it automatically requested the sender to resend the data. The following are the basic steps to build an ARQ protocol: ** 1. Confirm ARQ Type ** 1. ** Stop and Wait ARQ protocol ** - Sending party: - Encapsulated the network layer data into a data frame. - The data frame was sent to the data link layer's transmission buffer and sent out. - Waiting for the receiver's reply signal. If an acknowledgment (ACK) is received, the next frame will be sent, and if a negative acknowledgment (NAK) is received or no acknowledgment is received within a certain time interval, the frame will be retransmitted. - Receiving party: - Waiting to receive the data frame. - After receiving the data frame, it was placed into the receive buffer of the data link layer. - If the data frame was correct, the data frame would be unpacked, and the grouped data would be handed over to the network layer, and an acknowledgment frame would be sent back to the sender. If the data frame was wrong, no processing would be done.(Under this protocol, the receiver would not feed back the information related to the wrong frame, and the sender would rely on time-out retransmissions.) 2. ** Continuous ARQ protocol ** - Sending party: - Maintaining a certain size of the sending window, all packets within the sending window can be sent out continuously without waiting for the other party's confirmation. - Every time he received a confirmation, he would slide the send window forward by one packet. - Receiving party: - They could only receive data frames in sequence. 3. ** ARQ protocol with N frames backoff ** - Sending party: - After sending a frame, there was no need to stop and wait for the other party's reply. Several frames could be sent consecutively. - If a positive response is received from the receiver during the transmission process, the transmission can continue; if a negative frame is received for a previous frame, all subsequent frames starting from the frame will be retransmitted. - The sent frames needed to be differentiated by different numbers, and there had to be a large buffer to hold the frames that could be retransmitted. 4. ** Repeat ARQ protocol ** - Sending party: - It continuously sends a number of frames according to a window of a specified size. Even if a frame is lost during the transmission, it will continue to be sent. - Receiving party: - Continue receiving and acknowledging frames after errors. ** 2. define the data frame structure ** 1. It contains an error detection code for detecting errors, such as a Cyclic Redundance Check (Cyclic Redundance Check) code. 2. There is a serial number of the frame (it is very important in the continuous ARQ protocol, the ARQ protocol with a fallback of N frames, and the ARQ protocol with a selective repeat to distinguish between different frames). 3. It contains the actual data to be transmitted. ** 3. Dealing with error detection and feedback ** 1. sending end - Before sending the data frame, the error detection code is first added to the data frame. - It waits for feedback from the receiver according to the selected ARQ type (ACK or NAK), and decides whether to resend the data frame according to the feedback. 2. receiving end - The received data frame was deciphered to determine if there was an error. - If there is no error, send an acknowledgment to the sender; if there is an error, send a NAK according to the type of ARQ protocol (for example, in the stop-and-wait ARQ protocol, the sender can also send an acknowledgment without sending an acknowledgment, allowing the sender to resend after a time limit) or continue to receive subsequent frames and record the number of the error frame in the selective re-transmission ARQ protocol so as to request for re-transmission. ** 4. Time-out mechanism (mainly for stop-and-wait ARQ protocol and continuous ARQ protocol)** 1. The sender set up a timer that started counting down from the time the data frame was sent. 2. If the receiver does not receive an ACK or NAK before the timer times out, the data frame will be retransmitted. ** 5. Code implementation example (Take the stop-and-wait ARQ protocol as an example, pseudocode)** ```python #sender def sender(data): for packet in data: frame = create_frame(packet) #Create a data frame that contains data and error detection codes send(frame) start_timer() while True: if received_ack(): stop_timer() break elif timer_timeout(): send(frame) start_timer() #Receiving party def receiver(): while True: frame = receive() if check_frame(frame): #Check if the frame is correct send_ack() process_packet(frame) #process the data in the data frame else: pass #Under the stop-and-wait protocol, the sender does not send a NAK, and the sender relies on the time-out to resend. ``` This is just a simple example. The actual ARQ protocol implementation may be more complicated due to the specific application scenario, network environment, and performance requirements. "Choose" was equally exciting. Everyone was welcome to read it!
Automatic Repeat Request (ARQ) is one of the error correction protocol in the data link layer and transmission layer of the OSI model. It used confirmation and time-out mechanisms to achieve reliable information transmission on the basis of unreliable services. If the sender does not receive an acknowledgment frame after a period of time, it will usually resend. ARQ includes the stop-and-wait ARQ protocol and the continuous ARQ protocol: - Stop and Wait ARQ protocol: Stop sending after sending a packet and wait for the other party to confirm (reply with an ACK). If no acknowledgment is received after the time limit, the transmission will be considered a failure and the next packet will be sent again until the acknowledgment is received. In the case of no error, the sender sends a packet, the receiver receives and replies with an acknowledgment within a specified time, and the sender sends the next packet. In the case of an error (overtime re-transmission), as long as the acknowledgment is not received within the specified time, the previously sent packet will be re-transmitted. If the receiver receives a duplicate packet, it will discard the packet but send an acknowledgment at the same time. The advantage of this protocol was its simplicity, but the disadvantage was its low channel utilization and long waiting time. - Continuous ARQ protocol: The sender maintains a sending window, and the packets within the sending window can be sent continuously without waiting for the other party's confirmation. The receiver usually uses a cumulative acknowledgment to send an acknowledgment to the last packet that arrives in order, indicating that all the packets to this packet position have been received correctly. In addition, there were also hybrid automatic repeat request (HARQ) and other related concepts that had different applications in the field of communication technology. "Choose" was equally exciting. Everyone was welcome to read it!
Go-back- N (GGN): - In the stop-and-wait protocol, the sender can only send one frame at a time, and the channel utilization rate is low. However, the backward N-frame protocol uses a sliding window method, and the sender maintains a set of sending windows, and can send multiple data frames at a time. The receiver uses the method of cumulative confirmation, and the sender moves the sending window forward after receiving the confirmation. When there was a problem (such as frame loss or long delay), the sender used the method of retreating N frames to re-transmit. The timer here was used to recover data frames or confirm the loss of frames, similar to the timer in the pause protocol. Choosing the Repeat protocol: - Different from the N-frame backward protocol, when the receiver receives an out-of-order frame, it will not discard all subsequent frames like the N-frame backward protocol. Instead, it will buffer the correctly received out-of-order frame. When the sender found that a frame was lost, it only retransmitted the lost frame, instead of retransmitting the subsequent N frames from the lost frame like the backward N frames protocol. This could avoid unnecessary data retransmissions and improve transmission efficiency, especially in a poor network environment with a high packet loss rate. Both of these two types of protocol were designed to deal with the loss of frames and the disorder of order during data transmission to improve the reliability and efficiency of data transmission. However, the specific ways in which they dealt with the problem were different. "Choose" was equally exciting. Everyone was welcome to read it!
GGN (N-step Backward Agreement): - The sender's theory: - The sender uses the pipeline technology to allow multiple packets to be sent without waiting for acknowledgment, but it is limited by the number of unacknowledged packets in the pipeline cannot exceed the maximum number N. When the upper layer calls the send function (rdt_send ()), the sender first checks whether the send window is full (i.e., whether there are N sent but unacknowledged packets). If the window is not full, a packet is generated and sent, and the relevant variables are updated at the same time. If the window is full, the sender can choose to return the data to the upper layer (in reality, it is more likely to buffer the data or use a synchronization mechanism. The upper layer is only allowed to call the send function when the window is full). - The receiver acknowledges the packet with the sequence number n in a cumulative manner, indicating that the receiver has correctly received all the packets before and including the sequence number n. - If there is a time out (the timer is used to detect the loss of data or acknowledgment packets), the sender will resend all the packets that have been sent but not acknowledged. - Principle of the receiver: The receiver receives the packets and uses the cumulative confirmation method to feedback the situation of the correctly received packets to the sender. PR (select the replay protocol): - The sender and receiver had their own windows. The sender sends the packet without knowing the position of the receiver's window, and the receiver receives the packet without knowing the position of the sender's window. The two windows are not synchronized. - The problem was that if the size of the sequence number space and the window size did not meet a certain condition (for example, a scenario where the size of the sequence number space was 4 and the window size was 6 would be problematic), the receiver might not be able to distinguish between different situations. For example, the receiver might mistake the retransmitted packet as a new packet and receive it incorrectly. Different from the GGN protocol, the ACK (n) and TimeOut (n) in the GGN protocol would cause a lot of resources to be retransmitted, resulting in a waste of resources. The SSR protocol was more selective in dealing with situations such as retransmissions. "Choose" was equally exciting. Everyone was welcome to read it!
In the continuous ARQ protocol, the sender maintained a sending window of a certain size, and the packets within the window could be sent continuously without waiting for the other party's acknowledgment. The sender would slide the sending window forward by one packet every time it received an acknowledgment. The receiver usually uses the method of accumulating acknowledgement, that is, after receiving several packets, it sends an acknowledgement to the last packet that arrives in order, indicating that all the packets up to this packet have been received correctly. However, this method has shortcomings. For example, when the middle packet is lost, the sender cannot know the situation of the subsequent packets, and may need to re-transmit more packets. The sliding window protocol involves a sending window and a receiving window. The transmit window is the range of sequence numbers of the frames that have been sent but have not been acknowledged, and the receive window is the range of sequence numbers of the frames that are expected to be received. When the default window size is 1, you can operate according to the specific sending process. The sliding window protocol could improve the channel utilization and was a reliable transmission mechanism for data communication. The continuous ARQ protocol can be seen as a specific application form of the sliding window protocol under certain conditions (such as the cumulative acknowledgment method). They are all protocol mechanisms that exist to achieve effective and reliable data transmission in the network. "Choose" was equally exciting. Everyone was welcome to read it!
Yes, the selective replay protocol was based on the sliding window flow control technology. It was a sliding window protocol. " Choose " was equally exciting. Everyone was welcome to read it!
Both GGN (Fallback N-frame protocol) and SSR (Random Repeat protocol) were sliding window protocol under the reliable data transmission protocol in computer networks. There were the following differences between the two: 1. ** Receiving window size ** - ** GGN protocol **: Receiving window <br>(W = 1 <br>), which means that the receiver can only receive the data packets that arrive correctly in order. If an error occurs in a data packet, it will cause the subsequent packets to be discarded because they cannot be received in order by the receiver, even if these packets are not error-free and out of order. - ** PR protocol **: If the receiving window size is greater than 1, the receiver can receive packets out of order. 2. ** Confirm Method ** - ** GGN protocol **: uses cumulative acknowledgment. The receiver acknowledges the last frame of a group of frames that arrive in order, indicating that all the frames before this frame have been received. For example, if the sender sends four frames 1, 2, 3, and 4, and the receiver acknowledges frame 4, it means that the four frames 1, 2, 3, and 4 have been received. The previous frames 1, 2, and 3 are no longer separately acknowledged. - ** PR protocol **: Each packet has a separate confirmation mechanism. The receiver can confirm each correctly received packet separately, and the sender can selectively re-transmit the incorrectly received packet according to the confirmation information of the receiver. 3. ** Retransmission mechanism ** - ** GGN protocol **: When the sender receives an acknowledgment for a frame, the sending window will be moved forward. If there is a packet loss or a long delay (such as a timer exceeding), the sender needs to resend all the packets that have been sent but have not been acknowledged. For example, if the sender sends six frames, frame 1, 2, 3, 4, 5, and 6, the receiver will confirm frame 3, and the sender will think that frame 1, 2, and 3 have been sent correctly. If there is a problem later, frame 4, 5, and 6 will need to be retransmitted. - ** PR protocol **: The sender only re-sends the packet that the receiver did not receive correctly, instead of re-transmitting all the sent frames after the acknowledgment frame like the GGN protocol. 4. ** Resource utilization and wastage ** - ** GGN protocol **: Due to the method of accumulating acknowledgement and returning N frames of retransmissions, the error of one packet may lead to the retransmissions of multiple packets, even if these packets themselves are error-free. This causes a waste of resources to a certain extent, especially when the window is large and the bit error rate is high. A large number of unnecessary packets may be frequently retransmitted. - ** SP protocol **: Compared to the GGN protocol, it is more resource-saving because it only reforwards the packets that the receiver did not receive correctly, avoiding unnecessary packet retransmissions and thus improving the channel utilization. However, there were some problems with the SSR protocol. For example, the receiver and sender windows were not synchronized, which could cause errors. "Choose" was equally exciting. Everyone was welcome to read it!
The Address Resolution Protocol was a network layer protocol. It was between the data link layer and the network layer. It played a vital role in network communication, just like the address translator in the network. Its main function was to convert the IP address of the network layer to the data link layer's IP address. This was because in network communication, although the IP address was used to identify the host at the network layer, it was forwarded through the IP address at the data link layer (such as the ether network). The host or the layer 3 network device would maintain an ARP-table to store the IP address and the MAC-address map. The ARP-table entries included dynamic and static ARP-table entries. The working process was as follows: When host A needed to communicate with host B, it first determined the forwarded IP address according to the route table, and then checked the local ARP-buffer. If there was no matching address, it would broadcast an ARP-request frame in the network. All hosts in the same broadcast domain will receive this request. For example, after receiving the request, host C will find that the destination address is not its own, and then it will buffer the address of host A into its own ARP-table, and then discard the packet. After receiving the request, host B will find that the destination address is its own, and then it will buffer the address of host A and give a response. Then it will package its own address in the response ARP-packet and send it to host A. After receiving the response, host A will update its own ARP-buffer. There were two ways to obtain the ARPs: static and dynamic. The static acquisition was equivalent to manually configuration of the address map in the ARP-table. If the physical address changed, it would need to be manually changed, which was more troublesome. The dynamic acquisition was to obtain and update the address map by the host through the protocol, which was relatively convenient. In addition, there was also a free ARP-type message that was used to detect whether there was an IP address conflict. It would send a broadcast message with the same source and destination IP. Under normal circumstances, it was not expected to receive a response. If a response was received, it meant that there was an address conflict. In the Windows system, there were related ARP-commands. For example, ARP-a could check the ARP-buffer table, and ARP-d could delete the ARP-buffer table. However, due to network communication requirements, the buffer table might be regenerated immediately. In November 1982, the Internet Engineering Task Force (IetF) published the Internet Packet Packet Interface Problem (ARPG) 826. It was an indispensable protocol for the Internet Packet Interface Version 4, which was the most widely used version of the Internet protocol.(The Internet Packet Interface Version 6 was still in the early stages of deployment.) The role of the ARP-protocol in the car's ether network was the same as that of the traditional ether network. "Choose" was equally exciting. Everyone was welcome to read it!