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

0 downloads 0 Views 445KB Size Report
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:.
This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2017.2682501, IEEE Access

A Box-Covering-Based Routing Algorithm for Large-Scale SDNs Lianming Zhang, Qian Deng, Yiheng Su, Yao Hu College of Physics and Information Science, Key Laboratory of Internet of Things Technology and Application, Hunan Normal University, Changsha 410081, China Corresponding author: L. M. Zhang ([email protected]) ABSTRACT A routing algorithm is the pivotal and core issue in network communication. The 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

develop network-related software, they may take a long

With the development of Internet technology, the network

time to understand development standards and perform

and terminals have increasingly been integrated into

compatibility tests. (4) There are many devices from

people’s daily lives. However, the network architecture

different manufacturers as well as different products from

design did not originally consider the rapid development

the same manufacturer. Although similar in their

of the Internet nor the emergence of the Internet of things,

functionality, their difference is the way they are

which has directly led to an explosive growth in network

configured. Thus, these actions could hamper network

nodes. The infrastructure of the current network has been

innovation and increase the operational complexity of the

unable to keep pace with the rapid development of the

network, which result in added cost.

Internet. One of the important features of traditional

Against this background, software-defined networks

network architecture is decentralization. It lends to that (1)

(SDNs) have been developed [1][2][3]. The approaches of

Packet processing and forwarding control have been

SDN will completely change the way we design and

performed by different network devices that are difficult to

configure

manage and control. (2) Different devices run in different

characteristics in SDNs, the separation of the control plane

operating

application

and the data plane and the programmability of networks. It

software. People deploy network devices with varying

is easier in SDNs to set the forwarding rules of APIs

capabilities including switches, firewalls, routers, load

defined in the control plane and to control the entire

balancers, and intrusion detection systems. (3) Most of

network. With the development of SDN technology, many

this software has relatively long development periods.

business-class switches have begun to support OpenFlow

Network administrators need to configure various network

protocol [4]. Platforms for SDN controllers have been

devices through the configuration port. When developers

successfully developed for various applications including

systems

and

install

different

networks.

There

are

two

significant

2169-3536 (c) 2016 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.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2017.2682501, IEEE Access

server load balance, dynamic access control, green

some remarks and future work.

network architecture, and network virtualization. On the other hand, the routing mechanism is an

II. RELATED WORK

important aspect of network resource optimization

In large-scale networks, data packets will be routed to the

technology, but it is very difficult to achieve optimal

source node based on multi-hop routing algorithms. The

performance with the existing distributed routing because

principle of how to choose the next node is absolutely

of inherent limitations in the traditional network, and the

vital for network routing algorithms. An important

uncontrollability of distributed routing algorithms wastes

characteristic of routing algorithms is the ability to obtain

network resources. The above characteristics of SDNs

an optimal path based on the global information of

provide new insight into network routing. The centralized

network topology.

controller of SDNs can manage network resources

There are many shortest path algorithms applied in

efficiently and support network traffic control, thus

network routing. Dijkstra algorithm is a typical shortest

improving the performance of network routing.

path algorithm used for calculating the shortest path from

In addition, the Dijkstra algorithm is one of the routing

a node to all other nodes. However, there are some

algorithms for determining the shortest path, and it is

weaknesses

of

routing

algorithms.

First,

real-time

suitable for finding the shortest path in large-scale

computing of nodes with minimum consummation of

networks such as data centers that have millions of

resources is needed, and the process may be dynamic and

network nodes. The box-covering (BC) algorithm is used

nonlinear. With the rapid increase of the number of nodes,

for calculating the fractal dimension of large-scale

the cost of computing rises sharply, but we end up with

networks by covering the network with the minimum

useless information. Secondly, it is difficult to obtain

possible number of boxes, achieving renormalization of

knowledge of global information in the traditional

large-scale networks, and revealing interesting features of

networks; therefore, some distributed algorithms are

the network structure [5][6].

accepted in the traditional networks, such as the Routing

In this paper, we will discuss the problem of routing for

Information Protocol (RIP) [7] and Open Shortest Path

SDNs. We propose an algorithm for routing large-scale

First (OSPF) [8]. These are several problems in

SDNs. In comparison with similar work, this paper

