# Fast Reroute Mechanism for Satellite Networks Based on Segment Routing and Dual Timers Switching
## 2 Related Work
### Node Behavior Design
#### 3.2.1 PLR Node Behavior  
According to the Backup Path Activation and Deactivation with Two Timers algorithm outlined in Algorithm 2, the PLR first precomputes the backup paths for potential link failures in its vicinity. To enable table-based forwarding in underlay routing, the PLR, acting as the head node of the SR backup path, introduces an additional mechanism into the underlay routing table lookup process. When a fault is encountered during base route forwarding, the PLR redirects traffic to the SR backup path label stack through a backup routing table entry. This backup entry, which has a lower priority than the original base route entry for the destination, utilizes a virtual port to direct traffic toward the SR backup path. Upon detecting a failure with millisecond precision through hardware monitoring, the PLR activates the SR backup path. It increases the priority of the backup path entry in the underlay routing table, making it higher than that of the primary path entry, thereby redirecting traffic to the backup path's virtual port. This operation modifies only the priority of the affected backup routing entries, without altering the underlay routing entries, thereby minimizing the impact of the switch on traffic flow. To mitigate the cost of frequent switching between primary and backup paths during transient faults, the PLR sets a backup path activation timer when switching to the SR backup path via hardware detection. If the timer expires and the fault is resolved, the backup path's priority is lowered below that of the primary path, returning traffic to the primary path. If a new transient fault occurs during this period, the backup path activation timer is reset. ```
0: PLR node n & Link failure detection mechanism
0: Efficient management of backup path activation and deactivation
1: // Step1: Backup Path Activation timer for Transient Failures:
2:for each PLR node p \(n\in V\)do
3:if transient fault is detected then
4: Set backup path activation timer
5:if timer expires and fault is resolved then
6: Redirect traffic back to primary path
7:else if stable fault occurs during timer then
8: Cancel backup path activation timer
9:endif
10:endif
11:endfor
12: // Step2: Link Failure Evolution and Long-Term Stable Fault Detection:
13:if a fault evolves into a long-term stable fault then
14: Flood fault information across the network
15: Deploy converged base route with the same priority as the original primary path
16: Set backup path deactivation timer
17:endif
18:if backup path deactivation timer expires: then
19: Redirect traffic back to the onboard underlay routing system
20:endif
```  
**Algorithm 2** Backup path activation and deactivation with dual timers  
Additionally, during the activation timer for transient faults, if the link failure detection mechanism identifies that the fault has evolved into a long-term stable failure, this fault information is flooded across the network. A converged base route with a priority equal to that of the original primary path is deployed, and a backup path deactivation timer is set. Once the deactivation timer expires, the backup path's priority is lowered below that of the base route, reverting traffic to the onboard underlay routing system. The priority control of the backup path is a core mechanism of this scheme. This formula describes the process by which the PLR node adjusts the priority of the backup path based on the network status (i.e., whether a fault has occurred):  
\[P_{backup}(t)= \begin{cases}P_{base}+\Delta P&\text{backup path is activated}\\ P_{base}-\Delta P&\text{backup path is deactivated}\\ P_{backup}(t-1)&\text{otherwise}\end{cases}  \tag{1}\]  
where \(P_{backup}(t)\) is the priority of the backup path at time \(t\), \(P_{base}\) is the priority of the underlay routing path at time \(t\), and \(\Delta P\) is the adjustment in priority, representing the change in priority of the backup path relative to the base route.