Smart Flow Steering Agent for End-to-End Delay Improvement in Software- Defined Networks

To ensure fault tolerance and distributed management, distributed protocols are employed as one of the major architectural concepts underlying the Internet. However, inefficiency, instability and fragility could be potentially overcome with the help of the novel networking architecture called software-defined networking (SDN). The main property of this architecture is the separation of the control and data planes. To reduce congestion and thus improve latency and throughput, there must be homogeneous distribution of the traffic load over the different network paths. This paper presents a smart flow steering agent (SFSA) for data flow routing based on current network conditions. To enhance throughput and minimize latency, the SFSA distributes network traffic to suitable paths, in addition to supervising link and path loads. A scenario with a minimum spanning tree (MST) routing algorithm and another with open shortest path first (OSPF) routing algorithms were employed to assess the SFSA. By comparison, to these two routing algorithms, the suggested SFSA strategy determined a reduction of 2% in packets dropped ratio (PDR), a reduction of 1545% in end-to-end delay according to the traffic produced, as well as a reduction of 23% in round trip time (RTT). The Mininet emulator and POX controller were employed to conduct the simulation. Another advantage of the SFSA over the MST and OSPF is that its implementation and recovery time do not exhibit fluctuations. The smart flow steering agent will open a new horizon for deploying new smart agents in SDN that enhance network programmability and management.

hardware satisfied the needs of static networks. However, since programmable networks have substituted static networks, those gateways and routers are unable to handle the issues posed by dynamic networks. Under these circumstances, service providers do not only deal with the network requirements and manage the high number of connected devices, but also to maintain their competitiveness should explore alternatives like software-defined networking (SDN). Network and bandwidth problems can be effectively solved by SDN by dividing the control and data planes and therefore depriving the forwarding function of control and promoting dynamic networks that can be centrally programmed (8).
Transmission of information as digital packets at global level is made possible by the distributed control and transport network protocols contained in routers and switches. Standard IP networks display great complexity and their management is challenging, even though they are used on a broad scale (9). Configuration of every network device has to be undertaken separately by network operators with low-level commands that also frequently differ between vendors, in order to apply the targeted high-level network policies. Aside from the complicated configuration, fault dynamics and load modifications also burden network environments. Existing networks display vertical integration and most IP networks lack automatic reconfiguration and response mechanisms. The difficulty of making the networking infrastructure more flexible and innovative stems from the incorporation of the control and data planes, respectively responsible for network traffic decisions and traffic forwarding based on prior decision-making, into the networking devices (10,11). Figure 1 presents the new networking paradigm that shows great potential in enhancing the weaknesses of existing network infrastructures, the new infrastructure is called software-defined networking (SDN) (12) (13). It works by separating the control and data planes, as a result of which the network is no longer vertically integrated. This division facilitates policy implementation and network reconfiguration and innovation, since network switches become mere forwarding devices and the control logic is applied in a controller with logical centralization (14). SDN was developed to increase network programmability and management through the centralized controller. However, this solution is hindered by the necessity to ensure that the networks perform well and are scalable and reliable. Consequently, physical distribution of control planes is undertaken in production-level SDN network designs (15,16). The introduction of a clearly defined software routine between SDN-based switches and the controller can help to disassociate the network planes (data and control). OpenFlow is a wellknown application program interface (API) (17,18) in SDN. This interface empowers the control plane to straightway handle the status of the data plane components.
At least one table of packet managing rules, known as a flow table, is contained in an OpenFlow switch and every rule corresponds to a traffic subset on which it conducts specific tasks, like dropping, forwarding, editing, etc. A controller application can order an OpenFlow switch to adopt the behavior of a router, firewall, or other components, including load balancer, traffic shaper and middle box components, according to the rules applied by that controller. The division of the aspects of network policy formulation, application of network policies in switching hardware and traffic forwarding is a key implication of the SDN concepts. Without such division, it would be impossible to achieve the wanted flexibility, separate the issue of network control into smaller, manageable issues, as well as improving network management and enabling network development through facilitation of the creation and implementation of novel abstractions in networking.
An enhanced routing algorithm for the SDN environment is put forth in this study. To this end, a simulation is conducted with the POX controller serving as an open source SDN controller. Equipped with SDN Python libraries and APIS, the POX controller determines the shortest path and the source-to-destination paths with the Open Shortest Path First (OSPF) algorithm and the Minimum Spanning Tree (MST) algorithm, respectively. However, whereas the shortest path with minimal number of hops is the target of the OSPF and MST applied in the POX controller, the ideal path with least number of hops and minimal delay is assessed in the suggested scheme, as the shortest path may be unsuitable if the link delay among connected nodes in a network is uneven. Hence, the POX controller is reconfigured in this study to be able to determine the best path, which is not the path with this least number of hops but the path with that least delay, based on this information about the delay of every network link. The structure of the remainder of the paper consists of six further parts. In Section 2, relevant existing research is reviewed, while Section 3 addresses proactive and reactive flow tables, and Section 4 focuses on the traffic engineering and routing mechanisms. In Section 5, the suggested scheme is presented and, in Section 6, the outcomes of the performance assessment are provided. The study conclusion is given in Section 7.

