A New Fog-Based Routing Strategy (FBRS) for Vehicular Ad-Hoc Networks

. Vehicular ad-hoc network (VANET) plays a significant role in future intelligent transportation systems. The main objective of vehicular ad hoc networks (VANETs) is to improve driver safety and traffic efficiency. Many researchers proposed different schemes to improve communication efficiency. It is quite challenging where vehicles’ speed, Direction, and density of neighbors on the move are not consistent. Although several routing protocols have been introduced to manage data exchange among vehicles in VANETS, they still suffer from many drawbacks such as lost packets or time penalties. This paper introduced a new Fog Based Routing Strategy, which constructs a reliable system of adaptive, stable, and efficient routing networks. FBRS consists of two main phases: System Setup Phase (SSP) and System Operation Phase (SOP). SSP creates a cluster network, collects its nodes’ data, mining routes between them, and ranking paths using Dijkstra’s algorithm into a simplified table. Although, SOP generates a reliable route between the request of any two nodes for a communication channel and maintains the route against any simultaneous crashes. Recent VANET routing protocols have been compared against FBRS. Experimental results have proven the outperforming of the proposed algorithm against recent routing protocols in terms of packet delivery ratio and routing overhead.


Introduction
Vehicular ad hoc networks (VANETs) are innovative technology in transportation systems and smart cities [1][2][3].It is a critical component of intelligent transportation systems to improve vehicular traffic systems' efficiency and safety [4].VANETs implementation can be executed effectively by exchanging data between vehicles using multiple hops.Even so, considering the essential characteristics of VANET networks, as its limited data delivery delay, infrequent connectivity, and highly dynamic network topology.The most susceptible challenge is remaining the participated node in the network for just a limited time.Therefore, to prevent data loss, a stable routing technique should be implemented to fulfill VANET applications and handle intermittent connectivity and dynamic topology changes.
VANETs are considered an exceptional case of Mobile Ad hoc Networks (MANETs) except that mobile nodes are vehicles [5].The distinctive characteristics of VANET are the high mobility speed, but it is restricted by following organized routes and traffic laws.Furthermore, in VANET, vehicle communication channels are not only generated with other vehicles (V2V) but also with Base Stations (BS) and Road-Side Units (RSUs).The main target of VANET is to deliver specific data efficiently with the minimum delay possible in time.It supports many critical services such as traffic propagation alerts, sudden accidents, unusual traffic movements, route planning and control services, V2V communications, and cloud services [6].Many route planning and control services are already implemented in some countries [7,8].Yet, many VANET systems' challenges are still struggling in both deployment and management [9,10].With the current transportation systems, more challenges remain unsolvable such as geographical issues, unstable traffic flow, multiplying numbers of vehicles in the network, very high mobility traffic, communication channel crashes, and lack of security, which affect the quality of service (QoS) [11].Although, self-organized distributed network styles such as MANET can be applied to "fill the gaps" in these scenarios.However, the lack of a dedicated resource and communication management mechanism makes some services unenforceable.There is a need to suggest new network structures to deal with these issues.
A large amount of data between vehicles can be shared and distributed by Users.The delay in transferring data and information from vehicles to the remote cloud server and back to the vehicles after storage and processing is a critical area of concern in cloud computing.With the massive increase in the number of connected vehicles and their ever-increasing transportation, the demand for applications that support low latency and uninterrupted services is increasing day by day.
Fog computing is a model that spreads cloud computing and services to the edge of a network [12][13][14].It supplies an intermediate haze layer between Cloud and mobile devices.Unlike the Cloud, which is more central, Fog computing aims for services with widespread distribution.With a local feature, low latency, connection, and context awareness in Fog computing can be raised.Like Cloud, Fog provides data computing, storage, and application services to end-users [15].Fog computing as a new architecture is the right candidate for VANETs to meet requirements, such as rapid reaction on the base device, reduced cloud load, real-time data flow analysis using the Cloud, and better quality of service.Any device equipped with computing, storage, and network connectivity can be a haze node, including portable vehicles and road infrastructure [16].In VANETs, Fog nodes closest to the network's edge absorb data from different devices, and developers decide how to use them.
Therefore, this paper proposes a routing algorithm called Fog-Based Routing Strategy (FBRS) for Vehicular Ad-Hoc Network.FBRS consists of two main phases: System Setup Phase (SSP) and System Operation Phase (SOP).SSP creates a cluster network, collects its nodes' data, mining routes between them, and ranking paths using Dijkstra's algorithm [17][18][19] into a simplified table.Fog server collects clusters data and their Route Tables (RT) to be ready for communication requests.Although, SOP generates a reliable route between the request of any two nodes for a communication channel and maintains the path against any simultaneous crashes.Using Fog computing servers to collect, compare, and analyze data has improved routing speed and efficiency.
The main contributions of the proposed model are as follows: − The proposed model is a hybrid proactive and reactive routing approach for VANETs that gains both advantages as it works as a proactive routing system (table-driven) at SSP.Also, a reactive routing approach at SOP. − Using Cluster Formation Protocol (CFP) in SSP, which not only can identify each node in the cluster, collect their data and inner relations, but it also can identify neighboring nodes from other clusters.It also identifies orphan nodes with no cluster to belong to and creates a subcluster for them.These cases were mentioned barely in a few papers.CFP is capable of handling these exceptional cases.− In mining the data and the inner relations, we used Dijkstra's algorithm to optimize the routing table in a much simpler and faster form.It handles the proactive approach's primary disadvantage, which consumes time to build and mine all network routes.It depends on handshaking time, direction, average speed, and acceleration to calculate the route's reliability factor, not only the distance between nodes.− Furthermore, Depending on Fog computing and Fog servers to handle data computing and transferring which aims for services with widespread distribution.Unlike the Cloud, which is more central, Fog is an intelligent gateway that offloads clouds enabling more efficient data storage, processing, and analysis.− Moreover, the delay of the communication channel requesting is reduced mainly by using Realtime Rerouting Maintenance (R 2 M), which maintains crashed paths and finds a new one without calling back to the sender to search for an alternative route.This paper's organization is as follows: Section 2 shows the related works, explains Fog computing's essential characteristics as a new computing paradigm, and illustrates a quick survey of VANET routing protocols.Section 3 depicts the proposed Fog-Based Routing Strategy (FBRS).Section 4 presents the experimental results, and section 5 presents the conclusion of the observed experimental results.Finally, section 6 is the references.