implementing the distributed routing algorithms. First,

contributes the following:

because of the inherent flaw in the traditional distributed network, it is difficult to compute convergence, the time

 The study of the topology of network routing in SDNs

for path detection is too long [9], and route flap may occur

and the use of the BC algorithm for dividing the

[10]. Second, the instability of the prefix will also cause

network into many subnets and find the shortest path

route flap [11]. Autonomous system (AS) conflicting

in every subnet and between subnets.

routing can also destabilize the whole network or not

 The proposal of a routing algorithm for large-scale

converge [12]. The routing deployment of the network is

SDNs based on the BC algorithm for embedding the

very complex [13]. Third, lacking a global view of

proposed algorithm code inside the SDN controller and

network topology, it is hard to confirm the current optimal

the design of a testbed for the proposed routing

decision in traditional networks. Although there have been

algorithm.

many methods put forward to solve these issues, they are

The rest of the article is organized as follows. Section Ⅱ describes the problems of network routing and related work. Section Ⅲ describes the basic principles of the BC algorithm and the analysis of an example. In Section Ⅳ, the proposed routing algorithm is implemented in the experimental environment that consists of a Ryu controller and Mininet. Section Ⅴ presents a summary of results,

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

2169-3536 (c) 2016 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.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2017.2682501, IEEE Access

efficiently; and (3) these new proposals have not been

suggest new ideas. For example, on-demand intelligent

widely adopted and applied to a broad range of network

routing strategy [24] allows different users to use different

devices, and the user needs to be dedicated to the

routing

maintenance of these incompatible devices.

delay-optimized traffic routing scheme to explicitly

There are three important supporting technologies in the

strategies.

Reference

[25]

proposes

a

differentiate path selection for different sessions according

development of SDNs, as follows: programmable network

to

their

delay

sensitivities

in

software-defined

functions in the network [2][3][15], separation of the

inter-datacenter networks. Reference [26] studied the

control plane and the data forwarding plane [2][16], and

problem of computing multipath multicast routes for

network virtualization [2][17][18]. Early SDN protocols

streaming videos in SDNs. Reference [27][28] extended

focused on control plane programmability. Recent SDN

the Dijkstra’s shortest path algorithm to consider both

protocols support a wider range of data plane functions.

edge weights and node weights for a graph derived from

The behavior of network devices in an SDN is handled by

the underlying SDN topology. Reference [29] analyzed the

software that will allow a network engineer to reprogram

suitability of different routing algorithms for dynamic set

network infrastructure. The control plane hardware of

up of performance guaranteed traffic tunnels in backbone

SDNs can be physically decoupled from the data

large-scale SDN networks.

forwarding plane hardware, an SDN switch can forward

Some of the existing routing algorithms in SDN

packets, and an SDN controller can run the control plane.

environments are based on multipaths that will reduce

Network virtualization presents the abstraction of a

routing load, but some of them dynamically adjust the

network that is decoupled from the underlying physical

parameters of routing algorithms based on real-time link

equipment. It is a prominent early use case for SDNs.

information. These algorithms, however, ignore the

These features of SDNs are beneficial in simplifying the

information of network topology.

complexity of the management and the operation of The traditional network architecture is distributed and

III. A BOX-COVERING-BASED ROUTING ALGORITHM

decentralized, and most routing algorithms are also

There are some inherent flaws in the route design of the

distributed. The distributed routing algorithms often need

traditional network architecture. Currently, research on

to find the shortest path using some typical algorithm,

network routing algorithms concentrates primarily on the

such as Bellman-Ford or Dijkstra. For example, a

following factors: (1) multipath routing algorithms: the

distance-vector routing protocol such as RIP that is based

essence of routing algorithms is to find the shortest path to

on a distributed Bellman-Ford algorithm was applied to

forward packets with minimal overhead costs, and there is

APPANET [7]. Then, the routing protocol was replaced by

more than one optimal choice caused by the complexity of

the OSPF protocol that was based on the Dijkstra

different types of networks; and (2) dynamic adjustment

algorithm [8]. Later, hierarchical routing algorithms

of route parameters: this type of algorithms modifies

appeared.

routing parameters in real time based on link state

