## 4 Proposed Routing Scheme
### Distributed Detour Routing Scheme
The first step in rapid detour routing is to forward the original packet in the secondary direction from the link failure. During this process, a detour field containing the failed link information is added to the header of the original packet. The detour field indicates that a packet has taken a detour because of encountering a failed link. Therefore, only a 1-bit detour identifier is added to the packet header. The node receiving the detour packet generates a detour table. The detour table records the destination of the detour packet, the direction of the failed link, and the next direction calculated for the next transmission. The node calculates the detour packet sent in the secondary direction using the rapid detour direction calculation algorithm, as described in Algorithm 1. Lines 1-17, indicate the link failure that has occurred in each direction. In line 19, \(\text{MHR}^{k}_{H}\) and \(\text{MHR}^{k}_{W}\) denote the height and width of MHR, respectively. Therefore, if the height or width is zero, the shape of MHR is a line. Algorithm 1 utilizes the latitude of the satellite and the MHR information of the packet for computation without additional information exchange. Since it is calculated from a rapid detour point without an iterative process, Algorithm 1 always has a time complexity of \(O(1)\). The satellite determines the detour direction based on its current latitude and information regarding the link failure node (latitude and failure direction) included in the header of the detour packet. Rapid detour routing detours packets using only the precalculated routing table, without additional computing. Thus, the packet is transmitted by selecting either the primary or secondary direction, and both directions must be within the MHR region. Figure 4 shows a rapid detour routing process when link failure occurred in the Northern Hemisphere, and Figure 4a shows a rapid detour process link failed in the upward direction. Packets that encounter link failure are detoured in the secondary direction. The node that receives the detour packet in the secondary direction becomes the rapid detour point, as indicated by the red node in Figure 4a. At the rapid detour point, the next direction is chosen between the primary and secondary directions to determine the detour path. In this case, proceeding in an upward direction results in shorter inter-ISL lengths. Thus, the detour packet is forwarded in the primary direction, which is the upper direction and has a shorter inter-ISL. Figure 4b illustrates a case of rapid detour routing when link failure has occurred in the Northern Hemisphere in the downward direction. At the rapid detour point, if the detour is in the primary direction, the path would once again pass through the

link failure. Therefore, from the rapid detour point, the packet is rerouted in the secondary direction to reach its destination. Comparing the two cases shown in Figure 3(a),b, the rapid detour point in an upward link failure has two options: the primary or secondary direction. However, in the case of a downward link failure, the secondary direction must be selected to avoid loops. In the Southern Hemisphere, the routing approach is opposite to that of the Northern Hemisphere, such that the upward direction is the secondary direction and the downward direction is the primary direction. In the Southern Hemisphere, the downward direction of the ISL is toward high latitudes. Therefore, the route is heading in a direction opposite to that of the Northern Hemisphere. If a link failure occurs in the left or right direction, the next hop decision is made within the MHR. To determine which direction to use, the rapid detour algorithm considers the latitude of the current node and the location of the failed link. If the latitude of the current node is higher than that of the failed link, the primary direction is selected. Conversely, if the latitude of the current node is lower than that of the failed link, the secondary direction is chosen.