Fog computing
Fog computing is a highly virtualized platform that provides computing, storage, and networking services between end devices and traditional Cloud Computing Data Centers.In Fig. 1, a description of the ideal information and computing architecture that provides future IoT applications and illustrates Fog computing's role.However, Fog Computing implies several characteristics described below, which plays a significant role in VANET information exchange as an extension of the Cloud.− Geographical distribution.In sharp contrast to the most central Cloud, the applications and services targeted by the Fog demand widely distributed deployments.For example, the Fog will play an active role in providing a high-quality flow of moving vehicles through agents and access points placed along highways and tracks.− Extensive environmental monitoring and smart grid sensor networks are other examples of inherently distributed systems, which require distributed computing and storage resources.− As a result of the wide geographical distribution, a large number of nodes, as evidenced by the sensor networks in general and the smart grid in particular.− Mobility support.Many Fog applications are necessary to communicate directly with mobile devices, thus supporting mobility techniques − Real-time interactions.Critical Fog applications include real-time interactions rather than batch processing, which support online analytic and interplay with the Cloud.Fog plays a significant role in the ingestion and processing of the data close to the source.The publication of Connected Vehicles offers a rich scenario of communication and interactions [20]: Vehicle to vehicle (V2V), vehicle to infrastructure (V2I), and infrastructure to infrastructure (I2I).Fog has many features that make it the ideal platform for providing productive, existing services in the field of information, entertainment, safety, and traffic support and analysis: geographical distribution (across cities and along roads), site mobility and awareness, low latency, heterogeneity, and support for real-time interaction.
The publication of Connected Vehicles offers a rich scenario of communication and interactions [20]: Vehicle to vehicle (V2V), vehicle to infrastructure (V2I), and infrastructure to infrastructure (I2I).Fog has many features that make it the ideal platform for providing productive, existing services in the field of information, entertainment, safety, and traffic support and analysis: geographical distribution (across cities and along roads), site mobility and awareness, low latency, heterogeneity, and support for real-time interaction.

