Routing Strategy for Internet of Vehicles based on Hierarchical SDN and Fog Computing

The fog computing is invited to solve the lack of resources problem in the sensors of Internet of Things (IoT) and handle the tasks quickly. Internet of Vehicles (IoV) is a special application of IoT networks that composed of heterogeneous sensors that are found in vehicles. These sensors transfer the tasks to the fog servers that process them and give the responses to the sensors. However, the mobility of vehicles effects on the delivery operation of responses. When the source vehicle of a task exited from the domain of some fog server through the processing time of this task, the response will not be reached to that vehicle correctly. Therefore, it is need to compute the optimal path to that vehicle. This process causes exceeding the task deadline and decreasing the throughput. To overcome this issue, this paper produces a hierarchical architecture based on Software Defined Network (SDN) and fog computing for IoV networks. This architecture consists of IoV vehicles, fog computing framework, semi-central SDN controllers and central SDN controller layers. Moreover, a routing strategy is proposed called Delay-Efficient Routing strategy based on SDN and Fog computing for IoV (DRSFI). The SDN controllers perform DRSFI to compute the routes with minimum delay with taking into consideration the available bandwidth constraint and the location and speed of the vehicle. From the results of simulation of different scenarios with various mobility speeds and various number of tasks, we concluded that the proposed system is better than IoV-Fog-central SDN system and IoV-Fog system in terms of average delay from end to end, percentage of packet loss and percentage of successfully transmission.


Introduction
IoV is a new network paradigm represents a subclass of IoT and connects large group of heterogeneous sensors found in the vehicles.It can produce good information for the drives about the vehicles and environment.It represents the future of connection in the vehicular networks [1].The IoV sensors have not sufficient resources to handle the tasks, therefore the tasks are sent to the servers of cloud framework that can help in overcoming the processing, analyzing and storing challenges of huge data of IoV network [2], [3].
The cloud computing is a completed framework that has rich physical resources that are available in shared manner for the users.It has several features such as scalability, flexibility, reliability and accuracy in processing, storing and analyzing the arrived tasks and represents the optimal choice for many kinds of networks and applications [4].However, there are some factors that effect on the performance of cloud computing.For example, the vehicle mobility and distance between the cloud servers and IoV sensors make it not efficient solution for this type of networks.This was the main motivation behind the discovering of fog computing [5].
The major aim of fog computing is to migrate the resources to be closest to devices that found at the edge of the network [6].Any device has the capabilities of processing, connection and computing can be as a fog computing device such as Base Station (BS), switch, server, Road Side Unit (RSU), etc.It is play a complement role for the cloud computing and not substitute it [7].It can decrease the transmission time and energy consumption and help in meeting the deadline of hard real time tasks as well as decreasing the bandwidth wasting due to the sending operations of tasks frequently to the cloud servers.Therefore, it is efficient solution to meet the quality of service factors in IoT [7], [8].
Other efficient features of fog computing are: location awareness and supporting of mobility and real time applications [9].These features make it suitable to solve many network problems such as the routing process in IoV.
SDN is a technology or architecture that separates the traditional network architecture into two planes (data and control).Data plane contains simple devices which only forward the data packets while the control plane contains the controller(s) that represents the brain and very important part of this architecture [10].The control plane can be centralized or distributed [11].There are many benefits from merging SDN with fog computing to improve the IoT network: first, SDN provides global view about the IoT network that can help in controlling the network resource and infrastructures.Second, SDN provides simple management for different heterogeneous fog devices [5].Third, the SDN controller has all knowledge about the resources and tasks [12].Moreover, SDN can be used in the vehicular networks to enhance the routing process and use the resources of network in the best manner [13,14].The network devices in SDN use the flow tables to forward the packets simply.A flow table contains list of entries and each entry consists of a group of rules, actions and statistical information as shown in Figure 1.The rules are used to match such as IP addresses and Ethernet addresses and actions are applied upon a match such as modify-field, sendout-port, or drop [15], while the statistical information includes counters about some flow types such as number of transmitted bytes [16].

Figure 1: The flow table [17].
Generally, the task requests are transferred from the IoV sensors to the nearest fog device for the processing within the deadline [7].However, the mobility of vehicles makes the operations of sending the responses to the IoV sensors very difficult and needs to special routing strategy to send these responses with minimum response time.
The main contributions of this paper are as follows:  Merging the IoV network with fog computing and hierarchical SDN in a new architecture.
 Producing a new routing strategy to route the responses to the IoV vehicles correctly with minimum delay depending on the fog computing and hierarchical SDN and takes the location and speed of IoV vehicles into account.
 Producing mathematical model to compute the best routes that takes into account the available bandwidth constraint.
