A Box-Covering-Based Routing Algorithm for Large ... - IEEE Xplore

3 downloads 0 Views 3MB Size Report
Apr 24, 2017 - the proposed BCR algorithm code inside the SDN controller. We then design .... convergence, the time for path detection is too long [9], and route flap ... or not converge [12]. ..... When the node number is 100, the running time.
Received December 11, 2016, accepted February 19, 2017, date of publication March 15, 2017, date of current version April 24, 2017. Digital Object Identifier 10.1109/ACCESS.2017.2682501

A Box-Covering-Based Routing Algorithm for Large-Scale SDNs LIANMING ZHANG, QIAN DENG, YIHENG SU, AND YAO HU Key Laboratory of Internet of Things Technology and Application, College of Physics and Information Science, Hunan Normal University, Changsha 410081, China

Corresponding author: L. Zhang ([email protected]) This work was supported in part by the National Natural Science Foundation of China under Grant 61572191 and Grant 61402170, in part by the Hunan Provincial Science and Technology Program Project of China under Grant 2013FJ4051, and in part by the Hunan Provincial Education Department Scientific Research Fund of China under Grant 13B065.

ABSTRACT A routing algorithm is the pivotal and core issue in network communication. Traditional networks often use distributed routing algorithms that lead to difficulties in controlling network routes and accessing information concerning global topology. A software-defined network (SDN) is a new network framework that separates the network control plane from the forwarding/data plane. SDNs can access global topology through SDN controllers and make forwarding decisions based on flow tables. In this paper, we propose a box-covering-based routing (BCR) algorithm using a renormalization method that is applied to research the fractal dimensions of large-scale networks. We divide the entire SDN network into some subnets using a box-covering method, find the shortest path in every subnet and between subnets, and embed the proposed BCR algorithm code inside the SDN controller. We then design a testbed based on the Ryu controller and the Mininet platform for this algorithm. The results show that the proposed BCR algorithm has good low-latency performance and is suitable for a large-scale SDN. INDEX TERMS Software-defined network (SDN), large-scale, box-covering, routing, latency. I. INTRODUCTION

With the development of Internet technology, the network and terminals have increasingly been integrated into people’s daily lives. However, the network architecture design did not originally consider the rapid development of the Internet nor the emergence of the Internet of things, which has directly led to an explosive growth in network nodes. The infrastructure of the current network has been unable to keep pace with the rapid development of the Internet. One of the important features of traditional network architecture is decentralization. It lends to that (1) Packet processing and forwarding control have been performed by different network devices that are difficult to manage and control. (2) Different devices run in different operating systems and install different application software. People deploy network devices with varying capabilities including switches, firewalls, routers, load balancers, and intrusion detection systems. (3) Most of this software has relatively long development periods. Network administrators need to configure various network devices through the configuration port. When developers develop networkrelated software, they may take a long time to understand development standards and perform compatibility tests. (4) There are many devices from different manufacturers 4048

as well as different products from the same manufacturer. Although similar in their functionality, their difference is the way they are configured. Thus, these actions could hamper network innovation and increase the operational complexity of the network, which result in added cost. Against this background, software-defined networks (SDNs) have been developed [1], [2], and [3]. The approaches of SDN will completely change the way we design and configure networks. There are two significant characteristics in SDNs, the separation of the control plane and the data plane and the programmability of networks. It is easier in SDNs to set the forwarding rules of APIs defined in the control plane and to control the entire network. With the development of SDN technology, many business-class switches have begun to support OpenFlow protocol [4]. Platforms for SDN controllers have been successfully developed for various applications including server load balance, dynamic access control, green network architecture, and network virtualization. On the other hand, the routing mechanism is an important aspect of network resource optimization technology, but it is very difficult to achieve optimal performance with the existing distributed routing because of inherent limitations in the traditional network, and the uncontrollability of

2169-3536 2017 IEEE. Translations and content mining are permitted for academic research only. Personal use is also permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

VOLUME 5, 2017

L. Zhang et al.: BCR Algorithm for Large-Scale SDNs

distributed routing algorithms wastes network resources. The above characteristics of SDNs provide new insight into network routing. The centralized controller of SDNs can manage network resources efficiently and support network traffic control, thus improving the performance of network routing. In addition, the Dijkstra algorithm is one of the routing algorithms for determining the shortest path, and it is suitable for finding the shortest path in large-scale networks such as data centers that have millions of network nodes. The box-covering (BC) algorithm is used for calculating the fractal dimension of large-scale networks by covering the network with the minimum possible number of boxes, achieving renormalization of large-scale networks, and revealing interesting features of the network structure [5], [6]. In this paper, we will discuss the problem of routing for SDNs. We propose an algorithm for routing large-scale SDNs. In comparison with similar work, this paper contributes the following: •



The study of the topology of network routing in SDNs and the use of the BC algorithm for dividing the network into many subnets and find the shortest path in every subnet and between subnets. The proposal of a routing algorithm for large-scale SDNs based on the BC algorithm for embedding the proposed algorithm code inside the SDN controller and the design of a testbed for the proposed routing algorithm.