VANET routing protocols
MANETs and VANET are similar in their ad hoc nature, unpredictable communication links, and low bandwidth.Thus, many studies have modified the routing protocols of MANETs to adopt VANETs [21].VANETs is a unique type of MANETs and offers various features, such as frequent network disconnection, dynamic topological changes, narrow delay limits, no problems with power limitation, geo-connectivity, and specific mobility modeling after a road topology.Path stability and efficiency are the main design metrics for VANET routing protocols.

Topology-based routing protocols
These routing protocols use the critical information existing in the network to forward the packets.It can also be divided into proactive (table-driven) and interactive (on-demand) orientation.Even proactive routing has a distinct advantage: routing information such as post-error forwarding is corrected as packets gradually approach the destination.As such, interactive routing opens a path only when necessary for the node to communicate with another node.It only maintains methods that can reduce the burden on the network.Reactive paths usually include a path detection stage where query packets are flooded in the network.

Geographic-based routing protocols
It is also called position-based routing protocols that depend on forwarding decision-making made by a source node on the destination node's geographic position and the next one-hop node position.It is accomplished by storing the destination's position in the packet's header by the source.Hence, all nodes' positions in the network must be obtained periodically using beacon messages to prevent route crashes.In geographic routing protocols, all nodes in the same network are assumed to know their location using an onboard Navigation System and a Global Position System (GPS) unit.Although these protocols do not maintain crashed paths or exchange information about route status, they provide ready routes immediately, which decreases the delay time and more suitable for highly dynamic environments like VANETs.

The proposed Fog-Based Routing Strategy (FBRS)
This paper introduced a new Fog Based Routing Strategy (FBRS) for VANETS.It constructs a reliable system of adaptive, stable, and efficient routing network using static infrastructure -Road Side Units (RSUs) -in crowd areas.It is powered by Fog-Computing technology to build non-overlapped grouped clusters, each cluster divided into levels as well as on fast roads supervised by the central cloud server.
FBRS consists of two main phases, as described in Fig. 2: System Setup Phase (SSP) and System Operation Phase (SOP).Each phase is divided into two or three steps.
In SSP, steps are the following: (i) Network Setup: using Cluster Formation Protocol (CFP) as it defines cluster nodes, their level, relations with each other and gathers routes and data between all nodes back to Cluster Head (CH).These data are set in Data

System Setup Phase
System Setup Phase is divided into three primary operations: Network Setup, Mining and Ranking, and Route Table Formation and Delivery.

Network Setup
In this subsection, an illustrated example describes how to create a cluster network and collect its nodes' data.CFP is a periodical Cluster formation and routes discovery, in which the primary function of the protocol is to: divide the cluster into levels as in Fig. 3, discover routes between CH and all other nodes (vehicles), define new nodes into the cluster, initialize nodes level.At the start of constructing the cluster, a maximum number of cluster levels (LM) must be initiated.L M value depends on the size of the cluster and the number of nodes that hold.Then Data Gathering Protocol (DGP) gathers specific information about every node (node level, handshaking time, direction, speed, and acceleration) in Collected Data Flags (CDF) and its relation with neighbored nodes in the In CFP, the CH initiates Route Discovery Message (RDM).It is assuming that Route Discovery Message Level (M L ) = 0 and message direction = F where F: Forward and B: Backward.Then, the CH starts to broadcast RDM every λ of time to collect cluster nodes' Identity Code (N ID ), their data, and relations (routes) with other nodes in the cluster.Nodes receive RDM.There are two possibilities that if the node does not have a N ID (new node) or has its own N ID (old node).If it is a new or unidentified N ID (has N ID from a different cluster), RDM force it to generate a new N ID and copy it into the RDM sequence flag, set Node Level (N L ) equal to M L , then increment M L by one, and rebroadcast.RDM sequence flag holds a list/sequence of node addresses accumulated as the RDM propagates to be used as source routing.On the other hand, if the receiver node has its own N ID of the same cluster, it has one of three cases: (i) If N L > M L : Check if M L ≤ L M (maximum number of cluster levels).If so, then RDM reached a normal node in the cluster.It copies its N ID to the RDM route sequence, increment M L by one, and rebroadcast again.If not (M L > L M ), then check if the receiver node has no N ID .If so, then it means that RDM reached a node with no cluster to hold.In that case, RDM generates a Sub-Cluster Head ID (SCH ID ) for it and sets its N L to zero, and increment M L by one.RDM broadcasts again to find any more nodes that do not have a CH either.If any node has been found, it joins to a subcluster of the neighboring static cluster.It will also be a gateway to the main cluster.Moreover, any discovered nodes in the sub-cluster will be treated as normal nodes and follow the same routing protocol.If not (the receiver node has NID from a different cluster), it copies its N ID to the RDM route sequence as a gateway to this cluster and broadcast back to CH.
(ii) If N L < M L : The direction will be set to B (Backward), gather data in CDF, then broadcast message backward as the sequence to CH to store this route.
(iii) If N L = M L : Route flag set to be inner relation then treated as the second case.
In DGP, CH collects all RDMs from its cluster nodes.Collected data and routes help the CH to build Data Table (DT).Each relation and data collected in the received RDM is listed in the DT.GNs data is listed as well in DT as gateway's relation with other neighbored clusters to be ready for any communication requests with neighbored clusters.CFP and DGP algorithms are illustrated in Flowchart 1, Cluster Formation and Data Gathering, and Pseudocode 1 Cluster Formation and Data Gathering Pseudocode in detail.− Discover all nodes shared the same cluster and each available route between them.
Pseudocode 1 Cluster Formation and Data Gathering.− Collect nodes' data to the cluster-head server.
Illustrative Example: In this subsection, a simple illustrative example showing how CH mines its cluster members' paths will be presented in Fig. 5. Through the model, the following assumptions are considered.
The example is applied to a VANET service area consist of one cluster divided into levels with a maximum of 4 levels and 18 NN members.Each level has some members.Level (0) = {CH}, Level      − Message set time: when a node receives RDM with lower M L , it sets the node's internal clock of this M ID to zero and wait for its return.− Message received time: the time it takes for the same RDM to return with acknowledging that it has been received successfully.An example is described in Fig. 6.

