###### Abstract  
In wide-area networks (WANs) with high-speed, lossless transmission requirements, avoiding packet loss is crucial for ensuring link reliability, and maintaining link utilization over long distances is equally important. In this paper, we explore strategies for leveraging malfunctioning network links through link-local retransmission, optimizing our approach specifically for wide-area networks. To enhance performance, we select the duplicate threshold (dupthresh) based on the mean length deviation, which helps avoid triggering a certain portion of spurious fast retransmissions and reduces link bandwidth usage in an out-of-order environment. We evaluated our implementation on a programmable switch platform and found that this system maintained a low packet loss rate within a 10 Gbps line rate environment. It also reduces false retransmissions by 25% in the case of out-of-order links. link-local retransmission; packet reordering; in-network packet loss recovery; programmable switches 2025202520252025202520252025202520252020252020252  
in networks is random and difficult to predict. The typical approach to handling link corruption involves physical repairs; however, these repairs can be time-consuming [3]. If the strategy is to reroute packets to bypass the faulty link [5], the original route will also require some time to detect the link failure and switch to an alternative route. During this transition period, the removal of the damaged link can lead to a reduction in network capacity, and the selection of new routing paths can significantly impact real-time networks that have stringent requirements for integrity and timeliness. Therefore, relying solely on end-to-end recovery mechanisms is insufficient. The reliability of a link is closely tied to timely and efficient packet loss detection and recovery processes, which can keep the link operational until physical repairs are completed. This approach is crucial to maintaining the quality of the link and ensuring that network performance remains stable, even in the face of unexpected interruptions. In addition, link corruption can significantly influence congestion control algorithms, ultimately affecting overall network performance. Traditional TCP congestion control mechanisms have predominantly been designed around loss-based strategies. This dependency can lead to a decrease in throughput, as packet loss and latency do not always correlate with actual network congestion levels. For example, under conditions where the link rate is 100 Mbps and the packet loss rate reaches \(10^{-3}\), the throughput of TCP Westwood+ experiences a substantial decline of approximately 50%. In contrast, TCP NewReno and SACK (Selective Acknowledgment) exhibit only a 10% reduction in throughput under the same network conditions [6]. There are also some congestion control mechanisms based on delay or explicit congestion notification [7]. But in wide-area network communication across data centers, the traffic is often a mix of flows. Due to the heterogeneity of the data, methods based on network measurement (ECN or delay) may not be suitable [8]. In this case, the network still needs to rely on packet loss to detect congestion, which further increases the demand for network quality. These factors highlight the need for improved network reliability solutions to address both data integrity and performance in WANs. The reliability problem also involves some out-of-order problems on the link. An out-of-order packet is a network phenomenon in which the order of packet arrival is inconsistent with the order of packet sending. On a lossless network, reordering does not increase worst-case delay or jitter, but on a lossy network, reordering increases worst-case delay and jitter and has a significant impact on the TCP protocol on the receiving side [9]. The appearance of out-of-order packets has a great impact on the traditional protocols, causing unnecessary retransmissions at the transport layer and wasting bandwidth.