The rest of the article is organized as follows. Section II describes the problems of network routing and related work. Section III describes the basic principles of the BC algorithm and the analysis of an example. In Section IV, the proposed routing algorithm is implemented in the experimental environment that consists of a Ryu controller and Mininet. Section V presents a summary of results, some remarks and future work. II. RELATED WORK

In large-scale networks, data packets will be routed to the source node based on multi-hop routing algorithms. The principle of how to choose the next node is absolutely vital for network routing algorithms. An important characteristic of routing algorithms is the ability to obtain an optimal path based on the global information of network topology. There are many shortest path algorithms applied in network routing. Dijkstra algorithm is a typical shortest path algorithm used for calculating the shortest path from a node to all other nodes. However, there are some weaknesses of routing algorithms. First, real-time computing of nodes with minimum consummation of resources is needed, and the process may be dynamic and nonlinear. With the rapid increase of the number of nodes, the cost of computing rises sharply, but we end up with useless information. Secondly, it is difficult to obtain knowledge of global information in the traditional networks; therefore, some distributed algorithms are accepted in the traditional networks, such as the Routing Information VOLUME 5, 2017

Protocol (RIP) [7] and Open Shortest Path First (OSPF) [8]. These are several problems in implementing the distributed routing algorithms. First, because of the inherent flaw in the traditional distributed network, it is difficult to compute convergence, the time for path detection is too long [9], and route flap may occur [10]. Second, the instability of the prefix will also cause route flap [11]. Autonomous system (AS) conflicting routing can also destabilize the whole network or not converge [12]. The routing deployment of the network is very complex [13]. Third, lacking a global view of network topology, it is hard to confirm the current optimal decision in traditional networks. Although there have been many methods put forward to solve these issues, they are still in the research and development phase. The following list includes the main reasons causing these problems [14]: (1) many routing protocols used in the traditional networks are embedded into the firmware by the manufacturers, and they are difficult to modify; (2) if there is no profit driver, the ISP hates to risk adopting new proposals that can improve performance of the network efficiently; and (3) these new proposals have not been widely adopted and applied to a broad range of network devices, and the user needs to be dedicated to the maintenance of these incompatible devices. There are three important supporting technologies in the development of SDNs, as follows: programmable network functions in the network [2], [3], [15], separation of the control plane and the data forwarding plane [2], [16], and network virtualization [2], [17], [18]. Early SDN protocols focused on control plane programmability. Recent SDN protocols support a wider range of data plane functions. The behavior of network devices in an SDN is handled by software that will allow a network engineer to reprogram network infrastructure. The control plane hardware of SDNs can be physically decoupled from the data forwarding plane hardware, an SDN switch can forward packets, and an SDN controller can run the control plane. Network virtualization presents the abstraction of a network that is decoupled from the underlying physical equipment. It is a prominent early use case for SDNs. These features of SDNs are beneficial in simplifying the complexity of the management and the operation of largescale SDNs that were discussed in [19] and [20]. The traditional network architecture is distributed and decentralized, and most routing algorithms are also distributed. The distributed routing algorithms often need to find the shortest path using some typical algorithm, such as Bellman-Ford or Dijkstra. For example, a distance-vector routing protocol such as RIP that is based on a distributed Bellman-Ford algorithm was applied to APPANET [7]. Then, the routing protocol was replaced by the OSPF protocol that was based on the Dijkstra algorithm [8]. Later, hierarchical routing algorithms appeared. With the advent of the SDN technology, the routing algorithms have been rapidly developed. The appearance of network operating systems [21] has lowered the barrier of entry for testing and applying a new routing algorithm. The SDN technology allows the algorithms to be easily 4049

L. Zhang et al.: BCR Algorithm for Large-Scale SDNs

embedded in a system or a device, and link installing software with a local computer. There have been some SDN platforms for routing control, such as the Routing Control Platform (RCP) [22] and RouteFlow [23]. The programmability of SDNs has motivated researchers to suggest new ideas. For example, on-demand intelligent routing strategy [24] allows different users to use different routing strategies. Reference [25] proposes a delay-optimized traffic routing scheme to explicitly differentiate path selection for different sessions according to their delay sensitivities in software-defined inter-datacenter networks. Reference [26] studied the problem of computing multipath multicast routes for streaming videos in SDNs. Reference [27], [28] extended the Dijkstra’s shortest path algorithm to consider both edge weights and node weights for a graph derived from the underlying SDN topology. Reference [29] analyzed the suitability of different routing algorithms for dynamic set up of performance guaranteed traffic tunnels in backbone large-scale SDN networks. Some of the existing routing algorithms in SDN environments are based on multipaths that will reduce routing load, but some of them dynamically adjust the parameters of routing algorithms based on real-time link information. These algorithms, however, ignore the information of network topology. III. A BOX-COVERING-BASED ROUTING ALGORITHM

