# Inverse Coupled Simulated Annealing for Enhanced OSPF Convergence in IoT Networks
## 2 Main Contribution  
### Design Overview  
OSPF routing convergence refers to the process by which nodes in a network reach a consensus to update routing information following the detection of changes in links or nodes [12; 13; 14]. This process is illustrated in Figure 1.  
The process begins with fault detection. Node \(R\) periodically sends Hello packets via the Hello protocol to monitor the status of neighboring nodes. The sending interval for Hello packets is denoted as \(T_{h}\), which is controlled by the Hello Interval parameter, typically set to a default value of \(10\) s. Additionally, the link fault detection time \(T_{d}\) is usually set to four times \(T_{h}\). If no response to the Hello packets from the neighbors is received within \(T_{d}\) (governed by the Dead Interval parameter), the neighbor is considered unreachable, triggering link fault handling. Assuming that the occurrence of a fault is a random event, the time difference \(X\) from the occurrence of the link fault to when \(R\) detects the fault is  
Figure 1: OSPF routing convergence time distribution diagram. uniformly distributed within the interval (30, 40). The probability density function for this distribution is given by:  
\[f(x)=\left\{ \begin{matrix}\frac{1}{40-30}=0.1&\text{if }30\leq x\leq 40\\ 0&\text{otherwise}\end{matrix} \right. \tag{1}\]  
At this point, the expected value \(E(X)\) is 35. Therefore, the average fault detection time \(T_{D}\) is 35 s.  
When a fault occurs, \(R\) generates a new Link State Advertisement (LSA) to reflect the topological change. Upon receiving the new LSA, neighboring nodes store it in their Link State Databases (LSDBs) and subsequently flood the LSA to all neighbors, achieving complete LSA flooding. To optimize LSA flooding, OSPF employs the mechanisms of Designated node (DR) and Backup Designated node (BDR). The DR is responsible for receiving and broadcasting LSAs within the network, which reduces redundant transmissions and minimizes bandwidth consumption. The BDR acts as a backup for the DR, ensuring continuity in LSA flooding. The cooperative operation of the DR and BDR enables OSPF to efficiently flood LSAs while alleviating routing overhead and network load. Consequently, the flooding time of an LSA within a broadcast segment can be expressed as:  
\[T_{l}=\left\{ \begin{matrix}T_{c}^{DR}+\frac{s}{\beta}&\text{if }R=DR\\ T_{c}^{BDR/Others}+T_{\text{m}}^{DR}+T_{c}^{DR}+2\cdot\frac{s}{\beta}&\text{if }R=BDR/Others \end{matrix} \right. \tag{2}\]  
where \(T_{c}^{DR}\) and \(T_{c}^{BDR/Others}\) represent the time taken by the DR and BDR/Others to generate the LSA, respectively, \(s\) is the size of the LSA packet in bytes, \(\beta\) is the interface transmission rate, and \(T_{\text{m}}^{DR}\) is the time taken by the DR to process the LSA. Therefore, the total time for LSA dissemination within the entire segment can be expressed as:  
\[\text{T}_{Isa}=\sum_{i=1}^{n}T_{l}^{i} \tag{3}\]  
where \(n\) represents the maximum number of broadcast segments for flooding the LSA to all nodes, and \(T_{l}^{i}\) is the time required for the \(i\)-th broadcast segment that is traversed. Once the LSA flooding is complete, the node recalculates the Shortest Path Tree (SPT) using [PERSON]'s algorithm based on the updated LSDB and updates the routing table. Let the time taken for this process be denoted as \(T_{m}\). Therefore, the total routing convergence time can be expressed as:  
\[\text{T}_{total}=T_{\text{D}}+T_{Isa}+T_{m} \tag{4}\]  
In \(T_{\text{total}}\), the fault detection phase is typically the most time-consuming part. This is primarily because confirming a link failure depends on not receiving a response to the Hello packets within the time \(T_{d}\), which is set to 40 s by default. During this period, the average \(T_{D}\) requires 35 s. In contrast, the LSA flooding process, which involves the generation and flooding of LSAs, generally consumes less time than the fault detection phase, although the time required may increase with network size.