1 Introduction

Ad hoc networks are dynamic, self-configured, and multi-hop networks, which are formed without any control and infrastructure. In [1], the analyses about availability of routes in this network can change because of the mobility of nodes. The topology of this network is not fixed, it may change frequently. Some of the limitations of such kind of network are power consumption, reduced bandwidth, limited channel capacity and so on. Because of the dynamic topology, the routes are not fixed [2]. They change frequently with the node movement. As a consequence, the routes will be broken. Hence, proper route maintenance is required whenever the routes are broken. In [3], there are various routing protocols used for establishing appropriate route mechanism for nodes. The process of sending the messages or the data packets requires a special approach known as routing. Sending nodes from source to destination by means of intermediate nodes is known as routing.

MANET is a set of mobile nodes which temporarily forms the network of any form of infrastructure. The type of connection deployed in MANET is dynamic, minimum energy facility, unstructured and unbalanced connections. The routes are dynamically created to deliver the data packets. Routing protocol describes how routers communicate with each other, distributing the information which enables them to choose the routes between any of the two nodes in a network. In [4], there are three main types of routing protocols which are proactive, reactive and hybrid routing protocols. The network topology is studied by the proactive protocols which connects the nodes in the network. Energy aware routing (EAR) is a routing protocol developed to use several transmission ranges. This current research focuses on Dynamic on demand as well as Ad hoc on demand routing protocols that utilizes the present traffic to identify the path.

Hence it is considered as a reactive routing protocol and it is different from other reactive protocols. There are two phases which are route determination and route maintenance phases were proposed in [5, 6]. As far as ad hoc on demand is considered, source node as well as the intermediate node holds the information of its adjacent neighbour data packets which are to be transmitted. Route development stays initiated by distributing a “hello message” to accomplish communication between the nodes. It faces a challenge that it doesn’t retain up-to-date information of the network topology which still creates routes on demand. Dynamic on demand protocol handles an advanced mobility patterns by determining the routes on demand, and a broad selection of traffic patterns as well as developing and maintaining the route are the basic operations of it which was proposed in [7,8,9]. In this proposed work, the hybrid Particle Swarm Optimization as well as BAT concepts for updating effective parameters for the evaluation of throughput, network lifetime, routing overhead, end to end delay as well as energy drain rate.

1.1 Authenticated routing for ad hoc networks

Authenticated routing protocol by the usage of hash chains was proposed in [10, 11] through which the ad hoc on Demand Routing was authenticated both by means of the end points as well as via the node which receives the messages. Before the max hop count limit is selected, a random no is generated by the node which prefers to send a route request or route reply. The signature extension of the hash field was established to the seed. The hash field at the top is established to the seed which is hashed with max hop count times. The hashing max hop count hash field is verified by the hop count whenever the node precise a request or a reply. The resultant value is matched with the top hash. The packet is drop from the node if the check fails. In the signature extension, the node hashes the hash field once before rebroadcasting or forwarding a route request or route reply respectively. In the hash function field the function which is used to compute the hash is set. Only the similar hash function can be used by the forwarding node as the field is signed. The packet was dropped when a node fails to validate or forward a routing message. This is because the hash function that has been used was not supported. Even though the protocol is authenticated by hash chains the end to end delay still remains higher.

1.2 Secure routing protocol using dynamic MANET on demand

In [12, 13], a dynamic mobile on demand routing protocol along with elliptic curve cryptography were used. To prevent against forwarding attacks secure routing and security for routing misbehaviour was provided. Four modules were used, of which one was vertical and other three were horizontal modules. The geographic position was allotted by the certification authority obtained from the digital certificate. The data is forwarded by using dynamic mobile on demand protocol. Finally in new node deployment there is a possibility for malicious nodes entry, so to avoid this they are using access control mechanism on elliptic curve cryptography. It ensures security parameters like authentication, integrity and confidentiality. But, by using this methodology, route maintenance is a problematic as well as complexity one.

1.3 Network lifetime using residual battery