There are some inherent flaws in the route design of the traditional network architecture. Currently, research on network routing algorithms concentrates primarily on the following factors: (1) multipath routing algorithms: the essence of routing algorithms is to find the shortest path to forward packets with minimal overhead costs, and there is more than one optimal choice caused by the complexity of different types of networks; and (2) dynamic adjustment of route parameters: this type of algorithms modifies routing parameters in real time based on link state information, such as communication delay, bandwidth, and packet loss rate. There are a few routing algorithms for SDNs already, but most are based on multipath routing and dynamic link calculations. But in this paper, we can optimize routing strategy according to the topology information. The low time complexity of the Dijkstra algorithm that is designed to find the shortest path algorithm based on the network topology information is O(V +ElogE) in graph theory, and with reducing the number of nodes V and edges E, the complexity of the Dijkstra algorithm will be lower. At the international level, complex network theory for large-scale networks and its applications have rapidly developed. The most desirable characteristic of complex networks is that it analyzes a problem from its structure. The topology structure of large-scale networks determines the function. Routing is a function associated with the network layer, meaning that the routing algorithm for large-scale SDNs is determined using the topology structure. The BC algorithm that is applied to renormalize the structure of large-scale 4050

networks is most capable of decreasing the number of nodes and edges without changing the structural characteristics and functions of the network. In this paper, we propose a box-covering- based routing (BCR) algorithm for large-scale SDNs, and the BCR algorithm is even more optimal than the Dijkstra algorithm. The BCR algorithm has the following goals: (1) to introduce a box-covering method into routing strategy and to reduce the number of nodes and edges of large-scale SDNs and (2) to divide large-scale SDNs into several subnets for use in the BC algorithm and the shortest path calculated in every subnet. A. PRINCIPLE OF THE BCR ALGORITHM

In this section, we demonstrate the principle of the BCR algorithm proposed in the paper. Firstly, the whole network is divided into several subnets by using the BC algorithm, and each subnet is covered by a box of size l. Secondly, we treat each subnet as a new node, and find the shortest path between these new nodes (that is, the subnets) by the Dijkstra algorithm. Thirdly, we seek the shortest path between nodes inside every subnet by the Dijkstra algorithm. Finally, we link the shortest path between subnets and the shortest paths inside those corresponding subnets. The entire route from the source node to the target node is found for large-scale SDNs. The BC algorithms were first used for calculating the fractal dimension of a complex network [5] including the greedycoloring (GC) algorithm, the compact-box-burning (CBB) algorithm and maximum-excluded-mass-burning (MEMB) algorithm. The GC algorithm needs to maintain a two dimensional table, and the huge memory consumption of implementation of the GC algorithm for large-scale SDNs is the largest obstacle of its application. The algorithm cannot ensure that all nodes in a box are connected. The CBB algorithm can only be applied to some specific structures of networks, and it is a likely variable to skew results, especially in the face of adjoining hubs. The optimal BC algorithm is inefficient and has high-overhead. The MEMB algorithm overcomes the above disadvantages to some extent. The principle of the MEMB algorithm is as follows: the excluded mass of a node is the number of the uncovered nodes that are less than l from the node, the excluded mass of all uncovered nodes are calculated, and we select the node with greatest excluded mass value as the center and cover again. Different from traditional networks, the SDN controller is able to grasp the global topological information that decides whether the routing algorithm will find the shortest path (or as close as possible). To better apply the MEMB algorithm to a large-scale SDN, the detailed process of this algorithm is as follows: (1) calculate the excluded mass of each node, (2) select a central node and then recalculate the excluded mass, (3) select a new node as the central node and the entire network is then covered by these two boxes, (4) calculate the distance from the nearest central node and each box first contains the central node, and (5) put each node into the nearest box and the center distance refers to the distance between the current node and the central node. Using knowledge of global VOLUME 5, 2017

L. Zhang et al.: BCR Algorithm for Large-Scale SDNs

topology information of large-scale SDNs and combining the BC algorithm (the MEMB algorithm) and the shortest path algorithm (the Dijkstra algorithm), the BCR algorithm for a large-scale SDN is proposed as Algorithm 1. Algorithm 1 The BCR Algorithm 1: G1=global network topology 2: bc=BoxCovering(G1) 3: G2=bc.box_gragh() 4: p1= G2.shorest_path() 5: for box in p1 do 6: shortest_paths.append(box.shortest_path()) 7: end for 8: result=reduce(shortest_paths,join) 9: return result The BRC algorithm is composed of a finding section and a covering section. The first is used to find the shortest paths based on the Dijkstra algorithm. The second is used to calculate the number of boxes to cover the network using the BC algorithm. The BC algorithm uses the following two parameters as input: a network graph G and a box size l. The different box size maybe produces the different result of the shortest path. The outputs of the BC algorithm area graph Gbox , which is formed by boxes and a hash table dboxt on ode formed by a box and its nodes. The main functions of the BC algorithm are shown in Table 1. TABLE 1. The main functions of the BC algorithm.

FIGURE 1. An example of network topology.