• Definition 2. Direction (D)
The direction factor is defined as the relative Direction in degrees between two direct related nodesusing an inner compass -in the route from the source node along to the destination node.

• Definition 3. Average Route Speed (ΔS)
Average Route Speed is defined as the average of total relative speeds between each two direct contact nodes in a route.It can be expressed by Eq. ( 4).

ΔS
• Definition 4: Average Route Acceleration (ΔA CC ) Average Route Acceleration is defined as the average of total relative accelerations between each two direct contact nodes in a route.It can be expressed by Eq. (5).

Mining and Ranking Operation (MRO)
MRO is used to mine and rank routes in the cluster and ready for any communication requests to minimize route analysis time and provide the most reliable route.Two main steps accomplish this operation: Path Mining and Route Ranking.

• Path Mining Algorithm (PMA)
In PM, CH collects all routes between nodes, creates UCG formation, and designs Cluster Head Route Table (CHRT), described in Flowchart 2. PMA consists of four main steps: − Convert collected routes to UCG. − Rank main and alternative routes between nodes and others with fuzzy rules depend on four factors discussed in detail below.− Broadcast Ranked UCG Route Table to all nodes in the cluster.− Create node RT (NRT) using Dijkstra's Algorithm and choose the optimal routes between source and destination nodes.PM's main aim is to design UCG by filling NRT and CHRT with the routes between each node and other, including CH as if any node requests a connection between any other node.Initially, to convert a cluster formation as in Fig. 7 into a route map UCG as in Fig. 7, the following steps must be considered: − Split graph into levels (zero to L M -1) and arrange nodes according to their levels, as shown in Fig. 7 (a).− Read each route relationship in RT and create a relation configuration in UCG until it completes as in Fig. 7 (b).After PM and UCG are designed, The RT has been filled with all possible routes.However, routes reliability factors are not computed yet.Generally speaking, a path (e.g., route) can be broken into a set (and possibly one) of links.For example, the route (X → Y → Z) can be divided into two links, "X → Y" and "Y → Z".Setting the reliability factor (RF) of a path can be Hence each factor has a different weight in fuzzy rules.Accordingly, there is a need for combining those factors (e.g., τ, D, S, ACC) to get the RF of any route.Although techniques can be considered to achieve such an aim, we claim that the most suitable one is fuzzy inference.The cause is that it perfectly makes decisions using estimated values under partial or indefinite input data [22,23].So, decision making in recent VANET routing protocols is taken by applying Fuzzy logic.However, in the proposed FBRS, the fuzzy inference is used for estimating the route RF.Generally, there are three steps to apply the fuzzy inference system, namely: (i) Fuzzification, (ii) Fuzzy rule Induction, and (iii) Defuzzification.

