Destination-aware Adaptive Traffic Flow Rule Aggregation in Software-Defined Networks

09/07/2019 ∙ by Trung V. Phan, et al. ∙ TU Chemnitz 0

In this paper, we propose a destination-aware adaptive traffic flow rule aggregation (DATA) mechanism for facilitating traffic flow monitoring in SDN-based networks. This method adapts the number of flow table entries in SDN switches according to the level of detail of traffic flow information that other mechanisms (e.g. for traffic engineering, traffic monitoring, intrusion detection) require. It also prevents performance degradation of the SDN switches by keeping the number of flow table entries well below a critical level. This level is not preset as a hard threshold but learned during operation by using a machine-learning based algorithm. The DATA method is implemented within a RESTful application (DATA App) which monitors and analyzes the ongoing network traffic and provides instructions to the SDN controller to adapt the traffic flow matching strategies accordingly. A thorough performance evaluation of DATA is conducted in an SDN emulation environment. The results show that—compared to the default behavior of common SDN controllers—the proposed DATA approach yields significant SDN switch performance improvements while still providing detailed traffic flow information on demand.



There are no comments yet.


page 1

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

I Introduction

Software Defined Networking (SDN) is a new networking paradigm which brings numerous advantages w.r.t. dynamic traffic control and management. The SDN concept overcomes the restrictions of legacy network architectures by decoupling the control and data plane, and handling the control plane in a centralized entity called SDN controller. The global network view of the SDN controller allows to enable a policy-based traffic management and a faster and more dynamic response to network state and traffic variations [1].

Several features [2] are already available in SDN networks such as mechanisms for traffic analysis, traffic flow management and resilience. Nevertheless, some challenges still remain to be addressed [3]. In particular, adapting the granularity of traffic forwarding is an important issue. Most traffic management approaches rely on the default flow matching strategies of the available SDN controllers and therefore do not allow traffic flow handling with variable granularity. For instance, the Open Network Operating System (ONOS) SDN controller [4], by default, applies Reactive Forwarding and uses the destination MAC address for packet matching only. Hence, an incoming packet is matched to a flow entry by just using its layer 2 destination address. In order to change the flow matching scheme, an administrator has to manually set the respective or variables for the packet matching fields in the ONOS source code.

In this paper, we propose a destination-aware adaptive traffic flow matching (DATA) mechanism for SDN-based networks in order to adapt the number of flow table entries in SDN switches according to the level of detail of traffic flow information that other mechanisms (e.g. for traffic engineering, traffic monitoring) require. A RESTful application (DATA App) monitors and analyzes the network traffic and advises the SDN controller to adapt the matching strategy. The paper is structured as follows. Section II gives a short overview about common flow matching strategies in SDN-based networks. Related work is outlined in Section III. Section IV explains the DATA solution in detail. The results of the performance evaluation are outlined in Section V and Section VI provides a short summary of our work.

Ii Common SDN Flow Matching Strategies and Their Implications

ONOS [4] provides high scalability and availability through its distributed architecture. It supports Reactive Forwarding (fwd) and intent-based Reactive Forwarding (ifwd) [4]. By default, the ONOS SDN controller provides flow rules using destination MAC addresses, i.e. only the destination MAC address is examined during the packet matching process and the other packet header fields like src/dst IP addresses or src/dst ports are not considered. We denote this flow matching strategy as MAC Matching Only Scheme (MMOS). However, by modifying the ONOS Reactive Forwarding configuration file, it is possible to add both the src/dst IP addresses and the src/dst ports to the matching fields - this flow matching strategy we denote as Full Matching Scheme (FMS). Similarly, OpenDaylight (ODL) [5] provides a default L2Switch service which applies MMOS. ODL also allows for another flow matching scheme which uses only destination IP addresses.