FIGURE 2. The structure of the box-covering network.

FIGURE 3. The shortest path of the box-covering network.

The process of the BCR algorithm includes the following phases. First, we suppose that we need to find the shortest path from node 1 to node 25. The network is divided into six boxes using the BC algorithm, and the nodes in each box (the dotted line circle) are marked with a colored flag. Second, we think of each box as a single node. If there is an edge between two nodes in two different boxes, we believe that these two boxes are connected. The network as shown in Figure 2 is composed of six different boxes formed by the network shown in Figure 1. Obviously, the size of the network is greatly decreased. Third, we find the shortest path (the heavy solid lines) between node 1 and node 3 using the Dijkstra algorithm, as shown in Figure 3. Finally, we only need to find the shortest path to calculate the shortest path in each box and then link to the shortest paths. The global shortest path (the red solid lines) from node 1 to node 25 is obtained, as shown in Figure 4. C. ANALYSIS OF THE BCR ALGORITHM

B. AN EXAMPLE OF THE ALGORITHM

In this section, an example is given to illustrate the process of the proposed BCR algorithm. The network includes 40 nodes and 58 edges, as shown in Figure 1. VOLUME 5, 2017

The BCR algorithm is divided into four steps as follows: (1) run the BC algorithm on the network and divide the network into different subnets, (2) run the Dijkstra algorithm on the network where a subnet is considered a node and find the shortest path between subnets, (3) find the shortest path inside each subnet, and (4) link the shortest paths. To verify 4051

L. Zhang et al.: BCR Algorithm for Large-Scale SDNs

FIGURE 4. Illustration of the global shortest path. TABLE 2. The results of the running time (in seconds). FIGURE 5. Framework of the experimental platform.

the effectiveness of the BCR algorithm, we have implemented some sample applications and run the BCR algorithm on many large-scale networks of different sizes. We then compared the BCR algorithm with the Dijkstra algorithm. The large-scale networks are generated by the large-scale network model proposed in [30]. We run the BCR algorithm and the Dijkstra algorithm to find the shortest path of a node to all other nodes. The results are shown in Table 2. The node number of the network is given in the first column in Table 2. The second column and the third column are, respectively, the running time of the Dijkstra algorithm and the BCR algorithm for finding the shortest path. Here, in order to do comparison, we assume that the size l of each box is 1. You can see that the running time of the Dijkstra algorithm is significantly reduced when the node number is 10. The difference between the running times of the two algorithms becomes smaller as the number of nodes increases. When the node number is 100, the running time is approximately equal. With rapid growth of the numbers of nodes, the advantage of the BCR algorithm becomes increasingly obvious. IV. IMPLEMENTATION OF BCR ALGORITHM A. BUILDING OF THE PLATFORM

In this section, we build the platform for implementing the proposed BCR algorithm on the large-scale SDN. The experimental platform involves the following software tools and programming languages: Ubuntu 14.04 LTS from 4052

Canonical Ltd (Isle of Man, England), Mininet 2.2 developed by Nick McKeown from Stanford University, Ryu 3.6 from Nippon Telegraph and Telephone Corporation (Tokyo, Japan), Python 2.7.9 developed by Guido van Rossum from the Netherlands, and VirtualBox 4.3.10 from Oracle Corporation. The hardware environment includes a PC that has an Intel i7-3414 as a CPU, 8G DDR3 1600 of internal user memory, 1G 7200 rpm of hard disk, and an Intel PRO/ 1000 MT as NIC. The framework of the experimental platform is shown in Figure 5. It is divided into three layers. The bottom layer (data forwarding layer) is actually a virtual network environment based on the Mininet 2.0 platform. The underlying OpenVSwitch is a virtual OpenFlow switch generated by the OVS module and supports OpenFlow 1.3. The OpenVSwitch communicates with the middle layer using the OpenFlow protocol. The middle layer (network control layer) is the Ryu controller, and the Ryu controller uses the Northbridge supporting Python API as an interface to the top layer (application layer). The network policy, in routing and firewall, runs in the application layer. The proposed BCR algorithm is embedded in the application layer. B. GENERATION OF SDN TOPOLOGY

We use the above experimental platform to create an SDN, and then we send and receive the packets in the SDN. We run several tests to validate the performance of the BCR algorithm by monitoring packet delay. Tests are conducted under a variety of network sizes. An example of the SDN topology is shown in Figure 6. The SDN has 10 nodes (switches), one sender (source host) and three receivers (host 1, host 2 and host 3). The whole period can be divided into two stages. In the first stage, the source host sends the first message, and the controller of the SDN calculates the route. The route information is assigned to all switches and is stored in the flow table of each switch. This stage takes a long time. In the second stage, the flow table is in every switch, the Ryu controller does not participate, and the time it takes to send other packets is reduced. There are two time variables, and they serve as performance indicators for routing. The first time variable is affected by the routing algorithm, and VOLUME 5, 2017

L. Zhang et al.: BCR Algorithm for Large-Scale SDNs

