Selsh Node Detection and Prevention Based on SDSR in Infrastructure-Less Networks

Wireless mesh network formed temporarily by using mobile hosts (nodes) without the help of any centralized and cooperate to dispatch the data packets through wireless links over the network. Due to this decentralization, each node act as both router as well as host for dispatching packets in the network. Because of a dynamic nature that is the mobility nature of the node in a network is vulnerable to various types of attacks. Some of the attacks are gray and black hole attacks. These attacks are advertised incorrect information regarding the shortest path to the sink node. This paper proposes a secure Dynamic Source Routing (SDSR) for providing a secure and safe route between the origin and sink nodes which identify and remove the gray and black hole nodes in the network. The proposed work is simulated by using the NS2 simulator tool and got the better performance for considered performance variables such as packet delivery ratio, throughput and node overhead. The simulation results give better performance compared to normal DSR and selsh DSR with increased packet delivery ratio and throughput and with decreased overhead of the network.


Introduction
MANET is a group of mobile hosts to form a network temporarily with wireless interface and without use, any aid of any xed infrastructure .the presence of decentralization each node in a network act as both router as well as host for forwarding the data from one node to another node. Therefore the wireless mess networks face many security vulnerable attacks such as denial of service attack, imprecation, active route interfering. Gray hole and Block hole attack are one of the attacks in wireless networks [1,2]. These attacks send the false route replay information to the sink node to nd the route nding process.
The Gray hole attack might take place because of the malicious nodes that are consciously misbehaving and has smashed the node interface. A black hole attack is an intentional malicious activity that sometimes drops all or some packets are dropped while forwarding to the destined node [3].to detect or remove these sel sh nodes from the network assign the Armstrong number to each node as a node id in case of DSR routing.

1.1.DSR Routing Protocol:
DSR (Dynamic Source Routing) is an on-demand routing protocol of wireless networks. In DSR, the connection between the two nodes is established only when it is required [4,5]. It contains two messages for communication they are route request and route replay.
Route Request Message (RREQ): For nding the path to reach the sink, the origin node start by broadcasting the RREQ message to all its neighbors [6]. The RREQ consists of the source address, a route con rmation eld, destination host address and a unique identi cation number as shown in g.1.

Rout Reply message (RREP)
In a network every node observing the hop status to its neighbour's nodes during the route nding. Once the route is found in the target node, dispatch the RREP message to notify the other nodes in the hop list shown in g. 2.

1.2.Black hole attack:
A black hole attack is a type of denial of service attack. In which the sel sh node unicasts the incorrect RREP message to the origin node with the high sequence number for misguiding the source host might trust that is the ultimate destination for better performance of a network [7,8]. Origin node S wants to send the data to the sink node D As shown in g .3.here the node S broadcast the RREQ packet to all its neighbours. Now all the neighbour nodes after receiving the RREQ packet rst check its routing table entries. If they found the shortest path to the sink node then they send the RREP message to the origin node. However, here the sel sh node without checking any routing table entries for saving the battery to dispatch its RREP message to the origin node S with B is a sink node. After received the sel sh node RREP message source node start to send the data malicious node M then the malicious node continuously dropping the data packets and interrupts the control messages that may lead to the critical security issue in the network.

Gray Hole Attack
The Gray hole attack might take place because of the malicious nodes that are consciously misbehaving and has smashed the node interface. During the route nding process rst, the malicious node act as a trusted node and then may change to the sel sh node vice versa [8]. This sel sh node may drop some or all packets. The identi cation of this attack is di cult to compare a black hole attack why because of the ability of the state to change nature. As shown in g .4, the node 4 act as a sel sh node and send the incorrect message to origin node during route nding process and it drops all the packets coming from a speci c node to all nodes.

Methodology
A methodology is used to identify and prevention of the black hole and gray hole attacks in the DSR routing protocol. In this method, for the identi cation of the sel sh nodes, the source node takes the neighbour nodes opinions. The behaviour of a node in the mesh network shows its authentication [9]. The nodes should show their honesty for participation in the data communication process. For this product of an Armstrong number scheme is applied for the removal of black and gray hole attack in wireless networks. For the node, the identi cation process assigned an Armstrong number to each node as a node sequence number in the network. Which does not change. The origin node receives the RREP message from all its neighbour nodes. After receiving the RREP packet, the origin node veri es the product of the node sequence ID's in the neighbour count list to reach the sink node [10,11]. The origin node also takes the opinion of the neighbour's about the replied node. Considered the wireless mesh network scenario shown in g.6. Let the origin and sink nodes are H and G. The whole process is given by in different modules and shown in g.5.