• Fuzzification
In FBRS, four fuzzy parameters are considered, namely, τ, D, ΔS, and ΔACC.At the fuzzification step, the inputs' range values are converted into membership levels (High, Medium, Low) for the employed fuzzy sets.For every fuzzy set, a membership function is used to present the input range's resemblance grade to the corresponding fuzzy set.
The result is a value that varies from "zero" (as no membership) to "one" (as full membership).Table 2 demonstrating each α and β considered fuzzy set values.Furthermore, in Fig. 8, The employed membership functions are demonstrated for the regarded fuzzy sets.• Fuzzy rule Induction: After input fuzzification, the fuzzy rule base is employed.In FBRS, 36 different roles will be considered, which are depicted in Table 3. (assuming 'H' for "High", 'M' for "Medium", and 'L' for "Low").For example, in Table 3, the fifth role indicates that: if τ is Low (L), D is Low (L), ΔS is Medium (M), and ΔA CC is Low (L), so the Output would be High (H).On the other hand, the max-min average composition operation is considered in FBRS as it was more suitable and efficient for the collected data nature.Therefore, let be assumed µ(i,j) is the input fuzzy rule value, µ K is the minimum fuzzy rule value of each row, µ M is the output fuzzy rule value, M is the number of output rules, and N is the number of parameters.

Low Medium High
As a result, the max-min compositional interface formula can be described as equation (6,7).
[] = (µ (,) , µ (,+1) ) (6)   = (µ  ) (7) where i ∈ {1, 2, 3, …, M} and j ∈ {1, 2, 3, …, N-1} • Defuzzification: As the output is a fuzzy set of the inference operation, many real-life applications are usually required to be crisp values.Accordingly, defuzzification of the output of the fuzzy rules must be achieved by mapping from a fuzzy space into a non-fuzzy action space.Generally, defuzzification techniques have many different methods, and the most commonly used methods are: mean of maxima, max-criterion, and center-of-gravity (COG).As COG is the most popular defuzzification technique, it is the used technique in this paper.Fig. 9 demonstrates the output membership function that achieved the defuzzification operation.
Let be assumed the relations' data collected from the previous example is described in Table 4.The methodology of computing the RF of any accessible route will be explained in the following subsection.Assuming that there are two available paths between the two nodes, S and D, as demonstrated in Fig. 10.
By assigning RF for each path, the paths can be ranked.The RF will be calculated for the two paths with the same procedure.Therefore, the three steps that must be applied are: (step 1) Find the fuzzy set membership values for each input, (step 2) Calculate the fuzzy outputs for each role, and finally (step 3) Defuzzification of the output RF value as followed.Table 4 Assumed data table of the relations in the example of Fig. 6.Calculate the fuzzy outputs for each role as in Table 5.

Broadcasting:
Now, UCG and RT are designed with routes and relations between each other nodes in the cluster.So, CH begins to broadcast and share UCG and RT with all nodes in the cluster.Nodes receive this data and start to process this data to design their NRT.

Dijkstra's routing protocol:
One of the most used methods to solve the shortest path problem is the Dijkstra algorithm.The Dijkstra algorithm can be easily implemented in a crisp number to model arc lengths [24].However, it is used to determine the most reliable route based on the four parameters.It can get each relation's RF using fuzzification and defuzzification techniques.In [25], collects the output data in a large routing board table, which contains all routes between nodes of the cluster just in the cluster head.Any node that requests a communication must request a route from the cluster head.
If there were any crashes in the obtained route, the source node must return to the cluster head to request an alternative route.This because the size of the output routing board table must remain at the cluster head to analyze.However, using Dijkstra's algorithm optimizes the output routing table in a much smaller and simpler table to analyze.Also, it minimizes the mining and ranking delay to generate RT, making it more suitable to handle high dynamic networks such as VANETs rather than other protocols.This protocol is based on finding the most reliable route with a more straightforward table than discussed papers previously.
Hence every car mines its own Dijkstra's NRT, all routes to all nodes in the same cluster are ready to make a connection anytime if requested.In the original Dijkstra's algorithm, its target to find the shortest path between any two nodes in a network.However, in a high mobility network like VANET, many parameters would be concerned rather than the distance between source and destination.The combined parameters into the route RF are more suitable and efficient for the VANET system.When a node in the cluster receives CHRT from CH, ROT generates its Optimized Route Table (ORT).
It finds the most reliable path between the receiver node and each other node in the same cluster.Although, it provides the route sequence and average reliability percentage of the path.The Reliability factor Optimization Technique (ROT) processes are introduced in detail in Pseudocode 2. Table 5 The fuzzy output membership.