Network lifetime by the usage of a residual battery wherein, there is only short time route maintenance when the nodes have a limited battery capacity was proposed in [14, 15]. The stability of the link as well as the capacity of the battery was considered on the same time. The transmission delay was reduced by the usage of extend network lifetime. To stop unable consumption of energy by the nodes, the residual battery capacity, the vector distance as well as the link capacity were selected. The energy efficiency can be still improved further while at finding the malicious nodes. Even though the existing schemes work well in routing process, the existing technique has a challenge that it do not work well in case of low mobility. In this paper, Dynamic MANET on demand protocol with meta heuristic optimization approach is deployed to achieve proper route maintenance without loss of data efficient traffic control and life time maximization in our proposed research work. The rest of this paper is systematized as follows. Section 2 designates the proposed dynamic on demand vector processing method. Section 3 elaborates about proposed system framework model and in Sect. 4 there is a comparison about performance analyses of proposed and existing work. In Sect. 5, we discuss about numerical results attained from Ns2 simulations. Section 6 specifies the conclusion of the paper.

2 Dynamic MANET on demand vector processing

In this section the proposed methodology of two routing protocols are considered as said above which develops precise route for the source node to reach its destination. In addition to that bat as well as particle optimization technique is integrated which is a hybrid Meta—heuristic algorithm. Then, this hybrid optimization algorithm is employed to the dynamic mobile on demand routing protocol for effective route maintenance and lifetime improvement in MANET.

2.1 AODV routing for efficient traffic control

By using ad hoc on demand, traffic control is determined. Various nodes are selected and routing technique is applied to estimate the traffic control from initial node to the final node. This protocol remains applied in an energy efficient traffic control to yield better routing decision in a network. To reduce the network overhead ad hoc on demand which stays as a reactive protocol is used to maintain the routes. The ‘n’ remains as the number of route transmission which will be reduced by additionally creating routes on demand. Each of the ad hoc on demand packets contains destination address which deals with the symmetric links that allows the nodes to identify the genuine ones there by maintaining the routes for other nodes also, Bellman-Ford distance vector algorithm is the principle used in this. It is useful for deciding a path for sending the information packets to the final node. Besides this, ad hoc on demand eliminate loop problem using the sequence numbers for every route request. For this process the protocol also uses route request (RREQ), route error (RERR) as well as route reply (RREP).

2.1.1 Route discovery using ad hoc on demand distance vector

Ad hoc on demand distance vector first examines its own location for route discovery. If it discovers the routing access of the final node, it begins the transmission of packets with the destination node, else it discovers the routing access of the final node, it begins the transmission of packets with the destination node, else it discovers route access first, and then it broadcast route request message in the network. Figure 1 shows that the source node 1 sends the data packets via node 3 and node 6 to the destination node 7. At first, route request is sent from the node 1 to the neighbourhood nodes which are 2, 3 and 4. These neighbour nodes ensure the destination path individually. If these nodes find the destination address, then immediately route reply is sent to the node 1 after getting the route reply creates a route to node 7. Finally, the transmission is done from node 1 to 7 after creating a route.

Fig. 1
figure 1

Route discovery in AODV

2.1.2 Route maintenance process using ad hoc on demand distance vector

Using hello messages ad hoc on demand protocol started route for finding the nearest nodes within the communication range. When a node finds the link break in a working route, then faulty communication is created in it and the message is broadcasted to those nodes that are linked through route failure. Upon getting this information, the routing tables are updated by the nodes and the access of pretentious route is deleted. Figure 2 shows that the route maintenance in AODV in which the connection between node 7 and node 6 is failure. Route request is sent from node 6 to 1. So node 1 reinitiates the route discovery process.

Fig. 2
figure 2

Route maintenance in AODV

2.2 DYMO routing for most effective traffic control

Dynamic MANET on demand routing protocol is establishes advancement in ad hoc on demand protocol. It is otherwise known as successor of ad hoc protocol. In dynamic, routes are figure on demand. Hello message is not needed in dynamic like ad hoc protocol. Based on a sequence numbers assigned to the packets that contain data, it performs the operation. Route maintenance as well as route discovery are the two main operations. The route discovery is done from the initial stage to the final stage if it does not have a proper path. Route maintenance reduces the packet dropping during the occurrence when route of route break. During routing operation the dynamic mobile on demand implements 3 messages such as route request, route response as well as route error. Source sends the route request to its destination. Route response is meant to identify the route from initial to final and to the in-between nodes between them. Route error is used to identify the invalid route from the available numerous intermediate nodes to the final node.