Related Works
In the following part, research pertinent to the incorporation of algorithms for path identification in the SDN controller is reviewed. Additionally, the existing opportunities for integrating these algorithms with the OpenFlow protocol in the SDN framework are explored.
Hindering occurrence of congestion or regulating the traffic in such a way as to minimize the implications of congestion has been proposed by numerous researchers as a strategy for improving load balancing. Unlike other congestion-aware protocols that took into account just the local status because of the problems of path congestion measurement, one study put forth a new congestionaware routing protocol capable of making routing decisions based on both local and remote congestion information (8). The congestion is innovatively represented for links between routers and an aggregation protocol facilitated the dissemination of the congestion statistics to other network routers. Hence, both local and potential next-hop status could be considered in routing decision-making thanks to such an effective approach amenable to scalability.
A different routing strategy known as Accumulative Load-Aware Routing (ALAR) for SDN and considering the aggregating flow load on every link was suggested in (17). This strategy improved network resource use and reduced congestion likelihood, and implicitly, average endto-end delay, by establishing routes based on information regarding the entire network topology and traffic.
To enhance certain parameters of network performance (e.g. link congestion and bandwidth usage) and make the conventional OSPF routing protocol perform better, one study endowed the OSPF of the SDN with new attributes (14). According to the outcomes of the simulation, besides identifying the site where congestion occurred or is likely to occur, a network with a smart dynamic controller could also employ an intelligent heuristic Flows Distribution Algorithm (FDA) to avoid congestion through effective management of chosen flows on chosen network routers.
In a different study, a user-based strategy of traffic improvement was applied, whereby users' application trends documented via generic NetFlow records were used to characterize those users to improve understanding of individual user usage (15). Furthermore, Linux-based hierarchical token bucket (HTB) queues with real-time adjustment to each user profile depending on priorities identified by the users was used to implement an SDN application for supervising and managing traffic. Thanks to this approach, packet loss and latency were significantly reduced for chosen high-priority users as dynamic distribution of bandwidth according to users' profile priority ensured the efficiency of the traffic management strategy under upstream as well as downstream network congestion.

Problem Statement and Contributions
The overall goal of the present study is to decrease the network delay through the introduction of a smart agent in the SDN controller, and thus to contribute to literature expansion, as not many studies have used optimized routing algorithms in SDN controllers. Additionally, validation of proofof-concept application, which is concerned with methods of using the SDN controller in surveillance of extensive networks and diminishing end-to-end delay, is also an important objective of the study. In particular, the contributions of this study are significant for the following reasons:  -table entry update and speeding up recovery in the event of failure through the incorporation of a smart agent in the SDN controller. The suggested scheme is based on the smart flow steering agent (SFSA), which enables both routing algorithms and agent applications to be deployed in a dynamic and scalable manner in the SDN controller. Employing a multi-objective routing algorithm, the SFSA scheme is geared towards identifying the best path, thus improving SDN network management and configuration.