large-scale SDNs that were discussed in [19][20].

With the advent of the SDN technology, the routing algorithms have been rapidly developed. The appearance

information, such as communication delay, bandwidth, and packet loss rate.

of network operating systems [21] has lowered the barrier

There are a few routing algorithms for SDNs already,

of entry for testing and applying a new routing algorithm.

but most are based on multipath routing and dynamic link

The SDN technology allows the algorithms to be easily

calculations. But in this paper, we can optimize routing

embedded in a system or a device, and link installing

strategy according to the topology information. The low

software with a local computer. There have been some

time complexity of the Dijkstra algorithm that is designed

SDN platforms for routing control, such as the Routing

to find the shortest path algorithm based on the network

Control Platform (RCP) [22] and RouteFlow [23]. The

topology information is O(V+ElogE) in graph theory, and

programmability of SDNs has motivated researchers to

with reducing the number of nodes V and edges E, the

2169-3536 (c) 2016 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.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2017.2682501, IEEE Access

complexity of the Dijkstra algorithm will be lower.

large-scale SDNs is the largest obstacle of its application.

At the international level, complex network theory for

The algorithm cannot ensure that all nodes in a box are

large-scale networks and its applications have rapidly

connected. The CBB algorithm can only be applied to

developed. The most desirable characteristic of complex

some specific structures of networks, and it is a likely

networks is that it analyzes a problem from its structure.

variable to skew results, especially in the face of adjoining

The topology structure of large-scale networks determines

hubs. The optimal BC algorithm is inefficient and has

the function. Routing is a function associated with the

high-overhead. The MEMB algorithm overcomes the

network layer, meaning that the routing algorithm for

above disadvantages to some extent. The principle of the

large-scale SDNs is determined using the topology

MEMB algorithm is as follows: the excluded mass of a

structure. The BC algorithm that is applied to renormalize

node is the number of the uncovered nodes that are less

the structure of large-scale networks is most capable of

than l from the node, the excluded mass of all uncovered

decreasing the number of nodes and edges without

nodes are calculated, and we select the node with greatest

changing the structural characteristics and functions of the

excluded mass value as the center and cover again.

network.

Different from traditional networks, the SDN controller

In this paper, we propose a box-covering- based routing

is able to grasp the global topological information that

(BCR) algorithm for large-scale SDNs, and the BCR

decides whether the routing algorithm will find the

algorithm is even more optimal than the Dijkstra

shortest path (or as close as possible). To better apply the

algorithm. The BCR algorithm has the following goals: (1)

MEMB algorithm to a large-scale SDN, the detailed

to introduce a box-covering method into routing strategy

process of this algorithm is as follows: (1) calculate the

and to reduce the number of nodes and edges of

excluded mass of each node, (2) select a central node and

large-scale SDNs and (2) to divide large-scale SDNs into

then recalculate the excluded mass, (3) select a new node

several subnets for use in the BC algorithm and the

as the central node and the entire network is then covered

shortest path calculated in every subnet.

by these two boxes, (4) calculate the distance from the nearest central node and each box first contains the central

A. PRINCIPLE OF THE BCR ALGORITHM

node, and (5) put each node into the nearest box and the

In this section, we demonstrate the principle of the BCR

center distance refers to the distance between the current

algorithm proposed in the paper. Firstly, the whole

node and the central node. Using knowledge of global

network is divided into several subnets by using the BC

topology information of large-scale SDNs and combining

algorithm, and each subnet is covered by a box of size l.

the BC algorithm (the MEMB algorithm) and the shortest

Secondly, we treat each subnet as a new node, and find the

path algorithm (the Dijkstra algorithm), the BCR

shortest path between these new nodes (that is, the subnets)

algorithm for a large-scale SDN is proposed as Algorithm

by the Dijkstra algorithm. Thirdly, we seek the shortest

1.

path between nodes inside every subnet by the Dijkstra

ALGORITHM 1. The BCR algorithm.

algorithm. Finally, we link the shortest path between

1:

G1=global network topology

subnets and the shortest paths inside those corresponding

2:

bc=BoxCovering(G1)

subnets. The entire route from the source node to the

3:

G2=bc.box_gragh()

target node is found for large-scale SDNs.