In MMOS the destination MAC address but no IP addresses and port numbers are included in the matching fields. Consequently, flow-table space is saved and the SDN switch might have a higher data plane forwarding performance (as the packet matching operation is quite fast). Another significant advantage of MMOS is that it reduces the workload of the SDN controller as less packet_in messages are generated. For example, MMOS does not care about new TCP requests to the same destination because it only checks the layer-2 addresses. However, the simple MMOS scheme may raise problems for other applications which want to monitor traffic flows in the network. For instance, an intrusion detection application requires detailed flow information to detect malicious traffic. As a result, an intrusion prevention application cannot issue the right policies for specific flows to prevent or mitigate unwanted traffic (e.g., DDoS traffic). In general, by using only MMOS, the ability to track and monitor network traffic for security or forensic analysis is limited.

In FMS, as the MAC address, IP address, and port number are used for packet matching, it is possible to classify traffic based on any individual field or combination of these fields. This fine-grained flow handling enables security or traffic engineering applications to have a closer view on the current network traffic. On the contrary, the number of

packet_in messages to the SDN controller as well as the number of flow entries in a SDN switch is much higher than in the case of MMOS. This can result in significant degradation of the forwarding performance or even to a switch outage in case the maximum number of flow table entries is reached.

Iii Related Work

Issues related to flow rule installation and management in SDN switches attracted a high interest in the SDN research community. A wide range of approaches to control TCAM (Ternary Content Addressable Memory) utilization were proposed with the primary target of flow rule compression or aggregation [6, 7, 8, 9, 10]. For example, the authors in [6] argue that for simple packet forwarding rules based e.g. on MAC addresses or VLAN IDs only cheap SRAM memory is sufficient. Only more complex matching rules (with more matching fields) might require the use of fast but expensive TCAM memory. Thus the amount of TCAM memory in SDN switches can be significantly reduced. The solutions outlined in [7] and [8] apply the concept of flow rule aggregation by restructuring the matching fields. By that the number of flow rules can be significantly reduced. Another approach for dynamic flow matching was proposed in [9] where the matching policy includes the DSCP (Differentiated Services Code Point) values for different traffic types. Rifai et al. introduced the MINNIE framework [10] for flow table compression using wildcard rules. The mentioned approaches only focus on flow table size reduction and on increasing the data plane forwarding performance but—contrary to our approach—do not consider the possibility of adaptively changing the granularity of flow matching (and thus the flow table size) depending on the level of detail of traffic flow information that other mechanisms (traffic engineering, traffic monitoring) demand.

Iv Destination-aware Adaptive Traffic Flow Rule Aggregation Mechanism

Iv-a DATA Architecture

Fig. 1 provides an overview of the extended SDN control plane. It comprises the default SDN control plane with a built-in forwarding application and our novel DATA App. Detailed information about the relevant components is provided below.

Fig. 1: DATA Architecture

Iv-A1 Built-in Forwarding Application

Most of the common SDN controllers [4, 5] provide a built-in forwarding application with basic functionality to allow the creation of flow rules which are then downloaded to the SDN switches. In this work, we propose to add REST API interfaces to the built-in forwarding application to have a secure communication channel to the DATA App. The channel is used to share and exchange network information and control instructions with the DATA App via the shared database. Initially the DATA App instructs the build-in forwarding application to apply the FMS strategy.

Iv-A2 DATA App

The DATA App consists of the following three main components: The Statistics Collector periodically gets information about the traffic flows (e.g. MAC/IP addresses, packet counts) traversing the SDN switches from the SDN controller via a RESTful API [4, 5]. It sends the collected statistical information to the Analyzer and stores it in the shared database. The Shared Database is accessible from three agents: Built-in forwarding application, Statistics Collector and Analyzer. The Analyzer controls the change of the flow matching schemes in the SDN network. It receives flow statistics information from monitor threads of SDN switches via the Statistics Collector and identifies the SDN switches which are subject to performance degradation and finds out the destination hosts (via applying Algorithm 1

, see below) whose associated flows are most critical to the switch performance. In order to anticipate the switch performance degradation well before it occurs and to trigger the flow matching scheme change in time we apply a 2-dimensional Support Vector Machine (SVM)

[11] learning algorithm which is well known in the machine learning research community for its very good practical results [12]. After checking the switch performance, the Analyzer co-operates with the built-in forwarding application of the SDN controller to conduct actions regarding the flow matching schemes of all flows related to the previously identified destination hosts.