The rest of this paper is organized as follows: section 2 illustrates the related works.Section 3 introduces the proposed architecture.Section 4 describes the proposed routing strategy.Section 5 presents the simulation and discusses the results.At last, section 6 explains the conclusions.

Related Works
There are many authors merge the fog computing and SDN concept with vehicular networks.N. B. Truong et al. [12] at 2015 presented a new architecture with four layers as follows from top to bottom: cloud computing, SDN controller, fog computing, and vehicles.They used the SDN concept to increase the flexibility, scalability and programmability while the fog computing is exploited to achieve the location-awareness and high delay-sensitive services.M. Zhu et al. [18] at 2015 merged vehicular ad hoc network (VANET) with SDN concept and run some application named routing server to route the packets with minimum overhead and delivery time.Y. Liu et al. [19] at 2015 designed a new architecture with four layers called vehicles, RSU, switches and SDN controller.Moreover, they produced a GeoBroadcast strategy for VANET.If certain vehicle breaks down, then it must immediately send alerts periodically to notify other nearest vehicles using the RSUs.X.He et al. [2] at 2016 used the SDN and fog computing to enhance the performance of IoV network.Also, they proposed a new modified constrained particle swarm optimization method depending on possibilities of the SDN.X. Hou et al. [20] at 2016 applied the advantages of fog computing in the vehicular networks and proposed a novel concept named vehicular fog computing.They exploited the moving vehicles in the communication purpose to exchange the data while used the stopped vehicles in the computation operations.Z.He et al. [14] at 2016 applied the SDN concept in an architecture to enhance the communications in VANET.The authors assumed that the RSU and vehicles can work as SDN based switches while the SDN controller is used to assign the spectrum of the network and bandwidth to perform the configuration of the network quickly.X. Ji et al. [21] at 2016 introduced a new geographic routing approach for the VANET depending on SDN.This approach computes the paths depending on the vehicle's information that is received from the digital map and used the optimal forwarding route approach to select the shortest path while used the packet forwarding approach to determine the nexthop.D. Baihong et al. [22] at 2017 used the SDN capabilities to produce an on demand routing strategy for VANET.It uses the local level to determine the path for any vehicle in a specific geographical area and the global level to select the path for any target vehicle at any location.Also, there are many researchers studied the interplay between fog computing and cloud computing for the purposes of resource provisioning.R. Deng et al. [23] at 2016 proposed workload allocation technique between edge and cloud computing based on tradeoff between the delay and energy consumption.Also, they proposed architecture of four layers: user interface, edge computing, dispatch and cloud.S. Ningning et al. [24] at 2016 presented load balancing algorithm upon the dynamic graph partitioning in fog computing.They implemented hierarchical fog computing framework decomposed of four layers that are physical resource, resources layer of cloud atomization, service management and platform management layer.L. Tong et al. [25] at 2016 proposed hierarchical architecture of n layers: mobile devices, multilayers of fog devices and cloud layer.Each one of fog computing multilayers consists of arbitrary number of servers and each server connects with all other servers.The mobile device sends the requests to the closest edge device.If that device fails to execute the request, it forwards that request to the higher layer.X. Pham et al. [26] at 2016 presented heuristic scheduling algorithm to provide tradeoff between response time and monetary cost.They used architecture of three layers: IoT devices, fog and cloud computing.Fog computing layer contains n fog devices managed by the broker.IoT devices send the tasks to the broker that schedules and forwards them to the best fog devices or cloud servers.