FIGURE 6. Example of SDN topology.

the route distance is the key factor impacting the second time variable. We use NetworkX library to generate the topology of the large-scale SDN, and then use the interface of Mininet to convert it into the network topology. The code for the generation of network topology is shown in Algorithm 2. C. IMPLEMENTATION OF THE BCR ALGORITHM

The BCR algorithm is deployed in the Ryu controller by using a programming interface. The event-driven programming model has been adopted in the Ryu controller. The Ryu controller generates an event when an OpenFlow message is reached. The Ryu controller implements an eventhandler and uses it to handle the relevant event. In the BCR algorithm, the major event is EventOFPPacketIn, and this event has four statuses, as shown in Table 3.

Algorithm 2 The Generation of Network Topology 1: Class MNTopo(Topo): def_init_(self, cpu=.1, max_queue_size= none, ∗∗ params): 2: # initialize topo Topo.init_(self, ∗∗ params) 3: # host and link configuration 4: hostConfig = {‘cpu’: cpu} 5: linkConfig = {‘bw’: 5, ‘delay’: ‘10ms’, ‘loss’: 0, ‘max_queue_size’: max_queue_size} 6: g = nx.barabasi_albert_graph(50, 2) 7: # host and switches for node in g.nodes(); 8: self.addSwitch(node) sender = self.addHost (‘sender’, ∗∗ hostConfig) 9: receiver1 = self.addHost(‘receiver1’, ∗∗ hostConfig) 10: receiver2 = self.addHost(‘receiver2’, ∗∗ hostConfig) 11: receiver3 = self.addHost(‘receiver3’, ∗∗ hostConfig) 12: # wire receiver 13: self.addLink(receiver1, choice(g.nodes()), ∗∗ linkConfig) 14: self.addLink(receiver2, choice(g.nodes()), ∗∗ linkConfig) 15: self.addLink(receiver3, choice(g.nodes()), ∗∗ linkConfig) 16: # wire sender 17: self.addLink(sender, choice(g.nodes()), ∗∗ linkConfig) 18: # wire switches 19: for v, w in g.edges(): 20: self.addLink(v, w, ∗∗ linkConfig)

TABLE 3. The statuses of EventOFPPacketIn.

the PacketIn event. We have used these two codes as the route policy modules in the Ryu controller. D. PERFORMANCE ANALYSIS OF BCR ALGORITHM

The four statuses represent exchange HELLO messages, wait-receiving SwitchFeatures messages, normal status, and disconnected status, respectively. You can set a different handler to handle these events that have different statuses. After the OpenFlow switch completes the handshake with the Ryu controller, it will add a Flow-miss item into the flow table entry. When the OpenFlow switches have no corresponding match, the packet will be transmitted to the Ryu controller, and the Ryu controller completes forwarding control. The key code of the Dijkstra algorithm in the Ryu controller is given in Algorithm 3. The key code of the BCR algorithm in the Ryu controller is shown in Algorithm 4. The above codes are the key parts of the Dijkstra algorithm and the BCR algorithm, and they are the handlers for handling VOLUME 5, 2017

We can use the mn-custom./topo10.py –topo topo10 –mac – switch ovsk –controller remote -x command to run Mininet, and the topology of the SDN is defined by the document topo10.py. We start the controller, and load the corresponding routing modules. We collect the network performance metrics (especially latency) by pinging the source host to different hosts in Mininet. The total latency of routing packets from one node to another includes the following two stages: route establishing latency and data transmission latency. The results of the latencies by using the Dijkstra algorithm and the BCR algorithm on SDNs with 10 nodes, 50 nodes and 100 nodes are shown in Figure 7-9. The blue solid line represents the results of the BCR algorithm, and the red dotted line represents the results of the Dijkstra algorithm. Figure 7 shows the impact of network size on the route establishing latency. The route establishing latency based on the BCR algorithm is long because the switches do not know how to send a message. The algorithm must match Flow_miss of the flow table entry. The packet is transmitted to 4053

L. Zhang et al.: BCR Algorithm for Large-Scale SDNs

Algorithm 3 Code of the Dijkstra Algorithm in the Ryu controller 1: @ set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER) 2: def_packet_in_handler(self, ev): 3: msg = ev.msg 4: datapath = msg.datapath 5: ofproto = datapath.ofproto 6: pkt = packet.packet(msg.data) 7: eth = pkt.get_protocol(ethernet.ethernet) 8: dst = eth.dst 9: src = eth.src 10: dpid = datapath.id 11: self.mac_to_port.setdefault(dpid, {}) 12: if src not in self.net: 13: self.net.add_node(src) 14: self.net.add.edge(dpid, src, {‘port’: msg.in_port}) 15: self.net.add_edge(src, dpid) 16: if dst in self.net: 17: dij_sp = DijstraSP(self.net, src) 18: path = dij_sp.distance_to(dst) 19: next = path[path.index(dpid)+1] 20: out_port = self.net[dpid][next][‘port’] 21: else: 22: out_port = ofproto.OFFP_FLOOD 23: actions = [datapath.ofproto_parser.OFPActionOutput(out_port)] 24: if out_port !=ofproto.OFPP_FLOOD: 25: self.add_flow(datapath, msg.in_port, dst, actions) 26: out = datapath.ofproto_parser.OFPPacketOut(datapath = dadapath, buffer_id = msg.buffer_id, in_port = msg.in_port, actions = actions) 27: datapath.send_msg(out)