Input:
• CHRT message containing cluster members, relations, and their RFs Trigger: • After each CHRT message is received Output:  For the illustrative example, let us have the same example of Table 4.It has collected relations and data in Table 5, which minded each relation's RF using fuzzification (Min-Max) and defuzzification (COG) techniques.The calculated RFs are filled into CHRT, as in Table 6, to be ready for the next step.The ROT is based on Dijkstra's Algorithm to find the highest path reliability.
Assuming that a source node E request a communication channel to destination node P in the illustrated example in Fig. 5. ROT algorithm starts to generate ORT of node E. The result table is demonstrated in table 7. The path's RF can be calculated as the RF average of each relation from the N S to N D .As in ORT, the path (E → P) will be as followed:

System Operation Phase (SOP)
The main idea of the VANET network is to exchange information between nodes and each other and the government servers like traffic, Ambulance, Fire Extinguisher, Police Stations.So, vehicles can act as communication hubs or intermediaries to share local resources instead of sending redundant bulk data to cloud servers [26,27].Fog computing can refine the data obtained from social networks and vehicular networks to predict the possible interdependencies.It includes both local decisions making and geo-distribution characteristics to bring less delay [28].This subsection describes how to start a Private Communication Channel (PC 2 ) between any two nodes (source node N S and destination node N D ) in the service area.It also maintains any simultaneous crushes in the communication channel without returning to the source node to request an alternative route.The SOP is divided into two primary operations: Global Routing Operation (GRO) and Real-time Routing Maintenance (R 2 M).

Global Routing Operation
GRO's primary goal is to establish a PC 2 between N S and N D with minimum delay and the most reliable network connections.To accomplish that, the GRO task is to find N D in the service area and generate a reliable route between N S and N D .
Let be assumed that N S requests for a PC 2 with N D .First, GRO searches for N D in the same cluster of N S using N S NRT to generate a route with the highest RF.This route is called Selected Communication Sequence (SCS).Communications between N S and N D have four cases: (i) N S and N D are in the same cluster, (ii) N S and N D are not in the same cluster but in the same Fog server, (iii) N S and N D are in different Fog servers, and (iv) N D is not found any servers.
As follow in the flowchart (3), each case will be described in details: − Case (i): N S and N D are in the same cluster: In this case, N S finds a relation with N D in its NRT.Ns initializes a Communication Request Message (CRM) to communicate with N D and generates Route Sequence (RS) -path routing address list between Ns and N D using NRT of N S .Then it adds RS to CRM and sends it as in RS along to N D .In case N D agrees to communicate, the information appears and otherwise.If the data package is larger than the size of CRM, it returns with acknowledgment to N S to roll over the remaining data in a sequence of packages.In any case, the CRM must include handshakes and returns the acknowledgment message with a reply (agreed or refused) as it follows the same sequence back to the source.− Case (ii): N S and N D are in the same Fog Server (FS): In case NS cannot find a relation with N D in its NRT.It generates a CRM and sends it to its CH, which forwards it to its Fog server.If N D is found in the Fog service area, CRM returns with confirmation, its CH ID , the Gateway-to-Gateway route (G2G) to N D cluster.Then N S adds RS to the first gateway to CRM, G2G, and last gateway to N D .
− Case (iii): N S and N D are in different FSs: In case that N D is not in the same cluster or any neighbored clusters (Fog service area), the CRM generated is forward to the central cloud server to search for N D .If N D is found, CRM returns to the FS with confirmation, N D CH ID and FS ID , and FS to FS route sequence.Then the FS returns the CRM to N S CH again as described in case (ii).− Case (iv) N D is not found on any servers: If N D is not found on any servers, CRM is forward back to N S as in case (iii) but with access denied as wrong N D ID, or N D is not available at the moment.

