# A Game Model and Fault Recovery Algorithm for SDN Multi-Domain
## 3 Reliability Game-Enhanced Model for SDN Multi-Domain Controllers
: _The game for SDN multi-domain controllers is a non-cooperative one with incomplete information, which is defined as a quadruple, as shown in Equation (9)._  
\[Y_{GEA}=(C,\{I_{i}\},\{X_{i}\},\{U_{i}\}) \tag{9}\]  
\(C=\{c_{1},\ldots,c_{m}\}\) represents the set of players, and each player \(c_{i}\) refers to the alternative target controller participating in the game, whose remaining capacity is greater than the threshold selected from the set of failed neighborhood controllers. \(I_{i}=\{I_{i1},\ldots,I_{in}\}\) is the cost set for player \(c_{i}\). Each cost \(I_{ij}\) refers to the price paid by the controller \(c_{i}\) to accept the switch \(v_{j}\) migration request through the security protocol, and the calculation method is shown as Equation (10). It is mainly composed of the switch migration cost \(P_{t}\) and the load pressure \(\Omega_{i}\) generated by the target controller due to the switch migration. Switch migration is performed using TLS security protocol, including the process of re-establishment of connections in the network and routing table issuance, and the security and integrity of the network are maintained through keys. The calculation method for \(\Omega_{i}\) is shown in Equation (11):  
\[I_{ij}= \begin{cases}P_{t}+\Omega_{i},\ x_{i}\big{(}I_{ij}\big{)}=1\\ 0,\ x_{i}\big{(}I_{ij}\big{)}=0\end{cases}  \tag{10}\]  
\[\Omega_{i}=\delta_{v_{j}}\cdot pre\big{(}v_{j}\big{)} \tag{11}\]  
where \(pre\big{(}v_{j}\big{)}\) represents the expected request rate of switch \(v_{j}\), and \(\delta_{v_{j}}\) denotes the expected average packet size. \(X_{i}=\{x_{i}(I_{i1}),\ldots,x_{i}(I_{in})\}\) is the strategy set of the player \(c_{i}\), and each strategy \(x_{i}\big{(}I_{ij}\big{)}\) determines the actions of the player \(c_{i}\) under current cost \(I_{ij}\). If \(x_{i}\big{(}I_{ij}\big{)}=1\) means that controller \(c_{i}\) accepts the migration request from switch \(v_{j}\), if \(x_{i}\big{(}I_{ij}\big{)}=0\) means that it rejects it. \(U_{i}\) is the revenue function of the player \(c_{i}\), indicating the inverse sum of the costs of a newly connected switch for the same controller. The calculation method is shown in Equation (12):  
\[ \begin{split} U_{i}(x_{i},X_{-i})=\begin{cases}\sum\limits_{v_{j }\in\mathbb{v}_{i_{1}}}-O_{j},\ if\ x_{i}\big{(}I_{ij}\big{)}=1\ and\ argmin_{r}O_{j}=i\\ 0,\ else\end{cases}\\ s.t.\sum\limits_{c_{i}\in c_{v_{j}}}x_{i}\big{(}I_{ij}\big{)}=1\end{split}  \tag{12}\]  
where \(X_{-i}=X_{1}\times\ldots\times X_{i-1}\times X_{i+1}\times\ldots\times X_{m}\) is the set of strategies of all players except the \(c_{i}\). Switch \(v_{j}\) can select multiple controllers to make migration game decisions, and different decision costs are represented by \(O_{j}\), and then make global decisions according to decision costs to select appropriate controllers for migration. The calculation method of \(O_{j}\) is shown in Equation (13). \[ \begin{split} O_{j}=a_{t}P_{t}+a_{t}\Omega_{r}\\ s.t\ \forall r,\forall k,D_{r}\cap D_{k}=\varnothing\end{split}  \tag{13}\]  
where \(a_{t}\) and \(a_{r}\) represent weight factors. Since only a single game domain activity is considered in this paper, for two different controller game domains \(D_{r}\) And \(D_{k}\), the constraint condition indicates that there is no controller intersection between different game domains. The game for SDN multi-domain controllers adopts Nash equilibrium strategy to solve the problem of resource allocation and coordination among controllers. **Definition 7**: _For any controller \(c_{i}\) and \(x_{i}^{\prime}\in X_{i}\), if strategy \(X^{*}=\left(X_{1}^{*},\ldots,X_{m}^{*}\right)\) satisfies \(U_{l}\left(x_{i},X_{-i}^{*}\right)\geq U_{l}\left(x_{i}^{\prime},X_{-i}^{*}\right)\), then \(X^{*}\)is called Nash equilibrium._