## 5 Experimental Setup, Analysis and Evaluations
The latency graphs depicted in Figure 6a,b shows the latency status of switches and iBGP-peers in the random network without applying the BFR technique. Routers were migrated in a sequence ordering the shortest paths from the highest to lowest number of routers. Both graphs in Figure 6 show that the controller connected to either S5 or S6 gave the MCPL value. During the switch migration, iBGP-peers automatically appear and disappear. After the complete migration of transit routers, only AS gateways acted as iBGP-peers. This can be seen from the control path latency by gateway routers, in which latency increased, reached the peak value, and then reduced to zero after complete migration. We avoided the control traffic due to AS gateways during migration since AS gateways are fixed and generate regular iBGP peering traffic after complete migration of all routers in the AS. Figure 7 presents the latency by switches, and gateways after applying the BFR approach. From Figure 7a, based on switch latency traffic, attaching the controller with S6 gave minimum latency, while gateway latency shows that setting S5 as RSS gave a slightly better result. The number of iBGP peers changes dynamically during the router migration. Hence, we considered the minimum latency generated by switches to take the decision for controller placement. Figure 5: Network graphs generated after migration: (**a**) Random network; (**b**) Abilene Network. Figure 6: Control path latency without BFR in the Random network, while setting the switches (S1, S4, S5, and S6) as RSSes with one router migration in a sequence: (**a**) control path latency by switch; (**b**) control path latency by iBGP-peers formed during migration. Figure 8 shows that application of the BFR technique yielded a better result than sequential replacement to attach the controller with S6. This is also clarified by the curve of the difference in latency value with and without BFR for switch S6, which shows the overall difference in the positive distribution during migration. We ran another experiment with the standard Abilene network depicted in Figure 5b. gwr4 was considered as the foreign gateway connected via \"Seattle\". The LSSP was found to be from gwr1 to gwr4 via (Chicago, Indianapolis, Kansas City, Denver, Seattle). Figure 9a,b shows the graphs of control path latency by SDN switches and gateways without using BFR, while Figure 10a,b shows the same after using BFR. The latency plots in both figures indicate that attaching the controller with median router \"Kansas City\" gave the best result. Figure 8: Switch latency with and without applying BFR in the Random network during migration for controller placement. Figure 7: Control path latency with BFR in the Random network, while setting the switches (S1, S4, S5, and S6) as RSSes with one router migration in a sequence: (**a**) control path latency by switch; (**b**) control path latency by iBGP-peers formed during migration. Figure 9: Control path latency without BFR in the Abilene network, while setting Chicago, Denver, Indianapolis, Kansas City, and Seattle as RSSes with one router migration in a sequence: (**a**) control path latency by switch; (**b**) control path latency by iBGP-peers formed during migration. Choosing the optimal path for router replacement sometimes left the stub or backup link routers unmigrated. Those routers left unmigrated were set into migration in the final stage. For example, in Figure 11, there are seven routers identified in the shortest path and four routers left unmigrated. Hence, these four routers were migrated in the final stage, making the cumulative number of migrated routers eleven. Figure 11 presents the comparative chart of the latency plot with and without using BFR in the router migration of the Abilene network. Additionally, it shows the difference of latency value without and with using BFR for \"Kansas City\", as the RSS has positive distribution. This shows that implementation of BFR approach gave the better result in attaching the controller with \"Kansas City\".