FIGURE 7. Route establishing latency (in ms).

the Ryu controller. The Ryu controller knows the source and destination addresses from the packet header information. It calculates the shortest path using the Dijkstra algorithm. 4054

Algorithm 4 Code of the BCR Algorithm in the Ryu controller 1: @ set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER) 2: def_packet_in_handler(self, ev): 3: msg = ev.msg 4: datapath = msg.datapath 5: ofproto = datapath.ofproto 6: pkt = packet.Packet(msg.data) 7: eth = pkt.get_protocol(ethernet.ethernet) 8: dst = eth.dst 9: src = eth.src 10: dpid = datapath.id 11: self.mac_to_port.setdefault(dpid, {}) 12: if src notin self.net: 13: self.net.add_node(src) 14: self.net.add.edge(dpid, src, {‘port’: msg.in_port}) 15: self.net.add_edge(src, dpid) 16: if dst in self.net: 17: boxcovering = BoxCovering(self.net, l=3) 18: boxcovering.maximum_exclude_mass_ burning() 19: box_graph = boxcovering.box_graph 20: box_sp = DijkstraSP(box_graph, box_graph[0]) 21: box_path = box_sp.distance_to(dst.box) 22: defcompute_sp(self, box): 23: ds = DijkstraSP(x, x[0]) 24: path = ds.distance_to(dst) 25: node_sp = map(compute_sp, box_path) 26: path = [] 27: reduce(append, path, node_sp) 28: next = path[path.index(dpid)+1] 29: out_port = self.net[dpid][next][‘port’] 30: else: 31: out_port = ofproto.OFFP_FLOOD 32: actions = [datapath.ofproto_parser. OFPActionOutput(out_port)] 33: if out_port !=ofproto.OFPP_FLOOD: 34: self.add_flow(datapath, msg.in_port, dst, actions) 35: out = datapath.ofproto_parser. OFPPacketOut(datapath = dadapath, buffer_id = msg.buffer_id, i_port = msg.in_port, actions = actions) 36: datapath.send_msg(out) The information of the shortest path is written to the flow table of the OpenFlow switch. The packets can be forwarded to the next node by matching rules. With the increase of network scale, the route establishing latency becomes increasingly larger. We also found that route establishing latency based on the BCR algorithm is much smaller than that based on the Dijkstra algorithm. VOLUME 5, 2017

L. Zhang et al.: BCR Algorithm for Large-Scale SDNs

V. CONCLUSION AND FUTURE WORK

FIGURE 8. Data transmission latency (in ms).

FIGURE 9. Total latency (in ms).

Figure 8 shows the impact of network size on data transmission latency. With the enlargement of the size of the SDN, the data transmission latency increases. However, the data transmission latency is much smaller than the route establishing latency (see Figure 7). After establishing a route, the switches accomplish the forwarding function of the data, and the SDN controller does not participate. We can see that when the node number reaches 100, the two data transmission latencies greatly increase. This result occurs because one standalone runs 100 virtual nodes, consumes huge resources, and increases the scheduling time for resources. Figure 9 shows the impact of network size on the total latency. As the SDN increases in size, the total latency becomes increasingly larger. From Figure 9, if the number of nodes is 10, the total latency based on the BCR algorithm is greater than the total latency based on the Dijkstra algorithm. With the increase in the size of the SDN, the difference between the two total latencies decreases. When the number of nodes is 50, the two total latencies are approximately equal. When the number of nodes reaches 100, the total latency based on the BCR algorithm is significantly less than that of the Dijkstra algorithm. From Figure 8, we can see that when the node number is 10, the data transmission latency based on the BCR algorithm has been increased by 9%. If the number of nodes is 50, the propagation latency based on the BCR algorithm has been increased by 14%. When the number of nodes reaches 100, the data transmission latency based on the BCR algorithm is only a 5% increase. The main reason for these results is the BCR algorithm is a local optimal algorithm. As the SDN size increases, especially for a large-scale SDN, the proposed BCR algorithm can lead to optical solution sets. VOLUME 5, 2017