2.2.1 Route discovery using dynamic MANET on demand distance vector

One of the important characteristic that makes dynamic mobile ad hoc on demand protocol different from ad hoc on demand protocol is the path as cumulating feature. If an initial node doesn’t have any entry to its final, it broadcasts the message towards its neighbour. Then the neighbour node responds with a route response message to the final node else it sends a route request. Each time when a route request is delivered, if the neighbour node has an entrance to the final node, it responds by route reply information. Otherwise, the message is broadcasted by the route request message. Each time when a route request is send, the router updates its sequence number as well. If in case the incoming packets have same sequence number, the particular information will be discarded. During this process, the neighbour node attaches the address along with the message. The intermediate node marks the backward path. Dynamic mobile on demand also possess energy efficiency feature. If the energy is too low on a node, then that node cannot participate further in the route discovery procedure. In this manner, the routes will be developed.

Figure 3 demonstrates the route discovery in DYMO. Here, the source node is denoted by 1 whereas node 7 is designated as the destination node. The data packets have to be transmitted from 1 to 7. Initially node broad cast request to the neighbour nodes that contain a sequence number as well as address. Then it’s added to route request. If the hop count as well as sequence number is identified by the source node, it will also be added. After node 1 gets the reply, a route is created after which packets are transmitted to node 1. Route reply also contains the address of destination node and sequence number which transmit back using unicast.

Fig. 3
figure 3

Route discovery in DYMO

2.2.2 Route maintenance using dynamic MANET on demand distance vector

During the routing process, every node has to monitor the status of the links and also maintains the recent update within routing tables. The process of route conservation remains proficient with the aid of route error messages. This message would have been generated only if any of the nodes would have broken. With the response of this message, the routing table will be updated. Simultaneously, the entry of broken nodes will be cancelled. Figure 4 shows the route maintenance in dynamic mobile ad hoc on demand protocol where the connection between node 6 and node 7 is broken and node 6 receives a data for node 7. At that time, the time stamp in the route entry for a node expired and a route entry should be invalid. Then, node 6 broadcasts error message to towards node 1. The dynamic MANET on demand protocol does not perform well with the low mobility. It accomplishes very well whenever there is a traffic direction after every network. During the usage of this protocol, if interruption occurs, the particular node will be discarded from the route maintenance process as well as communication process and alternate route will be maintained. If in case the destination node is attacked by a malicious, then the process will be discarded and the new route has to be created for new destination. To create new route with short period of time, the machine learning approach like hybrid particle swarm optimization and bat algorithm is utilized to create an innovative route for route maintenance. Therefore, advanced dynamic mobile on demand protocol with optimization approach provides appropriate route maintenance at times of malicious attacks in path and destination node.

Fig. 4
figure 4

Route maintenance in DYMO

3 Proposed framework

The proposed method of work flow is shown in Fig. 5 to estimate the fitness value and velocity of the node. The reason behind in this implementation is to find the maximum velocity of the initial node x and neighbour node y. Initially every node sends the packets in a network if node i = 0, i > n to find the position best value. It updates the P best value automatically if pb value is 1 then, it estimates the velocity of the node and forwards the node if i++. This process repeats until to destination node.

Fig. 5
figure 5

Proposed framework for hybrid meta-heuristic methodology

3.1 Hybrid PSO and BAT

3.1.1 Particle swarm optimization

The concept behind particle swarm optimization algorithm is that it depends on the flock of birds significantly finding food within a specific region. The best effective solution to an optimization problem is originated alter the solution space through the aid of a population related finding process where the particles such as birds alter their locations similar to seeking food [16]. In an ‘N’ dimensional space, each and every particle represents a relevant and optimal solution to a problem. With two parameters such as position and velocity, the particles are generated randomly given as,

$$ X_{i} = \left( {x_{i1} ,x_{i2} , \ldots ,x_{iN} } \right) $$
(1)
$$ V_{i} = \left( {v_{i1} ,v_{i2} , \ldots ,v_{iN} } \right) $$
(2)

