Cross-Layer and SDN Based Routing Scheme for P2P Communication in Vehicular Ad-Hoc Networks

Featured Application: Authors are encouraged to provide a concise description of the speciﬁc application or a potential application of the work. This section is not mandatory. Abstract: Conventional routing protocols proposed for Vehicular Ad-hoc Network (VANET) are usually ine ﬃ cient and vulnerable for multi-hop data forwarding due to the unavailability of global information and ine ﬃ ciencies in their route discovering schemes. However, with the recently emerged software deﬁned vehicular network (SDVN) technologies, link stability can be better improved through the availability of global network information. Thus, in this paper, we present a novel software-deﬁned network (SDN) based routing scheme for P2P connection under urban inter-vehicle networks that can ﬁnd a global optimal route between source and destination. This is a cross-layer routing protocol in VANETs, which utilizes metrics not only considering the position and velocity of vehicles, but also channel allocation and link duration when selecting the relay vehicles. Consequently, it starts a route discovery process which can improve the network performance in terms of end-to-end delay and low overhead. Furthermore, packet loss is largely minimized by the relatively stable paths. With the help of realistic simulation, we show that the proposed routing framework performs better than other three latest SDVN and conventional VANET protocols in routing overhead, average end-to-end delay, packet drop ratio, and average throughput. Therefore, our routing scheme is more suitable for 5G-enabled vehicular ad-hoc networks in future.


Introduction
Vehicular Ad-hoc Network (VANET), as one of the core technologies of the Intelligent Transportation System (ITS), has huge application potential and commercial value. Based on the Vehicle-to-Vehicle (V2V) communications and the vehicle-to-roadside communications (V2R) [1,2], VANETs are aimed at the applications including traffic information dissemination, traffic safety, and Internet access services, etc. Furthermore, with the emergence of the Internet of everything in 5G [3,4], VANET has been given a new functional role, as a natural extension of the mobile network in the road travel scenario.
The inherent characteristics present in VANETs i.e., the diverse node velocities, severe channel fading, dynamic network topology, and limit transmission coverage of vehicles, etc., impose a lot of challenges in designing an efficient routing algorithm with both short delivery delay time and The rest of the paper is organized as follows. The existing SDVN architecture is described in Section 2.1. The proposed routing protocol is described in detail in Section 2.2 and followed by a performance analysis and simulation result in Section 3. Finally, in Section 4, the conclusion is given.

SDVN Framework
In order to implement SDN to VANET, the architecture of SDN based routing framework is presented in [19,20]. As shown in Figure 1, the whole vehicular network consists of three types of components, i.e., SDN controller, local controller, and forwarding nodes. Furthermore, each road is divided into several segments of equal length. The SDN controller is responsible for keeping global, updated information about the network topology, and it helps the network to provide the best stable route by maximizing the path duration among all the paths between source and destination. Those Road Side Units (RSUs) that serve as local controllers reduce the burden of the SDN controllers by keeping local, updated information about the network topology within communications range. Notice that the local controller is only responsible for sending control information to mobile vehicles within its coverage, but it does not need to deliver data information to vehicles. We assume that the RSUs serve as gateways on the VANET part thereby connecting with traditional clouds. Hence, local controllers cooperate with the SDN controllers on clouds to maintain the global network topology. The OpenFlow protocol is adapted for communication between the data plane and the control plane, the key benefit of which is that the existing hardware can be efficiently utilized under SDN [21].

SDVN Framework
In order to implement SDN to VANET, the architecture of SDN based routing framework is presented in [19,20]. As shown in Figure 1, the whole vehicular network consists of three types of components, i.e., SDN controller, local controller, and forwarding nodes. Furthermore, each road is divided into several segments of equal length. The SDN controller is responsible for keeping global, updated information about the network topology, and it helps the network to provide the best stable route by maximizing the path duration among all the paths between source and destination. Those Road Side Units (RSUs) that serve as local controllers reduce the burden of the SDN controllers by keeping local, updated information about the network topology within communications range. Notice that the local controller is only responsible for sending control information to mobile vehicles within its coverage, but it does not need to deliver data information to vehicles. We assume that the RSUs serve as gateways on the VANET part thereby connecting with traditional clouds. Hence, local controllers cooperate with the SDN controllers on clouds to maintain the global network topology. The OpenFlow protocol is adapted for communication between the data plane and the control plane, the key benefit of which is that the existing hardware can be efficiently utilized under SDN [21].