The Proposed Architecture
In this paper, the proposed architecture composed of five layers as follows: IoV vehicles, fog computing, semi-central SDN controllers, and central SDN controller as explained in Figure 2.
Each IoV vehicle has GPS, digital map and set of sensors.Each group of IoV vehicles connects to one fog device in local area network.Fog computing layer consists of number of clusters and each cluster has arbitrary number of fog devices (i.e.RSU and BS) that support the Openflow protocol and have the processing and storage capabilities.The vehicles send information about the mobility speed and location to the closest fog computing device periodically.To determine the closest fog device, the IoV vehicle broadcasts beacon packets.A group of fog devices will response to these beacon packets.However, the fog device that responses with minimum delay is considered as a closest one.Each group of the fog devices in a geographical area connects to one semi-central SDN controller and sends for it complete information about the vehicles and their locations and speeds.Therefore, each one of the semi-central SDN controllers has completed acknowledge about the fog computing devices and vehicle that found in that geographical area.All semicentral SDN controllers connect to the central SDN controller and send it complete information about the fog computing and IoV vehicles.This means that the central SDN controller controls all semi-central SDN controllers, fog computing devices and IoV vehicles and has completed view about the entire network.Normally, each SDN controller (i.e.semi-central or central SDN controller) has database which contains information such as average of lost packets and available bandwidth in each link, delay and number of hops to travel from one point to another.Each one of the SDN controllers can use its data base to perform the routing process.

The Proposed Routing Strategy (DRSFI)
Normally, the sensors of IoV vehicle send the tasks to the nearest fog device which schedules these tasks based on the deadline and handles them quickly.After the executing of these tasks, it must send the responses to the sensors.However, there is a problem occurs when the IoV vehicle existed from the coverage area of that fog device before delivering the response, therefore; the response will not reach correctly to the source sensors of these tasks.To solve this issue, the proposed Delay-Efficient Routing strategy based on SDN and Fog computing for IoV (DRSFI) as shown in figure 3 is used.In this strategy, the fog device sends route request contains the IP address of IoV vehicle and the data size of response to the semi-central SDN controller which searches in its own database and if this IoV vehicle is found in its coverage area, then it determines the new location of this IoV vehicle depending on its current location and speed by using CVLMS [27].Normally, the SDN controller has high capabilities for processing.Therefore, the searching process in the database does not take high time.After that, it computes the optimal route (i.e. a route with minimum delay) from the requesting fog device to the IoV vehicle and sends the flow tables to the requesting fog device and other intermediate fog devices.The fog devices based on these flow tables will forward the response to the IoV vehicle.Otherwise (i.e. the IoV vehicle is not found in the domain of semi-central SDN controller), it will forward the route request to the central SDN controller which after determining the new location of this IoV vehicle by using CVLMS will compute the optimal route to transfer the response to the source IoV vehicle.Then, it transfers the flow tables to the fog devices via the semi-central SDN controllers.To select the optimal route by the SDN controllers, the network is modeled into a weighted graph G = (V, L) where the symbols V and L represent the set of nodes and links respectively.Let d ij , f ij and b ij is the delay, transmitted flow data and available bandwidth between node i and node j.The objective function is to compute the route with minimum delay as follows: The first constraint means that the size of data flow that is sent through the link from i to j must be less than or equal to the available bandwidth in that link.According to the second constraint, the size of flow data cannot be negative value.The third constraint explains that the value of l ij is 0 if the link from i to j is not part of an optimal route, otherwise; its value will be 1.

Simulation and Results
The simulation is achieved by using OMNeT++ and SUMO that running on Windows 7. The general parameters and their descriptions of the simulation environment are in Table 1.To prove the efficiency of our proposed hierarchical system, we compare it with:  IoV-Fog system: the architecture in this traditional system consists of IoV vehicle and fog computing layers without using SDN.The RSUs and BSs use the AODV routing protocol to route the response if the IoV vehicle moves from the domain of a fog computing device to another. IoV-Fog-Central SDN system: it consists of IoV vehicle, fog computing and central SDN controller layers.The routing process is performed only by the central SDN controller depending on its acknowledge.
The simulation scenarios are as follows:  Scenario 1: The IoV Vehicles Speed This scenario studies the performance of our proposed system, IoV-Fog system and IoV-Fog-Central SDN system with increasing the mobility speed of IoV vehicles.The number of IoV vehicles in this scenario is 900 moving at various speeds ranged from 5 to 25 m/s.The number of tasks is 500 and have fixed size 500Mb.
Figure 4 shows the percentage of successfully transmission of responses within the deadline of our proposed system, IoV-Fog-Central SDN system and IoV-Fog system.This percentage decreases with increasing the speed of IoV vehicles due to the increasing in the cases of migration of the IoV vehicles from the domain of a fog device and entering to another one before delivering the responses of the tasks.It is also increases the broken cases of links.These issues increase the delay and the number of responses that exceed the deadline.However, our proposed system is better than other system because it computes the route with minimum transmission time and can computes the routes locally by using the semi-central SDN controllers that decrease the delay and help in meeting the tasks deadlines.Figure 5 illustrates the average delay from end to end with different IoV vehicle speeds.High speed of IoV vehicle increases the delay due to the broken links that need to be maintained.However, the proposed system produces good results in this term because it takes into account the transmission time when selects the optimal routes.In the proposed system, the semi-central SDN controllers can compute the routes and maintain several broken links locally, therefore; they reduce the time of correcting the broken links and as a result decrease the total delay.Moreover, the proposed system depends on the SDN controller which always has completed information associated to the entire network; therefore it can compute the optimal routes quickly.IoV-Fog-SDN Sys.Our Proposed Sys. Figure 6 shows the percentage of packet loss with various IoV vehicle speeds.High vehicle speed means frequent migration of IoV vehicles from the domain of some fog computing device to another one and high number of failed links that increases the number of packets that cannot reach to their destinations correctly.Our proposed system can handle most of the migration cases of the IoV vehicles and the failed links by the semi-central SDN controllers quickly.Therefore, it can reduce the number of packet loss and as a result it is better than other systems.

 Scenario 2: The Number of Tasks