where Xi is the position and Vi is the velocity. Each particle stays flown to discover out possible optimal best result and to amend flying velocity and direction with respect to the flying experience. The position of all particles is examined at the end of the iteration process which is related to objective value. The solutions obtained for all the particles are collected together, known as the global optimal solution assumed by,

$$ GB = \left( {gb_{1} ,gb_{2} , \ldots ,gb_{N} } \right) $$
(3)

Local ideal or location best is the effective identical position which is accomplished by the individual particle, and the ith particle is assumed as the position as well as the velocity’s information is updated which are as follows

$$ V_{i}^{j + 1} = wV_{i}^{j} + C_{1} \times r_{1} \times \left( {P_{i}^{j} - X_{i}^{j} } \right) + C_{2} \times r_{2} \times \left( {GB^{j} - X_{i}^{j} } \right) $$
(4)
$$ X_{i}^{j + 1} = X_{i}^{j} + V_{i}^{j + 1} $$
(5)

where w is the inertia weight, r1 and r2 are the random values among 0 as well as 1 and C1 as well as C2 are the two positive constants known as acceleration constants, j represents the iteration number.

3.1.2 BAT

If the echolocation characteristic features of the micro bat are idealistic, diverse bat inspired algorithms is developed. These are the idealized rules:

  1. 1.

    To sense the distance bat uses an echo location method. They will identify the background barriers as well as food by some ways

  2. 2.

    Here vi is to be considered as the velocity whereas xi is to be understood as the position within the confined frequency minimum (fmin) for the bat that fly randomly. They change their wavelengths denoted by λ, with the loudness of A0 when searching for its prey. Usually the bat adjusts its wavelength and rate of pulse emission r ∈ [0, 1] based on how close they are, to the target.

  3. 3.

    In spite of the fact that loudness differs in various ways, there is a general assumption that loudness differs from large A0 to a minimum constant value of Amin. To have simplicity, the succeeding estimates are utilized. The wavelengths which are [λ min, λ max], are corresponded to a frequency f, is a range which are [fmin, fmax]. In a situation where for the given problem, suggest to use any wavelength so that the implementation can be executed easily in [17, 18]. While the wavelength can be set, the frequency can also be modified simultaneously. This is due to the fact that λ as well as f remain associated and λ f stays as a constant. There need to be certain rules that how xi and velocities vi positions are updated.

The following equations denote a solution xti as well as velocities vti at the step time t. whereas in the Eq. 6 βϵ [0, 1] denotes the random vector which is measured from the uniform distribution and x* denotes the current global best location once all the possible solutions are compared among all n bat

$$ f_{i} = f_{\hbox{min} } + \left( {f_{\hbox{max} } - f_{\hbox{min} } } \right)\beta $$
(6)
$$ v_{ti} = vt - 1i + \left( {x_{ti} - x^{ * } } \right)f_{i} $$
(7)
$$ x_{ti} = xt - 1i + v_{t} . $$
(8)

3.1.3 Hybrid meta-heuristic methodology

Individually this meta-heuristic proposed algorithm yields the most optimal solution but the computation time to find out the population values might be long. When replacing the worst individuals of the particle swarm optimization with bat and the worst individuals of bat with best of particle, becomes an effective approach to obtain best values. Several groups in the population will be divided into sub population. Each sub population will be independently evolved in continuous iterations. During the instance, when communication strategy gets stimulation, there occurs the exchange of information the proposed algorithm is determined based on the previous algorithm as discussed. The steps followed in hybrid formulation is given as follows,

  • Step 1Initialization For this meta-heuristic algorithm the initial population is generated. It initializes every population individually. The iteration set is defined to be R for execution of communication.

  • Step 2Evaluation Evaluate fitness value for hybrid algorithm in every population, it also develop the population execution individually.

  • Step 3Update The positions and velocity of particle swarm optimization is updated. The velocity and location of bat is updated in the best fitness value, which are found out.

  • Step 4Communication strategy From the initial population of bat, the best artificial one is transferred through the top k fitness in N1. From N2 the poorer particles are replaced and updated from every population.

  • Step 5Termination Steps from 2 to 5 have to be repetitive up to maximum number of iterations as shown in Fig. 7. Best particle position St and the best value function f (Xt) have to be recorded. Best location between entire bat Xt and the finest value of the function f (Xt) also have to be recorded. The dynamic mobile on demand protocol with optimization technique is preferred to obtain efficient output during network lifetime, end to end delay, routing overhead, as well as energy drain ratio. By combining hybrid optimization techniques, the best initial population will be selected and the best optimal solution can be achieved.

