# A Novel Anomaly Behavior Detection Scheme for Mobile Ad Hoc Networks
## 5 Simulation Results  
In this section, the results and analysis (for the detection ratios and QoS parameters) of the study are presented. In the real-world environment, protocol testing involves huge costs, and is very time-consuming. Simulation tools are a good choice to create a scenario for the performance evaluation of a network, because of the dynamic nature of MANETs. In this article, we use the network simulation tool ns-3; ns-3 is a free, open-source discrete-event network simulator; ns-3 is widely used, as it is open source, operates in a high degree of complex network environment, and offers high reliability; its simulation results can be easily reproduced and analyzed; it is also cost-effective for constructing an application. Figure 2: The proposed approach for outlier detection. In the ns-3 simulator, the AODV, DSDV, DSR, OLSR, and ZRP routing protocols were implemented and the performance matrix was calculated. The analysis was carried out in terms of the impact on MANET performance and anomaly detection, in order to enhance security when the density of the network is increased. To perform analysis of the AODV, DSDV, DSR, OLSR, and ZRP routing protocols using the ns-3 network simulation tool, several parameters were applied; these parameters were used to calculate and analyze the performance of the network (Table 1). ns-3 provides different frameworks and built-in libraries; these libraries can be linked to the (C++/Python) simulator program, either statically or dynamically. In this work, the ns-3 simulator Python language is used in conjunction with LINUX OS. The various notations used in the proposed methodology are described in Table 2. The simulation results of each routing protocol in the ns-3 environment have been fetched and presented in graphs (Figures 3-7) and data tables (Tables 3 and 4). According to the simulation results, there is a clear indication that when the network density increases, the routing protocols under study are affected in terms of QoS. The comparative analysis of the routing protocols shows that the performance of the ZRP is enhanced concerning jitter value, end-to-end delay, throughput, and average energy consumption. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Value** \\ \hline Numbers of nodes & 200–1000 \\ \hline Channel type & Wireless channel \\ \hline Radio propagation model & Ray tracing \\ \hline Network interface & Wireless PHY \\ \hline MAC type & 802.11 \\ \hline Interface queue & Priority queue \\ \hline Antenna & Omni antenna \\ \hline Max packet in queue & 50 \\ \hline Dimension & 1000 m \(\times\) 1000 m \\ \hline Mobility model & Random waypoint mobility \\ \hline Data rates & 5 packets/second \\ \hline Packet size & 512 bits \\ \hline Simulator & ns-3 \\ \hline Simulation time & 5000 s \\ \hline Number of slots assigned to the reader at stretch( ) & 1 \\ \hline Time of each slot & 10 ms \\ \hline Velocity(minimum to maximum) & 0.3–5 m/s \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Simulation parameters. Figure 4: Comparative analysis of end-to-end delay in 200–1000-node networks using the proposed scheme over five MANET routing protocols. Figure 3: Comparative analysis of jitter in 200–1000-node networks using the proposed scheme over five MANET routing protocols. \begin{table}
\begin{tabular}{l c} \hline \hline  & **Notations** & **Meaning** \\ \hline Re & Region \\ \hline Ti & Initial time \\ \hline Tt & Termination time \\ \hline TW & Window selected in one stretch \\ \hline \(\mathbf{N_{m}}\) & Mobile node \\ \hline \(T_{S}\) & Timestamp \\ \hline \(T_{Frame}\) & Timeframe \\ \hline \(P_{S}^{AVG}\) & Probability of finding a node in a region \\ \hline \(N_{m_{static}}\) & Active node \\ \hline \(N_{m_{future}}\) & Passive node \\ \hline \(STDEV\) & Standard deviation \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Summary of notations. Figure 5: Comparative analysis of throughput in 200–1000-node networks using the proposed scheme over five MANET routing protocols.