International Journal of Computer Applications (0975 8887) Volume 135 No.11, February 2016 37 Anti-Black Hole Attack Mechanism for Ad Hoc On- Demand Distance Vector (AODV) Routing Protocol in Manets Fawaz Mahiuob Mohammed Mokbal MS (IT) Scholar, IBMS The University Of Agriculture Peshawar-Pakistan Khalid Saeed Lecturer Computer Sciences IBMS The University Of Agriculture Peshawar-Pakistan ABSTRACT Mobile Ad-hoc Networks (MANETs) can be set up dynamically anywhere and anytime without the need of infrastructure. MANETs consists of a set of wireless nodes. These nodes move randomly and communicate with each other via a wireless communication links. MANETs routing protocols are vulnerable to several types of attacks, the most famous and common is Black Hole attack .This research simulate the behavior of Black Hole attack on Ad-hoc On- Demand Distance Vector (AODV) Routing Protocol using Network Simulator (NS2.35). Moreover, the black hole node(s) have been eliminated completely using the mechanism proposed in this research. The proposed approach is named as Anti-Black Hole Attack mechanism for AODV (ABHMAODV) Routing Protocol. The proposed mechanism maintains the performance of the protocol while handling Black Hole attacks. Keywords MANET, AODV, ABHMAODV, Black Hole Attack. 1. INTRODUCTION A wireless ad-hoc network is also known as IBSS because the communication links are wireless. The network is ad-hoc because the connections between the stations are directly connected with each other and does not need access points [1]. Ad-hoc with mobility is commonly called MANETs (Mobile Ad-hoc Networks). MANETs are autonomous systems in which mobile nodes are connected by wireless links and are free to move randomly. The nodes sometimes act as host and sometimes act as a router [2]. Moreover, the network topology is constantly changing and unexpectedly as well. These nodes cooperate with each other to do routine tasks in the network [3]. It is called infrastructure-less networks because it is temporary and short-range [1]. In most cases, the hardware components for MANETs have limited power, limited memory, and the processor capabilities are limited, as well as speed and data transfer rate are also limited. These limitations are called thin client [4]. Therefore, the range ultimately becomes less. The packets in MANETs are transmitted either directly from the source node to destination node or by passing through a series of intermediate nodes. However, the issue of security in MANETs is a challenging task such as establishing secure route between source node and destination node [3]. Figure 1 given below shows the diagrammatic representation of MANETs which consist of three nodes (n0, n1, n2). Fig. 1: MANETs Consist of Three Nodes. MANETs are used in case of lack of specific infrastructure, or when there is little infrastructure to find due to many reasons including cost or non-consensual. In some cases MANETs are used in fire, safety, rescue and military operations in which the identified infrastructure or specific topology structure are not possible or have been destroyed [3]. Moreover, it can also be used in the classroom in a group which wants to communicate with each other, if any mobile device which has a wireless interface, the group of mobile devices can form MANETs. Protocols are needed to pass the packets in the network. There are many routing protocols in MANETs, and one of the most important among them is Ad-hoc On- demand Distance Vector (AODV) Routing Protocol. 2. AODV ROUTING PROTOCOL The Ad hoc On-Demand Distance Vector (AODV) routing protocol intended for use by mobile nodes in ad hoc network. It offers quick adaptation to dynamic link conditions, low processing and memory overhead, low network use, and determines unicast routes to destinations within the ad hoc network [5]. AODV is the reactive protocol which uses a table of routes and keeps information on recent routes that is used by the recent node. The protocol uses two functions such as route discovery and route maintenance. 2.1 Route Discovery When a source node needs a new route to another node (destination node) and does not have a fresh-enough-route in its route table than the source node broadcasts the route request message (RREQ) to the rest of its neighbor nodes in the network. The source node waits to receive a route reply message (RREP) about desired node within a specific period of time from neighbor node or destination node itself. If the source node does not receive any response during that period, it either rebroadcasts route request again or assume that there is no known new route to the required destination node. When (RREQ) is received from the neighbor node than it will either send a reply (RREP) to the source node or forward the request based on the data in its own routing table. In addition, it establishes the opposite route on temporary basis using the IP address of the source node. The sequence number mechanism