## 3 Intelligent Cluster-Based Routing Approach
### Cluster Formation
However, if the destination node is situated outside the cluster and requires communication with subsequent vehicular nodes, a mechanism comes into play. When the destination is within the cluster,the communication process involves RSU broadcasting a route error message back to the source node upon detecting path errors. The source node then redirects the packet through an alternative path within the same cluster. However, an authentication key mechanism is activated if the destination is outside the cluster and requires communication with subsequent vehicular nodes. The RSU furnishes an authentication key in Algorithm 1, and upon RSU confirmation, the vehicular node can communicate with the next cluster node, mirroring the process for inter-cluster communication. The RSU authentication key serves a crucial role in inter-cluster communication. When a vehicular node needs to communicate with subsequent nodes outside its cluster, it utilizes the authentication key provided by the RSU in Algorithm 1. This key serves as a form of authorization, allowing the vehicular node to establish communication with the next cluster node. The RSU's authentication key acts as a secure credential, ensuring that only authorized nodes within the cluster can communicate with nodes in other clusters. This mechanism enhances the security and integrity of inter-cluster communication by controlling access and verifying the legitimacy of communication between clusters in the vehicular network. In this scenario, the authentication key furnished by the RSU in Algorithm 1 is shared with the following cluster node. Following RSU confirmation, the vehicular node can communicate with the next cluster node. The process mirrors the one employed for inter-cluster communication. Various procedures and loops influence the complexity of Algorithm 3 for path prediction using modified AODV. The FCPdata_send procedure involves sending messages to neighbors, and the objective function procedure utilizes AODV to obtain paths and evaluate fitness functions. The overall time complexity is likely influenced by the number of vehicular nodes, the iterations in evaluating fitness functions, and the conditional checks for distance, hop count, and channel availability. The nested loops contribute to the complexity, especially in the objective function procedure. The overall complexity is likely polynomial and depends on factors such as the number of nodes, paths, and the effectiveness of the fitness function evaluation. ```
0:\(\textit{secure clusters, }\textit{FCP, BCP, vehicular nodes}(25,50,75,100)\)
0:Predicted path, targeted path \(\textit{FCPdata\_send}(\textit{source, destination})\) \(\textit{if}(\textit{neighbor}=0)\)  Send FCP to all neighbors \(\textit{for i = 1 to n}\) \(\textit{if}(\textit{neighbor}=\textit{destination})\)\(\{\)  Delete FCP and create BCP \(\textit{Data\_send}(\textit{source, destination})\)\(\}\)  Else \(\textit{FCPdata\_send}(\textit{source, destination})\)  Procedure Objective function() \(\textit{Available paths}\rightarrow\ AODV\)  While (j<=p)  Obtain path and evaluate fitness function \(\textit{if}(\textit{distance, hopcount and channels}>\textit{threshold})\) \(\textit{Evaluate objective function}()\)  Increment j  End while  End
```

**Algorithm 3** Path prediction using modified AODV

## 4 Performance Evaluation

This chapter delineates the context and enacts the envisioned project within the VANET milieu. Herein, we elucidate the outcomes of our experiments, employing deep learning techniques and simulations conducted using the Network Simulator-2 (NS-2). These endeavours are aimed at comprehensively assessing and executing the principal operational scenarios. ### Simulation Scenario

We implemented the prescribed methodology in NS-2.33 to assess the efficacy of our proposed model. This model was meticulously crafted to ensure vehicular devices' efficient and dependable performance in routing and detecting black hole attacks.