4:

p1=G2.shorest_path()

The BC algorithms were first used for calculating the

5:

for box in p1 do

fractal dimension of a complex network [5] including the

6:

shortest_paths.append(box.shortest_path())

greedy-coloring (GC) algorithm, the compact-box-burning

7:

end for

(CBB) algorithm and maximum-excluded-mass-burning

8:

result=reduce(shortest_paths,join)

(MEMB) algorithm. The GC algorithm needs to maintain

9:

return result

a two dimensional table, and the huge memory consumption of implementation of the GC algorithm for

The BRC algorithm is composed of a finding section and a covering section. The first is used to find the

2169-3536 (c) 2016 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.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2017.2682501, IEEE Access

shortest paths based on the Dijkstra algorithm. The second

boxes using the BC algorithm, and the nodes in each box

is used to calculate the number of boxes to cover the

(the dotted line circle) are marked with a colored flag.

network using the BC algorithm. The BC algorithm uses

Second, we think of each box as a single node. If there

the following two parameters as input: a network graph G

is an edge between two nodes in two different boxes, we

and a box size l. The different box size maybe produces

believe that these two boxes are connected. The network

the different result of the shortest path. The outputs of the

as shown in Figure 2 is composed of six different boxes

BC algorithm area graph Gbox, which is formed by boxes

formed by the network shown in Figure 1. Obviously, the

and a hash table dbox_to_node formed by a box and its nodes.

size of the network is greatly decreased.

The main functions of the BC algorithm are shown in Table 1. TABLE 1. The main functions of the BC algorithm. Function name

Function specification

maximum_exclude_mass_

Box-covering based on the

burning()

MEMB

calculate_maximum_excl

Calculation of maximum

uded_mass()

excluded mass

calculate_vertex_exclude

Calculation of vertex excluded

d_mass()

mass

bfs()

Depth first search

covering_node()

Flagging of the status of nodes covered by a box

assign_node_to_box()

Assignment of a node into a specific box

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

Third, we find the shortest path (the heavy solid lines) between node 1 and node 3 using the Dijkstra algorithm, as shown in Figure 4.

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

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.

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.

FIGURE 4. Illustration of the global shortest path.

C. ANALYSIS OF THE BCR ALGORITHM 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 FIGURE 1. An example of network topology.

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

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 the effectiveness of the BCR algorithm,

we

have

implemented

some

sample

2169-3536 (c) 2016 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.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2017.2682501, IEEE Access

applications and run the BCR algorithm on many

4.3.10

from

Oracle

Corporation.

The

hardware

large-scale networks of different sizes. We then compared

environment includes a PC that has an Intel i7-3414 as a

the BCR algorithm with the Dijkstra algorithm. The

CPU, 8G DDR3 1600 of internal user memory, 1G 7200

large-scale networks are generated by the large-scale

rpm of hard disk, and an Intel PRO/1000 MT as NIC.

network model proposed in [30]. We run the BCR

The framework of the experimental platform is shown

algorithm and the Dijkstra algorithm to find the shortest

in Figure 5. It is divided into three layers. The bottom

path of a node to all other nodes. The results are shown in

layer (data forwarding layer) is actually a virtual network

Table 2.

environment based on the Mininet 2.0 platform. The underlying OpenVSwitch is a virtual OpenFlow switch

TABLE 2. The results of the running time (in seconds). Node number

Dijkstra algorithm

BCR algorithm

generated by the OVS module and supports OpenFlow 1.3.

10

0.00113

0.00998

The OpenVSwitch communicates with the middle layer

50

0.03098

0.03899