Fig. 2: Support Vector Machine principle

The SVM algorithm in the DATA App works as follows. In general we have a linearly separable data set for training , where and . In this work represents the tuple (,). Here () is the current total number of flow entries and denotes the change of the total number of flow entries in a SDN switch between two consecutive observations. The value of represents the status of the switch in the th observation period: = +1 denotes a good switch state while = -1 indicates a performance degradation (due to e.g. errors or exceptions). The SVM algorithm operates in two main phases: training and mapping. In the training phase, the SVM algorithm takes data samples from the data set

and tries to find three hyperplanes

, and as follows:


see Fig. 2. The region bounded by the and hyperplanes is called the margin in which no data samples of the training set are allowed to be in. The hyperplane lies in the middle between and . Note, that the chance of finding more than three hyperplanes to separate two data groups is relatively high. However, there is only one optimal solution that maximizes the margin between and . The task is to find the values and so that the margin is maximum. The solution of this optimization problem is described in [11]. The distance of to the hyperplane is defined as follows:


where the sign of indicates the data group to which belongs. In the mapping phase, for a new sample it is checked to which of the two data groups separated by the hyperplane it belongs. This is done according to the result of the function . If = +1 the sample is assigned to the data group representing a good switch performance status, otherwise (= -1) the sample is assigned to the data group representing a performance degradation of the switch. Interested readers are referred to [11, 13, 14, 15] for a detailed explanation of the SVM algorithm.

The reasons for choosing the tuple (,) for evaluating the forwarding performance of a SDN switch are as follows: The effort for flow searching and matching within a SDN switch is proportional to the number and matching fields of flow entries. Moreover, a SDN switch has a maximum capacity () for storing the flow entries. Accordingly, the change of the number of flow entries indicates the control plane load (w.r.t. and messages sent between SDN controller and SDN switch) affecting both the SDN switch and the SDN controller.

Fig. 3: Traffic analysis and policy creation at the Analyzer
  Input: = : set of destination hosts and respective number of flow entries associated with these hosts in switch , = : total number of current flow entries in switch , = 1: first index
  Output: = : set of destination hosts
  Sort in descending order of the current flow (from highest to lowest numbers)
      {One MMOS flow entry is installed in switch }
      {Delete flow entries in switch }
      = (, )
      {Feed into SVM}
     if  = +1 then
        break {Switch can handle entries}
         = +1 {Switch cannot handle entries}
     end if
  end loop
Algorithm 1 Identification of the destination hosts whose flows are most critical to the performance of switch

Iv-B Operational Workflow

Initially, the Statistics Collector sends a request to the SDN controller to ask for network topology information. Then, it launches a monitor thread for each connected SDN switch (step (1) in Fig. 1). The monitoring information is stored in the shared database. Meanwhile, the Analyzer activates the SVM engine and performs the training phase using a pre-prepared training data set, see Section V-A. Next, the Statistics Collector gets traffic flow statistics from the connected SDN switches (step (2) in Fig. 1). In regular time intervals (observation period) - for each SDN switch - a monitor thread counts the total number of current flows and measures the flow number changes in order to provide the tuple (,) to the SVM engine within the Analyzer. The Analyzer then conducts traffic analysis and policy creation for each SDN switch (step (3) in Fig. 1).

As illustrated in Fig. 3, in case the SVM engine detects a performance degradation of a switch , the destination hosts whose associated flows are most critical to the performance of switch (i.e. have the most flow entries in switch ) are identified by applying Algorithm 1. Subsequently, the Analyzer instructs the built-in forwarding application to send of_mod messages to remove all full-matching flow entries in the flow-table of switch and replace them by MAC matching only flow entries, i.e. to perform a change from FMS to MMOS (step (4) in Fig. 1). Furthermore, the DATA App monitors the number of incoming packets per second () in switch individually for all flows, for which the matching scheme change to MMOS is applied.

