# A Game Model and Fault Recovery Algorithm for SDN Multi-Domain
## 4 SDN-MARA Algorithm
### Design of the SDN-MARA Algorithm
#### 4.3.3 Game-Enhanced Dynamic Mapping Algorithm for Switches and Target Controllers
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Topology Name** & **Number of Switches** & **Number of Links** & **Number of Controllers** \\ \hline NT1 & 30 & 31 & 6 \\ \hline NT2 & 50 & 89 & 6 \\ \hline NT3 & 70 & 121 & 6 \\ \hline NT4 & 90 & 152 & 6 \\ \hline NT5 & 120 & 239 & 6 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Network topology information. The proposed algorithm in this paper is compared with the CFRS [31], BCS [30], and SBC [32]. The core idea of CFRS is to execute a backup controller adjustment algorithm based on a multi-population particle swarm, which reduces the average propagation delay between out-of-control switches and backup controllers. The BCS algorithm, based on a heuristic approach, selects a new target controller for out-of-control switches while minimizing the activation overhead of controllers under the premise of load balancing, thereby enhancing recovery efficiency. SBC employs a shared data method to store network states during failures, calculates the number of backup controllers based on probability theory, and uses a multi-objective optimization algorithm to determine the placement scheme for backup controllers. In contrast, this paper comprehensively considers the remaining capacity of the target controller and the migration cost of out-of-control switches, allowing for the dynamic selection of the optimal mapping between them while ensuring load balancing among the target controllers. The effectiveness of the proposed algorithm is validated from three aspects: the migration cost of switches, the load situation of target controllers, and the convergence performance of the algorithm. ### Experimental Result Analysis

#### 5.2.1 Comparison of Migration Costs for Out-of-Control Switches

Figure 4 illustrates the comparison of migration costs for out-of-control switches across different algorithms. From the figure, it is evident that the SBC algorithm incurs the highest migration cost. This is primarily due to its shared mechanism for fault recovery, which increases the communication overhead between out-of-control switches and target controllers during migration operations across different network domains. The performance of BCS in out-of-control switch migration cost is basically the same as that of CFRS and slightly better than that of SBC. This is because the former relies on a minimal set of target controllers while also considering the reduction of their activation costs, thus lowering communication overhead. In contrast, the CFRS algorithm takes into account both controller load and propagation delay when selecting target controllers. The proposed SDN-MARA algorithm demonstrates a lower overall migration cost for out-of-control switches compared to the other three. This is attributed to its comprehensive consideration of the costs of establishing secure channels and migration rules during the mapping selection phase between out-of-control switches and target controllers. Figure 4: Comparison of migration costs for out-of-control switches. #### 5.2.2 Comparison of Fault Recovery Experiments

Figure 5 presents a comparison of fault recovery delays across different algorithms. It is evident from the figure that an increase in the number of faulty controllers leads to a corresponding rise in the number of out-of-control switches, which in turn results in increased fault recovery delays. Both the BCS and SBC algorithms are based on backup controller selection strategies and seek to identify a set of target controllers under load constraints. However, due to BCS's approach of minimizing the activation overhead of controllers, the overall fault recovery delay for the SDC algorithm is greater than that of the BCS algorithm. The CFRS algorithm significantly reduces the fault recovery delay compared to the BCS and SBC. As illustrated in the figure, CFRS exhibits comparable fault recovery delays to the proposed SDN-MARA algorithm when the scale of out-of-control switches is small. However, as this number increases, the SDN-MARA algorithm demonstrates a marked advantage.