Registering Phase
In this framework, each vehicle uses hello messages, including its velocity, location, pseudo-ID, and channel state information (CSI) etc. to periodically advertise status information to the nearest local controller at a fixed interval. After the corresponding controller receives these "State Update" messages, it will update the vehicles' state information tables. Note that each local controller separately maintains a vehicular history trace database which records the state information of all vehicles in its control area, and all vehicles' state information from these local databases could be integrated into a global network state vector via cloud computing.

Route Prediction Phase
In the P2P communication process, the source node firstly needs to send a route request (RREQ) packet to the nearest RSU. The RREQ message contains the source's ID and destination's ID. When receiving RREQ, the routing server will calculate a more reliable and optimized routing path from source to destination using global network state vector and our proposed routing algorithm. After that, this routing server will respectively respond a route reply (RREP) to all nodes on the routing path (including source, destination, and other intermediate vehicles) via local controllers. When these

Registering Phase
In this framework, each vehicle uses hello messages, including its velocity, location, pseudo-ID, and channel state information (CSI) etc. to periodically advertise status information to the nearest local controller at a fixed interval. After the corresponding controller receives these "State Update" messages, it will update the vehicles' state information tables. Note that each local controller separately maintains a vehicular history trace database which records the state information of all vehicles in its control area, and all vehicles' state information from these local databases could be integrated into a global network state vector via cloud computing.

Route Prediction Phase
In the P2P communication process, the source node firstly needs to send a route request (RREQ) packet to the nearest RSU. The RREQ message contains the source's ID and destination's ID. When receiving RREQ, the routing server will calculate a more reliable and optimized routing path from source to destination using global network state vector and our proposed routing algorithm. After that, this routing server will respectively respond a route reply (RREP) to all nodes on the routing path (including source, destination, and other intermediate vehicles) via local controllers. When these nodes receive the respective RREP message, they insert the routing path mark and next hop node ID to their own routing tables. Then the data flow will be sent out and propagated along the route to the destination. The route will stay alive for a certain length of time, after this time, it will be deleted so that the new routing path will be recomputed for the next cycle. This alive-timeout length is important to make our routing algorithm adaptive to the dynamic network topology. In addition, the routing path also will be limited by a certain maximum number of hops, so that the communication distance between source and destination will not be too long to reduce the efficiency of data packet transmission. The route discovery process in detail is described in Algorithm 1, and the whole session process of our protocol in detail is described in Algorithm 2.

Access Wireless Communication Protocol
SDN technology in VANETs also allow using multiple wireless technologies, like DSRC (Dedicated Short Range Communications), WAVE (Wireless Access in the Vehicular Environment), and LTE (Long Term Evaluation), etc. The relationship between cellular and ad-hoc communications technologies is suggested to be complementary; hence it will be a promising scheme to extend LTE with the direct communication capability between vehicles to become an integrated V2X solution. In this paper, we assume that the proposed algorithm adopts an LTE-A (LTE-Advanced) network [22,23] for communication between vehicle and vehicle.

Routing Metrics
Cross layer design has been widely used to improve the network performance in wireless networks [24]. Such networks are expected to support various types of applications with different and multiple QoS and grade-of-service (GoS) requirements. Our proposed algorithm exploits cross-layer information exchange to obtain the most optimal routing path, which depends on three different parameters, i.e., forwarding probability, link duration, and wireless bandwidth allocation.

