## 4 Proposed Routing Scheme
### Distributed Detour Routing Scheme
The rapid detour process is repeated until the original packet reaches its destination. After transmission ends, the detour table compares the destination of other packets with the destination in the detour table. If the destination in the detour table matches the destination of the packet, the packet is forwarded to the next hop specified in the detour table. Rapid detour routing detours failed links instead of using the original routing table. To effectively minimize packet drop within a network, the instant detouring of packets from any failed link is required. By implementing rapid detour routing, networks can decrease the overall packet drop rate, thereby ensuring reliable data transmission. ### Selective Flooding within Minimum Hop Region

As the rapid detour path results in more hops compared to the shortest path within the MHR, establishing a pre-detour path is necessary. Instead of flooding all the nodes within the MHR, selective flooding discovers an optimal detour point to directly send the link failure information. Nodes between the rapid detour point and the detour point receive the link failure information and generate a detour table. This detour table works similarly to rapid detour routing in redirecting the pre-detour packets that can pass through the failed link. The proposed selective flooding algorithm selectively propagates link failure information to the optimal detour point. Unlike traditional flooding methods, link information is

Figure 4: Rapid detour routing in different link failure directions. not transmitted to all nodes within reach but is only sent along the specific detour point within the MHR. Consequently, the key objective of the selective flooding algorithm is to find a detour point. To determine the detour point for selective flooding, the packet uses its MHR region. In this study, the shortest path used in the distributed routing is identical to the MHR edge of the packet. The optimal routing path is the same as the edge of the MHR of the packet. Therefore, packets with the same MHR have to pass through the MHR edge. Finally, the detour point becomes the MHR edge of the rapid detour routing packet. The MHR edges \(M_{x}\) and \(M_{y}\) correspond to the \(x,y\) coordinates of the source and destination, respectively, and the link failure information is sent to the detour point. The messages that are selectively flooded to the detour point instruct each node to create a detour table. As shown in Figure 4(a), the red dotted line is a selective flooding path from the rapid detour point (red dotted node). The rapid detour sets the next-hop field in the detour table using the calculated result for the next hop. However, the detour table created by selective flooding sets the previous node as the next hop. This means that the path of the selective flooding transmitted up to the detour point achieves the same effect as the pre-detour path. When packets pass through the link failure node in the MHR region, they must take the pre-detour path to reach the destination using the detour table. When packets follow their original path, the destination is compared with that in the detour table. If the destinations match, the packets are detoured using the detour table. When the MHR shape is not a square, its edge and the original path of the packet do not intersect. Therefore, the optimal detour point cannot be determined. In this scenario, the source node of the original packet is used as the destination for selective flooding, as shown in Figure 4(a),b. The selective flooding path calculation is outlined in Algorithm 2. The calculation for the selective flooding path requires only the packet information with MHR. Without the iterative operations, the time complexity of Algorithm 2 is \(O(n)\), increasing in accordance with the number of hops through which the selective flooding is transmitted. Depending on the location of the link failure, optimal detour paths can be created without selective flooding.