1 Introduction

In the last few years, Software Defined Network (SDN) is one of the most attractive architecture for enhancing network efficiency. Using SDN, network administrators can program the network dynamically and control the behavior of the network by separating control plane from the forwarding plane [15, 21]. The control plane globally controls the network via network administration in centralized manner [1]. The forwarding plane is responsible for packet forwarding functions and follows the policies of the control plane. The forwarding plane consists of multi-layer programmable switches which can be programmed dynamically. The communication between control plane and forwarding plane is made using southbound APIs such as OpenFlow [27]. The OpenFlow protocol facilitates software programs executing on OpenFlow switches to forward packets among the network switches [1]. Furthermore, various applications exist in the application layer to develop network services such as traffic engineering, security, network resource management and other network controlling techniques. In SDN architecture, when a switch receives a packet, it extracts the header of the packet and explores its relevant rule from forwarding rule table. If the header of the packet matched with any rule entry, the actions associated with the specific entry are performed. If the header does not match any rule entry, the switch forwards the header to the controller by using southbound protocols such as OpenFlow. Then the controller executes traffic engineering or routing algorithm and delivers a new forwarding entry to the relevant switches along the path between source and destination [21, 31]. All consequent packets with the same matching headers will then be forwarded according the new forwarding entry. The above mentioned schema is named reactively. The network providers can also program the control plane proactively. In proactive schema, the controller delivers forwarding entries to the relevant switches before the switches request any forwarding entry [6].

Usually provisioning Quality of Service (QoS) and Quality of Experience (QoE) for real time applications such as video streaming is one of the main important networking issues [27]. For example, in a video surveillance system, high packet loss rate and delay reduce the quality of received video data. In such systems, the network administrator can develop a suitable traffic engineering to provide QoS and reduce packet loss rate and delay time. An efficient traffic engineering technique calculates optimal path between source and destination. In a video surveillance system an optimal path is a path which is built by finding favorable links between source cameras and monitoring center. Moreover, the end to end delay of video data is very important and should not be more than 200 ms between two end points in video streaming applications [9]. In a video surveillance system, a favorable link is a link which has enough available bandwidth and short delay time. Therefore, the cost of each link should be determined based on these parameters. Since each path between two hosts consists of a set of links, choosing proper cost for links can improve path selection between hosts.

Due to dependency of each link to the end user perception (QoE) as well as network resources status, the overall concept is uncertain and therefore it can be modeled by fuzzy logic to assign a proper cost for each link regarding its available bandwidth and delay. Usually, in a computer network, there are many senders and receivers with different traffic patterns. Therefore, the available bandwidth and delay of each link may change dynamically. This dynamic nature of users’ traffics in networks makes it difficult to assign a proper cost to links and this will increase uncertainty. In such situations, due to high level of uncertainty, using fuzzy logic is a suitable choice. Although type-1 fuzzy system can also be utilized to compute cost for each link, type-2 fuzzy logic allows handling more uncertainty and achieving better results [19]. It has been shown [2, 10] that type-2 fuzzy systems are more viable than type-1 fuzzy systems in scenarios with high level of uncertainty. The main difference between type-2 fuzzy and type-1 fuzzy is associated with the nature of the membership functions. Implementing intelligent algorithm based on fuzzy logic for routing in computer networks is very popular [25].

Type-2 fuzzy logic system has been widely used in finance, communication, control, and medicine [4]. Type-2 fuzzy logic introduced by Zadeh [37] and involves procedures of fuzzification, inference, and output processing. Figure 1 illustrates the structure of type-2 fuzzy logic system [19]. In type-2 fuzzy logic system, the fuzzifier maps crisp inputs into type-2 fuzzy sets. The role of inference engine is to combine “IF-THEN” rules and give a mapping from input type-2 fuzzy sets to the output type-2 fuzzy sets. Type reduction procedure takes type-2 fuzzy set and produces a type-1 fuzzy set. Finally, defuzzifier maps type-1 fuzzy sets to crisp output.

Fig. 1
figure 1

Type-2 fuzzy logic system