using the OpenFlow protocol. The middle layer (network

100

0.09302

0.08042

500

3.36523

2.34667

750

8.72980

4.69111

1000

17.7252

7.32198

2000

92.1916

32.1823

5000

815.167

204.111

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.

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 ALGORITHM

B. GENERATION OF SDN TOPOLOGY

OF

BCR

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 Canonical Ltd (Isle of Man, England), Mininet 2.2 developed by Nick McKeown from Stanford University, 3.6

from

Nippon

Telegraph

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

A. BUILDING OF THE PLATFORM

Ryu

FIGURE 5. Framework of the experimental platform.

and

Telephone

Corporation (Tokyo, Japan), Python 2.7.9 developed by Guido van Rossum from the Netherlands, and VirtualBox

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.

2169-3536 (c) 2016 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.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2017.2682501, IEEE Access

This stage takes a long time. In the second stage, the flow

17:

self.addLink(sender, choice(g.nodes()), **linkConfig)

table is in every switch, the Ryu controller does not

18:

# wire switches

participate, and the time it takes to send other packets is

19:

for v, w in g.edges():

reduced. There are two time variables, and they serve as

20:

self.addLink(v, w, **linkConfig)

performance indicators for routing. The first time variable is affected by the routing algorithm, and the route distance

C. IMPLEMENTATION OF THE BCR ALGORITHM

is the key factor impacting the second time variable.

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 event-handler 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. TABLE 3. The statuses of EventOFPPacketIn. No. FIGURE 6. Example of SDN topology.

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. ALGORTHM 2. The generation of network topology. 1:

State names of the event

1

ryu.controller.handler.HANDSHAKE_DISPATCHER

2

ryu.controller.handler.CONFIG_DISPATCHER

3

ryu.controller.handler.MAIN_DISPATCHER

4

ryu.controller.handler.DEAD_DISPATCHER

The four statuses represent exchange HELLO messages, wait-receiving SwitchFeatures messages, normal status,

Class MNTopo(Topo): def_init_(self, cpu=.1,

and disconnected status, respectively. You can set a

max_queue_size= none, **params):

different handler to handle these events that have different

2:

# initialize topo Topo.init_(self, **params)

statuses. After the OpenFlow switch completes the

3:

# host and link configuration

handshake with the Ryu controller, it will add a Flow-miss

4:

hostConfig = {‘cpu’: cpu}

item into the flow table entry. When the OpenFlow

5:

linkConfig = {‘bw’: 5, ‘delay’: ‘10ms’, ‘loss’: 0,

switches have no corresponding match, the packet will be

‘max_queue_size’: max_queue_size}

transmitted to the Ryu controller, and the Ryu controller

6:

g = nx.barabasi_albert_graph(50, 2)

completes forwarding control. The key code of the

7:

# host and switches for node in g.nodes();

Dijkstra algorithm in the Ryu controller is given in

8:

self.addSwitch(node) sender = self.addHost(‘sender’,

Algorithm 3.

**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: 16:

self.addLink(receiver3, choice(g.nodes()), **linkConfig) # wire sender

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)

2169-3536 (c) 2016 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.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2017.2682501, IEEE Access

8:

dst = eth.dst

13:

self.net.add_node(src)

9:

src = eth.src

14:

self.net.add.edge(dpid, src, {‘port’:

10:

dpid = datapath.id

11:

self.mac_to_port.setdefault(dpid, {})

15:

12:

if src not in self.net:

16:

msg.in_port}) self.net.add_edge(src, dpid) if dst in self.net:

13:

self.net.add_node(src)

17:

boxcovering = BoxCovering(self.net, l=3)

14:

self.net.add.edge(dpid, src, {‘port’:

18:

boxcovering.maximum_exclude_mass_bur

msg.in_port}) 15:

self.net.add_edge(src, dpid) if dst in self.net:

16:

ning() 19:

box_graph = boxcovering.box_graph

20:

box_sp = DijkstraSP(box_graph,

17:

dij_sp = DijstraSP(self.net, src)

18:

path = dij_sp.distance_to(dst)

21:

box_path = box_sp.distance_to(dst.box)

19:

next = path[path.index(dpid)+1]

22:

defcompute_sp(self, box):

out_port = self.net[dpid][next][‘port’]

23:

ds = DijkstraSP(x, x[0])

20: else:

21:

box_graph[0])

24:

path = ds.distance_to(dst)

22:

out_port = ofproto.OFFP_FLOOD

25:

node_sp = map(compute_sp, box_path)

23:

actions =

26:

path = []

27:

reduce(append, path, node_sp)

28:

next = path[path.index(dpid)+1]

29:

out_port = self.net[dpid][next][‘port’]

[datapath.ofproto_parser.OFPActionOutput(out_port)] if out_port !=ofproto.OFPP_FLOOD:

24: 25:

self.add_flow(datapath, msg.in_port, dst,

26:

out = datapath.ofproto_parser.OFPPacketOut(datapath =

31:

out_port = ofproto.OFFP_FLOOD

32:

actions = [datapath.ofproto_parser.OFPActionOutput(out_port)]

dadapath, buffer_id = msg.buffer_id, in_port = msg.in_port, actions = actions) 27:

else:

30:

actions)

datapath.send_msg(out)

34:

self.add_flow(datapath, msg.in_port, dst, actions)

The key code of the BCR algorithm in the Ryu controller is shown in Algorithm 4.

if out_port !=ofproto.OFPP_FLOOD:

33:

35:

out =

ALGORITHM 4. Code of the BCR algorithm in the Ryu

datapath.ofproto_parser.OFPPacketOut(datapath =

controller.

dadapath, buffer_id = msg.buffer_id, in_port =

1:

@ set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER)

2:

def _packet_in_handler(self, ev):

msg.in_port, actions = actions) 36:

datapath.send_msg(out)

The above codes are the key parts of the Dijkstra

3:

msg = ev.msg

algorithm and the BCR algorithm, and they are the

4:

datapath = msg.datapath

handlers for handling the PacketIn event. We have used

5:

ofproto = datapath.ofproto

these two codes as the route policy modules in the Ryu

6:

pkt = packet.Packet(msg.data)

controller.

7:

eth = pkt.get_protocol(ethernet.ethernet)

8:

dst = eth.dst

D. PERFORMANCE

9:

src = eth.src

ALGORITHM

10:

dpid = datapath.id

We can use the mn-custom./topo10.py --topo topo10 --mac

11:

self.mac_to_port.setdefault(dpid, {})

--switch ovsk --controller remote -x command to run

12:

if src notin self.net:

ANALYSIS

OF

BCR

Mininet, and the topology of the SDN is defined by the document topo10.py. We start the controller, and load the

2169-3536 (c) 2016 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.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2017.2682501, IEEE Access

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 8. Data transmission 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

FIGURE 7. Route establishing latency (in ms).

Figure 7 shows the impact of network size on the route

runs 100 virtual nodes, consumes huge resources, and increases the scheduling time for resources.

establishing latency. The route establishing latency based

Figure 9 shows the impact of network size on the total

on the BCR algorithm is long because the switches do not

latency. As the SDN increases in size, the total latency

know how to send a message. The algorithm must match

becomes increasingly larger. From Figure 9, if the number

Flow_miss of the flow table entry. The packet is

of nodes is 10, the total latency based on the BCR

transmitted to the Ryu controller. The Ryu controller

algorithm is greater than the total latency based on the

knows the source and destination addresses from the

Dijkstra algorithm. With the increase in the size of the

packet header information. It calculates the shortest path

SDN, the difference between the two total latencies

using the Dijkstra algorithm. The information of the

decreases. When the number of nodes is 50, the two total

shortest path is written to the flow table of the OpenFlow

latencies are approximately equal. When the number of

switch. The packets can be forwarded to the next node by

nodes reaches 100, the total latency based on the BCR

matching rules. With the increase of network scale, the

algorithm is significantly less than that of the Dijkstra

route establishing latency becomes increasingly larger. We

algorithm.

also found that route establishing latency based on the BCR algorithm is much smaller than that based on the Dijkstra algorithm.

FIGURE 9. Total latency (in ms).

2169-3536 (c) 2016 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.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2017.2682501, IEEE Access

From Figure 8, we can see that when the node number is 10, the data transmission latency based on the BCR

many logical subnets. The proposed algorithm finds the shortest path between two subnets and within a subnet.

algorithm has been increased by 9%. If the number of

To efficiently divide the whole network into subnets,

nodes is 50, the propagation latency based on the BCR

the paper uses renormalization and box-covering methods

algorithm has been increased by 14%. When the number

beginning with complex networks. The core idea behind

of nodes reaches 100, the data transmission latency based

the method is to cover the whole network using as few

on the BCR algorithm is only a 5% increase. The main

boxes as possible. The proposed BCR algorithm

reason for these results is the BCR algorithm is a local

introduces the box-covering approach to cover the