A. Forwarding probability
The forwarding probability of any intermediate node could be calculated [25] according to the following formula.
where the constants α 1 and α 2 are used to weight the contribution of both sub-objectives, and α 1 + α 2 = 1. V Denotes the velocity of a current intermediate node, and V max denotes the fastest velocity allowed on this road section. D is the calculating distance between the previous forwarding node and the current intermediate node. R denotes the communication range between vehicles which is a fixed value. However, the main application scenario in [25] is expressway. Compared with the expressway scenarios, the urban road topology is complex and changeable. In urban scenarios, the communication range of vehicles is affected by many factors, and there are differences in the communication range between roads and intersections. Therefore, it is not appropriate to use fixed R to express the communication range. In this paper we derive adaptive transmission range between vehicles by the knowledge about the velocity and arrival rate. Then Equation (1) is modified to Equation (2).
where β ∈ (0, 1) denotes traffic flow constant [26]. The communication link lifetime between two adjacent mobile nodes i and j(CLT i,j ) on the route is calculated as Equation (3): In Equation (3) R is the communication radius between node i and node j. a , b , c and d are separately defined as follows.
where v i and v j separately denote the velocity of i and j. (x i , y i ) and (x j , y j ) separately denote the position of i and j which can be obtained by GPS. θ i and θ j separately denote the velocity angle of i and j. Among all the neighboring vehicles within communication range of the transmitting node i, the one that has the maximum CLT i,j ( j ∈ neigbor of i) can be selected first. According to Equation.
(3) above, the link duration is determined by each CLT i,i+1 of Node i (1 < i < N − 1) on the route as Equation (4).
where N denotes number of hops of the route and N must be less than certain threshold k. It means that the path length in the proposed routing algorithm is limited to a short distance. Similarly, li f etime must be greater than or equal to a specified time interval in order to ensure the link stability of our algorithm.

C. Wireless bandwidth allocation
Bandwidth estimation is necessary to transmit the data, because nodes within the transmission and interference range of each other will consume the bandwidth of each other. Suppose the LTE-A system is used in this inter-vehicle network architecture, the available wireless bandwidth between any two adjacent mobile nodes (i and j) may be figured out using following formula.
where p i denotes the transmitting power of sender i, p c denotes the transmitting power of the cellular user c, which will allocate a portion of channel bandwidth to the data transmission between i and j. B i denotes channel bandwidth of c. G i,j denotes the link gain between sender i and receiver j. G c,j denotes the link gain between c and j. N 0 is the noise power. Obviously, BW i,j must reach the level of corresponding application business, otherwise, the route building will not succeed.

Routing Format
In Section 2, we mentioned that local controllers need to create a RREP packet respectively for each node along the route and unicast it to the corresponding node in order to establish one link. Furthermore, the RREP packets will be updated and transmitted periodically to maintain the link until the end of data transmission. The RREP format consists of fields as shown in Figure 2, where Rsu_ID denotes the RSU number. Vehicle_ ID denotes the vehicle identity of destination. Package ID denotes the RREP packet number. Last Hop field denotes the vehicle identity of the previous hop on the route, and Next Hop denotes vehicle identity of the next hop on the route. SendTime is the sending time of the RREP packet. DelayTime is the delay time when the destination receives this routing packet. ExpiredTime denotes the expiration time of this routing packet. CMC is the specific check code encrypted by the RSU's private key that verifies the correctness of the packet. As can be seen in Figure 2, the length of RREP packet in the proposed algorithm is shorter than the AODV algorithm, and the local controllers only need to send a RREP packet to each vehicle node on the route. Therefore, we believe that our algorithm performs better in packet overhead, compared to AODV. Furthermore, the RREP packets will be updated and transmitted periodically to maintain the link until the end of data transmission. The RREP format consists of fields as shown in Figure 2, where Rsu_ID denotes the RSU number. Vehicle_ ID denotes the vehicle identity of destination. Package ID denotes the RREP packet number. Last Hop field denotes the vehicle identity of the previous hop on the route, and Next Hop denotes vehicle identity of the next hop on the route. SendTime is the sending time of the RREP packet. DelayTime is the delay time when the destination receives this routing packet. ExpiredTime denotes the expiration time of this routing packet. CMC is the specific check code encrypted by the RSU's private key that verifies the correctness of the packet. As can be seen in Figure  2, the length of RREP packet in the proposed algorithm is shorter than the AODV algorithm, and the local controllers only need to send a RREP packet to each vehicle node on the route. Therefore, we believe that our algorithm performs better in packet overhead, compared to AODV. Each vehicle stores a simple routing table inside. When receiving the RREP packet, these nodes need to update the information of their own routing table immediately. Note that the link duration should be greater than or equal to the sending cycle of the RREP packet.