4 Performance analysis

This section discusses the performance analysis of the proposed scheme in that the process involved in hybrid formulation algorithm is given as follows,

Process 1—Initialization

Initially, the resource collected from each node is,

  • ns_stop = 0.000001

  • rx_power = 0.312

  • tx_power = 0.472

Process 2—Factors for Machine learning approach

The following are the factors used for machine learning approach,

  • qlen: qlen provides the time difference between the channel and node

  • ifq: distance time between one node and other node

  • prop: prop denotes the average power used for consumption and excitation

  • chan: chan denotes the channel data

  • radi: radius represents the distance between the cluster head and the nodes present

Factors considered for initial population of position vector is (qlen, prop, chan, radi). The minimum velocity in which the optimal value of the position vector obtained with minimum value of frequency is considered as the optimal output value. If 0.2–20 values are considered, there are 100 such combinations. In each combination, the position vector value gets varied. The point at which the maximum effective value obtained is considered as the optimal value. Therefore, for each of the position vector four combinations will be obtained as a result of hybrid algorithm. Once the four combinations are achieved, particle swarm optimization stays deployed to discover the best ideal combination out of sixteen combinations. The Ad hoc on demand distance vector routing protocol versus Dynamic mobile on demand for proposed scheme are plotted by dissimilar parameters is shown in the Table 1 such as throughput, end–end delay, routing overhead, energy drain rate, as well as time. From the performance of proposed protocol with optimization approach is found to be more effective while compared to the existing protocol. The improvements and betterments in Dynamic MANET on demand protocol is achieved by using machine learning approach. The parameters deployed to ensure the performance evaluation of the corresponding methods.

Table 1 Results obtained for AODV and proposed research method

5 Numerical results

This section discusses the numerical results of the proposed scheme. The performance evaluation metrics meant for ad hoc and dynamic on demand routing protocol used for 10, 20, 30, 40, and 50 nodes are combined into a single bar graph is shown in Fig. 6. Also the throughput value obtained for ad hoc protocol and the proposed dynamic mobile on demand protocol is described for proposed work. The typical amount of packet information transmitted throughout the communication and is measured on the basis of bits per second which is shown in the formula and it expressed as Throughput = (P*S)/T Where, P—Packets transmitted, S—Size of the packet, T—Simulation. Time From the throughput graph, it can be seen that when the number of nodes are 10 the throughput range is 5 Kbps. When there are 20 nodes, ad hoc vector routing reaches a throughput of 25 Kbps, whereas dynamic vector routing is only 90 Kbps. But when there are 30 and 40 nodes, dynamic vector routing gives the maximum throughput which is 250 and 255 Kbps respectively, whereas ad hoc routing is only 200 and 199 Kbps respectively.

Fig. 6
figure 6

Throughput value of AODV and proposed DYMO protocol

When there are 50 nodes ad hoc routing is only 50 Kbps whereas proposed method gives the best throughput which is 340 Kbps. Therefore it is clear that in Fig. 6, while compared to ad hoc routing protocol the proposed dynamic routing protocol performs better and provides improved throughput. This implies that all the data packets are delivered from source to destination without any loss in data. End–end delay relates to the interval occupied by packets throughout the communication. It differs only during the Round Trip Time. The delay time for ad hoc protocol and proposed dynamic protocol is described in the Fig. 7. From the delay time graph, it can be seen that when there are 10 nodes, the delay time is 0.73 s for ad hoc vector routing and 0.64 s for dynamic vector routing.

Fig. 7
figure 7

Delay time for AODV and proposed DYMO protocol

When there are 20 and 30 nodes the delay time for existing method is 0.52 and 0.39 s respectively, whereas for proposed method it is 0.3 and 0.21 s respectively. When the nodes are 40 and 50 the delay is very high in ad hoc routing which are 0.29 and 0.1 s respectively, whereas for dynamic routing it is very less which are 0.03 and 0.01 s respectively. Therefore, it is clear that the proposed work has minimum delay when compared to ad hoc routing. From the delay graph, the time taken for source node to reach the destination is comparatively less in proposed method.