In case no performance degradation is detected for switch it is checked whether there exists a MMOS policy for any destination hosts. If an MMOS policy is found, then Algorithm 2 is applied to check the conditions for a change to the FMS strategy (step (4) in Fig. 1).

  Input: : set of destination hosts and respective packet rate of MMOS flows associated with these hosts in switch , (, ): total number of current flow entries and maximum number of flow entries in switch , : number of flow entries that might be added in switch
  Output: : set of destination hosts
  for ; ; ++ do
      = idle_timeout* {Worst case assumption: each packet is associated with a new entry in switch }
     if ( then
     end if
  end for
  return {idle_timeout is a period of time set in a flow entry. If there is no more incoming packets that matches to the flow entry since last matched packet, then the flow will be removed after idle_timeout seconds.}
Algorithm 2 Identification of the MMOS flows/destination hosts related to switch for which changing back to FMS is feasible

Algorithm 2 works as follows: for each switch (which has MMOS applied) the identified flows respectively destination hosts are sorted in ascending order w.r.t. the packet rate of the identified flows. For the first destination host in the list a flow matching scheme change to FMS is applied in the switch. For that, the built-in forwarding application is instructed to send of_mod messages to remove all MMOS flow entries in the affected switches (step (4) in Fig. 1). The decision about changing the flow matching strategy happens once per observation period (which is set to 3 seconds in our implementation). By that strategy we increase the number of flow entries in a switch only moderately (per observation period) and avoid large variations in the number of flow entries.

Fig. 4: DATA deployment example (Enterprise SDN network emulated with MaxiNet)

V Performance Evaluation

Fig. 5: Total number of flow entries in the enterprise SDN network over time for three different traffic loads

V-a Scenario Setup

The MaxiNet framework [16] is applied to emulate an enterprise SDN network comprising several SDN switches (realized via OpenvSwitch), 96 enterprise hosts (24 hosts per office), 24 enterprise servers (within one server rack) and a connection to the Internet (see Fig. 4). The emulated enterprise SDN network runs within one Linux PC and is controlled by a remote ONOS SDN controller running on another PC. The Internet hosts are emulated on a third Linux PC. Enterprise and Internet hosts are running within Linux containers using Ubuntu images, and the servers are running within Linux containers using Apache Web server images. For a convenient configuration we place both the ONOS SDN controller and the DATA App on the same Linux PC.

Initially, for training the SVM we generate traffic from enterprise and Internet users towards the enterprise servers and among enterprise users and apply the FMS scheme for these traffic flows. Contrary, for the traffic flows from the servers towards the enterprise and Internet users (response traffic) we apply MMOS. We monitor any errors or exceptions indicating that switches cannot handle new flow requests or that switches are disconnected from the SDN controller. We capture the tuple (,) at all SDN switches and set sign = -1 if the switch performance degrades (due to errors or exceptions); otherwise, we set sign = +1. These tuple samples are then used for training the SVM in the Analyzer. We observe that an SDN switch starts getting overloaded or cannot handle new flow rules when the current number of flows is around 3000 (). Setting the idle_timeout value (after which the flow entries are removed) to 10 seconds, the safety threshold for the packet rate a switch can handle is 300 packets per second assuming that each packet belongs to a different flow (worst case assumption). Accordingly, for the traffic generation we divide R into three levels: low (=100), medium (=200) and high (=300).

In our performance analysis we carry out several experiments with different flow matching strategies: MMOS only, FMS only, Threshold-based (considering the number of flow entries, , as threshold in the DATA App without applying the SVM engine) and adaptive (DATA App with SVM engine). The ONOS controller applies Reactive Forwarding

. Furthermore, we implement an IDS application to detect abnormal traffic. The IDS application is based on a Self Organizing Map algorithm

[17] which classifies traffic by the 4-tuple average number of packets per flow, average number of bytes per flow, average duration per flow and percentage of pair-flows. For the performance analysis we generate traffic from enterprise and Internet users towards the enterprise servers and among enterprise users with three different load levels = (100, 200, 300). During the experiments we trace the total number of flow entries in the enterprise SDN network and extract the average number of packet_in messages per second to the ONOS controller.

V-B Result Analysis

V-B1 Total number of flow entries in the enterprise SDN network

Fig. 5 shows that the MMOS scheme naturally accounts for a very small amount of flow entries in all cases, and that the FMS, the DATA and Threshold-based strategies are not much different for low and medium traffic load. In case of high traffic load, the total number of flow entries is still beyond a critical level both for the DATA as well as the Threshold-based scheme (with ). This is due to the fact that despite increasing traffic flows, these two mechanisms significantly reduce the number of new flow entries by changing to MMOS in order to prevent performance degradation of the SDN switches. Contrary the FMS and the Threshold-based scheme (with ) continue to generate more and more flow entries which quite soon has negative effects (errors and exceptions) on both the built-in forwarding application of the SDN controller and some SDN switches leading to a gradual performance degradation. Finally the SDN controller and some switches suspend their operation. A low total number of flow entries remains due to the few switches which are still operational.

Threshold- Threshold-
Schemes MMOS FMS based based DATA
(0.5 ()
=100 0.066 187.33 180.33 183.33 184.33
=200 0.066 369.33 340.33 368.33 363.33
=300 0.066 562.33 387.33 553.33 393.33
TABLE I: Average packet_in rate (pkts/s) to the SDN controller for different traffic flow rule aggregation schemes and traffic loads

V-B2 Average packet_in message rate to the ONOS controller

In Table I the average number of packets per second (packet_in rate) arriving at the built-in forwarding application quering for new flow rules is shown. It can be seen that, contrary to the FMS and the Threshold-based scheme (with ), for all traffic load levels, the Threshold-based scheme (with ) and the DATA scheme allow the ONOS controller to have an acceptable packet_in rate and guarantee that the SDN switches are not getting degraded. Besides, they significantly reduce the workload of the built-in application due to the lower number of new flow queries.

V-B3 Errors and exceptions

An important criterion for the performance evaluation of the DATA approach is the time until an error or exception (observed by the ONOS) occurs because of an overloaded SDN switch in the network. Our results show that the FMS and the Threshold-based scheme (with ) cause disconnected channels errors and FlowRuleManager exceptions in the ONOS controller after 7 to 10 seconds since the high traffic load ( = 300) is generated. For the other traffic load cases no errors and exceptions are observed.

Threshold- Threshold-
Schemes MMOS FMS based based DATA
(0.5 ()
=100 0.0 98.6 97.8 97.5 98.8
=200 0.0 98.7 82.45 97.9 97.5
=300 0.0 0.0 81.23 0.0 97.8
TABLE II: Detection rate (%) of our IDS application for different traffic flow rule aggregation schemes and traffic loads

V-B4 Detection rate of the IDS application

We assume that attackers from both the enterprise and the Internet launch a DDoS TCP SYN flooding attack to the enterprise Web servers. We measure the DDoS attack detection rate of our IDS application. The results in Table II show that there is no alert in case of MMOS for all traffic loads because all traffic towards the Web servers is grouped into one flow entry at all switches. Hence, the IDS application can not recognize the DDoS attack. In case of low and medium load, with FMS, Threshold-based (with ) and DATA a TCP SYN flooding attack is detected by the Self Organizing Map algorithm (with quite similar detection rate). The Threshold-based scheme (with ) accounts for a less attack detection rate due to the fact that traffic flows towards the Web servers are handled with MMOS whenever the threshold is reached. In our DDoS attack scenario the attacker tries to send as fast as possible TCP segments with different source TCP ports to the victim (Web servers). This leads to the installation of new flows entries in the SDN switches. Therefore, it is easy for the IDS application to gather traffic flow information and detect the attack. In the high load case and for FMS as well as for the Threshold-based (with ) scheme, the operations of the SDN controller and some switches are suspended. That makes the IDS application unable to gather traffic information from the SDN controller and detect the attack. On the contrary, with DATA, all SDN network components stay operational and the IDS application can gather detailed information about the new traffic flows and thus detect the TCP SYN flooding attack. DATA yields a detection rate that is 16.5% higher compared to the Threshold-based scheme (with ). Consequently, our novel DATA solution can efficiently provide useful information for security analysis avoiding the drawbacks of the other flow matching schemes.

Vi Conclusion

In this paper, we propose a destination-aware adaptive traffic flow rule aggregation mechanism (DATA) to adapt the number of flow table entries in SDN switches according to the level of detail of traffic flow information that other mechanisms (e.g. for traffic engineering, traffic monitoring, intrusion detection) require and at the same time prevent SDN switch performance degradation. Our performance evaluation proves that the DATA solution outperforms legacy flow rule matching schemes. In our future work, we are going to adapt DATA as integrated application for common SDN controllers.


This work has been performed in the framework of the Celtic-Plus project SENDATE Secure-DCI, funded by the German BMBF (ID 16KIS0481).


  • [1] 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 Communications Surveys Tutorials, vol. 16, pp. 1617–1634, Third 2014.
  • [2] I. F. Akyildiz, A. Lee, P. Wang, M. Luo, and W. Chou, “A roadmap for traffic engineering in sdn-openflow networks,” Computer Networks, vol. 71, pp. 1 – 30, 2014.
  • [3] S. Azodolmolky, P. Wieder, and R. Yahyapour, “Cloud computing networking: challenges and opportunities for innovations,” IEEE Communications Magazine, vol. 51, pp. 54–62, July 2013.
  • [4] “Description of the onos controller, available at”
  • [5] “Description of the opendaylight controller, available at”
  • [6] B. Stephens, A. Cox, W. Felter, C. Dixon, and J. Carter, “Past: Scalable ethernet for data centers,” in Proceedings of the 8th International Conference on Emerging Networking Experiments and Technologies, CoNEXT ’12, (New York, NY, USA), pp. 49–60, ACM, 2012.
  • [7] B. Leng, L. Huang, X. Wang, H. Xu, and Y. Zhang, “A mechanism for reducing flow tables in software defined network,” in 2015 IEEE International Conference on Communications (ICC), pp. 5302–5307, June 2015.
  • [8] S. Luo, H. Yu, and L. M. Li, “Fast incremental flow table aggregation in sdn,” in 2014 23rd International Conference on Computer Communication and Networks (ICCCN), pp. 1–8, Aug 2014.
  • [9] A. Mimidis, C. Caba, and J. Soler, “Dynamic aggregation of traffic flows in sdn: Applied to backhaul networks,” in 2016 IEEE NetSoft Conference and Workshops (NetSoft), pp. 136–140, June 2016.
  • [10] M. Rifai, N. Huin, C. Caillouet, F. Giroire, J. Moulierac, D. L. Pacheco, and G. Urvoy-Keller, “Minnie: An sdn world with few compressed forwarding rules,” Computer Networks, vol. 121, pp. 185 – 207, 2017.
  • [11] N. Cristianini and J. Shawe-Taylor, An Introduction to Support Vector Machines: And Other Kernel-based Learning Methods. New York, NY, USA: Cambridge University Press, 2000.
  • [12] G. Blanchard, O. Bousquet, and P. Massart, “Statistical performance of support vector machines,” Annals of Statistics, vol. 36, pp. 489–531, 2008.
  • [13] T. V. Phan, T. V. Toan, D. V. Tuyen, T. T. Huong, and N. H. Thanh, “Openflowsia: An optimized protection scheme for software-defined networks from flooding attacks,” in 2016 IEEE Sixth International Conference on Communications and Electronics (ICCE), pp. 13–18, July 2016.
  • [14] T. V. Phan, N. K. Bao, and M. Park, “A novel hybrid flow-based handler with ddos attacks in software-defined networking,” in 2016 Intl IEEE Conferences on UIC/ATC/ScalCom/CBDCom/IoP/SmartWorld, pp. 350–357, July 2016.
  • [15] T. V. Phan and M. Park, “Efficient distributed denial-of-service attack defense in sdn-based cloud,” IEEE Access, pp. 1–1, 2019.
  • [16] P. Wette, M. Dräxler, and A. Schwabe, “Maxinet: Distributed emulation of software-defined networks,” in 2014 IFIP Networking Conference, pp. 1–9, June 2014.
  • [17] R. Braga, E. Mota, and A. Passito, “Lightweight ddos flooding attack detection using nox/openflow,” in IEEE Local Computer Network Conference, pp. 408–415, Oct 2010.