optimal algorithm. As the SDN size increases, especially

network; the validity of the BCR algorithm has been

for a large-scale SDN, the proposed BCR algorithm can

proven with several examples. We built an experimental

lead to optical solution sets.

setting using Mininet and Ryu Controller, and embedded the proposed BCR algorithm into the Ryu controller. The

V. CONCLUSION AND FUTURE WORK

results show that the proposed BCR algorithm performs

The

better in large-scale networks than in others.

complexity

and

uncontrollability

of

routing

algorithms in traditional networks leads to low utilization

The next step in this work is to discuss the method of

of network resources. The emergence of SDN technology

optimum calculation for the number of boxes and the

has provided a new way to improve the usage rate of

shortest paths and supplement the current information

network resources. The SDN is a promising solution for

available on subnets connected to subnets. The proposed

network virtualization that decouples control from the

BCR algorithm characteristics have broad prospects for

forwarding or data plane. Using the SDN technology can

further development and mining, for example, how to

achieve a variety of routing algorithms that can be

control in real-time the box size parameter and provide

complex if implemented in the traditional networks. In this

route optimization.

paper, using box-covering, we propose a BCR algorithm through programming interfaces of the SDN. There are

VI. ACKNOWLEDGMENT

two approaches in the current routing algorithms designed

This research is supported in part by a grant from the

for SDNs; one is a multi-path routing scheme, and the

National Natural Science Foundation of China (No.

other comprises route computation according to real-time

61572191 and No. 61402170), the Hunan Provincial

renewed information. There have been few studies

Science and Technology Program Project of China (No.

concerning routing issues from the point of view of

2013FJ4051), and the Hunan Provincial Education

network topology. The traditional router could acquire

Department Scientific Research Fund of China (No.

local topology information to route traffics, but the SDN

13B065).

has a central controller that can acquire global information or topology. This paper proposes a BCR algorithm based

REFERENCES

on topology information.

[1] Kreutz D, Ramos F M V, Verissimo P, et al.

The existing routing algorithms for the SDN generally

Software-defined

networking:

a

comprehensive

use the Dijkstra algorithm for the shortest path. The

survey. Proceedings of the IEEE, 2014, 103(1):

complexity of the Dijkstra algorithm using Fibonacci

14-76

heaps is O(V+ElogE). That is, the total number of nodes

[2] Feamster N, Rexford J, Zegura E. The road to SDN:

and edges will affect the efficiency of the Dijkstra

an intellectual history of programmable networks.

algorithm. There are many large complex networks in

ACM

natural and real systems, and these networks have many

Review, 2014, 44(2): 87-98

SIGCOMM

Computer

Communication

nodes and edges. The existing routing algorithms for a

[3] Nunes B A A, Mendonca M, Nguyen X N, et al. A

large-scale SDN poor perform poorly. This paper proposed

survey of software-defined networking: past, present,

the BCR algorithm by dividing the whole network into

and

future

of

programmable

networks. IEEE

2169-3536 (c) 2016 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.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2017.2682501, IEEE Access

Communications Surveys and Tutorials, 2014, 16(3): 1617-1634

Internet Computing, 2013, 17(2): 20-27 [18] Wood T, Ramakrishnan K K, Hwang J, et al. Toward

[4] Vaughannichols S J, OpenFlow: the next generation of the network. Computer, 2011, 44(8):13-15.

a software-based network: integrating software defined

[5] Song C, Gallos L K, Havlin S, Makse H A. How to

networking

and

network

function

virtualization. IEEE Network, 2015, 29(3): 36-41

calculate the fractal dimension of a complex network:

[19] Fernandez C, Bermudo C, Carrozzo G, et al. A

the box covering algorithm. Journal of Statistical

recursive orchestration and control framework for

Mechanics: Theory and Experiment, 2007, (3):

large-scale, federated SDN experiments: the FELIX

297-316

architecture and use cases. International Journal of

[6] Wei D J, Liu Q, Zhang H X, et al. Box-covering algorithm for fractal dimension of weighted networks. Scientific Reports, 2013, 3(6157):3049

Parallel, Emergent and Distributed Systems, 2015, 30(6): 428-446 [20] Choi T, Kang S, Yoon S, et al. SuVMF:

