## 5 Results and Discussion
### Experimental Details  
The complete detail of the experimental setup and tools are discussed in this section. This section covers the details of the tools and why they were selected in this experiment. First, as we know, the main objective of our proposed framework is to convert \(m\) heterogeneous controllers into \(n\) homogeneous groups in an SDN-IoT-based network. First, we must construct a network with multiple hosts and open-flow switches. In the experiment, two real-world topologies are created. Figure 4(a),4(b) show these networks' graphical representations on the map. The data of these networks are available on Internet Topology Zoo. The ITZ is a public online source, where data of different network real-world topologies are stored. The ITZ has many different network topologies which are publicly available from various network providers around the globe. Around 250 different network topologies' data are presented as undirected graphs in GraphML format. Extensible markup language (XML) is used to represent all topologies' data [53]. The ITZ provides detailed data about each topology in its database. The details about nodes, their connectivity, bandwidth, and their location in terms of longitude and latitude are essential to construct the network. The two topologies which we used are AARNET and DFN. The details about how these data are used to construct the topology in Mininet are discussed in the next paragraph. Listing 1 shows important topology data in XML format. There is much information in these structures, but to construct a topology, you need some important values from this XML structure. We exclude the meta-data and pass the important values to Mininet to generate the topology through the parser. Every node in the structure represents a switch, and edges represent a link between these nodes (switches). Each node has a unique ID number, and every node has some information. The important information about every node is its longitude and latitude. These are used to calculate the delay between two connected switches. The information in the edges tells us about the connection to two switches and their link bandwidth. The topology in Mininet is constructed through these important values of network topology. We are interested in these values in parsing Listing 2. Figure 5: AARNET/DFN network topologies. ``` #!/usr/bin/python frommininet.topoimportTopo... classGeneratedTop(Top): def_init_(self,**opts): #InitializeTopology Topo_init_(self,**opts) #switchesfirst CHE=self.addSwithc('sq')... #addnewhosts CHE_host=self.addHost('h0')... #addedgesbetweenswitches self.addLink(CHE,CHE_host)... #addedgesbetweenswitches self.addLink(CHE,LEI,bw=10,delay='0.348009503 ms')... #addnewhosts CHE_host=self.addHost('h0')... #addedgesbetweenswitches self.addLink(CHE,CHE_host)... #addedgesbetweenswitches self.addLink(CHE,LEI,bw=10,delay='0.348009503 ms')... #addaddedgesbetweenswitches loops='generated'; (**lambda**:GeneratedTopo0)... #addaddedgesbetweensw



Mininet is a lightweight emulation tool built for the emulation of networks with the support of an SDN controller. The bandwidth and delay parameters of the links can be set in Mininet. In our scenario, the delay between switches is the time a packet takes between two connected nodes. Latitude and longitude data are used to calculate the delay between nodes. The following formulas [54] are used to find the delay time between two nodes. Table 3 shows the important notations used in Equations (11) and (12):

\[dist(SF,DP)=cos^{-1}\{sin(La_{DP})\cdot sin(La_{SP})+cos(La_{DP})\cdot cos(La_{ SP})\cdot cos(La_{DP}-La_{SP})\}\cdot r \tag{11}\]

\[t_{l}=\frac{dst(SP,DP)}{v_{l}} \tag{12}\]

The spherical law of cosine is used to calculate the distance of topology in Equation (11). The radius value is assumed. The nodes are connected via a fiber optic link, so the signal speed is taken as the speed of light and divided by the reflective factor of 1.52.