## 4 Proposed Method and Problem Formulations
### Problem Formulations
Increasing the number of SDN switches increases the control path traffic, while iBGP peering traffic varies based on the number of routers attached with the switches. Hence, we consider two latencies: the control path latency (or propagation latency) due to SDN switches, and the gateway latency by iBGP peering gateway routers. We also consider that after finding the RSS, breadth-first routers are to be replaced/upgraded to SoDIP6-enabled switches in the hierarchy through BFT. In the shortest path, after finding the RSS, the routers are replaced in the sequence provided by BFT. Considering one branch migration via random or depth-first order creates control traffic imbalance in the network. Hence, our choice of BFT with median point router for migration help maintains the equilibrium in the control path traffic \begin{table}
\begin{tabular}{l l} \hline \hline
**Parameters** & **Descriptions** \\ \hline \(A_{i}\in A\) & Set of autonomous systems, \(A0\) (\(AS0\)) is the transit AS \\ \(R_{i}\leftrightarrow S_{i}\) & Legacy routers and SDN switch mapping during and after migration. Legacy router \(R_{1}\), \\ \(\Delta_{i,j}\) & Optimal path cost from router \(R_{i}/S_{i}\) to \(R_{j}/S_{j}\) \\ \(\forall R_{i}\in A_{0}\) & Number of legacy routers (\(R\)) in the transit AS. \\ \(\forall S_{i}\in A_{0}\) & Number of SDN switches in the transit AS during and after migration \\ \(\forall(V_{i},E_{i})\in A_{i}\) & Number of vertices \(V\) and edges \(E\) in an AS. \(R,S\in V\) \\ \(\forall G_{i}\in A_{0}\) & Number of gateway routers attached to transit AS (\(AS0\)) \\ \(\forall A_{i}\in G\) & Number of ASes in the ISP network graph \(\mathbb{G}\) \\ \(\forall p\in P_{ij}\) & Shortest path \(p\) in the set of alternate paths \(P_{i,j}\) from \(AS_{i}\) to \(AS_{j}\) \\ \(\forall c_{i}\in C_{A}^{0}\) & ONOS/SDN-IP controller \(c\) in the set of controllers in \(AS0\) \\ \(\forall g_{i}\in R\) & iBGP gateway routers directly connected to switch \(S_{i}\) in \(AS0\) \\ \(\phi_{0}^{*}\) & Root source switch directly attached to ONOS/SDN-IP controller in transit AS \\ \(\tau\) & Time slot for router migration in the optimal path \(p\) \\ \(T_{p}\supseteq\tau\) & Time stamp to migrate all routers in the shortest path \(p\) \\ \(\mathbb{R}\) & Median router in the set of routers’ longest span shortest path (LSSP) (\(p\)) \\ \(\sigma\) & Controller (ONOS/SDN-IP) processing capacity (intent processing and flow rule generation) \\ \(\lambda_{i}\) & Control path latency between switch \(S_{i}\) and controller \\ \(\psi_{i}\) & iBGP peering latency between switch gateway (\(g_{i}\)) and controller BGP speaker \\ \(\gamma_{i}\) & Average control load generated by switch \(S_{i}\) \\ \(\Psi_{i}\) & Average iBGP peering load generated by switch gateway \(g_{i}\) \\ \(x_{i}\) & Binary variable set to TRUE if \(R_{i}\) is migrated to \(S_{i}\) \\ \(y_{i}\) & Binary variable set to TRUE if \(R_{i}\) is a gateway router attached with SDN switch \\ \(z_{i}\) & Binary variable set to TRUE if controller processing capacity exceeds the threshold \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters and their usual meanings. between switch-controller communications. BFT gives the best choice of control traffic load balancing if we slice or cluster the network into different segments for controller placement. The details about the choice of first shortest path, their router migration, and the situation of the network after the first SP routers' migration are depicted in Figure 3. We consider the selection of LSSP from the customer endpoint router to the foreign gateway router having the higher number of routers in its path as the first shortest path for migration. The steps to identify the LSSP are presented in Algorithm 1. The shortest paths are put into order from longest span to shortest span in terms of router numbers, and follow migration in the consequent next phases. Hence, among the available alternate shortest paths, SP2 is selected as the LSSP.