Realtime Route Maintenance (R 2 M):
One of VANET routing networks' significant problems is crashed links due to its high mobility network nature [29].Most VANET routing protocols depend on CH to find a new route to ND.It requires returning every crashed message to CH, which causes more traffic on Cluster network and CH, more delay time to find a route back to CH, and a higher chance of network changes.
So, R 2 M is critical for improving network efficiency and reliability in delivering data successfully.The R 2 M algorithm principle is to automatically find an alternative path during the connection without returning to CH requesting a new path.It starts with a crashed CRM that is received by the Last Successful Node (LSN).The R 2 M algorithm removes the crashed node from the NRT of LSN to send any messages to the crashed node until the next RT is received.Then, it generates a Request an Alternative Route (RAR) message at LSN and broadcast it to all Direct Relation Node(s) (DRNs).Every node that received a RAR message should return it with route sequence to N D if found and its RF.LSN collects all RAR messages and selects RS with the Highest Reliability Factor (HRF).So, LSN replaces the crashed RS of CRM with the active one and resend CRM as the new RS.The R 2 M algorithm is described in detail in Flowchart 4.

Experimental Results:
The proposed routing strategy FBRS is compared with four approaches, which are: SRS [30], OEB [31], R 2 P [25], and 5G-FSDN [32].The simulation was performed using the Network Simulator NS2 (version 2.35) [33], the vehicular mobility simulator SUMO (version 1.4.0)[34], and OpenStreetMap API [35].The vehicles' starting positions are distributed randomly on the road maps.NS-2 implements 802.11 physical and MAC models for V2V communication with a maximum transmission range of each vehicle is set to 500m.Table 8 demonstrates the simulation environment parameters used to set up for NS2.
The following Figures (from Fig. 13 to Fig. 18) illustrate the comparison of the proposed algorithms in terms of packet delivery ratio, routing overhead, normalized routing load, average end-to-end delay, and throughput of the system described in detail below.The reported results are the average of 10 independent runs with the same configuration and circumstances.

Packet delivery ratio (PDR)
The packet delivery ratio for SRS, OEB, R 2 P, 5G-FSDN, and FBRS was measured against the pause time and nodes' mobility speed.Fig. 13 demonstrates compared algorithms against different pause times of 20 sources with an average moving speed of 30 km/h inside the city [36].As illustrated in Fig. 13, the PDR of all tested algorithms is increased along with pause time.FBRS's PDR achieved its maximum value at a pause time of 30 seconds.After this pause time, other algorithms start to variant.Some algorithms are increasing in PDR as in SRS, and some others are decreasing as in FBRS.
Moreover, in 5G-FSDN, it increased till 20 seconds, decreased and stabilized at 35, then increased again after 45 seconds.Therefore, 30 seconds pause time was chosen as it achieves the highest average PDR and most stabilization with compared algorithms.Although PDR was measured against different mobility speeds between 10 and 60 km/h, various sources vary between 10 and 60.Fig. 14 illustrates the road map with 10 to 60 sources of 200 nodes request a communication channel.As depicted in Fig. 14, generally, with low mobility and a small number of sources (10 sources), the competing protocols can deliver most of the delivered data packets (around 92-99%).However, as the number of sources increases (up to 60 sources) as well as increasing the source speed, it is found that the packet delivery ratio gradually decreases mainly in R 2 P, OEB, and SRS.Considering FBRS, it is shown in Fig. 14 (E) that it outperforms all other competitors.As NRT continuously delivers up-to-date routing information to the cluster nodes.R 2 M algorithm maintains crashed routes automatically without rolling back, asking for alternative routes.
Moreover, the GRO algorithm deals with communication requests from other clusters using shared information of the Fog and cloud servers without any delay.So, it gives nodes the ability to communicate with outside nodes simultaneously immediately.
Considering Fig. 14 again, in high mobility (e.g., using little pause time), it is indicated that: 5G-FSDN and FBRS overcome SRS, OEB, and R 2 P in almost all cases.On the other hand, R 2 P outperforms SRS but in most cases.