The complexity and uncontrollability of routing algorithms in traditional networks leads to low utilization of network resources. The emergence of SDN technology has provided a new way to improve the usage rate of network resources. The SDN is a promising solution for network virtualization that decouples control from the forwarding or data plane. Using the SDN technology can achieve a variety of routing algorithms that can be complex if implemented in the traditional networks. In this paper, using box-covering, we propose a BCR algorithm through programming interfaces of the SDN. There are two approaches in the current routing algorithms designed for SDNs; one is a multi-path routing scheme, and the other comprises route computation according to real-time renewed information. There have been few studies concerning routing issues from the point of view of network topology. The traditional router could acquire local topology information to route traffics, but the SDN has a central controller that can acquire global information or topology. This paper proposes a BCR algorithm based on topology information. The existing routing algorithms for the SDN generally use the Dijkstra algorithm for the shortest path. The complexity of the Dijkstra algorithm using Fibonacci heaps is O(V +ElogE). That is, the total number of nodes and edges will affect the efficiency of the Dijkstra algorithm. There are many large complex networks in natural and real systems, and these networks have many nodes and edges. The existing routing algorithms for a large-scale SDN poor perform poorly. This paper proposed the BCR algorithm by dividing the whole network into many logical subnets. The proposed algorithm finds the shortest path between two subnets and within a subnet. To efficiently divide the whole network into subnets, the paper uses renormalization and box-covering methods beginning with complex networks. The core idea behind the method is to cover the whole network using as few boxes as possible. The proposed BCR algorithm introduces the box-covering approach to cover the network; the validity of the BCR algorithm has been proven with several examples. We built an experimental setting using Mininet and Ryu Controller, and embedded the proposed BCR algorithm into the Ryu controller. The results show that the proposed BCR algorithm performs better in large-scale networks than in others. The next step in this work is to discuss the method of optimum calculation for the number of boxes and the shortest paths and supplement the current information available on subnets connected to subnets. The proposed BCR algorithm characteristics have broad prospects for further development and mining, for example, how to control in real-time the box size parameter and provide route optimization. REFERENCES [1] D. Kreutz, F. M. V. Ramos, P. E. Veríssimo, C. E. Rothenberg, S. Azodolmolky, and S. Uhlig, ‘‘Software-defined networking: A comprehensive survey,’’ Proc. IEEE, vol. 103, no. 1, pp. 14–76, Jan. 2014. 4055

L. Zhang et al.: BCR Algorithm for Large-Scale SDNs

[2] N. Feamster, J. Rexford, and E. Zegura, ‘‘The road to SDN: An intellectual history of programmable networks,’’ ACM SIGCOMM Comput. Commun. Rev., vol. 44, no. 2, pp. 87–98, 2014. [3] B. A. A. Nunes, M. Mendonca, X.-N. Nguyen, K. Obraczka, and T. Turletti, ‘‘A survey of software-defined networking: Past, present, and future of programmable networks,’’ IEEE Commun. Surveys Tuts., vol. 16, no. 3, pp. 1617–1634, 3rd Quart. 2014. [4] S. J. Vaughannichols, ‘‘OpenFlow: The next generation of the network,’’ Computer, vol. 44, no. 8, pp. 13–15, 2011. [5] C. Song, L. K. Gallos, S. Havlin, and H. A. Makse, ‘‘How to calculate the fractal dimension of a complex network: The box covering algorithm,’’ J. Statist. Mech. Theory Experim., vol. 2007, no. 3, pp. 297–316, 2007. [6] D. J. Wei, Q. Liu, H.-X. Zhang, Y. Hu, Y. Deng, and S. Mahadevan, ‘‘Boxcovering algorithm for fractal dimension of weighted networks,’’ Sci. Rep., vol. 3, no. 6157, p. 3049, 2013. [7] C. Hedrick, ‘‘Routing information protocol,’’ Tech. Rep. RFC1058, 1988. [8] J. Moy, ‘‘OSPF version 2,’’ Tech. Rep. RFC2328, 1998. [9] O. Ricardo, B. Zhang, D. Pei, and L. Zhang, ‘‘Quantifying path exploration in the Internet,’’ IEEE/ACM Trans. Netw., vol. 17, no. 2, pp. 445–458, Apr. 2009. [10] Z. M. Mao, R. Govindan, and G. Varghese, ‘‘Route flap damping exacerbates Internet routing convergence,’’ ACM SIGCOMM Comput. Commun. Rev., vol. 32, no. 4, pp. 221–233, 2003. [11] D. Mcpherson, V. Gill, D. Walton, and A.Retana, ‘‘Border gateway protocol (BGP) persistent route oscillation condition,’’ Tech. Rep. RFC 3345, Aug. 2002. [12] T. G. Griffin and G. Wilfong, ‘‘An analysis of BGP convergence properties,’’ ACM SIGCOMM Comput. Commun. Rev., vol. 29, no. 4, pp. 277–288, 1999. [13] M. Caesar and J. Rexford, ‘‘BGP routing policies in ISP networks,’’ IEEE Netw., vol. 19, no. 6, pp. 5–11, Nov. 2005. [14] V. Kotronis, X. Dimitropoulos, and B. Ager, ‘‘Outsourcing the routing control logic: Better Internet routing based on SDN principles,’’ in Proc. 11th ACM Workshop Hot Topics Netw., Redmond, WA, USA, 2012, pp. 55–60. [15] A. T. Campbell et al., ‘‘A survey of programmable networks,’’ ACM SIGCOMM Comput. Commun. Rev., vol. 29, no. 2, pp. 7–23, 1999. [16] S. H. Yeganeh, A. Tootoonchian, and Y. Ganjali, ‘‘On scalability of software-defined networking,’’ IEEE Commun. Mag., vol. 51, no. 2, pp. 136–141, Feb. 2013. [17] D. Drutskoy, E. Keller, and J. Rexford, ‘‘Scalable network virtualization in software-defined networks,’’ IEEE Internet Comput., vol. 17, no. 2, pp. 20–27, Mar./Apr. 2013. [18] T. Wood et al., ‘‘Toward a software-based network: Integrating software de-fined networking and network function virtualization,’’ IEEE Netw., vol. 29, no. 3, pp. 36–41, Mar. 2015. [19] C. Fernandez et al., ‘‘A recur sive orchestration and control framework for large-scale, federated SDN experiments: The FELIX architecture and use cases,’’ Int. J. Parallel, Emergent Distrib. Syst., vol. 30, no. 6, pp. 428–446, 2015. [20] T. Choi et al., ‘‘SuVMF: Software-defined unified virtual monitoring function for sdn-based large-scale networks,’’ in Proc. 9th Int. Conf. Future Internet Technol., Jun. 2014, p. 4. [21] N. Gude et al., ‘‘NOX: Towards an operating system for networks,’’ ACM SIGCOMM Comput. Commun. Rev., vol. 38, no. 3, pp. 105–110, 2008. [22] C. E. Rothenberg et al., ‘‘Revisiting routing control platforms with the eyes and muscles of software-defined networking,’’ in Proc. 1st Workshop Hot Topics Softw. Defined Netw. (HotSDN), 2012, pp. 13–18. [23] M. R. Nascimento et al., ‘‘Virtual routers as a service: The routeflow approach leveraging software-defined networks,’’ in Proc. 6th Int. Conf. Future Internet Technol. (CFI), 2011, pp. 34–37. [24] X. Wang et al., ‘‘Research and verifi-cation on SDN-based on-demand smart routing system,’’ Telecommun. Sci., vol. 30, no. 4, pp. 8–14, 2014. [25] Y. Liu, D. Niu, and B. Li, ‘‘Delay-optimized video traffic routing in software-defined inter data center net-works,’’ IEEE Trans. Multimedia, vol. 18, no. 5, pp. 865–878, May 2016. [26] M. W. Lee et al., ‘‘Robust multipath multicast routing algorithms for videos in software-defined networks,’’ in Proc. IEEE 22nd Int. Symp. Quality Service (IWQoS), May 2014, pp. 218–227. [27] J. Jiang, H.-W. Huang, J.-H. Liao, and S.-Y. Chen, ‘‘Extending Dijkstra’s shortest path algorithm for software defined networking,’’ in Proc. Asia–Pacific Netw. Oper. Manage. Symp., Sep. 2014, pp. 1–4. 4056