Routing Table
The proposed algorithm provides that all the vehicle nodes in VANET need to store a simple routing table. Once the route is selected, each node along the path creates a temporary forwarding table which specifies the path for forwarding the packets. In the forwarding table, the field Next hop denotes the next hop on the direction from source node S to destination node D. Last hop denotes the next hop on the direction from D to S. ID denotes the ID number of links between D and S. Destination sequence number denotes the RREP sequence number.

Route Establishment and Data Transmission
Our algorithm adopts the cross-layer computation principle for the route establishment process. Depending on the vehicle's velocity and position, wireless bandwidth allocation and longest link duration, an optimized path is chosen by the local controllers cooperating with SDN controllers for data flow transmission.
Algorithm 1 shows the detail of the route discovery in our algorithm. These cross-layer metrics mentioned above are used to establish the routing path from source vehicle to destination vehicle, as shown in lines 12-14. Note that, the distance between source vehicle and destination vehicle is limited (lines 5 and 6), and the stack structure 'PathSet' could be used to store the route (lines [19][20][21][22][23].
Algorithm 2 describes the whole session process of the proposed SDVN routing protocol, which can be divided into following four steps: (i) each vehicle sends "state updating" messages (line 2), (ii) the source vehicle sends RREQ packet (line 3), (iii) the local controllers distribute RREP packets for link establishment (lines 4-10), (iv) route refreshing phase (lines [11][12][13][14]. When link damage is detected (line 11), check whether the P2P path can be repaired. If it can be repaired, continue to perform the data transmission along the repaired path. For instance, there is a vehicle new v that can replace the broken node i v while other nodes on the routing path have not Each vehicle stores a simple routing table inside. When receiving the RREP packet, these nodes need to update the information of their own routing table immediately. Note that the link duration should be greater than or equal to the sending cycle of the RREP packet.

Routing Table
The proposed algorithm provides that all the vehicle nodes in VANET need to store a simple routing table. Once the route is selected, each node along the path creates a temporary forwarding table which specifies the path for forwarding the packets. In the forwarding table, the field Next hop denotes the next hop on the direction from source node S to destination node D. Last hop denotes the next hop on the direction from D to S. ID denotes the ID number of links between D and S. Destination sequence number denotes the RREP sequence number.

Route Establishment and Data Transmission
Our algorithm adopts the cross-layer computation principle for the route establishment process. Depending on the vehicle's velocity and position, wireless bandwidth allocation and longest link duration, an optimized path is chosen by the local controllers cooperating with SDN controllers for data flow transmission.
Algorithm 1 shows the detail of the route discovery in our algorithm. These cross-layer metrics mentioned above are used to establish the routing path from source vehicle to destination vehicle, as shown in lines 12-14. Note that, the distance between source vehicle and destination vehicle is limited (lines 5 and 6), and the stack structure 'PathSet' could be used to store the route (lines [19][20][21][22][23].
Algorithm 2 describes the whole session process of the proposed SDVN routing protocol, which can be divided into following four steps: (i) each vehicle sends "state updating" messages (line 2), (ii) the source vehicle sends RREQ packet (line 3), (iii) the local controllers distribute RREP packets for link establishment (lines 4-10), (iv) route refreshing phase (lines [11][12][13][14]. When link damage is detected (line 11), check whether the P2P path can be repaired. If it can be repaired, continue to perform the data transmission along the repaired path. For instance, there is a vehicle v new that can replace the broken node v i while other nodes on the routing path have not changed, then the repaired path is s If the P2P path cannot be repaired, restart the routing discovery process to find another new P2P path. Figure 3 shows how the source selects the local controller and communicates with the SDN controller to find the final route from among all the paths between source and destination.

Performance Analysis
In this section, we provide a performance estimate of our routing algorithm by analyzing its route selection, link stability, transmission delay etc.

Benefits of SDN Migration
The SDN migration may maintain a global vision of the VANET topology. It means that SDN controllers are able to monitor traffic flows in the VANET domain in real time. When data traffic becomes unbalanced, they can start a reroute traffic process to improve network utility and reduce congestion. In addition, the SDN/OpenFlow technology can increase network intelligence by decoupling the control plane from the data plane; the decoupling brings efficiency, flexibility, management. Hence, SDN/OpenFlow allows the system to make more informed routing decisions in terms of path selection, channel selection, and safety service.

Cross-Layer Solution
The proposed scheme is designed on cross-layer metrics from MAC layer to application layer, which selects the best route by achieving high probability and low time delay as well as channel availability. For instance, a source vehicle S wants to establish a reliable route to the destination vehicle D. In terms of the prediction of topology map in Figure 4, the flows from S to D can be split into multiple paths (S→C→F→D, S→A→B→D, S→G→K→L→D and S→G→C→F→D). Suppose Vehicle C's available bandwidth is less than the given threshold value that means it has not enough channel bandwidth to forward data, so the paths, i.e., S→C→F→D and S→G→C→F→D are not available for the specified business type. In addition, vehicle L's reception probability in path G→K→L→D is less than the threshold probability, hence, this path also cannot be used. Finally, the path S→A→B→D is selected as the reliable path at the next cycle.

Performance Analysis
In this section, we provide a performance estimate of our routing algorithm by analyzing its route selection, link stability, transmission delay etc.

Benefits of SDN Migration
The SDN migration may maintain a global vision of the VANET topology. It means that SDN controllers are able to monitor traffic flows in the VANET domain in real time. When data traffic becomes unbalanced, they can start a reroute traffic process to improve network utility and reduce congestion. In addition, the SDN/OpenFlow technology can increase network intelligence by decoupling the control plane from the data plane; the decoupling brings efficiency, flexibility, management. Hence, SDN/OpenFlow allows the system to make more informed routing decisions in terms of path selection, channel selection, and safety service.

Cross-Layer Solution
The proposed scheme is designed on cross-layer metrics from MAC layer to application layer, which selects the best route by achieving high probability and low time delay as well as channel availability. For instance, a source vehicle S wants to establish a reliable route to the destination vehicle D. In terms of the prediction of topology map in Figure 4, the flows from S to D can be split into multiple paths (S→C→F→D, S→A→B→D, S→G→K→L→D and S→G→C→F→D). Suppose Vehicle C's available bandwidth is less than the given threshold value that means it has not enough channel bandwidth to forward data, so the paths, i.e., S→C→F→D and S→G→C→F→D are not available for the specified business type. In addition, vehicle L's reception probability in path G→K→L→D is less than the threshold probability, hence, this path also cannot be used. Finally, the path S→A→B→D is selected as the reliable path at the next cycle.  If the Dijkstra algorithm is used in Figure 3, the shortest path could be S→C →f→D in terms of If the Dijkstra algorithm is used in Figure 3, the shortest path could be S→C →f→D in terms of inter-vehicle distance. However, selecting this path will lead to link quality degradation or even link damages since the available bandwidth of node C is not enough. Therefore, compared to the Dijkstra algorithm, our algorithm performs better.

Communication Load
In order to maintain the state of the link between each pair of nodes, all control packets are periodically distributed by local controllers, and then a routing table is constructed at each node on the routing path. This method makes the source vehicle not broadcast a routing request message to neighbor vehicles like AODV protocol, which will alleviate the multicast traffic flooding problem in the routing discovery process to a large extent.

Simulation Evaluation
In this section, we use OPNET14.5 to analyze the performance of our routing algorithm, and compare it with efficient AODV without SDN [6], SVAO with SDN [24], and SDGR with SDN [23] in the same urban scenario.
The simulations were carried out considering a roadway field having a 10 × 5 km rectangular shape, and the running time was set to 5 min. As shown in Figure 5, there are three 4 km × 100 m one-way lanes named A, B and C, and assuming that A and B are in opposite directions while C is perpendicular to A and B. There are four RSUs placed near four corners of the rectangular simulation area, which ensures that all vehicles in the area are within the coverage of SDN network. To estimate the impact of density on the performance of the routing protocols, we varied the number of nodes from 15, 30, 50, and above 70 nodes. The network environment parameters are shown in Table 1.
Appl. Sci. 2019, 9, x FOR PEER REVIEW 10 of 15 inter-vehicle distance. However, selecting this path will lead to link quality degradation or even link damages since the available bandwidth of node C is not enough. Therefore, compared to the Dijkstra algorithm, our algorithm performs better.

Communication Load
In order to maintain the state of the link between each pair of nodes, all control packets are periodically distributed by local controllers, and then a routing table is constructed at each node on the routing path. This method makes the source vehicle not broadcast a routing request message to neighbor vehicles like AODV protocol, which will alleviate the multicast traffic flooding problem in the routing discovery process to a large extent.

Simulation Evaluation
In this section, we use OPNET14.5 to analyze the performance of our routing algorithm, and compare it with efficient AODV without SDN [6], SVAO with SDN [24], and SDGR with SDN [23] in the same urban scenario.
The simulations were carried out considering a roadway field having a 10 × 5 km rectangular shape, and the running time was set to 5 min. As shown in Figure 5, there are three 4 km × 100 m oneway lanes named A, B and C, and assuming that A and B are in opposite directions while C is perpendicular to A and B. There are four RSUs placed near four corners of the rectangular simulation area, which ensures that all vehicles in the area are within the coverage of SDN network. To estimate the impact of density on the performance of the routing protocols, we varied the number of nodes from 15, 30, 50, and above 70 nodes. The network environment parameters are shown in Table 1.    The performance metrics that we considered were routing overhead, average end-to-end delay, packet drop ratio, and average throughput.
Routing overhead: Ratio of the routing packets generated to the total data packets delivered to the receivers.
Average end-to-end delay: Average delay experienced by a data packet across the inter-vehicle network from one source vehicle to another destination.
Packet drop ratio: Ratio of the number of data packets lost at the destinations to the number of data packets generated by the source vehicle.
Average throughput: Average rate of successful packets (including routing packets and data packets) delivery over the inter-vehicle network. Figure 6 shows the performance comparison of routing overhead for efficient AODV, SVAO, and SDGR and the proposed algorithm. From the figure, it can be seen that the proposed scheme outperforms the other three reference schemes, consistently maintains around 0.21 in all scenarios: 15, 30, 50 and above 70 nodes. The SDN controllers keep a global record of updated information due to the cooperation among the local controllers and vehicles. The selection of local controllers at different depths from the SDN controllers reduces unnecessary propagation of control messages; thereby the overhead ratio of SDN-based schemes shows better performance than the non-SDN-based approach i.e., efficient AODV. On the other hand, the distance-based selections in the reference protocols SVAO and SDGR, show performance degradation in terms of overhead ratio, as the stability is not assured. The performance metrics that we considered were routing overhead, average end-to-end delay, packet drop ratio, and average throughput.
Routing overhead: Ratio of the routing packets generated to the total data packets delivered to the receivers.
Average end-to-end delay: Average delay experienced by a data packet across the inter-vehicle network from one source vehicle to another destination.
Packet drop ratio: Ratio of the number of data packets lost at the destinations to the number of data packets generated by the source vehicle.
Average throughput: Average rate of successful packets (including routing packets and data packets) delivery over the inter-vehicle network. Figure 6 shows the performance comparison of routing overhead for efficient AODV, SVAO, and SDGR and the proposed algorithm. From the figure, it can be seen that the proposed scheme outperforms the other three reference schemes, consistently maintains around 0.21 in all scenarios: 15, 30, 50 and above 70 nodes. The SDN controllers keep a global record of updated information due to the cooperation among the local controllers and vehicles. The selection of local controllers at different depths from the SDN controllers reduces unnecessary propagation of control messages; thereby the overhead ratio of SDN-based schemes shows better performance than the non-SDNbased approach i.e., efficient AODV. On the other hand, the distance-based selections in the reference protocols SVAO and SDGR, show performance degradation in terms of overhead ratio, as the stability is not assured.  Figure 7 illustrates the comparison between average end-to-end delay as a function of the number of vehicles. As can be seen from the figure, with an increasing number of vehicular nodes in the network, the end-to-end delay decreases. The pattern is the same for all the schemes, since the connectivity in the network will increase with an increase in vehicular nodes. Obviously, SDN-based protocols show much less end-to-end delay than the efficient AODV because applying the local controllers can reduce the network delay. In addition, the SVAO and SDGR select the next node based on distance only, whereas the proposed scheme calculates metrics including forwarding probability, link duration, and wireless bandwidth allocation. Hence, our target is to maintain network stability by providing the optimized route between source and destination, as a result, the proposed scheme shows less end-to-end delay than other two SDN-based schemes.
As shown in Figure 8, we can see that the proposed algorithm is also the best for packet drop ratio under the assumed simulation scenario, whose packet drop ratio is almost 0% until the number of 50 nodes. In the efficient AODV without SDN, a querying node has to select the next node for every hop until it reaches the destination. By doing so, it may come across several fragile links due to the  Figure 7 illustrates the comparison between average end-to-end delay as a function of the number of vehicles. As can be seen from the figure, with an increasing number of vehicular nodes in the network, the end-to-end delay decreases. The pattern is the same for all the schemes, since the connectivity in the network will increase with an increase in vehicular nodes. Obviously, SDN-based protocols show much less end-to-end delay than the efficient AODV because applying the local controllers can reduce the network delay. In addition, the SVAO and SDGR select the next node based on distance only, whereas the proposed scheme calculates metrics including forwarding probability, link duration, and wireless bandwidth allocation. Hence, our target is to maintain network stability by providing the optimized route between source and destination, as a result, the proposed scheme shows less end-to-end delay than other two SDN-based schemes.
As shown in Figure 8, we can see that the proposed algorithm is also the best for packet drop ratio under the assumed simulation scenario, whose packet drop ratio is almost 0% until the number of 50 nodes. In the efficient AODV without SDN, a querying node has to select the next node for every hop until it reaches the destination. By doing so, it may come across several fragile links due to the random and fast movement of vehicles. However, in other SDN-based schemes, the SDN controllers keep the global view of the VANET, which means the SDN controllers manage all the information about idle channels and relay nodes for each segment of the road. Therefore, SDN controllers can provide more informed routing decisions to each querying node. Furthermore, our proposed protocol increases network stability by providing a more stable route solution, for this reason, the least number of packets dropped compared to the other three protocols. Note that, the result above is obtained in the simulation environment we set, not in all simulation scenarios, and we did not take into account other factors not mentioned in this paper [27].
Appl. Sci. 2019, 9, x FOR PEER REVIEW 12 of 15 random and fast movement of vehicles. However, in other SDN-based schemes, the SDN controllers keep the global view of the VANET, which means the SDN controllers manage all the information about idle channels and relay nodes for each segment of the road. Therefore, SDN controllers can provide more informed routing decisions to each querying node. Furthermore, our proposed protocol increases network stability by providing a more stable route solution, for this reason, the least number of packets dropped compared to the other three protocols. Note that, the result above is obtained in the simulation environment we set, not in all simulation scenarios, and we did not take into account other factors not mentioned in this paper [27].   Figure 9 shows the impact of the proposed scheme on average throughput. It can be clearly observed that as number of vehicles increases, the throughput of our proposed algorithm is relatively stable and higher than efficient AODV, SVAO, and SDGR. Specifically, the throughput of our algorithm is in the range of 25,000-30,000 bit/s for the considered range of vehicle nodes (50-above 70). This is because the proposed algorithm is aware of stable links and the future position of nodes, which result in lower packet loss. Furthermore, it does not consume more bandwidth and gives opportunity to other packets to transmit in the inter-vehicle network. Obviously, our algorithm can receive a greater number of data packets than the other three protocols.  random and fast movement of vehicles. However, in other SDN-based schemes, the SDN controllers keep the global view of the VANET, which means the SDN controllers manage all the information about idle channels and relay nodes for each segment of the road. Therefore, SDN controllers can provide more informed routing decisions to each querying node. Furthermore, our proposed protocol increases network stability by providing a more stable route solution, for this reason, the least number of packets dropped compared to the other three protocols. Note that, the result above is obtained in the simulation environment we set, not in all simulation scenarios, and we did not take into account other factors not mentioned in this paper [27].   Figure 9 shows the impact of the proposed scheme on average throughput. It can be clearly observed that as number of vehicles increases, the throughput of our proposed algorithm is relatively stable and higher than efficient AODV, SVAO, and SDGR. Specifically, the throughput of our algorithm is in the range of 25,000-30,000 bit/s for the considered range of vehicle nodes (50-above 70). This is because the proposed algorithm is aware of stable links and the future position of nodes, which result in lower packet loss. Furthermore, it does not consume more bandwidth and gives opportunity to other packets to transmit in the inter-vehicle network. Obviously, our algorithm can receive a greater number of data packets than the other three protocols.  Figure 9 shows the impact of the proposed scheme on average throughput. It can be clearly observed that as number of vehicles increases, the throughput of our proposed algorithm is relatively stable and higher than efficient AODV, SVAO, and SDGR. Specifically, the throughput of our algorithm is in the range of 25,000-30,000 bit/s for the considered range of vehicle nodes (50-above 70). This is because the proposed algorithm is aware of stable links and the future position of nodes, which result in lower packet loss. Furthermore, it does not consume more bandwidth and gives opportunity to other packets to transmit in the inter-vehicle network. Obviously, our algorithm can receive a greater number of data packets than the other three protocols.

Conclusions
In this paper, an efficient cross-layer SDVN routing scheme for P2P communication was presented. The novelty of this work lies in its unique design based on Software-Defined vehicular networks. Taking into account the existing SDVN framework, the proposed algorithm calculates globally optimized routes for V2V communication by SDN/OpenFlow controllers , while generating much lower end-to-end delay. Specially, the path selection from source to destination is determined based on the cross-layer metrics including forwarding probability, available bandwidth, and link duration. Consequently, its link stability-based routing decision also reduces the probability of link failure resulting in a lower rate of path disconnection. The overall performance of our proposed scheme was evaluated with varying vehicle speed and density, and compared with efficient AODV without SDN, SVAO with SDN, and SDGR with SDN in simulation scenarios. The result has proven that it is superior to the other three protocols in terms of routing overhead, average end-to-end delay, packet drop ratio, and average throughput.
Fifth generation (5G) VANET is considered as a promising technology due to the merits of 5G architecture such as high mobility and scalability support, massive connectivity, and reduced latency, which overcome the limitations of the 4G technology. The proposed scheme is reliable and efficient, which is suitable for 5G applications. In addition, the SDN-based global routing greatly increases the computing load of remote controllers, which can be further solved by cloud computing and big data technologies.

Conclusions
In this paper, an efficient cross-layer SDVN routing scheme for P2P communication was presented. The novelty of this work lies in its unique design based on Software-Defined vehicular networks. Taking into account the existing SDVN framework, the proposed algorithm calculates globally optimized routes for V2V communication by SDN/OpenFlow controllers, while generating much lower end-to-end delay. Specially, the path selection from source to destination is determined based on the cross-layer metrics including forwarding probability, available bandwidth, and link duration. Consequently, its link stability-based routing decision also reduces the probability of link failure resulting in a lower rate of path disconnection. The overall performance of our proposed scheme was evaluated with varying vehicle speed and density, and compared with efficient AODV without SDN, SVAO with SDN, and SDGR with SDN in simulation scenarios. The result has proven that it is superior to the other three protocols in terms of routing overhead, average end-to-end delay, packet drop ratio, and average throughput.
Fifth generation (5G) VANET is considered as a promising technology due to the merits of 5G architecture such as high mobility and scalability support, massive connectivity, and reduced latency, which overcome the limitations of the 4G technology. The proposed scheme is reliable and efficient, which is suitable for 5G applications. In addition, the SDN-based global routing greatly increases the computing load of remote controllers, which can be further solved by cloud computing and big data technologies.