This scenario studies the performance of our proposed system, IoV-Fog system and IoV-Fog-Central SDN system with increasing the number of tasks.The number of IoV vehicles is 900 moving at fixed speed 12 m/s.The numbers of tasks are 250, 500, 750, 1000, 1500, 2000.All of these tasks have fixed size 500Mb.
Figure 7 shows the percentage of responses that arrive without exceeding their deadlines of our proposed system, IoV-Fog-Central SDN system and IoV-Fog system with different numbers of tasks.Increasing the number of tasks means increasing the number of processing operations and overhead that increase the delay.However, the proposed system produces better result in this performance metric than other systems because it is distributed system.Therefore, the processing operations and overhead are distributed among the semi-central SDN controllers and central SDN controller that decrease the delay and increase the number of responses that meet their deadlines.Figure 8 illustrates the average delay from end to end with increasing the number of tasks.For the same reasons that illustrated above, the delay will be increased.Moreover, increasing the number of tasks means most of the routes with shorter transmission time will be full for the first responses.Therefore, the routes for the next responses will be selected with high transmission time.However, the proposed system produces low delay than other systems since it computes the routes with minimum delay and takes into account the available bandwidth.Figure 9 the comparison of our proposed hierarchical system with IoV-Fog system and IoV-Fog-Central SDN system in term of percentage of packet loss with increasing the number of tasks.Our proposed hierarchical system is the best one because it computes the routes with minimum delay and uses the SDN controllers in distributed manner that can build new routes and rebuild the broken links efficiently.

Number of Tasks
IoV-Fog Sys.

Figure 9:
The percentage of packet loss with number of tasks.

Conclusions
This paper focused on the mobility of IoV vehicles that affects the delivery operation of responses especially when some IoV vehicle exited from the coverage area of a fog server before receiving the response.An efficient hierarchical system based on the fog computing and SDN concept is produced for the IoV network.Moreover, a new routing strategy called DRSFI is proposed to route the responses with minimum delay and takes into account the available bandwidth of network links.This routing strategy is applied in the semi-central SDN controller and central SDN controller and depends on the proposed mathematical to compute the optimal route.Also, the speed and current location of IoV vehicle in computation of optimal route are taken into account.The simulation results explained that the proposed system is better than IoV-Fog-central SDN system and IoV-Fog system in terms of percentage of packet loss, percentage of successfully transmission within the deadline and average delay from end to end in different scenarios with different number of tasks and mobility speeds.The factor that helps in producing these results is using the SDN based network instead of traditional network that computes the optimal route quickly and forwards the flow tables.Therefore, the nodes use these flow tables to forward the data packets instead of searching in their routing tables for the optimal route.Also, the distributed SDN controllers help in minimizing the overhead in the central SDN controller and as a result minimizing the time of computing the optimal route.

Figure 3 :
Figure 3: The diagram of proposed routing strategy.

Figure 4 :
Figure 4: The percentage of successfully transmission with IoV vehicle speed.

Figure 5 :
Figure 5: The average delay with IoV vehicle speed.

Figure 6 :
Figure 6: The percentage of packet loss with IoV vehicle speed.

Figure 7 :
Figure 7: The percentage of successfully transmission with number of tasks.

Figure 8 :
Figure 8: The average delay with number of tasks.

Table 1 :
The general parameters used for simulation.