[28] W. Yahya, A. Basuki, and J. R. Jiang, ‘‘The extended Dijkstra’s-based load balancing for openflow network,’’ Int. J. Elect. Comput. Eng., vol. 5, no. 2, pp. 289–296, 2015. [29] S. Tomovic, I. Radusinovic, and N. Prasad, ‘‘Performance comparison of QoS routing algorithms applicable to large-scale SDN networks,’’ in Proc. IEEE Int. Conf. Comput. Tool, Sep. 2015, pp. 1–6. [30] S. Yook, H. Jeong, and A. Barabasi, ‘‘Modeling the Internet’s large-scale topology,’’ Proc. Nat. Acad. Sci. USA, vol. 99, no. 21, pp. 13382–13386, 2002.

LIANMING ZHANG received the B.S. and M.S. degrees from Hunan Normal University, China, and the Ph.D. degree from Central South University, China. He is currently a Professor with the School of Physics and Information Science, Hunan Normal University, where he leads the Key Laboratory of Internet of Things Technology and Application. He completed a two-year PostDoctoral Fellowship in complex networks at South China University of Technology. He manages research projects funded by various sources, such as National Natural Science Foundation of China and industries. He has authored more than 90 papers. His research interests include cloud computing, software-definednetworking, complex networks, and network calculus.

QIAN DENG received the B.S. degree from Hunan Normal University, China in 2015. He is a member of the Key Laboratory of Internet of Things Technology and Application. His research interests include routing, wireless communication, and software-defined networking.

YIHENG SU received the B.S. and M.S. degrees from Hunan Normal University, China, in 2013 and 2016, respectively. He is a member of the Key Laboratory of Internet of Things Technology and Application. His research interests include qualityof-service and software-defined networking.

YAO HU received the B.S. degree from Hunan Normal University, China, in 2014. She is currently pursuing the M.S. degree with the College of Physics and Information Science, Hunan Normal University. She is a member of the Key Laboratory of Internet of Things Technology and Application. Her research interests include wireless communication and network and cloud computing.

VOLUME 5, 2017