Reactive and Proactive Flow-Table in SDN
Dynamic restoration of flows is enabled by the flexibility exhibited by the SDN network configuration. This procedure involves performance of flow tasks, such as addition or elimination of flow-entries to/from flow-tables, by network devices to achieve disrupted flow re-routing (19). Upon reception of a packet, an attempt is made by the OpenFlow switch to establish a correspondence between the packet header and its flow table. The switch forwards the header to its OpenFlow controller if it cannot find any packet information. This results in a packet in event in the controller. The headers L2, L3 and L4 are assessed by the controller and the packet is distributed all through the network along with other packets of the same flow. The controller returns flow modification to the switches when it secures a route, so that the switches can update their flow tables as depicts in Fig. 2 in which the proactive or reactive techniques are employed to create such data paths.

Figure 2. Reactive and proactive flow-table in SDN
Ensuring that packet transmission occurs after paths are established is the main task of proactive routing techniques in SDN networks. What makes these techniques particularly useful is that, in the process of end-host detection, they do not produce extra network overhead and do not interfere with network performance. Since forwarding rules are already in place, the controller does not receive any packet transmitted through the network. On the downside, prior mapping of every interconnection in the network topology is a requirement in proactive techniques and this may not be possible in some networks. In contrast, in cases where a switch receives a new packet that has no correspondent in its flow table, reactive routing techniques are applicable. The packet is sent to the controller, which undertakes identification of its end-hosts with control messages and, prior to forwarding the data traffic in the network, it acquires the active links. Reactive routing techniques are advantageous because they do not require prior information about the entire network topology. On the downside, given that the controller receives every initial packet of every new flow prior to network dissemination, the performance of extensive networks may be adversely affected by the volume of control messages.
Path establishment in SDN networks can be effectively undertaken with both proactive and reactive techniques. Path-deploying controllers must be synchronized in the case of proactive techniques, while extra overhead is generated by reactive techniques in extensive networks and they also affect network performance. Furthermore, owing to the caching of the next flow forwarding state on the OpenFlow switch, latency is introduced by reactive techniques only to the initial packet of flow (16).

Traffic Engineering and Routing Mechanisms
Improvement of network performance and traffic delivery relies greatly on traffic engineering, which in turn depends on route optimization, involving discovery of routes that could help attain the target network performance (20,21). Important elements of traffic engineering in IP networks are quality of service (QoS) and resilience mechanisms. Alongside bandwidth requirements, QoS assurance (i.e. end-to-end delay, jitter, likelihood of packet loss, and energy efficiency) is also important in many of the novel multimedia applications. Meanwhile, IP networks are often affected by various kinds of failures, including node or link failure, and rapid resilience mechanisms are needed to address those failures (19,22,23). Under such circumstances, preventing failures from disrupting network performance and resource usage is the main objective of traffic engineering solutions. Basic routing models consisting of shortest path and load-balancing strategies with traffic divided evenly into a specific number of paths of equal cost represent the cornerstone of the majority of IP-based traffic engineering solutions (23). In the following part, several popular routing algorithms and their impact on network traffic performance are discussed. The connected graph ( , ) can be derived from the SDN topology, the generated graph is weighted and directed, where is the vertices (SDN switches) and is the connected edges of the graph (connected links).

Open Shortest Path First (OSPF)
An OpenFlow interface is included in numerous new Internet routers, which are also compatible with a hybrid OpenFlow/OSPF mode. For optimal forwarding of packets, the distributed legacy routing protocol is usually applied by hybrid control plane frameworks and is augmented with high-priority rules by the SDN controller to allow more elaborate routing configurations (24).
In the case of IP networks, the OSPF algorithm frequently serves as an interior gateway protocol (IGP) based on the link state. A network topology graph is created by OSPF with information about link state derived from existing routers. Furthermore, it applies a hop-counts technique to determine the shortest path for packet routing.
In the connected graph ( , ), the links weights are given by the weight function : → [0, ∞], the cost of the link can be expressed as the number of hops between two switches. Therefore ( , ) is the non-negative cost of moving directly from ∈ to ∈ with a cost of ( ). The shortest path algorithm can be executed as follows from source node to : 1. Set to empty, where is a set of nodes whose shortest paths from the source have already been determined; 2. Add the source to and ( ) = 0, if there is a link from to , ( ) = ( , ), for all other nodes, ( ) = ∞; 3. Add node to , where ( ) is the minimum hops in − , if = , complete the task; 4. If there is a link from to ∈ − $; ; min { ( ), ( ) + ( , )}. Then go back to step 3.

