## 1 Introduction  
A wireless sensor network (WSN) consists of a large number of wireless nodes connected to sensors. These sensors monitor and sense changes in environmental or physical conditions, then transmit this data to a sink node. Wireless nodes in WSNs are constrained by their limited power, computational capabilities, storage, and link bandwidth. WSNs often experience link failures due to the insufficient power of wireless nodes, the unstable state of wireless links, and unpredictable environmental interference. If any link failure occurs, a lack of fault-tolerant mechanisms may lead to the interruption of communications between the source and destination nodes [1; 2]. A cyber physical system (CPS) consists of a collection of computing devices which communicate with each other and interact with the physical world via sensors [3]. CPS is a rapidly emerging field which is expected to affect all aspects of life in the near future [4]; the applications of CPS include automotive systems, smart space, healthcare, military systems, emergency real-time systems, environmental monitoring and control, smart transportation, traffic control and safety, power generation and distribution, aircraft, instrumentation, water management systems, trains, physical security, asset management, and distributed robotics [5; 6]. WSN technology is used in the development of CPSs for real-time decision-making systems in the aforementioned applications [6]. CPS is increasingly used in life-critical applications, where the probability of failure must be kept below very low levels. Seamless fault-tolerant communication is therefore one of the key requirements for life-critical and mission-critical applications, and fault-tolerance has long been one of the major concerns for communications for sensors in CPS [7]. Fault-tolerance in a WSN ensures that the WSN is available for use without any interruption when any link or node failure occurs in the network. Therefore, fault-tolerance improves the availability, reliability, and dependability of the WSN [8]. Several techniques have been proposed to provide fault-tolerance in WSNs; these techniques can be classified into three categories, including redundancy-based techniques, clustering-based techniques, and deployment-based techniques [9]. Redundancy-based techniques provide fault-tolerance based on redundancy mechanisms such as path redundancy, node redundancy, and time redundancy. Clustering-based techniques use clustering mechanisms to provide fault-tolerance for WSNs. Clustering mechanisms divide a WSN into several disjointed or overlapping clusters. Each cluster elects one node as a representative of the cluster, called a cluster head. Clustering is an effective way to reduce energy consumption in WSNs. Finally, deployment-based techniques focus on the deployment of sensor nodes in WSNs to lead to effective design goals. There are several ways to deploy sensor nodes (SNs) in WSNs, including the pre-deployment of sensor nodes, the deployment of sensor nodes during use, and the post-deployment of nodes [8]. Several fault-tolerant techniques are described in Section 2. In this paper, we propose a novel path redundancy-based algorithm, called the dual separate paths (DSP) algorithm, for providing fault-tolerant communication and improving network traffic performance in WSNs, as well as in other networks. The main idea of DSP is to find dual paths between a source node and a destination node in a network. The dual paths are node-disjoint paths with an optimal path distance. The dual paths are used to forward unicast frames from the source to the destination, resulting in seamless communication over the network. The proposed DSP algorithm can be applied to wired and wireless networks, such as high-availability seamless redundancy (HSR) networks and WSNs, to provide fault-tolerant communication with improved network traffic performance for applications that require high availability, such as fault-tolerant CPSs and substation automation systems.