RREQ:
After assigning the Armstrong, number to each node in the network the origin H broadcast the RREQ message to all its neighbours during the route nding process. The neighbour node received the RREQ message and to the identi cation of its honesty send the RREP message to the origin node. The RREP packet consists of the neighbour node list [12] .this process continues until the RREQ message reaches the sink node G.

RREP:
All the nodes in a network hold their neighbour's list by using two tables. They are the decision  [13]. The neighbour node fresh path to the sink node dispatches the RREP message to the origin. After receiving the RREP message, the source host broadcast its decision message to all its neighbours for taking the opinion about the replied node.
Neighbour's Node: After receiving the decision message from the origin node the neighbour nodes give the acknowledgement with N packet means no packet through the replied node and Y packet means yes packet through some other path to the origin host. The origin node H waits for some time t for getting the decision packets from its entire neighbour's list [14,15]. If the source H receives, the y packet then set the opinion as Y and if the origin node receives as N packet that updates its routing table with sequence ID of neighbours and set opinion as N [16,17]. If the second table all opinion entries are, Y then the origin node conforms to the replied node as a black hole sel sh node shown in table 2. In addition, if the second table all opinion entries are a combination of Y and N then the origin node conforms the replied node as gray hole sel sh node shown in table 3.

Simulation Results And Discussions
The proposed work is simulated by using the NS2 simulator tool to the DSR protocol. Constant bit rate (CBR) Tra c type, two-way ground propagation in a rectangle eld of 1000m x 1000m with 80 nodes, IEEE Link layer MAC protocol, DSDV routing protocol parameters used by the simulator for simulation. An output trace le is a resultant of the simulation used to visualize, processing data with the help of a network animator (NAM) program, and got better performance for considered performance parameters such as throughput, node overhead and packet delivery ratio. The results of the simulation give the better performance compared to the SDSR, normal DSR and sel sh DSR with increased throughput and packet delivery ratio. The overhead is decreased.
The following graph of nodes vs packet delivery ratio is shown in g.7. For all considered protocols. The PDR is increased for SDSR and for normal DSR the PDR is zero in starting after the PDR value is increased and stopped to increase. For sel sh DSR the PDR is constant in starting after some time the value of PDR is slightly increased and nally decreased due to state change nature of malicious node.
The graph of nodes versus overhead is shown in the following g.8. The overhead of the SDSR protocol is zero because of the collecting of neighbour's opinions. The Overhead of the normal DSR is a little bit more compared to the sel sh DSR because of the dropping of the packets.
The graph of nodes versus throughput is shown in the following g.9. Initially, the throughput is decreased for all considered protocols and the number of node velocities is varied. After some time the throughput of the SDSR is improved, compared to remain normal and sel sh DSR protocols.

Conclusion
Page 6/10 The wireless mesh networks are unprotected from the malicious attacks .this paper explains some of the malicious attacks black and gray hole attack .and their detection and removal by using secure DSR.to make a normal DSR into a secure DSR assigned Armstrong product number scheme. For the node, the identi cation process assigned An Armstrong number to each node as a node sequence number in the network. Which does not change. The origin node receives the route replay message from its neighbour nodes. After receiving the route replay packet the origin node veri es the product of the node sequence ID's in the neighbor count list to reach the sink node. The origin node also takes the opinion of the neighbour's about the replied node. The simulation results give better performance compared to normal DSR and sel sh DSR with increased throughput and packet delivery ratio. The overhead is decreased. In feature scope, the same methodology will be applied to the other classes of the wireless mobile networks protocols and compare with the proposed protocol secure DSR with the different network performance metrics.

Declarations
Funding: Not Applicable Con icts of interest: no potential con ict of interest in relation to the study in this Paper.

Availability of data and material: Not Applicable
Code availability: custom code.   Nodes vs. Overhead Nodes vs. Throughput