Minimum Spanning Tree (MST)
To prevent the issue of packet broadcast storm in a legacy network with loops, a spanning tree is created with the IEEE 802.11d distributed spanning tree protocol. The same issue can be addressed in an SDN network through central creation of a spanning tree based on the overall information of network topology gathered by the SDN controller (14). The basic bridge protocol that was initially devised for loop prevention in bridge network is known as the Spanning Tree Protocol. Data are disseminated through the tree constructed by this protocol and encompassing all network bridges, with only the links included in the tree being allowed. If the bridged network breaks down, it can repair itself through activation of the links that have been previously blocked. However, the algorithm presents limitations in that recovery in the event of failure does not occur fast enough and backup links can only be used for forwarding under conditions of failure (20).
The spanning tree of the graph ( , ) is the graph = ( , ′) such that is a tree and ′ ⊆ if is a weighted graph, will be a weighted graph. The total edge weight of is defined as the sum of the edge weight in . the minimum spanning tree of , is the spanning tree of , such that no other spanning tree of has lower total edge weight.

Proposed Smart Traffic Steering
Quality deterioration is mainly caused by network congestion, which occurs when the traffic is not distributed homogeneously or network resources are insufficient. This issue is compounded by the fact that current routing algorithms are designed to detect just the shortest paths from a source to a destination, and that routing and congestion control do not work together (25). Packet drop ratio (PDR), latency (end-to-end delay) and error rate are all heightened by the rise in queuing delay due to congestion.
Building on the extended Dijkstra's algorithm, the approach put forth in this study aims to identify the best path from a source to a destination in an SDN. The information collected by the OpenFlow switches is used by the SDN controller to create a general network topology. The suggested approach involves appraisal of congestion rate during network traffic by the OpenFlow switches through gauging of link delay via hello and acknowledgement messages for detection of connected switches. The detection information sent by every switch to the SDN controller enables the latter to construct a general network topology. Flow table entries are generated by an agent application with a smart flow steering mechanism working within the SDN controller. OpenFlow switches. Applying a technique underpinned by Dijkstra's algorithm, the smart flow steering mechanism determines the shortest path for every route, thus achieving packet routing. Furthermore, weights are allocated by the SFSA to all network links in order to identify the shortest paths. The allocation of link weights takes the form of link states, with the SDN controller receiving link state messages from all OpenFlow switches. For routing to be considered optimal, it must prevent network congestion by employing existing network resources for effective traffic distribution. To take into account both the edge weights and the switch congestion for all routes obtained from the underpinning SDN topology, the modified Dijkstra's shortest path algorithm is applied. Dijkstra's algorithm is classified as a label-setting algorithm because the label of a node that has been visited remains permanently fixed if it does not become out of reach. All nodes in label-setting algorithms have such a label, which informs about the cost and route for reaching a specific node from a source. The link delay and estimated congestion give the route cost function, which enables the SFSA to identify every potential path between source and destination. By contrast to the OSPF and MST algorithms, the route hop count and minimum segment are respectively disregarded in labelsetting algorithms, which choose the route with least delay and congestion from among all potential routes. In SDN, the SFSA can achieve significant improvement in PDR and end-to-end delay. Fig. 3 presents the SFSA framework. to . On the controller, is defined As a set of links from path , and let is the congestion level of link , the congestion level is being estimated at the switch using the following formula: Where the is the of packets passed across the given switch. The congestion status ( ) of path is the maximum congestion level of all the links of path : Where is the congestion level of link at switch on the other hand, the congestion weight of the path is the sum of all the links congestion level in path :

=
( 1 , 2 , ⋯ , ) … (4) Once all the network information is being reported at the controller, the controller starts building up the flow table entries for each switch, for a given source/destination pairs, let be equal cost shortest paths where congestion level are 1 , 2 , ⋯ , respectively. Among these paths, the controller defines a set such that: contains all the paths that have the same minimum congestion level, contains source destination pairs with lowest congestion weight. Finally, the paths is is the Flow Table entities for each switch in the SDN controller.