This paper uses type-2 fuzzy system for assigning proper cost regarding delay and available bandwidth to each link of network based on a well-known QoE metric called Mean Opinion Score (MOS) [29]. After assigning costs to links, the proposed traffic engineering method solves the Constraint Shortest Path (CSP) problem of the network and calculates minimum cost path taking into account network constraints in terms of end to end delay for guaranteeing QoS in video surveillance system. Due to NP-completeness of the CSP problem [33], this paper uses LARAC algorithm [16] to solve the CSP problem. Assigning proper costs to the network links causes the links with high available bandwidth and low delay to be chosen for creating optimal path. As a result, the video data packets transfer via optimal path between two end points. As the matter of fact, streaming video data via optimal path reduces packet loss and delay while improves the quality of received video in monitoring center. This paper implements type-2 fuzzy system in traffic engineering method for guaranteeing QoS and supporting QoE in a video surveillance system, and compares the proposed method with type-1 fuzzy system traffic engineering and traditional techniques. Simulation results show that using type-2 fuzzy system for determining links costs gives better performance than type-1 fuzzy system as well as traditional methods.

The remainder of this paper is structured as follows. In Section 2, the related works of multimedia traffic engineering over SDN are reviewed. Section 3 presents the architecture of the proposed traffic engineering method. Formulating and solving the CSP problem using LARAC algorithm is described in Section 4. In Section 5 simulation details and test results are outlined. Finally, conclusions are described in Section 6.

2 Related works

In this section, some related works on multimedia and video streaming traffic engineering over SDN are surveyed. As mentioned in previous section, SDN is a new paradigm and as a result, there are few works on multimedia traffic engineering over SDN in the literatures.

Kassler et al. [20] proposed a new system for path assignment based on QoE. Their proposed system has been implemented using OpenFlow network where path cost computation and assignment is performed by conferring between end-users multimedia applications. Before transmitting streaming multimedia traffic, a session between endpoints applications is initialized based on user preferences, service requirements and terminal features. Then multimedia packets are streamed over different routes taking into account network resources via minimum cost path where costs of links are negative QoE values. In their proposed method, QoE is determined as a weighted combination of different parameters such as individual usage context, user preferences, and service content.

An optimization framework over OpenFlow networks for video streaming applications presented by Egilmez et al. [9]. This framework is based on CSP problem and network traffics are classified into three different levels where the base layers of video have been treated as a level-1 QoS flow, and the enhancement layers of video have been treated as level-2 QoS or best-effort. The authors have implemented the LARAC algorithm to solve CSP problem for computation paths. The result of the LARAC algorithm is a path with minimum cost which satisfies end to end delay constraint. In their framework, the cost of link is calculated as a weighted combination of packet loss and delay of links. Simulation results showed that their framework improves the performance of network [9]. As another work, Egilmez et al. [7] introduced a new multimedia streaming technique for large scale and multitenant SDNs. In their proposed approach, the network is divided into multi sub domains where each controller in a sub domain uses optimal QoS routing within its sub domain. Each controller shares QoS routing information with other sub domain controllers. Their approach improves received video quality, memory overhead and communication cost.

Tomovic et al. [32] presented a new control framework for QoS provisioning over SDN. In their proposed framework, controller collects network resources statistics according to the collected information. Authors have considered Dijkstra algorithm for calculating shortest path between source and destination. The cost of each link is the utilization of link. Simulation results demonstrated that their approach improves the performance under high traffic.

Another QoS routing method for video streaming over SDN has been proposed by Yu et al. [36] called ARVS. The routing uses the base and enhancement layers of video as two different levels of QoS. In their approach, delay variation has been considered as a constraint in CSP problem and the cost of each link was the weighted sum of the packet loss rate and the delay variation on a path. If the CSP problem does not satisfy the delay variation constraint, the enhancement layers of video stay on shortest path and the base layers of video reroute to another feasible path.

Egilmez et al. [8] proposed a novel approach called OpenQos for streaming video over OpenFlow networks. Their approach has a dynamic QoS routing for guaranteeing end-to-end delay QoS. Dynamic QoS routing calculates minimum cost path where the cost of each link in network is calculated as a weighted combination of link utilization and delay of link. OpenQoS reduces the packet loss and latency and can guarantee seamless video data delivery in both UDP and TCP connections.