Routing overhead (RO)
To keep up-to-date information about network topology, routing algorithms generate small-sized packets called routing packets (such as hello messages).Routing packets do not carry any application with specific content as data packets do.However, both routing and data packets share the same network bandwidth most of the time.Accordingly, routing packets are considered as an overhead for the network.This overhead generated by routing packets is called routing overhead.A suitable routing protocol should generate as small routing overhead as possible.
The routing overheads were compared against the maximum mobility speed and depicted in Fig. 15 for all competing protocols.It is noted that routing overheads increase with the increase in sources' mobility speed.In Fig. 15, as the sources' mobility is increased, it is noted that SRS has lower overheads according to OEB.In a small number of sources (10 sources), the behavior is similar to all competing protocols regardless of the average speed of sources.It can be concluded that SRS has lower routing overheads than 5G-FSDN and OEB.Moreover, as illustrated in Fig. 15, FBRS outperforms the other competing protocols as it has minimal routing overheads.The reason is that it efficiently tracks the changes simultaneously at all the time in the network topology.Further, as in FBRS, the selected route for data transmission is the most reliable route: routing overheads are minimized since these routes' maintenance decreases.Fig. 15 illustrates the routing overhead for the tested techniques considering different numbers of sources.Also, by increasing the number of sources, the routing overhead increases.So, increasing the number of sources will undoubtedly increase the cluster routing packets (traffic).

Normalized routing load (NRL)
The normalized routing load can be defined as the fraction of all control packets sent by network nodes over the number of all received data packets at the destination nodes.It is the ratio between all routing packets sent over the network to all data packets received.The performance of the proposed FBRS in terms of the normalized routing load is illustrated in Fig. 16.

Conclusion
In this paper, a new Fog-Based Routing Strategy (FBRS) for VANETs is introduced.FBRS merges both proactive and reactive routing approaches.Hence, it gains the advantages of both.According to the most reliable path, this paper's originality is that FBRS employs an efficient and stable route discovery mechanism, mining, and ranking routes.Also, it presents a global communication system using Fog and Cloud computing servers.
A unique real-time maintenance mechanism in which nodes do not need to request another path at path crashes.FBRS has been compared against the current VANET's routing protocols.Experimental results have proven that FBRS overcomes the compared protocols as it has much higher performance in terms of throughput, bandwidth consumption, and delay time.
Fuzzy output membership set.
Example on computing route reliability.
The output membership.
Packet delivery ratio of the compared algorithms against pause time.
The Throughput of the compared algorithms against different number of sources.
The second and final step, (ii) Real-time Route Maintenance (R 2 M).If there was any change in path while transmitting the message or any crashes in route connection, it initiates the Dynamic Rerouting Operation (DRO).DRO maintains the crashed paths and finds a new one without calling back to the sender to search for an alternative route.
Input:− Ad hoc network with n nodes − Cluster size = LM − τ: The initial cluster formation time.Trigger:− At the start of each timestamp.Output:− Dividing the network into clusters, in which each cluster consists of cluster-head, nodes, and subclusters.

Fig. 4
route discovery message Flags.
L (Route Length) is defined as the number of intermediate nodes (e.g., the number of hops) between source and destination nodes.It should be as low as possible to decrease the loss of time in handshaking and then rebroadcast inner nodes.Furthermore, τ n is expressed by Eq. (2).

Fig. 6
Fig. 6 Example of Handshaking time between three nodes A, B, and C.

Fig. 7
Fig. 7 Converting Cluster formation (a) into UCG formation (b) according to nodes' levels and relations.

Fig. 11 7 µ
Fig. 11 Fuzzy input set values of S-A relation example.(a) Handshaking Time (b) Direction (c) Average speed (d) Average Acceleration.

Flowchart 4
The R 2 M Algorithm.

Fig. 13
Fig. 13 Packet delivery ratio of the compared algorithms against pause time.

Fig. 18 The
Fig.18 The Throughput of the compared algorithms against different number of sources.

Figure 2 Proposed
Figure 2

Figure 4 route
Figure 4

Figure 6 Example
Figure 6

Table 1
Collected relations and data of the Illustrative Example.The handshaking time factor is defined as the summation of time taken to send a communication request message and reply with acknowledgment between each two direct contact nodes in a route.It can be expressed by Eq. (1).

Table 3
Fuzzy Roles.Table2Considered α and β values for each parameter.

Table 6
Cluster Head Route Table.Pseudocode 2 Reliability factor Optimization Technique.