Performance Evaluation Results
A Windows-based Oracle virtual box and MATLAB software for the Mininet emulator and algorithm analysis, respectively, were employed to perform the simulation scenarios. There are two sequential procedures undertaken by the SDN controller. Prior to selection of a routing algorithm, it conducts network discovery to uncover the network topology. The identification of the OpenFlow switches is followed by application of the SFSA in the SDN controller and provision of optimum flow tables to the OpenFlow switches for storage and initiation of data routing. Two scenarios concerned with end-to-end delay and PDR are explored in this study via the following steps:  Creation of the general network topology and execution of the default routing algorithm OSPF or MST in POX controller by the Mininet;  Use of the packet capture method to extract link quality information from the OpenFlow switches following completion of the network discovery process;  Comparison between the outcome of using SFSA in the SDN controller and the default algorithms based on MATLAB analysis;  Re-simulation in MATLAB of the same network topology but with the link quality information derived from the Mininet;  MATLAB-based application of three distinct routing algorithms in the same sub-domain, namely, OSPF and MST in custom as well as full-mesh topology, and SFSA underpinned by the extended Dijkstra's algorithm with parameters of link quality information (e.g. link delay, bandwidth utilisation, and number of hops). Several assumptions were formulated before the two simulation scenarios and related analysis were initiated:  The computation capacity and traffic handling are the same for every OpenFlow switch;  The creation of the general topology does not include the connection between every OpenFlow switch and a remote SDN controller;  The SDN switches and hosts are bidirectionally connected via SDN links;  The simulation is conducted with the POX controller.

Mesh Topology Scenario
For both Mininet (Fig. 4) and MATLAB (Fig. 5), the mesh topology was made up of five OpenFlow switches with ten links ensuring their connection. Fig. 6 illustrates the round-trip comparison and it can be seen that, by contrast to the default Mininet routing algorithms, the SFSA was associated with less delay by achieving a 23% decrease in packet round trip time (RTT) even when the generated packets across the network have been increased. On the other hand, Fig. 7 presents the algorithm execution time and failure recovery time, indicating that, by comparison to the other algorithms, the SFSA can identify the optimal path from all possible paths much faster in the event of network failure. The values associated with the worst-case scenario in mesh topology are listed in Table I. It can be seen that, in the selection of the optimal path between two nodes, the SFSA successfully balanced path length and congestion cost. As a result, the end-to-end delay was 15-30% lower in the case of the SFSA than in the case of the default Mininet routing algorithm, which is influenced by the traffic load and node position.  (Fig. 8) and MATLAB (Fig. 9), the custom topology was made up of nine OpenFlow switches with eleven links ensuring their connection. Figure 10 presents the algorithm execution time and recovery time, indicating that, by comparison to the other algorithms, the SFSA can identify the optimal path from all possible paths much faster. Figure 11 illustrates the PDR comparison and it can be seen that, by contrast to the default Mininet routing algorithms, MST and OSPF, the SFSA achieved a 2% decrease in PDR. The capacity of a control plane to prevent additional traffic loss in the event of a network failure by finding a feasible alternative routing with no routing loops and black holes is known as failure recovery. In the process of optimal path identification, an important factor considered by the SFSA is the determination of the congestion of every network link. To achieve route optimization, it is not the shortest path that is chosen, but the path with minimal congestion and delay, and this selection process is undertaken with the multiobjective routing algorithm. The values associated with the worst-case scenario in custom topology are listed in Table 2. It can be seen that, in the selection of the optimal path between two nodes, the SFSA successfully balanced path length and congestion cost. As a result, the end-to-end delay was 15-45% lower in the case of the SFSA than in the case of the default Mininet routing algorithm, which is influenced by the traffic load of the switches.

Conclusion:
This paper reviewed major research related to SDN, and proposed a promising approach involving incorporation of a smart agent in the SDN controller. SDN is of significant benefit to network and flow management, but it is not without limitations, which needs further investigation. One major problem is the stability of the control plane. Numerous strategies have been suggested to address this problem, but all of them involve measuring the performance of control plane stability in relation to certain parameters of network QoS (e.g. throughput and latency). In contrast to these strategies, the proposed SFSA approach is geared towards improvement of end-to-end delay, RTT and PDR. According to the findings of this study, as the number of requests rise at high traffic, the SFSA ensures the stability of the execution and recovery time in the two scenarios employed. In addition, by transferring knowledge to an external agent, it is possible to diminish the number of flow entries in the switches. The results of the simulation confirm that, by comparison to the MST and OSPF algorithms, the SFSA approach performs much better.