Karl et al. [17] introduced a streaming setup which uses the dynamic routing over SDN. The streaming setup improves the quality of transmission channel for RTP/RTSP streaming applications without interaction between source and destination. In their dynamic routing packet loss rate, round-trip time (RTT) and number of hops have been considered as a single routing criterion.

The related works which have been mentioned in this section all have been proposed to provide the QoS parameters for different network applications. However, none of them has been simulated in a real specific application. Moreover, in most of the above related works, the costs of the links have been determined either as a single metric such as link utilization, packet loss and delay; or a weighted combination of multiple metrics. The main contribution of the proposed method in this paper in comparison to the related works is to apply type-2 and type-1 fuzzy logic for calculating the costs of network links based on QoE for providing QoS in a video surveillance system. In addition, this paper models the provisioning of QoS in a real scenario and emulates the model in a network emulator.

3 Architecture of the proposed method

A video surveillance system over SDN consists of multi IP cameras, OpenFlow switches, a monitoring center and a controller. The goal of developing such system is to observe and monitor an indoor or outdoor area. IP cameras capture the environment video data and then send the video to the monitoring center via network. The role of the controller in such system is to find the best routes between IP cameras and monitoring center. After that, the controller should announce the best routes to OpenFlow switches for routing video data. As mentioned before, in a video surveillance system the quality of received video in monitoring center is very vital for end user. Packet loss and delay are two important metrics in video streaming applications and affect the quality of video data. Packet loss is generally caused by congestion and occurred when a link does not have enough capacity for forwarding packets. One of the solutions for reducing packet loss is to route packets via links which have enough available bandwidth. In a video surveillance system, it is better to combine link available bandwidth and delay as a cost of link. Therefore, the controller finds the links with high available bandwidth and low delay for creating a route between an IP camera and monitoring center.

As mentioned in Section 2, most of literatures have been considered these parameters either as a single metric or as a weighted combination for cost of a link. This paper is the first paper which implements type-2 fuzzy system for assigning a proper cost to each link based on QoE. To make better comparison, this paper also implements type-1 fuzzy system. In this paper, an interval type-2 Mamdani fuzzy logic system (T2FLS) is established. The input variables of the system include link delay and link available bandwidth; and the output variable is the cost of the link. In order to simplify the calculation, singleton fuzzifier is used to fuzzify crisp input values. The domains of input variables are taken to be interval between 0 to maximum value. To reduce the computation complexity, both the two inputs are divided into three levels, that is, the available bandwidth: low, medium, high; the link delay: low, medium, high. The output value (Link Cost) is divided based on a well-known QoE metric called Mean Opinion Score (MOS) [27] into five levels: excellent, good, fair, poor, bad. Figures 2, 3 and 4 show the inputs and output variable and their membership functions respectively.

Fig. 2
figure 2

Membership functions of input variable ‘Available Bandwidth’

Fig. 3
figure 3

Membership functions of input variable ‘Link Delay’

Fig. 4
figure 4

Membership functions of output variable ‘Link Cost’

As mentioned so far, in a computer network with different traffic patterns, the available bandwidth and delay of each link have a dynamic nature which makes difficult to assign a crisp cost to links and have inherited uncertainty. Due to existence of such uncertainty, type-2 fuzzy logic which allows handling more uncertainty than type-1 fuzzy can give better results [19]. As a result, in this paper for improving the performance of fuzzy system and achieving better results [3], type-2 fuzzy system as extension of type-1 fuzzy system is used by adding uncertainties and spreading the membership functions’ values by ±1. The antecedents of fuzzy “IF-THEN” rules is represented by 3*3 matrix with the column representing “low”, “medium” and “high” delay of link, and the rows representing “low”, “medium” and “high” available bandwidth of link as shown in Fig. 5.

Fig. 5
figure 5

The fuzzy rule matrix

In this paper the Center Of Sets (COS) type-reducer [23] which combines the process of type reduction and inferencing is used in which each type-2 set is replaced by its centroid and a weighted average of centroids is computed. Finally, fuzzification process is performed by using average of the results of type reducer procedure. After assigning costs to the links of the network, the controller can execute the desired algorithm to find the best path between an IP camera and monitoring center. Figure 6 illustrates the architecture of the proposed traffic engineering for video surveillance system. As demonstrated in Fig. 6, the proposed architecture is modular and new modules and services can be added. The proposed traffic engineering schema over SDN is composed of the six following modules:

Fig. 6
figure 6

Architecture of the proposed traffic engineering for video surveillance system

Links available bandwidth collector: Frequently acquires information about available bandwidth of each link in a network and stores them in available bandwidth matrix.

Links delay collector: Frequently acquires information regarding delay of each link of the network and stores them in delay matrix.

Link cost calculator: This module works both on available bandwidth and delay matrix and computes the costs of the links using fuzzy logic and stores the link costs in link cost matrix. This module can be replaced and reprogrammed with the desired module by network administrator for assigning link costs using another method such as weighted sum of metrics.

Network topology mapper: This module periodically collects information about network topology including nodes and links and maps them into a structure called network connectivity matrix.

Route finder: Implements the CSP model which is described in Section 4. This module uses the network connectivity matrix and link cost matrix to solve the CSP problem using LARAC algorithm and finds the optimal route regarding the costs of the links.

Route inserter: This module injects the forwarding rule entries into the relevant switches along the optimal route.

All of these six modules respectively execute periodically and cause the video data packets to be transferred via optimal path.

4 Problem formulation

In this paper, computation of an optimal path between IP cameras and monitoring center is considered as a CSP problem. The goal of CSP problem is to find the minimum cost path between two endpoints regarding the situation where the end to end delay should be equal or less than a specified value [23]. A communication network in CSP problem is considered as directed graph G (V, E), where E is a set of network links and V is a set of network nodes. Each link (a, b) in the graph has two weights c ab  > 0 and d ab  > 0 which denote link cost and link delay, respectively. In addition, s and t are source and destination nodes and P st denote the set of all feasible path from node s to node t. Let P be a feasible route in Pst. For each P is P st , the cost of path, c(P) and delay of path, d(P) is defined as follows:

$$ c(P)={\displaystyle \sum_{\left(a,b\right)\in P}{c}_{ab}},d(P)={\displaystyle \sum_{\left(a,b\right)\in P}{d}_{ab}} $$
(1)

Consider T > 0 as a threshold for end to end delay of path P. The CSP problem can be formulated as the following integer linear program:

$$ \begin{array}{c}\hfill \begin{array}{l} \min {\displaystyle \sum_{\left(a,b\right)\in E}{c}_{ab}{x}_{ab}}\\ {}\mathrm{s}.\mathrm{t}.\forall a\in \mathrm{V}\end{array}\hfill \\ {}\hfill {\displaystyle \sum_{\left\{b\backslash \left(a,b\right)\in E\right\}}{x}_{ab}-{\displaystyle \sum_{\left\{b\backslash \left(b,a\right)\in E\right\}}{x}_{ba}=\left\{\begin{array}{c}\hfill 1\kern0.24em if\;a=s\hfill \\ {}\hfill -1\kern0.24em if\;a=t\hfill \\ {}\hfill 0\kern0.24em otherwise\hfill \end{array}\right.}}\hfill \\ {}\hfill {\displaystyle \sum_{\left(a,b\right)\in E}{d}_{ab}\le T,\kern0.72em T\ge 0}\hfill \\ {}\hfill {x}_{ab}=0\; or\;1,\kern0.36em \forall \left(a,b\right)\in E\hfill \end{array} $$
(2)

Where x ab and c ab are decision variable and the link cost of (a, b),respectively. The objective function minimizes the path cost from node s to node t regarding to problem constraints [35]. As reviewed in previous sections, the link cost of (a, b) in the most literatures is either the combination of multiple metrics or a single metric of QoS. In this paper the link cost is determined by using fuzzy logic.

According to [22], it has been proved that the CSP problem is NP-complete and some approximation and heuristic algorithms have been proposed in many literatures [16, 22]. The Lagrangian Relaxation Based Aggregated Cost (LARAC) algorithm is one of the most promising and polynomial-time algorithms in which the lower bound for optimal value of the CSP problem is provided. Figure 7 shows the LARAC algorithm [16]. As shown in Fig. 7, Dijkstra(src,dest,cost) finds the shortest path using link costs, Dijkstra(src,dest,delay) finds the shortest path using link delays and Dijkstra(src,dest,c λ ) finds the shortest path using combined link weights regarding to λ multiplier. The functions d(r), c(r) and c λ (r) are used to calculate the delay, cost and aggregated cost of path, respectively. In the first step, the LARAC algorithm computes the shortest path (p c ) using link costs; If p c satisfies the delay constraint (be equal or less than T threshold value), this will be the optimal solution. Otherwise, LARAC computes the shortest path using link delays denoted as p d . If the path p d. does not meet the delay constraint (be equal or less than T threshold value), there is no solution to this instance. Otherwise, LARAC computes the optimal solution by searching for optimal λ, iteratively. It has been proved that LARAC finds a good solution in O ([nlogn + m] 2 ) time [33] where n and m are the number of nodes and links, respectively.

Fig. 7
figure 7

Pseudo-code of LARAC algorithm

5 Performance evaluation

In this section, a comprehensive simulation study is investigated and the results have been analyzed to evaluate the performance of the proposed type-2 fuzzy system traffic engineering method for video surveillance system. The performance of the proposed method is evaluated against three following benchmarks:

Benchmark-1: the cost of each link in the test-bed network is computed based on type-1 fuzzy system according to Fig.2, Fig.3, Fig.4 and Fig. 5. Then the LARAC algorithm is used for calculating the minimum path cost between source IP cameras and monitoring center.

Benchmark-2: the cost of each link in the test-bed network is determined as the available bandwidth ratio of the links. In this approach the cost of link (a, b) is defined as Eq. (3):

$$ {c}_{ab}=\frac{B_{ab}-{G}_{ab}}{B_{ab}} $$
(3)

Where B ab and G ab are the total bandwidth and the occupied bandwidth of link (a, b), respectively. After assigning the costs of links, this approach uses the LARAC algorithm for finding the shortest path between source IP cameras and monitoring center.

Benchmark-3: OSPF routing is the one of the most popular routing protocols in IP based networks. OSPF protocol has been widely used in the literatures for comparing and evaluating the performance of new routing schemes [18, 24, 28]. The cost of a link in OSPF is inversely proportional to the bandwidth of that link. OSPF uses Dijkstra routing algorithm to find the shortest path between two desired source and destination node [5]. In this approach OSPF routing protocol is used for finding the shortest path between source IP cameras and monitoring center.

5.1 Configuration

To make a fair comparison, the proposed method and benchmarks are evaluated in two different test-bed scenarios as follow:

Scenario-1: in this scenario, the test-bed network consists of 10 OpenFlow switches, 5 IP cameras and a monitoring center. There are 24 links in the network for connecting OpenFlow switches together which have different bandwidth and delays.

Scenario-2: the test-bed network of this scenario consists of 5 IP cameras, 28 OpenFlow switches and a monitoring center. OpenFlow switches are connected together with 50 links which have different bandwidth and delays.

The bandwidth and delay of links in both scenarios are randomly chosen between 1 Mbps to 15 Mbps, and 1 ms to 30 ms, respectively. In this paper Opendaylight controller is used for implementing the traffic engineering technique. Opendaylight is a popular open source controller which is used for enabling SDN network to be implemented using programs [34]. This controller is installed on a machine with CPU Intel Core i7-4700MQ-2.4 GHz and 6GB RAM. In the test-bed scenarios, the proposed method and the benchmarks are programmed in Java programming language and each of them installed as a bundle on Opendaylight controller. Each different bundle is evaluated separately for each scenario. The controller executes the bundle every 20 s for calculating optimal paths between the IP cameras and the monitoring center. In both scenarios, the maximum tolerable end to end delay for video surveillance system is set to 200 ms [9]. This value is the T threshold value in the CSP problem which is used for modeling the network.

The both test-bed scenarios are emulated in mininet environment [11]. To achieve accurate simulation results, the hosts in mininet are configured according to the specification of Cisco video surveillance IP camera 6030. This camera is a high-definition video endpoint which supports multiple resolutions and video encoding and compression methods [13]. Each host in the test-bed scenarios uses VLC player [14] for streaming video to the monitoring center over SDN. VLC player is an open source multimedia player which can stream multimedia over HTTP or RTP protocol [26]. The performance of each traffic engineering method is evaluated under three different workloads. Therefore, each host using VLC player streams three different video resolutions: 1920*1080 (H.264), 1280*720 (H.264) and 640*480 (H.264) video at 30 fps over RTSP protocol for 180 s (3 min). RTSP is an application layer protocol for streaming real time data such as video and audio [30]. The video content which is streamed by each host is the Big Buck Bunny animation [12].

5.2 Performance metrics

The performance of the proposed method and three benchmarks is evaluated using the following QoS parameters in both scenarios:

PSNR (Peak Signal-To-Noise Ratio): PSNR is a metric which is useful to measure video quality. This metric is used to calculate the error between the original streamed video and the received video.

Average end to end delay: this metric is the average time interval from the IP camera to the monitoring center for each successfully delivered video packet.

Packet loss ratio: packet loss ratio is the total number of video packets which haven’t been delivered at the monitoring center to the total number of packets streamed at the IP cameras.

5.3 Simulation results

In this section, simulation results have been analyzed for different scenarios and workloads in terms of QoS metrics. Figure 8 illustrates the average end to end delay under different workloads for the test-bed scenarios. Figure 9 illustrates the packet loss under different workload for test-bed scenarios. As shown in Fig. 8 and Fig. 9, it is clear that type-2 fuzzy system traffic engineering performs better than type-1 fuzzy system traffic engineering and other methods in all of the trials. This is because type-2 fuzzy system handles more uncertainty and in the proposed method it assigns proper link cost, and the LARAC algorithms also finds low cost links for calculating the minimum cost routes. Moreover, OSPF routing protocol (benchmark-3) performs worst in all trials. This is because the OSPF protocol only considers the total bandwidth of the link as a metric for link cost, and Dijkstra algorithm finds the shortest path without considering end to end delay constraint. Since benchmark-2 uses the available bandwidth ratio metric for assigning link cost and the link with higher available bandwidth has lower cost, it performs better results than OSPF routing.

Fig. 8
figure 8

Average end to end delay: a test-bed scenario-1, b test-bed scenario-2

Fig. 9
figure 9

Packet loss ratio: a test-bed scenario-1, b test-bed scenario-2

Figure 10 illustrates the PSNR under different workloads for the test-bed scenario-1 where the horizontal axes denotes the number of video frames and the vertical axes denotes average PSNR. Figure 11 illustrates the PSNR under different workloads for the test-bed scenario-2 where the horizontal axes denotes the number of video frames and the vertical axes denotes average PSNR. As depicted in Fig.10 and Fig. 11, both type-1 and type-2 fuzzy system traffic engineering show better performance than two other methods in all experiments in terms of PSNR. Because by using type-1 and type-2 fuzzy system traffic engineering, the end to end delay and packet loss have been reduced, as a result the PSNR of received video has been increased. Moreover, type-2 fuzzy system traffic engineering outperforms other methods in high workloads.

Fig. 10
figure 10

PSNR values for test-bed scenario-1 under three different video resolutions

Fig. 11
figure 11

PSNR values for test-bed scenario-2 under three different video resolutions

6 Conclusions

In this paper an adaptive traffic engineering method based on type-2 fuzzy logic for video surveillance system over SDN is proposed. Type-2 fuzzy system has been used for assigning costs to the network links based on QoE; and adaptive traffic engineering calculates the best routes to guarantee QoS in a video surveillance system. Finding the optimal routes between streamer cameras and monitoring center in video surveillance system has been modeled as a CSP problem which is solved by using LARAC algorithm. The produced forwarding rules are send to the associated OpenFlow switches for routing manipulation. The Performance of the proposed method on the proposed video surveillance system has been evaluated against the type-1 fuzzy system traffic engineering, available bandwidth based traffic engineering and OSPF routing protocol. To measure the benefits of the proposed method, different scenarios and workloads have been investigated. Because PSNR, end to end delay and packet loss ratio are the most important metrics for measuring QoS in real time video streaming applications, this paper evaluates these metrics for evaluating the proposed method. Simulation results demonstrated that the proposed traffic engineering based on type-2 fuzzy system is better than the other methods in terms of end to end delay, PSNR and packet loss ratio.