The routing overhead for ad hoc routing versus proposed dynamic routing protocol is described in the Fig. 8. It says that the overall packets routed to the overall packets sent in bytes and analysis of typical number of data packets will be done. It is required because the size of routing packet changes. When the number of nodes are 10, 20 and 30 the routing overhead for ad hoc routing is 16.9, 14 and 9.8% respectively, whereas for dynamic routing it is very less which are 4.8, 3.8 and 3.5% respectively. When there are 40 and 50 nodes the routing overhead for existing method is very high which are 6.7 and 3.8% respectively, whereas for proposed method it is very less which are 2 and 1.8% respectively. It is obvious that the proposed protocol possess only minimum routing overhead.

Fig. 8
figure 8

Routing overhead for AODV and proposed DYMO protocol

The lifetime of every node is judged as per the recent traffic situation. The energy drain rate for ad hoc protocol and proposed dynamic protocol is described in the Fig. 9. When the number of nodes is 10, 20 and 30 the energy drain rate for ad hoc routing is 5.9, 9 and 11.2 mJ/s respectively, whereas for dynamic routing it is very less which are 2, 6 and 2.4 mJ/s respectively. When there are 40 and 50 nodes existing method reaches a maximum energy drain rate which are 14.2 and 17 mJ/s respectively, whereas the proposed method gives the minimum which are 1.4 and 1 mJ/s respectively. It is clear that energy drain rate is the minimum in terms of proposed protocol.

Fig. 9
figure 9

Energy drain rate for AODV and proposed DYMO protocol

Hence, maximum energy of the nodes can be preserved in proposed method which in turn increases the network lifetime. The energy drain rate was computed by using consumed energy divided by simulating time as shown in Eq. 9

$$ {\text{Energy}}\,{\text{drain}}\,{\text{rate}} = {\text{consumed}}\,{\text{energy/simulating}}\,{\text{time}} . $$
(9)

The network lifetime aimed at ad hoc versus dynamic on demand routing protocol is described in Fig. 10. When the number of nodes is 10, 20 and 30 the network lifetime is 15,494, 10,521 and 8554 s respectively for ad hoc routing, whereas for dynamic vector routing it is very high which are 15,723, 37,387 and 44,869 s respectively. When there are 40 and 50 nodes the network lifetime for ad hoc routing is 6838 and 5777 s respectively, whereas for dynamic routing it is 84,388 and 117494 s respectively which is the maximum.

Fig. 10
figure 10

Network Lifetime of AODV protocol and proposed DYMO protocol

Finally, it shows that the network lifetime obtained for proposed routing protocol is higher than existing protocol. As the delay time is less and energy drain rate is the minimum by deploying proposed research method, the network lifetime is obviously increased than ad hoc on demand routing protocol.

The results prove that the existing scheme performs only lesser than the proposed scheme with the help of proposed optimization approach is found to be more effective while linked to the conventional ad hoc on demand routing protocol. The scheme which is proposed, obtains by deploying 50 numbers of nodes as well as the improvements and betterments in the dynamic routing protocol is achieved by using machine learning approach.

6 Conclusion

The hybrid Meta heuristic methodology of dynamic mobile ad hoc network presented in this paper highly focuses on the mobile node energy level and lifetime maximization with the use of velocity estimation and fitness value calculations of PSO–BAT optimization algorithm. The simulation results of PSO–BAT optimization algorithm shows energy drain rate level is reduced to 1 mJ/s. This is 90% reduction of energy drain rate when compared to AODV implemented mobile node energy drain rate level. The end-to-end delay has been minimized to 50% than an existing AODV methodology. Dynamic routing protocol yields an excellent routing maintenance by discovering new routing path to the new destination. This increases the performance metrics routing overhead, execution time and throughput. Also the proposed heuristic algorithm enhances the secured routing process of mobile nodes in dynamic mobile network with denial of service mitigation algorithm in a reliable method. Using this optimization technique, intrusion detection system is used to detect the intruders of dynamic mobile ad hoc network without unnecessary energy draining of mobile nodes in dynamic mobile ad hoc network.