[7] Hedrick C. Routing information protocol. RFC1058, 1988

software-defined unified virtual monitoring function for SDN-based large-scale networks, Proceedings of

[8] Moy J. OSPF version 2, RFC2328, 1998

The Ninth International Conference on Future

[9] Ricardo O, Zhang B, Pei D, et al. Quantifying path

Internet Technologies, 2014

exploration in the Internet. IEEE/ACM Transactions

operating system for networks. ACM SIGCOMM

on Networking, 2009, 17(2): 445-458 [10] Mao Z M, Govindan R, Varghese G, et al. Route flap damping exacerbates Internet routing convergence. ACM

SIGCOMM

Computer

[21] Gude N, Koponen T, Pettit J, et al. NOX: towards an

Communication

Review, 2003, 32(4): 221-233

Computer Communication Review, 2008, 38(3): 105-110 [22] Rothenberg C E, Nascimento M R, Salvador M R, et al. Revisiting routing control platforms with the eyes

[11] Mcpherson D, Gill V, Walton D, et al. Border

and

muscles

of

software-defined

networking.

gateway protocol (BGP) persistent route oscillation

Proceedings of the first workshop on Hot topics in

condition. RFC 3345, 2002

software defined networks (HotSDN'12), 2012:

[12] Griffin T G, Wilfong G. An analysis of BGP convergence properties. ACM SIGCOMM Computer

13-18 [23] Nascimento M R, Rothenberg C E, Salvador M R, et al. Virtual routers as a service: the routeflow

Communication Review, 1999, 29(4): 277-288 [13] Caesar M, Rexford J. BGP routing policies in ISP networks. IEEE Network, 2005, 19(6): 5-11

approach

leveraging

software-defined

networks.

Proceedings of the 6th International Conference on

[14] Kotronis V, Dimitropoulos X, Ager B. Outsourcing

Future Internet Technologies (CFI'11), 2011: 34-37

the routing control logic: Better Internet routing

[24] Wang X, Wang Q, Liu E, et al. Research and

based on SDN principles. Proceedings of the 11th

verification on SDN-based on-demand smart routing

ACM Workshop on Hot Topics in Networks, 2012,

system. Telecommunications Science, 2014, 30(4):

1349(1): 55-60

8-14

[15] Campbell A T, De Meer H G, Kounavis M E, et al. A survey

of

programmable

networks.

ACM

SIGCOMM Computer Communication Review, 1999, 29(2): 7-23 [16] Yeganeh S H, Tootoonchian A, Ganjali Y. On

[25] Liu Y, Niu D, Li B. Delay-optimized video traffic routing

in

software-defined

inter

data

center

networks. IEEE Transactions on Multimedia, 2016, 18(5): 865-878 [26] Lee M W, Li Y S, Huang X, et al. Robust multipath

scalability of software-defined networking. IEEE

multicast

Communications Magazine, 2013, 51(2): 136-141

software-defined networks. Proceedings of IEEE

[17] Drutskoy D, Keller E, Rexford J. Scalable network

22nd International Symposium of Quality of Service

virtualization in software-defined networks. IEEE

routing

algorithms

for

videos

in

(IWQoS), 2014: 218-227

2169-3536 (c) 2016 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.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/ACCESS.2017.2682501, IEEE Access

[27] Jiang J, Huang H, Liao J, et al. Extending Dijkstra's shortest

path

algorithm

for

software

defined

networking. Proceedings of Asia-Pacific Network Operations and Management Symposium, 2014 [28] Jiang J, Huang H, Liao J, et al. The extended Dijkstra’s-based

load

balancing

for

OpenFlow

network. International Journal of Electrical and Computer Engineering, 2015, 5(2): 289-296 [29] Tomovic S, Radusinovic I, Prasad N. Performance comparison of QoS routing algorithms applicable to large-scale SDN networks. Proceedings of IEEE International Conference on Computer As A Tool. IEEE, 2015 [30] Yook S, Jeong H, Barabasi A. Modeling the Internet's large-scale topology. Proceedings of the National Academy of Sciences of the United States of America, 2002, 99(21): 13382-13386.

2169-3536 (c) 2016 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.

Suggest Documents