You are on page 1of 69

CHAPTER 1 INTRODUCTION

1.1 ADHOC NETWORKS


A wireless network uses radio waves or micro waves to connect the devices such as laptops to any business network or internet without the use of physical wired network betweensender and reciever. When you connect a laptop to a WiFi hotspot at a caf or other public place, you're connecting to that business's wireless network. 1.1.1 Benefits of wireless network: Mobility: You're no longer tied to your desk, as you were with a wired connection. You and your employees can go online in conference room meetings, for example. Convenience: Access your network resources from any location within your wireless network's coverage area or from any Wi-Fi hotspot. Easy setup: You don't have to string cables, so installation can be quick and costeffective. Expandable: You can easily expand wireless networks with existing equipment, while a wired network might require additional wiring. Cost: Because wireless networks eliminate or reduce wiring costs, they can cost less to operate than wired networks. An Adhoc network is an autonomous collection of mobile nodes and wireless communication network is used to connect these mobile nodes. This type of network is known as MOBILE ADHOC NETWORK (MANET). MANET is an infrastructureless network with no fixed base station for communication and each n ode is free to move independently. Intermediate mobile nodes act as router to deliver the packets between the two nodes. So, MANET is a highly dynamic network and hence more vulnerable to attack. Nodes in an Adhoc networks are computing and communication devices, which may be laptops, computers, PDAs, mobile phones or even sensors that communicate with each Prevention against Wormhole Attack in MANET 1

other over wireless links and work in a distributed manner in order to provide the network functionality. Applications of Adhoc networks include military communication, emergency relief operations, commercial and educational use in remote areas, in meetings, drilling and oil mining operations and other situations where the networking is mission oriented and communication based.

1.2 CHARACTERISTICS OF ADHOC NETWORKS


Adhoc networks have several salient characteristics: Bandwidth constrained, variable capacity links: Wireless links have significantly lower capacity than their hardwired counterparts. The realized throughput of wireless communications is often much less than a radios maximum transmission rate because of the effect of fading, multiple access, noise, and interference condition. Infrastructure less, decentralized operation: Usually Adhoc networks do not have any kind of infrastructure support for routing, network management, etc. In other words, Adhoc networks are basically self-organizing and self-managing networks. Power-constrained operation: Because nodes can be mobile, they have to rely on battery power, which is a limited source. Mobility: Nodes of the Adhoc networks are mobile in nature and the mobility causes frequent changes in network topology when new nodes join in, some nodes leave or some links break down. Multi-hop routing: In Adhoc networks, multihopping is possible as the nodes only route the traffic for other nodes. A node may wants to connect to a distant node that is out of its transmission range.

1.3 ISSUES IN ADHOC NETWORKS


The major issues that affect the design, deployment and performance of Adhoc networks are as follows: Prevention against Wormhole Attack in MANET 2

1.3.1 Routing The responsibilities of a routing protocol include exchanging the route information, finding the feasible path to a destination based on parameters such as hop length, minimum power required and minimum bandwidth. The major challenges faced by the routing protocol are as follows: Mobility: Due to the mobile nature of the nodes, it may result in frequent path brakes, transient loops, packet collisions, and problem in resource reservation. A good routing protocol should be able to efficiently resolve all the issues. Bandwidth constraint: As the channel is shared by all the current nodes in the broadcast region so only a fraction of the total bandwidth is available for each node. Minimum Control Overheads: The control packets that are used for finding the new route and maintaining the existing route should be kept as minimal as possible, Since the control packets cause collision with data packets and consume more bandwidth, thereby, reducing the network throughput. Security and Privacy: The routing protocol in Adhoc wireless networks must be resilent to threats and vulnerabilities. It must have in-built capabilities to avoid resource consumption, impersonation and denial-of-service. Scalability: It is the ability of the routing protocol to perform efficiently in a network with large number of nodes. 1.3.2 Medium Access Control The primary responsibility of a medium access scheme in Adhoc wireless network is the distribution of the shared channel for transmission of packets. The major issues that need to be considered while designing a MAC protocol are as follows: Hidden Terminal: These are the nodes that are reachable from the receiver but are hidden from the sender of the session. Presence of these nodes may reduce the throughput of a MAC protocol. Exposed Terminal: These are the nodes that are in transmission range of the sender. In order to improve the efficiency of MAC protocol, these nodes should be permitted to transmit in a controlled fashion. Prevention against Wormhole Attack in MANET 3

Synchronization: The MAC protocol design should also consider the requirement of time synchronization. It involves usage of scarce resources such as bandwidth and battery power.

Distributed Operations: The MAC protocol design should be fully distributed involving minimal control overhead and minimum central coordination. In the case of polling based MAC protocol, partial coordination is required.

Throughput: The MAC protocol should attempt to maximize the throughput of the system by minimizing collision, minimizing control and maximizing channel utilization.

Access Delay: The access delay refers to the average delay that any packet experiences to get transmitted. The MAC protocol should minimize the transmission delay for any packet.

1.3.3 Multicasting Multicasting plays an important role in typical applications of Adhoc wireless networks, namely emergency operations, military operations and search and rescue operations. In such applications, nodes form groups to carry out certain tasks that require point-to-multipoint, voice communications and multipoint-to-multipoint data. The random movement of nodes changes the topology dynamically. The mobility of nodes, with the constraints of power source and bandwidth, make multicast routing very challenging. The major issues in designing as follows: Security: Prevention of non member nodes of the network from gaining unauthorized information and authenticating the session members plays a major role in military communication. Quality of service: As the multicast session is time sensitive, so the QoS support is most essential in multicast routing. Control Overhead: The bandwidth availability in Adhoc wireless network demands minimum control overhead for multicast session. Efficiency: A multicast routing protocols should make a minimum number of transmissions to deliver the data packet to all the group members.

Prevention against Wormhole Attack in MANET

Scalability: The routing protocol should be a scalable network and be able to scale for a network with a large number of nodes.

1.3.4 Scaling Even though the number of nodes in an Adhoc wireless network does not grow in the same magnitude as todays internet, the operation of a large number of nodes in the Adhoc mode is not far away. Traditional applications such as military, emergency operations and crowd control may not lead to such a big Adhoc network. Scalability is considered as one of the major issues in Adhoc networks. The latency of path-finding with an on demand routing protocol in a large Adhoc wireless network may be unacceptably high. Similarly, the periodic rouing overhead involved in a table driven routing protocol may consume a significant amount of bandwidth in such large network. A hierarchical topology based system and addressing may become suitable for large Adhoc wireless networks. Hybrid architectures that combine the multihop radio relaying in the presence of infrastructure may improve scalability. 1.3.5 Energy Management Energy Management is the process of managing the resources and energy consumer in the network as a whole for enhancing the life of the network.The management of energy can be classified into the following: Transmission power management: The power consumed by radio frequency (RF) module of a mobile node is determined by several factors such as the state-of operation, the technology used for RF circuitry, and the transmission power. The transmission power is determined by the the MAC protocol and the routing protocol employed. Battery power management: The battery management is aimed at executing the battery life of a node by taking advantage of its chemical properties, discharge patterns, and by the selection of a battery from the set of batteries that is available for redundancy. Processor power management: The processor parameters that affect the power consumption are the clock speed and the number of instructions executed per unit Prevention against Wormhole Attack in MANET 5

time. The CPU can be put into different power saving modes during low processing load conditions. 1.3.6 Security The security of communication in Adhoc network is very important, especially in military applications. The lack of any central coordination and shared wireless medium makes them more vulnerable to attacks. Attacks are generally classified into two types: Passive and Active attacks. Passive attacks refer to the attempts made by malicious nodes to perceive the nature of activities and to obtain information transacted in the network without disrupting the operations. Active attacks disrupt the normal operation of the network. Those active attacks that are executed by nodes belonging to the same network are called internal attack. Several characteristics of an Adhoc network make it much more difficult to keep the network secure as compared to the infrastructure based network. The various challenges that the wireless network faces are as follows: Channel Vulnerabilities: Broadcast wireless channels allow message

eavesdropping and injection easily. Node vulnerability: When nodes do not reside in physically protected places, they easily fall under attck. Absence of infrastructure: Authentication/certification authorities are absent. Power and computational limitation: These limitations can prevent the use of complex encryptions algorithm. Dynamically changing the network topology: This dynamic nature of the network puts the security of routing protocols under threat.

1.4 APPLICATIONS OF ADHOC NETWORK


1.4.1 Military Applications Adhoc wireless networks provide the infrastructure and can be very useful in establishing communication among soldiers for tactical operations. Another application in this area can be the coordination of military objects moving at high speed. They provide infrastructure for communication among soldiers in enemy territories or in inhospitable terrains. Adhoc networks can provide such as other satellite based services or location Prevention against Wormhole Attack in MANET 6

tracking. The primary requirements in a military environment enforces certain important requirements on Adhoc wireless network such as efficiency, secure communication, reliability and support for multicast routing. 1.4.2 Emergency operations Adhoc wireless network are useful in emergency operations such as crowd control and commando operations, search and rescue operations. The major factors that uses Adhoc network for such task are self configuration of the system with minimal overhead, the nature of the terrain of such application, the freedom and flexibility of mobility, independent of centralizes and fixed infrastructure and unavailability of conventional infrastructure. Adhoc networks are useful in the environments where the conventional infrastructure based communication facilities are destroyed due to natural calamities or due to war. 1.4.3 Collaborative and distributed computing When a group of researchers want to share some information, the formation of collaborative wireless network with a necessary support for reliable multicast routing can serve the purpose. In such situation the level of security is not important but the reliability of data transfer is of high importance. The requirement of a temporary communication infrastructure for fast communication with minimal configuration among large number of people brings the need for the formation of Adhoc wireless networks. 1.4.4 Wireless mesh network Wireless mesh network is a communication network made up of radio nodes. These nodes are organized in a mesh topology and often consist of mesh clients, gateways and mesh routers. The mesh clients are often cell phones, PDAs, laptops and other network devices while the mesh routers forward traffic to and from the gateways which need not to connect to the internet. The entire coverage area of the radio nodes working as a single network is often called a mesh cloud. The access to this mesh cloud is dependent on the radio nodes working in coordination with each other to create a radio network. The mesh network is very reliable and offers redundancy. When one node stop working, the rest of the nodes can still communicate with each other, through one of intermediate nodes or Prevention against Wormhole Attack in MANET 7

directly. Wireless mesh network can be implemented with various wireless technologies including cellular technologies or combination of more than one type. A wireless mesh network has a planned configuration, and may be constructed to provide cost effective and dynamic connectivity over a certain geographic area. An Adhoc network on the other hand, is formed Adhoc when wireless devices come within communication range of each other. The mesh routers may be moved according to specific demands arising in the network or it may be mobile. 1.4.5 Wireless sensor network A wireless sensor network (WSN) is a wireless network consisting of spatially distributed autonomous devices using sensors to cooperatively monitor physical or environmental conditions, such as sound, temperature, vibration, motion, pressure or pollutants, at different locations which are more distributed, and more pervasive in daily life. A wireless senor node consists of computing, sensing, and actuation, power components and communication. These components are all integrated on a single or multiple broads, and packaged in cubic inches. The low-power circuit and networking technologies, a sensor node powered by 2AA batteries can last for up to three years with a 1% low duty cycle working mode. Sensor nodes are responsible for self-organizing the network infrastructure, with multi-hop connections between sensor nodes.

1.5 SECURITY IN MANET


Security in a MANET is an essential component for basic network functions like packet forwarding and routing. Unlike conventional networks, the Adhoc networks carry out basic support functions like packet forwarding, routing, and network management all of the available nodes without the support of dedicated nodes and also the data travels through the open medium. As opposed to dedicated nodes of a wired network, the nodes of an Adhoc network can not be trusted for the correct execution of the critical network function due to lack of a prior trust, classical network security mechanism based on authentication and access control can not cope with selfishness and cooperative security schemes seem to offer the only reasonable solution. Prevention against Wormhole Attack in MANET 8

1.5.1 Types of Attacks in MANET There are a variety of attacks which may harm the network .Like malicious routing attack may harm operation of the routing protocols. There is a wide variety of attacks that weakness of network. For example, routing messages are an important component for mobile communications, as each packet need to be passed quickly through intermediate nodes. Malicious routing attacks can spoil the routing discovery or maintenance phase by not following the specifications of the routing protocols. There are also attacks that target some particular routing protocols, such as DSR, or AODV Passive attacks are those, launched by the adversaries just to look the data exchanged in the network. These adversaries dont disturb the operation of the network. It becomes very difficult to identify such attack as the network itself does not affected and they can reduced by using powerful encryption techniques. Passive attacks can be listed as eavesdropping, traffic analysis, and traffic monitoring. Active attack tries to alter or destroy the information that is being exchanged, thereby disturbing the normal functionality of the network. . Active attacks include wormhole, black hole, gray hole, information disclosure, resource consumption, routing attacks

1.6 OBJECTIVE OF THE DISSERTATION


Objective of this research is to provide one of the solutions to secure the transmission over the network. In this research, we present the following contribution to the field of secure routing in mobile routing in mobile Adhoc network. We are looking at a novel approach to prevent the wormhole attack using the proposed approach. The objective of this work is to develop and validate a novel Approach to provide performance enhancements over some of the methods proposed in the literature. The key objectives in this work are: 1. To study the work of different MANET protocols and to study the functioning of AODV routing protocol. 2. Prevention of wormhole aatack in MANET so as to minimize its impact on the network. Prevention against Wormhole Attack in MANET 9

3. Representing the results using the graph.

1.7 ORGANIZATION OF THE DISSERTATION


This dissertation is organized in six chapters. In chapter 1, introduction to Adhoc networks is included. I have discussed bout the various characteristics of Adhoc networks and some of the challenging issues in the Adhoc networks. In chapter 2, reviews starts by relating the work to other surveys in the literature. This is followed by an update of the state of the art development in the field of secure routing in mobile Adhoc networks. It also includes the security aspects in Adhoc networks. Chapter 3 will give an overview of routing and various routing protocols. Chapter 4 defines the security goals and the attacks on the network. This chapter defines the wormhole attack in detail. Chapter 5 gives a review of problem definition, protocol used for analyzing, methodology and proposed algorithm to defend the network from the wormhole attack. In chapter 6, analysis and results are reported to support the advocacy of the introduced algorithm. In chapter 7, conclusion of the dissertation is presented. An important point is summarized and future work covers some open issues which merit future consideration. Hence, the chapter provides a summary of the thesis, relation to the other work and future work.

Prevention against Wormhole Attack in MANET

10

CHAPTER 2 LITERATURE REVIEW

In [2], the author has given the approach to defend against wormhole attack in Adoc networks using digital signature. She presented a mechanism in which there is the concept of digital signature in which there is the verification of sending nodes by receiving nodes. Each legitimate node in the network is having the digital signature of every other legitimate node in the same network. In proposed approach, the sender creates a secure path between sender and receiver with the help of verification of digital signature and if there is any malicious node in between the path then it is identified because malicious node does not have its own legal digital signature. In [3], the author has shown the effect of wormhole attack on routing protocols and given a countermeasure which can avoid this attack. He has presented the case, when several attackers make wormholes between each other and a case where two malicious nodes attack a target node in the network. The attacker can disrupt or control around 40% to 50% of all communications when the wormhole is strategically placed in the network. Finally, a timing-based countermeasure is proposed, that avoids the deficiencies of existing timing-based solutions. In the countermeasure, the nodes are required to predict the sending time or do fast switching between the send and receive mode.Using this approach, nodes do not need synchronized clocks and do not need one-to-communication with all their neighbors. They are also not required to compute the signatures. In [4], According to the author, every node share its public key with the help of HELLO message with its neighbors during neighbor discovery Phase. In response to it, HELLO reply is generated.The source of Reply packet is verified by the encryption of hash value with the private key of source. The data Transmitted by node is also in encrypted form. Routing table in this technique will hold public key of destination node, next node and delay. This eliminates the fake identity of neighbor node completely. If node receives data with false digest value then it declares that the packet is received through the wormhole node and discards that packet. It also discards the routing entry for that node. Prevention against Wormhole Attack in MANET 11

In [5], author has used the RSA technique for encryption and decryption purposes. It uses the 2Ack scheme to check that data is reached to the authentic node. This scheme can take acknowledgment from one hope and two hop nodes and finds the misbehaving node. If attacker does not forward the received message to the next node and tries to drop them into another location. This scheme prevents this by taking the acknowledgments from the next two nodes. In [6], authors have studied the problem of wormhole attack without compromising any network node or cryptographic quantity. It uses the geometric graphs induced by the communication range constraint of the nodes and then presents the necessary and sufficient conditions for detecting and defending against wormholes. In [7], authors have worked upon the hound packets to detect the wormhole node. They presented a protocol without the use of any special hardware such as synchronized clock or directional antenna. After the route discovery, wormhole detection process is initiated by the source. It counts the hop difference between the neighbors of the nodes that exceeds the acceptable level. In [8], the author has introduced the wormhole attack in which the attacker retransmits the packet again into the network without harming the confidentiality and integrity of the network. They presented a mechanism called packet leashes, for detecting the wormhole attack and present a specific protocol, called TIK, which implements the temporal leashes. A temporal leash restricts the maximum travelling distance, as the packet can travel at most at the speed of light. In [9], authors have focused on a particular from of the wormhole attack called the self contained in-band wormhole. They analyzed the criterion for successful wormhole attack on a MANET. Based on the results, they evaluated the likelihood of such an attack. In [10], authors have presented a work to defend against wormhole attack in multicast routing protocol for MANET using a certified- based scheme. They have analyzed the performance of reactive multicast routing protocol under the influence of wormholes under different scenarios and design a wormhole secure MAODV by applying certificate based authentication mechanism in route discovery. Prevention against Wormhole Attack in MANET 12

In [11], authors have discussed some basic routing protocols in MANET like Destination Sequenced Distance Vector, Dynamic Source Routing Temporarily Ordered Routing Algorithm and AODV. Security is a big issue in MANETs as they are infrastructure-less and autonomous. They have also addressed some basic security concerns in MANET, mitigation of wormhole attack and securing the well known routing protocol Adhoc OnDemand Distance Vector. In [12], the author has proposed the mitigation of wormhole in Adhoc networks. The scheme relies on the idea that usually the wormhole nodes attract most of the traffic by participating in the routing in a repeated way. Therefore, a cost will be assigned to each node depending on its participation in the routing. Besides preventing the network from the wormhole attack, the scheme also provides a load balancing among the nodes to avoid the nodes that are cooperative in routing. In [13], a distributed approach is presented to detect the hidden wormhole node. Hidden wormhole attack, can be mounted easily and can be immune to cryptographic techniques. They distort the network, and degrade the performance of applications such as data collection and localization. The wormhole attack is one of the most dangerous threats to an Adhoc network. Unfortunately, most state-of-art wormhole detection algorithms are not practicable. They observed and proved that, nodes attacked by the same wormholes are either 1-hop or 2-hop neighbors, or it can be 3 nodes, which are non-1-neighbors, in the intersection of two neighbors. Thus a distributed algorithm is designed for wormhole detection and mitigation with polynomial complexity. In [14], according to the author, the wormhole attack is detected by verifying the authentication details of the nodes in the route which is done by the zone leaders in the destination groups of the proposed technique. Here it is assumed that the nodes in the network share their certificates and digital signatures by adding their digital signatures to the data packet whenever the data packet passes through them. If any node is found without digital signature or false digital signature in the data packet, the data packet is taken as untrusted packet and a request is sent to the source node from zone leaders to send the data packet in the new route.

Prevention against Wormhole Attack in MANET

13

According to this approach, the malicious node which does not have a key, cannot impersonate and cannot use the other node authentication. This method is called the preprocessing level and is continued until the packet reaches the destination node which is the zone leader in the destination group. Based on the processing approach and number of hop counts, when the packet is received by the zone leader which is the destination, determines whether the path is trusted or not. In [18], the author presented the scheme in which he considers that all the nodes will monitor the behavior of its neighbors and send RREQ messages to destination by using its neighbor list. Each node maintains a neighbor node table which contains a RREQ sequence number, neighbor node ID, sending time and receiving time of the RREQ and count. If the source does not receive back the RREP message within a stipulated time, it detects the presence of wormhole and adds the route to its wormhole list. In this scheme, the source node also sets the Wormhole Prevention Timer (WPT) after sending RREQ packet and wait until it overhears its neighbor's retransmission. According to the author, the maximum amount of time that is required for a packet to cover one-hop distance is WPT/2. So, the delay per hop value must not exceed estimated WPT. However, the technique does not fully support DSR as it is based on end-to-end signature authentication of routing packets. In [19], Time of Flight is a technique used for prevention of wormhole attacks.This technique calculates the round-trip journey time of a packet and with the help of acknowledgement, it estimate the distance between the nodes based on this time, which conclude whether the estimated distance is within the maximum possible communication range or area. If there is any malicious node involved, packets do not travel further.

Prevention against Wormhole Attack in MANET

14

CHAPTER 3 ROUTING PROTOCOLS IN MOBILE ADHOC NETWORKS

3.1 ROUTING IN MANET


Routing is the mechanism by which user traffic is directed from the source node to the destination node and transported through the network. Main objectives include maximizing performance of the network from the application point of view application requirements- while minimizing the cost of network itself. The requirements are delay, throughput, loss rate, stability, hop count,cost and the network capacity is a function of available resources that reside at each node and number of nodes in the network as well as density, frequency of end-to-end connection, frequency of topology changes. 3.1.1 Properties of MANET routing protocols Loop Free: Routing protocol should provide the routes which are loop-free to improve the overall performance. This avoids the CPU consumption or misuse of bandwidth. Distributed operations: The protocol operations should be distributed. It should not depend on the centralized controlling node. The dissimilarity is that the nodes in an adhoc network can enter or leave the network very easily because of mobility and the network can be partitioned. Demand Based Operation: The protocol should be reactive in nature i.e ondemand to minimize the control overhead and the wastage of resources in the network. This mean the protocol should not periodically broadcast the control information. The broadcast should start only when the route is needed by the source. Security: The Adhoc network is vulnerable to attacks due to the mobile nature of the nodes. Especially, the radio environment is vulnerable to impersonation attacks so to ensure the operations of the routing protocol we need some sort of security measures. Encryption and authentication is the way to solve these problems but problem lies here also. Prevention against Wormhole Attack in MANET 15

Power conservation: The nodes in the Adhoc network can be laptop or the thin clients such as PDAs that are limited in battery power and therefore uses some standby mode to save the power of the devices. So it is very important that the routing protocol has support for these sleep modes.

Multiple Routes: It is very important that multiple routes should be present to reach to a particular node. If one route becomes invalid, it is possible that another stored route could still be valid and thus saving the routing protocol from initiating another route discovery procedure. To reduce the number of reactions to topological changes, congestion or route error, multiple routes can be used.

3.2 ROUTING PROTOCOLS

FIGURE 3.1 CLASSIFICATION OF ROUTING PROTOCOLS

3.2.1 Proactive Routing Protocols In proactive or table-driven routing protocols, each node periodically sends the packets to its neighbors and maintains a routing table and continuously maintains up-todate routes to every other node in the network by exchanging the information among all the nodes in the network. So, when there is a need for a route to destination, these routing tables are used to tell the route to destination immediately. As these tables need to maintain

Prevention against Wormhole Attack in MANET

16

node entries for each and every node, it is not suitable for larger networks. It is also not preferable when the network topology changes frequently. 3.2.2 Reactive routing Protocols This protocol does not need the periodic exchange of routing information. The route discovery process is initiated only when only when the source node requires the route to the destination and the source is not having the route to that destination. The route discovery process is usually done broadcasting the route request packets to the neighboring nodes. The same process is repeated until the packet reaches to the destination or the intermediate node that has the route to the destination. These protocols were designed to rescue the overhead that was encountered in the proactive protocols by maintaining the information for the active routes only. 3.2.3 Hybrid Routing Protocols Hybrid routing protocol is the mixture of both reactive routing protocol and proactive routing protocol that yield a better solution. Proactive and reactive routing protocol features alone are not sufficient, so this new approach was suggested. Hence, in the recent years, several hybrid protocols are also proposed.

3.3 PROACTIVE ROUTING PROTOCOL


3.3.1 Destination-Sequenced Distance-Vector Routing Protocol (DSDV) In this routing protocol, each mobile node in the network keeps a routing table. Each of the routing table includes all available destinations and the number of hops to reach that destination. Each entry in the routing table has a sequence number. If a Link is present then sequence number will be even otherwise odd number will be used. This number is generated by the destination, and the sender node should have to send out the next update with this number. The Periodic transmissions of updated routing tables help to maintain the topology information in the network. If there is any new and significant change in the network then the updates will be sent out immediately to the neighbours. So, the routing information updates may be periodic or when any topology change occurs. DSDV protocol each mobile node in the network will send its routing table to its current neighbours. This is Prevention against Wormhole Attack in MANET 17

possible either by broadcasting or by multicasting. By the advertisements, the neighbouring nodes can know whether any change has occurred in the network due to the movements of nodes. The routing updates can be sent in two ways, one is called a full dump and another is incremental. In full dump, the entire routing table is transmitted to the neighbours, when change occurs in the topology. But in case of incremental update only the entries that are updated due to changes are sent.

FIGURE 3.2 DSDV MECHANISM

3.4 REACTIVE ROTING PROTOCOL


3.4.1 Adhoc Ondemand Distance Vector (AODV) Adhoc On -Demand Distance Vector (AODV) is a routing protocol for mobile Adhoc networks and other wireless Adhoc networks. AODV is capable of both unicast and multicast routing. It is jointly developed in Nokia research centre of University of California, and University of Cincinnati S.Das and C.Perkins. It is an ondemand distance vector routing protocol, which means a route is established by AODV to destination only on demand. It keeps the records for the active routes only. Here, the sequence numbers are used by the AODV to ensure the freshness of routes. AODV is self starting, loop free and scales to large numbers of nodes which can be mobile. Prevention against Wormhole Attack in MANET 18

When a source node desires a route to a destination for which it does not already have a route, it broadcasts a route request (RREQ) packet across the network. Nodes receiving this RREQ packet update their information for the source node and set up a backward pointer to the source node in route tables. In addition to the source nodes address, the RREQ packet also contains the broadcast ID, the most recent sequence number for the destination of which the source node is aware. The intermediate node getting the RREQ may send a route reply (RREP) if it is having the route to the destination with the corresponding sequence number greater than or equal to the sequence number contained in the RREQ or it can also be generated by the destination. If this is the case, it sends a RREP back to the source. Otherwise, the node will rebroadcast the RREQ. Nodes keep the track of the RREQs source IP address and broadcast ID. If the nodes receive a RREQ which they have already sent, they discard that RREQ and do not forward it. When the RREP is propagating back to the source, the nodes will set up the forward pointer to the destination. When the source receives the RREP, it starts forwarding the data packets to the destination. If the source node receives the RREP that contains the same sequence number with a smaller hop count or the greater sequence number, it may update its routing information for that destination and begin using the new route to send the packets. As long as the route remains active, the node will maintain the route entry. A route is active as long as the data packets are traveling from that path. When the source stops sending the data packets, the links will get time out and eventually it will be discarded from the immediate routing tables. Route Discovery Mechanism in AODV: If the source node A wants to initiate communication with destination node E as shown in the Figure 3.3 ,then it will make a connection between itself and the destination and will generate a route request message (RREQ). This message is then forwarded to the neighboring nodes, and the neighboring nodes will forward this control message to their neighboring nodes. This process of finding destination node continues until the destination node is located itself or the node that has the fresh route to the destination. Once an intermediate node with enough fresh routes is located or destination node is located, they generate the route reply message (RREP) and send it back to the source node. When RREP reaches back to the source node, a route or the path is established between the source node A and destination node E. Once the route Prevention against Wormhole Attack in MANET 19

is established between A and E, node A and E can communicate with each other. Figure 3.3 depicts the exchange of control messages between source and destination.

FIGURE 3.3 ROUTE DISCOVERY MECHANISM

If a link break occurs while the route is active, the node upstream of the break propagates a route error (RRER) message to the source node to notify the unreachable nodes. After receiving the RRER, if the source node still desires the route, it can re initiate the route discovery. Route Maintenance Mechanism: When there is a link down or a link breakage between destinations that causes one or more than one links unreachable from the source node or neighbors nodes, then the RERR message is generated by the node and sent to the source node. If there is a route from A to E via D, and if there is a link breakage D and E, then the node E will generate and send the RERR message to the source node A informing the source node that there is a route error.

FIGURE 3.4 ROUTE ERROR MESSAGE\

Prevention against Wormhole Attack in MANET

20

Characteristics of AODV 1. Unicast, broadcast and multicast communication 2. Use of periodic hello messages for the neighbors discovery. 3. Ondemand route establishment with small delay. 4. Link breakage is effectively repaired. 5. All routes are loop-free through use of sequesnce numbers. 6. Use of sequence numbers to check the freshness of the routes. 7. Each node maintains only the next hop information fro the route to destination. 8. Better under scalable conditions. 3.4.2 Dynamic Source Routing The basic idea of DSR is that, it uses the concept of source routing where the sender knows the complete hop-by hop route to the destination. In this protocol, all the mobile nodes are required to maintain route caches which contain the routes to other nodes. The route cache is updated only when any new route is maintain/update for a particular entry in the route cache. The data packets carry the source route in the packet header. Routing in DSR is done in two phases: route discovery and route maintenance. Suppose there is a source node and wants to send a data packet to a destination, it first checks its route cache to determine whether its cache already contains any route to the destination or not. If there is already an entry for that destination, the source uses that route to send the packet. If not, then the source node broadcast a route request packet which includes the destination address, source address, and a unique request ID. Each intermediate node checks whether route is available or not. If the intermediate node does not know the route to destination, it adds its own address to route request packet and forwards the packet and to other nodes eventually this reaches the destination. The node processes the route request packet only if it is not previously processed that packet. A route reply is generated by the destination or by any of the intermediate nodes which knows the route to destination. Another Phase is Route Maintenance which is done by using the route error packet (RERR) and acknowledgements. Route error packets are generated by a node if there is any Link break occurs or any other error in the route. When a route error packet is received by node, the hop in error is removed from the route cache. Prevention against Wormhole Attack in MANET 21

3.5 HYBRID ROUTING PROTOCOL


3.5.1 Zone routing Protocol Zone Routing Protocol or ZRP is the first hybrid routing protocol have the features of both proactive and reactive routing component. ZRP was proposed to reduce the control overhead of proactive routing protocols and decrease the latency caused by route discovery in reactive routing protocols. The Zone Routing Protocol, as the name implies, is based on the concept of zones. Every node has its own separate routing zone and the zones of neighboring nodes overlap with others. To create zones in the network, a node first has to know about its neighbors. A neighbor is defined as a node with which direct communication can be established, and that is; one hop distance from a node. A route to a destination within the local zone can established from the source's proactive route cache. For routes that are not in local zone, route discovery happens according to reactive protocol by sending the route request to the peripheral nodes of its zone. Each peripheral node checks its local zone for the destination. If the destination is not there, then the peripheral node adds its own address to the route request packet and forwards the packet to its own peripheral node. If the destination is a member of the local zone, it sends a route reply on the reverse path back to the source.

Prevention against Wormhole Attack in MANET

22

CHAPTER 4 WHY WE NEED SECURITY IN MANET

4.1 NEED OF SECURITY IN MANET


Wireless ad-hoc network helps in challenging many real-world problems, for example, communication in emergency response system, military field operation, and oil drilling and mining operation. The proliferation of wireless devices also stimulates the emergent applications in a wide range of areas covering from health to enviiornmental control. However, the realization and wide deployment of such network face many challenges in the network. Security is one of the most challenging problems as the nodes are utilizing open air medium to communicate and the operation environment of such network is usually unpredictable. The existing mechanisms such as routing protocols assume a trusted environment i.e they assume all the nodes are authentic and the environment is trustworthy. So, any malicious node could disrupt the normal operation of such networks. Hence, these network face acute security problems compared to the wired medium.

4.2 SECURITY GOALS


Security services include the functionality required to provide a secure networking environment. The main security service can be summarized as follows: Authentication: This service verifies users identity and assures the recipient that the message is from the source that it claims to be from. Firstly, at the time of initiation of communication, the services assure that the two parties are authentic, that each entity is what it tells. Andd next, it must assure that the third party doesnt interfere by impersonating one of the two authentic parties for the purpose of authorized transmission and reeption. Confidentiality: This service ensures that the data transmitted over the network is not disclosed to unauthorized party in the network. It can be achieved by using different encryption techniques. Prevention against Wormhole Attack in MANET 23

Access Control: This limits and controls the access of such a resource which can be an application or a host system. Integrity: The function of integrity control is to assure that the data is received in verbatim as sent by authorized user. The data received contains no editing, deletion, insertion or modification.

4.3 ATTACKS IN MANET


Malicious and selfish nodes are the ones that fabricate attacks against network, application, link, and physical layer functionality. Current routing protocols are exposed to following attacks: 4.3.1 Flooding attacks There are different types of flooding attacks, which may disrupt the routing discovery or the maintenance phase of routing within MANET. Basically, In a flooding attack a malicious node/an attacker aims the exhaustion of the network resources (e.g. network bandwidth) as well as consuming the resources of an authentic network user (e.g. computational and battery power). Furthermore an attacker can influence the network performance, by obstructing the proper execution of routing protocol. By RREQ flooding (or routing table overflow) is possible for an attacker to send multiple RREQs to recipient node which actually doesnt exist. It means the malicious node represents false routes to all authentic nodes within the network, which makes it impossible to create new and actual routes which causes routing table overflow by the authentic users. The flood of RREQs all over the network leads to consumption of the battery power and the network bandwidth which decreases the performance of the network. 4.3.2 Blackhole attack The blackhole attack is an active insider attack with two properties: first, the attacker does not forward any intercepted packet. Second, the node announces itself as the accurate route to reach to the destination node, even though the route is counterfeit. When the source node broadcasts the RREQ message to its neighbors, then the malicious node also receives the forwarded RREQ message. The malicious node or the blackhole node immediately sends an RREP message that contains the highest sequence number and this Prevention against Wormhole Attack in MANET 24

message are received by the source node as if it is having the best route to the destination. The source node considers the route with the blackhole node. 4.3.3 Wormhole attack The wormhole attack is a severe threat against packet routing in Adhoc networks that is particularly challenging to prevent. In wormhole attack, the attacker interrupts the usual flow of routing packets. This attack can be done with one node or two or more nodes. But generally, two or more attackers are connected via a link called wormhole link. The two malicious nodes in the network are located in the way that one near to the source node and another near to the destination node thus bypassing information from source node to destination node and disrupting proper routing. They intercepts the packets at one end and replay them at the other end using private high speed network. The attacker tunnels the request packet RREQ directly to the destination node, without increasing the hop count value and thereby, prevents any other path from being discovered. Or it makes the tunneled packet arrives faster and with better metric value. In this way, they create the illusion that the two attackers who are connected by a tunnel are very close to each other or the neighbors. They can lunch many types or varieties of attack like replay attack, selective dropping and eavesdropping etc. Wormhole attacks can also cause Denial-of-service through unauthorized access, Data Traffic, and routing disruptions. The malicious node(s) can add itself in a route and then drop the data packets. Denial of service can prevent the discovery of legitimate routes and unauthorized access could allow access to wireless control systems that are based on physical proximity. Wormhole attack associates two remote malicious nodes shown as X and Y in Figure 4.1 which are attached via a wormhole link and target to attack the source node S. S broadcasts RREQ to find the route between source S and destination node D. Now, the neighbors of S, A, and E will also broadcast the RREQ to their neighbors. Now, when the malicious node X receives RREQ forwarded by A, it tunnels the RREQ by the high-speed wormhole link to its partner Y. Malicious node Y forwards RREQ to the destination D via B. Thus, RREQ is forwarded via S-A-X-Y-B-D. And the other RREQ packet is also forwarded through the path S-E-F-G-H-I-D. However, RREQ via X and Y reaches fast to D, as X and Y are connected via a high speed bus. Therefore, destination D discards all the Prevention against Wormhole Attack in MANET 25

RREQ packets that reach later and choose the path D-B-A-S to send an RREP packet to the source node S. As a result, S chooses the route via X and Y to send data that to destination D.

FIGURE 4.1 WORMHOLE ATTACK

Wormhole Attack Modes Wormhole attacks can be achieved using several modes as follows: Wormhole with high power transmission: In this mode, when a attcker node gets a RREQ, it broadcasts the RREQ at a high power level towards the destination. By this method, the malicious mode attracts the packets to follow path passing from it. Wormhole using in band channel: When the source node broadcast the RREQ packet, a malicious node which is at one part of the network receives the RREQ packet. Then it tunnels that packet to a second malicious node via legitimate path only, it then rebroadcasts the RREQ. When the neighbors of the second colluding party receive the RREQ, it discards all of them and the result is that the routes between source and the destination go through the two malicious nodes that will be said to have formed a wormhole or the tummel between them. This prevents the other nodes from discovering any other legitimate path that are more that two hops away. Wormhole using out of band channel: This mode for wormhole attack involves the use of an out of band channel. In this mode, an out-of-band high bandwidth channel is placed between two end points to create a wormhole link.

Prevention against Wormhole Attack in MANET

26

Wormhole using Packet Relay: In this mode also, one malicious node replays packets between two far nodes and this way fake neighbors are created. Figure 4.2 shows the in-band and out-of band channel. In-band channel wormhole

attack shows that the malicious node tunnels the route request packet by encapsulation to the other malicious node. And the node following the malicious node M2 believes that there is no other node between m1 and m2. And in out-of-band channel, the malicious node uses a physical channel that could be either long range wireless link or dedicated wired link between them. When the wormhole is made, the malicious nodes can hide or reveal themselves in the routing path. The former is known as the hidden attack and the latter is known as the exposed or open attack.

FIGURE 4.2 MODES OF WORMHOLE ATTACK

Types of Wormhole Attack Open wormhole attack: In the open wormhole attack, the attackers include themselves in the RREQ packet header in the route discovery stage. Other authentic nodes are aware that the two colluding parties lie on the path but they would think that they are direct neighbors. Half open wormhole attack: One side of the wormhole does not modify the packet and only another side modifies the packet while following the route discovery procedure. Thereby, generating the path S-M 1-D for the packets sent by S for D. Prevention against Wormhole Attack in MANET 27

Closed wormhole attack: The attackers do not modify the content of the packet in a route discovery. Instead they simply tunnel the packet from one side of the wormhole to another side and it rebroadcasts the packet.

FIGURE 4.3 TYPES OF WORMHOLE ATTACK

Prevention against Wormhole Attack in MANET

28

CHAPTER 5 PROPOSED APPROACH

The proposed work is about to prevent the mobile Adhoc network from the wormhole attack. In this research we are presenting the complete work with AODV protocol. In this work, we proposed a way to detect the wormhole node and to prevent the wormhole attack by encrypting the packet at each levels by sharing the Secret Key with the neighboring nodes and ensuring secured delivery via decrypting the packet at the neighbor node and matching the distributed Secret Key in MANET in AODV protocol environment. Formation of Hypothesis The hypothesis defines a decision surround in which the complete research is taken place. In the proposed work, the hypothesis is about to find the solution to avoid the wormhole attack in a mobile Adhoc network. To define the research work we need to define some questions related to the research concept. In the proposed work, the questions that arises over the research are Which kind of Network can be used to perform the communication? How many nodes are sufficient to define the proposed work? Which cryptographic algorithm will be used to match the user? How the problem will be resolved? Which Environment should be implementing to find the solution of the defined problem? How the result will be analyzed?

As the work begin with defining the answers of the above questions and a complete research solution is obtained that provide us reliable communication over the network.

5.1 PROBLEM DEFINITION


A Mobile Adhoc Networks (MANET) is an autonomous collection of mobile nodes and there is no fixed infrastructure, so it is more vulnerable to attack and the problems Prevention against Wormhole Attack in MANET 29

related to the routing and security. Security is the main concern in almost all the application scenarios and in order to provide the secure communication between the mobile nodes. The open and dynamic nature of MANET makes it more vulnerable to attacks and cripples many MANET operations. Security plays an important role in mobile Adhoc networks because of its inherent vulnerabilities. The research problem is how to provide security protection to the network. The major challenges include dynamic topology, decentralized control, limited resources, and the lack of information dissemination control. The attacker doesnt allow the packet to arrive at real destination. In addition, the attacker produces some packets and sends them in the network to consume the bandwidth and create the bottleneck in the network. One of these attacks is Wormhole Attack that has an important and dangerous effect on Mobile Adhoc networks and cause problems in the network. 5.1.1 Wormhole Attack In the wormhole attack, an adversary receives packets at one location in the network and tunnels them to another location in network, where the packets are resent into the network to consume the bandwidth. The wormhole attack would involve two distant malicious nodes colluding to undertake their distance from each other by relaying the packets along an out-of-band channel which is available only to the attackers. Thus, a false route would be established by the attackers which would shorten the hop distance between any two non-malicious nodes. This attack effect is analyzed on AODV routing protocol in MANET and a prevention mechanism is presented to secure the network.

5.2 PROTOCOL USED IN SIMULATION


Ad Hoc OnDemand Distance Vector Routing (AODV) AODV is a reactive routing protocol instead of proactive. It minimizes the number of broadcast messages by creating routes based on demand, which does not happen in DSDV. When any source node wants to send a packet to a destination, it broadcasts a route request (RREQ) packet. The neighbors in turn broadcast the packet to their neighbors and Prevention against Wormhole Attack in MANET 30

the process continues until the packet reaches to the destination. When the process of forwarding the route request packet is going on, the intermediate nodes record the address of the neighbors. This record is stored in their respective routing tables, which helps to establish the reverse path. If the copies of the same RREQ are later received, then these packets are discarded from the network. The route reply is sent using the reverse path, the same process continues until the RREP message reaches to the source node. As the RREP is propagated back towards the source, all intermediate nodes sets the forward route entries in their table for the transmission of data packages to the destination node. It may obtain multiple routes to a destination. So AODV uses destination sequence to determine up-todate path to destination. For route maintenance, when a source node moves, the route discovery process will restart. If any intermediate node moves, the neighbor of the moved node can detect the link failure and sends a link failure notification to its neighbor. This process continues until the failure notification reaches the source node. On the receiving information link failure information, the source may re-initiate the route discovery phase.

5.3 METHODOLOGY
5.3.1 Algorithmic Description The proposed work is about the prevention of the network from the wormhole attack. In this research, a mechanism is presented to secure the communication between source and destination. As the node has to start the communication, it first starts with the neighbor discovery from the neighbor list. It first generates the Hello message and encrypts it using the secret key. The encryption technique is used to prevent the network from the wormhole attack. As the neighboring node receives this message, the node will decrypt it using the same secret key and send the acknowledgement back to the sender. If the node is not authentic, it will remove its entry from the neighbor list. After the neighbor discovery if sends the RREQ to its immediate neighbors from the neighbors list to have the route to the destination. As the RREQ reaches the destination, it will generate a RREP message and unicast it to the source node. To check the authentication of the node, it will also check the response time of the node. If the response time is greater than the threshold then also it excludes the node from the list. The complete process is repeated node by node till the destination node is achieved. Here the exact algorithm is presented. Prevention against Wormhole Attack in MANET 31

5.3.2 Algorithm Algorithm: Wormhole Attack Prevention INPUT: Encrypted Message. OUTPUT: Path to destination excluding wormhole Nodes. Intermediate Nodes: i, j Source Node: S Destination Node: D This algorithm is divided into two modules: Neighbor Discovery Mechanism and Route Discovery Mechanism. In first module, the secure neighbors are discovered and then, in the second module, the route is discovered from the source to the destination to transmit the data packets. Neighbor Discovery Mechanism Step1: Message Transmission begins for finding the neighboring node. Step2: Generate HELLO message at each current node i and encrypt it by Secret key and forward to every other neighboring Node j in the network also based upon distance within transmission range. Step3: While (i! = D) Step4: If j is in neighboring list. Then, If (Secret key (Encrypted Message) == Hello) Then Add Node j to the list of Node i. Else Prevention against Wormhole Attack in MANET 32

I. II. Endif i = i + 1; j = j + 1; End if End While Step5: End

Originator i Removes j from its One Hop Neighbor. Update Table and report the node j is a Wormhole node.

Route Discovery Mechanism Step1: For New Path discovery Source S sends RREQ to j. Step2: While (j! = D) Step3: If (Secret key (Encrypted Message) == RREQ && Response Time < Threshold) Then Each Node j Forwards Encrypted RREQ. Until the RREQ is received by D. Else The RREQ packet is dropped at j. Endif EndWhile Step4: The Node D sends the Encrypted RREP to S while j is TRUE. Step5: END Prevention against Wormhole Attack in MANET 33

CHAPTER 6 SIMULATION ANALYSIS OF PROPOSED ALGORITHM

6.1 DIFFERENT APPROACHES FOR RESULT ANALYSIS


Result analysis is a critical component of systems researches that allows evaluation of new ideas and methodologies, identification of problems and bottlenecks and optimization of existing systems. There are three approaches to result analysis: Prototyping In prototyping we need to build a system and see how it works. Prototyping is not feasible and is time consuming especially for large scale systems. It also provides controllability and observability. Analytical In analytical approach we build a software model of the system. It has emerged as an attractive alternative that is heavily used in result analysis of computer systems. Network Simulator Trace support NS is a discrete event driven and object oriented network simulator developed at UC Berkley written in OTcl and C++. It implements the networking protocols such as UDP and TCP, traffic source behavior such as FTP, Web, Telnet, VBR, and CBR, queue management mechanism such as RED, Droptail and CBQ. It also supports for simulation of multicast protocols over wired and wireless (local and satellite) networks. NS-2 is a discrete event network simulator in which physical activities are translated to events; events are processed in the order of their occurrences. The simulation time is progressed with the events getting processed. Typically, it can configure transport layer protocols, interface queues, routing protocols and also link layer mechanisms. We can easily see that NS2 provide us a whole view of the network construction and also maintains the flexibility for the user to decide or check. Thus, just this one software can help us Prevention against Wormhole Attack in MANET 34

simulate nearly all parts of the network. This definitely will save us great amount of cost invested on net work constructing.

FIGURE 6.1 DATA FLOW OF NS2

6.2 SIMULATION ENVIRONMENT PARAMETER


Traffic Type Number of Nodes Area Covered Routing Approaches Mobility Type Threshold Energy of Node's Maximum packets in Queue Channel Type

VALUE
CBR 36 800 X 800 AODV Critical Mobility 1.42681E-12 50 Wireless channel
Table 6.1 Simulation Environment

Here the basic parameters of the proposed approach are presented respective to the simulation environment. The approach is implemented with NS2 simulator and the xgraph is used as the tool for the analysis. Prevention against Wormhole Attack in MANET 35

The mobile Adhoc network of 36 nodes is constructed in the NS2 with the boundary area of 800m X 800m with the use of Tcl script. The nodes are mobile with the initial energy, speed and threshold energy as shown in the table. AODV routing protocol is used here as the protocol for the analysis.

6.3 SIMULATION ANALYSIS


6.3.1 Neighbor Discovery

FIGURE: 6.2 NEIGHBOR DISCOVERY

The above simulation scenario shows the forwarding of the HELLO packets to its one hop nodes. The HELLO packet acceptance at the one hop neighbor nodes leads to the addition of the neighbors to the routing table of the source nodes. This process continues until all the nodes are covered in the simulation scenario. Prevention against Wormhole Attack in MANET 36

6.3.2 RREQ Broadcasting

FIGURE 6.3: RREQ BROADCASTING

The nodes are sending the RREQ packet for the route discovery of the destination after the neighbor discovery. The source sends the RREQ packet to its neighboring nodes which in turn, sends the packet to their neighboring nodes, till the RREQ packet reaches the destination.

Prevention against Wormhole Attack in MANET

37

6.3.3Wormhole Attack

FIGURE 6.4 WORMHOLE ATTACK

The source node transfers the data through the malicious node. The wormhole node transfers the data to the destination through the tunnel. The tunnel created by the pair of wormhole nodes is called a wormhole tunnel which causes late delivery of the data thus; in this process it put large number of the data packet in its queue to process the large number data. Thus, the wormhole node drops data constantly.

Prevention against Wormhole Attack in MANET

38

6.3.4 Preventing Wormhole Attack

FIGURE 6.5 PREVENTION OF WORMHOLE ATTACK

The nodes transferring data without wormhole nodes make the smooth passage of the data in the Adhoc network environment. The nodes which were ctreating the tunnel are discarded from the route The data drop in this process is very negligible. The source can easily send data without any late delivery and packet loss. This scenario is very reliable to send the data from the source to the destination nodes.

Prevention against Wormhole Attack in MANET

39

6.3.5 Comparison of Throughput

FIGURE 6.6: THROUGHPUT COMPARISON

The above compared throughput are of the scenarios when there is no wormhole node present in the network which is represented in green while the red curve represents the throughput after the intrusion in the network i.e. the packet losses during the wormhole attack decreases the throughput of the network which is caused by the packet losses incurred on the wormhole nodes.

Prevention against Wormhole Attack in MANET

40

6.3.6 Comparison of Packet Drop

FIGURE 6.7 PACKET DROP COMPARISONS

The above graph shows the number of packets dropped during the wormhole attack which is represented in red and the drop which is during the prevention mechanism applied on the network.The other losses in the network are very less and negligible as compared to the wormhole packet losses thus they are represented in green.

Prevention against Wormhole Attack in MANET

41

CHAPTER 7 CONCLUSION AND FUTURE WORK

7.1 CONCLUSION
A wireless networks is the network where the nodes can communicate over the wireless media without the use of physical wired network between sender and receiver. The wireless network is used to connect the mobile nodes in mobile Adhoc networks. A Mobile Adhoc Networks is a collection of mobile nodes and there is no fixed infrastructure, so, the open and dynamic nature of MANET makes it more vulnerable to attacks and cripples many MANET operations. One of the attacks is Wormhole Attack that has an important and dangerous effect on Mobile Adhoc networks and cause problems in the network. In this attack, an adversary receives packets at one location in the network and tunnels them to another location in network, where the packets are resent into the network to consume the bandwidth. This attack result in packet dropping or bandwidth consumption and interrupts the usual flow of routing the packets. The proposed work is about the prevention of this attack. In the proposed work, a mechanism has been presented in which secret key is used to encrypt the packets. It means only authenticated node will get the request packet and can reply. The system is implemented in the mobile Adhoc networks on AODV protocol. The mechanism is providing better throughput and less packet drop over the network. The implementation is performed on ns2 and the analysis is done using the xgraph.

Prevention against Wormhole Attack in MANET

42

7.2 FUTURE WORK


In this research, a secret key has been used for the encryption and decryption. Sharing the secret key in the beginning is a problem in symmetric key encryption. It has to be exchanged in a way that ensures that it remains secret. The work has been done only with the wormhole attack in AODV protocol. In future, We will try to suggest a mechanism in which the key distribution will be in more secured manner and in the effective way. Secondly, this work can be analyzed with other routing protocols and can be enhanced implementing some other attacks such as black hole, DOS etc.

Prevention against Wormhole Attack in MANET

43

APPENDIX-A REFERENCES

[1] C.Sivaram Murthy and B.S. Manoj,ADHOC Wireless Networks:Architecture and Protocols, Prentice Hall PTR, 2004. [2] Pallavi Sharma, Prof. Aditya Trivedi, An Approach to Defend Against Wormhole Attack in Adhoc Network Using Digital Signature, IEEE 2011. [3] Majid Khabbazian, Hugues Mercier, and Vijay K. Bhargava, Severity Analysis and Countermeasure for the Wormhole Attack in Wireless Adhoc Networks, IEEE TRANSACTION ON WIRELESS COMMUNICATIONS, VOL.8(2), 2009. [4] Pradnya Patange, S.P.Medhane, PUBLIC KEY BASED APPROACH TO MITIGATE WORMHOLE ATTACK, International Journal of Computer Science Engineering Research and Development (IJCSERD). [5] Pravin Khandare, Prof. N. P. Kulkarni, Public Key Encryption and 2Ack Based Approach to Defend Wormhole Attack, International Journal of Computer Trends and Technology- volume4Issue3- 2013. [6]L.Lazos, R.Poovendran, C.Meadows, P. Syverson, L.W Chang, Preventing Wormhole Attack on Wireless Adhoc Networks: A Graph Theoretic Approach,IEEE

Communications Society IEEE, 2005. [7]Saurabh Gupta, Subrat Kar, S Dharmaraja, WHOP: Wormhole Attack Detection Protocol using Hound Packet, International Conference on Innovations in Information Technology, 2011. [8]Yih-Chun Hu, Adrian Perrig, David B. Johnson, Packet Leashes: A Defense against Wormhole Attacks in Wireless Networks, IEEE 2003. [9]Viren Mahajan, Maitreya Natu, Adarshpal Sethi,Analysis of Wormhole Intrusion Attack in MANETs,IEEE, 2008. Prevention against Wormhole Attack in MANET 44

[10]E.A.Mary Anita, V.Vasudevan, A.Ashwani,A Certificate-Based Scheme to Defend Against Wormhole Attacks in Multicast Routing Protocols for MANTEs,ICCCCT-10, 2010. [11] Rutvij H.Jhaveri, Ashish D.Patel, Jatin D. Parmar, Bhavin I. Shah, MANET Routing Protocols and Wormhole attack against AODV, IJCSNS International Journal of Computer Sciences and Network Security,VOL.(4),April 2010. [12] Mariannne. A. Azer, Wormhole Attacks Mitigation, Sixth International Confernece on Availability, Reliability and Security, 2011. [13] Yun Wang, Zhongke Zhang, Jie Wu, A Distributed Approach for Hidden Wormhole Detection with Neighborhood Information, Fifth IEEE International Conference on Networking, Architecture and Storage, 2010. [14] L. Sudha Rani , R.Raja Sekhar (Ph.D), DETECTION AND PREVENTION OF WORMHOLE ATTACK IN STATELESS MULTICASTING, International Journal of Scientific & Engineering Research Volume 3, Issue 3, March -2012. [15] Pushpendra Niranjan, Prashant Srivastava, Raj kumar Soni, Ram Pratap, Detection of Wormhole Attack using Hop-count and Time delay Analysis, International Journal of Scientific and Research Publications, Volume 2, Issue 4, April 2012. [16] Ajay Jadhav and Eric E. Johnson, Secure Neighborhood Routing Protocol, IEEE. [17] Anil Kumar Fatehpuria, Sandeep Raghuwanshi, An Efficient Wormhole Prevention in MANET Through Digital Signature, International Journal of Emerging Technology and Advanced Engineering, Volume 3, Issue 3, 2013. [18] Reshmi Maulik and Nabendu Chaki, A Study on Wormhole Attacks in MANET, International Journal of Computer Information Systems and Industrial Management Applications. [19] Rutvij H. Jhaveri, Ashish D. Patel, Bhavin I. Shah, Jatin D. Parmar, MANET Routing Protocols and Wormhole Attack against AODV, IJCSNS International Journal of Computer Science and Network Security, VOL.10 No.4, April 2010 12 Manuscript received April 5, 2010 Manuscript revised April 20, 2010. Prevention against Wormhole Attack in MANET 45

[20] Dhara Buch and Devesh Jinwala, PREVENTION OF WORMHOLE ATTACK IN WIRELESS SENSOR NETWORK, International Journal of Network Security & Its Applications (IJNSA), Vol.3, No.5, Sep 2011. [21] Rajni Sharma1, Alisha saini2, A Study of Various Security Attacks and their Countermeasures in MANET proceeding of International Journal of Advanced Research in Computer Science and Research. [22] Mahak Gupta, Kushagra agrawal, Rajneesh kumar gujral, sanjeev rana, Attacks and its security mechanism in AODV for mobile Adhoc networks, International conference on tele-communications and networks (TEL-NET 2013). [23] Yashpalsinh Gohil, Sumegha Sakhreliya, Sumitra , A Review On: Detection and Prevention of Wormhole Attacks in MANET, International Journal of Scientific and Research Publications, Volume 3, Issue 2, February 2013. [24] NETWORK SIMULATOR (ns2). http://www.isi.edu/nsnam/ns/

Prevention against Wormhole Attack in MANET

46

APPENDIX-B CODING

# =================================================================== # Environmental Settings =====================================================================

set val(chan) set val(prop) model set val(ant) set val(ll) set val(ifq) type #set val(ifq) set val(ifqlen) set val(netif) type set val(mac) set val(rp) set val(nn) mobilenodes set val(x) set val(y) set opt(energymodel) Joules set r set rw

Channel/WirelessChannel

;# channel type

Propagation/TwoRayGround ;# radio-propagation Antenna/OmniAntenna LL ;# Antenna type ;# Link layer type Queue/DropTail/PriQueue CMUPriQueue 50 Phy/WirelessPhy Mac/802_11 AODV 36 800 800 EnergyModel 100 250 800 ; ; ;# Energy model ;# Initial energy in ;# max packet in ifq ;# network interface ;# MAC type ;# Routing Protocol ;# number of ;# Interface queue

set opt(initialenergy)

#=====================Simulator Object Creation===================== set ns [new Simulator] # =================Trace File to record all the Events==============

Prevention against Wormhole Attack in MANET

47

set f [open t.tr w] $ns trace-all $f $ns use-newtrace # =====================NAM Window creation========================== set namtrace [open t.nam w] $ns namtrace-all-wireless $namtrace $val(x) $val(y) # =====================Topology Creation============================ set topo [new Topography] $topo load_flatgrid $val(x) $val(y) # ================General Operational DirectoR======================= create-god $val(nn) # =====================Node Configuration=========================== $ns node-config -adhocRouting $val(rp) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propType $val(prop) \ -phyType $val(netif) \ -channelType $val(chan) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ -macTrace ON \ -movementTrace ON \ -rxPower 0.5 \ -txPower 0.5 \ -energyModel $opt(energymodel) \ -initialEnergy $opt(initialenergy)

-llType $val(ll) \

Prevention against Wormhole Attack in MANET

48

# ============Node creation========================================== set src 0 set d 35 set w1 7 set w2 28 source t for {set i 0} {$i < $val(nn)} {incr i} { if {$i==$w1 || $i==$w2} { Phy/WirelessPhy set RXThresh_ 1.42681E-12 ;#1000m } else { #Phy/WirelessPhy set RXThresh_ 3.65e-10 ;#250m Phy/WirelessPhy set RXThresh_ 2.28289e-11 ; #500m } set n($i) [$ns node] $n($i) random-motion 0 }

for {set i 0} {$i < $val(nn)} {incr i} { $ns initial_node_pos $n($i) 40 # # # } proc Delete { } { set loc [open location w] close $loc set loc2 [open location2 w] close $loc2 set spd 6 set dis 125 proc position { } { $n($i) set X_ 0.0 $n($i) set Y_ 0.0 $n($i) set Z_ 0.0 $n($i) color black

Prevention against Wormhole Attack in MANET

49

global ns n dis spd set x1 1 set y1 25 set x2 $dis set y2 $dis set nds 0 set dst 1 set spd 4 set mov 1 for {set i 0} {$i<6} {incr i} { set loc [open location a] set loc2 [open location2 a] set flag 0 while {$flag<6} { set x [expr int(rand()*$x2)] set y [expr int(rand()*$y2)] if {$x>$x1 && $x<$x2 && $y>$y1 && $y<$y2} { $ns at 0.0 "$n($nds) setdest $x $y 5000" puts $loc "\$ns at 0.0 \"\$n($nds) setdest $x $y 5000\"" $ns at $mov "$n($nds) setdest $x1 $y1 $spd" puts $loc2 "\$ns at $mov \"\$n($nds) setdest $x1 $y1 $spd\"" set flag [expr $flag+1] set x1 [expr $x1+$dis] set x2 [expr $x2+$dis] set nds [expr $nds+1] } } set x1 1 set x2 $dis set y1 [expr $y1+$dis] set y2 [expr $y2+$dis] }

Prevention against Wormhole Attack in MANET

50

close $loc close $loc2 } $ns at 0.0 "position " } source "Initial_Location.txt" source "Move.txt" #Creating the Application/Traffic for Data Transmission proc attach-CBR-traffic { node sink size interval} { #Get an ins_tance of the simulator set ns_ [Simulator instance] #Create a CBR sink14 agent and attach it to the node set udp [new Agent/UDP] $ns_ attach-agent $node $udp set cbr [new Application/Traffic/CBR] $cbr attach-agent $udp $cbr set packetSize_ $size $cbr set interval_ $interval #Attach CBR source to sink; $ns_ connect $udp $sink return $cbr }

#creating sink # Agent Creation for Sink for { set i 0 } { $i < $val(nn) } { incr i } { set sink($i) [new Agent/LossMonitor] $ns attach-agent $n($i) $sink($i) }

Prevention against Wormhole Attack in MANET

51

set cbr(1) [attach-CBR-traffic $n(0) $sink(1) 50 0.01] $ns at 0.3 "$cbr(1) start" $ns at 0.301 "$cbr(1) stop" # ===================================================================== # Distance Setting #==================================================================== set nbr [open nbr w] close $nbr set nbr [open nbr10 w] close $nbr proc distance { n1 n2 nd1 nd2 tm} { global r w1 w2 rw src d if {$tm==0} { set nbr [open nbr a] } if {$tm==10} { set nbr [open nbr10 a] } set x1 [expr int([$n1 set X_])] set y1 [expr int([$n1 set Y_])] set x2 [expr int([$n2 set X_])] set y2 [expr int([$n2 set Y_])] set dis [expr int(sqrt(($x2-$x1)*($x2-$x1) + ($y2-$y1)*($y2-$y1)))] if {($nd1==$w1 && $nd2==$w2) || ($nd1==$w2 && $nd2==$w1)} { set $y1)))] if {$dw<=$rw && $nd1!=$nd2} { if {$tm==10} { puts $nbr "$nd1\t$nd2\t$x2\t$y2\t$dw\tWH" } } } if {$dis<=$r && $nd1!=$nd2} { dw [expr int(sqrt(($x2-$x1)*($x2-$x1) + ($y2-$y1)*($y2-

Prevention against Wormhole Attack in MANET

52

puts $nbr "$nd1\t$nd2\t$x2\t$y2\t$dis" } if {$nd1==$src && $nd2==$d && $tm==10} { set hop [expr $dis.0/$r.0] set MinHop [expr int($hop+1)] #puts ediate_Hops=$MinHop\n" } close $nbr } for {set i 0} {$i<$val(nn)} {incr i} { for {set j 0} {$j<$val(nn)} {incr j} { $ns at 2.7 "distance $n($i) $n($j) $i $j 0" $ns at 9.7 "distance $n($i) $n($j) $i $j 10" } } "\nSecure nbr Discovery\nSource=$src\tDestination=$d\tDistance=$dis\tMinimum_Interm

#==================================================================== # Mod1 #=================================================================== #$ns at 2.8 "exec awk -f hello.awk connect nbr" $ns at 3.0 "source hello.tcl" set dt 10 #set src 0 #set d 35 set cn [open connect w] puts $cn "$src\t$d\t10" close $cn #$ns at 9.8 "exec awk -f route.awk connect nbr10"

#$ns at 10.0 "source corman.tcl"

Prevention against Wormhole Attack in MANET

53

$ns at $dt $ns at $dt $ns at $dt $ns at $dt

"$n($src) color green4" "$n($d) color red" "$n($src) label Src" "$n($d) label Dest"

#==================================================================== # set dt 10 #$ns at $dt-0.2 "exec awk -f AODV.awk nbr10 connect" Mod 2 #====================================================================

$ns at $dt "source rreq.tcl" $ns at $dt "source rrep.tcl" $ns at $dt "source data.tcl" $ns at 25 "exec awk -f graph.awk t.tr"

#====================================================================

proc finish {} { global ns namtrace $ns flush-trace close $namtrace exec nam t.nam & exec xgraph w.xg p.xg -t "Drop" -x "Time" -y "Number of drops" & exec xgraph tputE.xg tputP.xg -t "Throughput" -x "Time" -y "Throughput" & exit 0 } $ns at 25.0 "finish" puts "Start of simulation.." $ns run

Prevention against Wormhole Attack in MANET

54

Rreq.tcl
$ns at 14.58 "$n(0) label Source" $ns at 14.58 "$n(0) color green4" $ns at 14.58 "$n(1) color pink" $ns at 14.58 "$ns trace-annotate \"Node 0 send RREQ to its Neighbour node 1\"" set cbr(1) [attach-CBR-traffic $n(0) $sink(1) 48 0.05] $ns at 14.58 "$cbr(1) start" $ns at 14.63 "$cbr(1) stop" $ns at 14.63 "$n(6) color pink" $ns at 14.63 "$ns trace-annotate \"Node 0 send RREQ to its Neighbour node 6\"" set cbr(1) [attach-CBR-traffic $n(0) $sink(6) 48 0.05] $ns at 14.63 "$cbr(1) start" $ns at 14.68 "$cbr(1) stop" $ns at 14.68 "$n(12) color pink" $ns at 14.68 "$ns trace-annotate \"Node 0 send RREQ to its Neighbour node 12\"" set cbr(1) [attach-CBR-traffic $n(0) $sink(12) 48 0.05] $ns at 14.68 "$cbr(1) start" $ns at 14.73 "$cbr(1) stop" $ns at 14.73 "$n(2) color pink" $ns at 14.73 "$ns trace-annotate \"Node 1 send RREQ to its Neighbour node 2\"" set cbr(1) [attach-CBR-traffic $n(1) $sink(2) 48 0.05] $ns at 14.73 "$cbr(1) start" $ns at 14.78 "$cbr(1) stop" $ns at 14.78 "$n(8) color pink" $ns at 14.78 "$ns trace-annotate \"Node 1 send RREQ to its Neighbour node 8\"" set cbr(1) [attach-CBR-traffic $n(1) $sink(8) 48 0.05] $ns at 14.78 "$cbr(1) start" $ns at 14.83 "$cbr(1) stop" $ns at 14.83 "$n(13) color pink" $ns at 14.83 "$ns trace-annotate \"Node 6 send RREQ to its Neighbour node 13\"" set cbr(1) [attach-CBR-traffic $n(6) $sink(13) 48 0.05]

Prevention against Wormhole Attack in MANET

55

$ns at 14.83 "$cbr(1) start" $ns at 14.88 "$cbr(1) stop" $ns at 14.88 "$n(18) color pink" $ns at 14.88 "$ns trace-annotate \"Node 6 send RREQ to its Neighbour node 18\"" set cbr(1) [attach-CBR-traffic $n(6) $sink(18) 48 0.05] $ns at 14.88 "$cbr(1) start" $ns at 14.93 "$cbr(1) stop" $ns at 14.93 "$n(19) color pink" $ns at 14.93 "$ns trace-annotate \"Node 12 send RREQ to its Neighbour node 19\"" set cbr(1) [attach-CBR-traffic $n(12) $sink(19) 48 0.05] $ns at 14.93 "$cbr(1) start" $ns at 14.98 "$cbr(1) stop" $ns at 14.98 "$n(3) color pink" $ns at 14.98 "$ns trace-annotate \"Node 2 send RREQ to its Neighbour node 3\"" set cbr(1) [attach-CBR-traffic $n(2) $sink(3) 48 0.05] $ns at 14.98 "$cbr(1) start" $ns at 15.03 "$cbr(1) stop" $ns at 15.03 "$n(9) color pink" $ns at 15.03 "$ns trace-annotate \"Node 2 send RREQ to its Neighbour node 9\"" set cbr(1) [attach-CBR-traffic $n(2) $sink(9) 48 0.05] $ns at 15.03 "$cbr(1) start" $ns at 15.08 "$cbr(1) stop" $ns at 15.08 "$n(10) color pink" $ns at 15.08 "$ns trace-annotate \"Node 8 send RREQ to its Neighbour node 10\"" set cbr(1) [attach-CBR-traffic $n(8) $sink(10) 48 0.05] $ns at 15.08 "$cbr(1) start" $ns at 15.13 "$cbr(1) stop" $ns at 15.13 "$n(14) color pink" $ns at 15.13 "$ns trace-annotate \"Node 8 send RREQ to its Neighbour node 14\"" set cbr(1) [attach-CBR-traffic $n(8) $sink(14) 48 0.05] $ns at 15.13 "$cbr(1) start"

Prevention against Wormhole Attack in MANET

56

$ns at 15.18 "$cbr(1) stop" $ns at 15.18 "$n(15) color pink" $ns at 15.18 "$ns trace-annotate \"Node 8 send RREQ to its Neighbour node 15\"" set cbr(1) [attach-CBR-traffic $n(8) $sink(15) 48 0.05] $ns at 15.18 "$cbr(1) start" $ns at 15.23 "$cbr(1) stop" $ns at 15.23 "$n(20) color pink" $ns at 15.23 "$ns trace-annotate \"Node 13 send RREQ to its Neighbour node 20\"" set cbr(1) [attach-CBR-traffic $n(13) $sink(20) 48 0.05] $ns at 15.23 "$cbr(1) start" $ns at 15.28 "$cbr(1) stop" $ns at 15.28 "$n(25) color pink" $ns at 15.28 "$ns trace-annotate \"Node 13 send RREQ to its Neighbour node 25\"" set cbr(1) [attach-CBR-traffic $n(13) $sink(25) 48 0.05] $ns at 15.28 "$cbr(1) start" $ns at 15.33 "$cbr(1) stop" $ns at 15.33 "$n(26) color pink" $ns at 15.33 "$ns trace-annotate \"Node 13 send RREQ to its Neighbour node 26\"" set cbr(1) [attach-CBR-traffic $n(13) $sink(26) 48 0.05] $ns at 15.33 "$cbr(1) start" $ns at 15.38 "$cbr(1) stop" $ns at 15.38 "$n(24) color pink" $ns at 15.38 "$ns trace-annotate \"Node 18 send RREQ to its Neighbour node 24\"" set cbr(1) [attach-CBR-traffic $n(18) $sink(24) 48 0.05] $ns at 15.38 "$cbr(1) start" $ns at 15.43 "$cbr(1) stop" $ns at 15.43 "$n(30) color pink" $ns at 15.43 "$ns trace-annotate \"Node 18 send RREQ to its Neighbour node 30\"" set cbr(1) [attach-CBR-traffic $n(18) $sink(30) 48 0.05] $ns at 15.43 "$cbr(1) start" $ns at 15.48 "$cbr(1) stop"

Prevention against Wormhole Attack in MANET

57

$ns at 15.48 "$n(21) color pink" $ns at 15.48 "$ns trace-annotate \"Node 19 send RREQ to its Neighbour node 21\"" set cbr(1) [attach-CBR-traffic $n(19) $sink(21) 48 0.05] $ns at 15.48 "$cbr(1) start" $ns at 15.53 "$cbr(1) stop" $ns at 15.53 "$n(27) color pink" $ns at 15.53 "$ns trace-annotate \"Node 19 send RREQ to its Neighbour node 27\"" set cbr(1) [attach-CBR-traffic $n(19) $sink(27) 48 0.05] $ns at 15.53 "$cbr(1) start" $ns at 15.58 "$cbr(1) stop" $ns at 15.58 "$n(4) color pink" $ns at 15.58 "$ns trace-annotate \"Node 3 send RREQ to its Neighbour node 4\"" set cbr(1) [attach-CBR-traffic $n(3) $sink(4) 48 0.05] $ns at 15.58 "$cbr(1) start" $ns at 15.63 "$cbr(1) stop" $ns at 15.63 "$n(5) color pink" $ns at 15.63 "$ns trace-annotate \"Node 3 send RREQ to its Neighbour node 5\"" set cbr(1) [attach-CBR-traffic $n(3) $sink(5) 48 0.05] $ns at 15.63 "$cbr(1) start" $ns at 15.68 "$cbr(1) stop" $ns at 15.68 "$n(16) color pink" $ns at 15.68 "$ns trace-annotate \"Node 9 send RREQ to its Neighbour node 16\"" set cbr(1) [attach-CBR-traffic $n(9) $sink(16) 48 0.05] $ns at 15.68 "$cbr(1) start" $ns at 15.73 "$cbr(1) stop" $ns at 15.73 "$n(11) color pink" $ns at 15.73 "$ns trace-annotate \"Node 10 send RREQ to its Neighbour node 11\"" set cbr(1) [attach-CBR-traffic $n(10) $sink(11) 48 0.05] $ns at 15.73 "$cbr(1) start" $ns at 15.78 "$cbr(1) stop" $ns at 15.78 "$n(17) color pink"

Prevention against Wormhole Attack in MANET

58

$ns at 15.78 "$ns trace-annotate \"Node 10 send RREQ to its Neighbour node 17\"" set cbr(1) [attach-CBR-traffic $n(10) $sink(17) 48 0.05] $ns at 15.78 "$cbr(1) start" $ns at 15.83 "$cbr(1) stop" $ns at 15.83 "$n(23) color pink" $ns at 15.83 "$ns trace-annotate \"Node 10 send RREQ to its Neighbour node 23\"" set cbr(1) [attach-CBR-traffic $n(10) $sink(23) 48 0.05] $ns at 15.83 "$cbr(1) start" $ns at 15.88 "$cbr(1) stop" $ns at 15.88 "$n(22) color pink" $ns at 15.88 "$ns trace-annotate \"Node 15 send RREQ to its Neighbour node 22\"" set cbr(1) [attach-CBR-traffic $n(15) $sink(22) 48 0.05] $ns at 15.88 "$cbr(1) start" $ns at 15.93 "$cbr(1) stop" $ns at 15.93 "$n(32) color pink" $ns at 15.93 "$ns trace-annotate \"Node 20 send RREQ to its Neighbour node 32\"" set cbr(1) [attach-CBR-traffic $n(20) $sink(32) 48 0.05] $ns at 15.93 "$cbr(1) start" $ns at 15.98 "$cbr(1) stop" $ns at 15.98 "$n(33) color pink" $ns at 15.98 "$ns trace-annotate \"Node 20 send RREQ to its Neighbour node 33\"" set cbr(1) [attach-CBR-traffic $n(20) $sink(33) 48 0.05] $ns at 15.98 "$cbr(1) start" $ns at 16.03 "$cbr(1) stop" $ns at 16.03 "$n(31) color pink" $ns at 16.03 "$ns trace-annotate \"Node 25 send RREQ to its Neighbour node 31\"" set cbr(1) [attach-CBR-traffic $n(25) $sink(31) 48 0.05] $ns at 16.03 "$cbr(1) start" $ns at 16.08 "$cbr(1) stop" $ns at 16.08 "$n(29) color pink"

Prevention against Wormhole Attack in MANET

59

$ns at 16.08 "$ns trace-annotate \"Node 21 send RREQ to its Neighbour node 29\"" set cbr(1) [attach-CBR-traffic $n(21) $sink(29) 48 0.05] $ns at 16.08 "$cbr(1) start" $ns at 16.13 "$cbr(1) stop" $ns at 16.13 "$n(34) color pink" $ns at 16.13 "$ns trace-annotate \"Node 27 send RREQ to its Neighbour node 34\"" set cbr(1) [attach-CBR-traffic $n(27) $sink(34) 48 0.05] $ns at 16.13 "$cbr(1) start" $ns at 16.18 "$cbr(1) stop" $ns at 16.18 "$ns trace-annotate \"Node 29 send RREQ to its Neighbour node 35\"" set cbr(1) [attach-CBR-traffic $n(29) $sink(35) 48 0.05] $ns at 16.18 "$cbr(1) start" $ns at 16.23 "$cbr(1) stop" $ns at 16.23 "$n(35) color green4" $ns at 16.23 "$n(35) label Destination" Hello.tcl $ns at 3 "$n(0) color magenta" $ns at 3 "$n(1) color pink" set cbr(1) [attach-CBR-traffic $n(0) $sink(1) 48 0.01] $ns at 3 "$cbr(1) start" $ns at 3.01 "$cbr(1) stop" $ns at 3.01 "$n(1) color green" $ns at 3.02 "$n(6) color pink" set cbr(1) [attach-CBR-traffic $n(0) $sink(6) 48 0.01] $ns at 3.02 "$cbr(1) start" $ns at 3.03 "$cbr(1) stop" $ns at 3.03 "$n(6) color green" $ns at 3.04 "$n(7) color pink" set cbr(1) [attach-CBR-traffic $n(0) $sink(7) 48 0.01] $ns at 3.04 "$cbr(1) start" $ns at 3.05 "$cbr(1) stop" $ns at 3.05 "$n(7) color green"

Prevention against Wormhole Attack in MANET

60

$ns at 3.06 "$n(12) color pink" set cbr(1) [attach-CBR-traffic $n(0) $sink(12) 48 0.01] $ns at 3.06 "$cbr(1) start" $ns at 3.07 "$cbr(1) stop" $ns at 3.07 "$n(12) color green" $ns at 3.08 "$n(0) color green" $ns at 3.08 "$n(1) color magenta" set cbr(1) [attach-CBR-traffic $n(1) $sink(0) 48 0.01] $ns at 3.08 "$cbr(1) start" $ns at 3.09 "$cbr(1) stop" $ns at 3.1 "$n(2) color pink" set cbr(1) [attach-CBR-traffic $n(1) $sink(2) 48 0.01] $ns at 3.1 "$cbr(1) start" $ns at 3.11 "$cbr(1) stop" $ns at 3.11 "$n(2) color green" $ns at 3.12 "$n(6) color pink" set cbr(1) [attach-CBR-traffic $n(1) $sink(6) 48 0.01] $ns at 3.12 "$cbr(1) start" $ns at 3.13 "$cbr(1) stop" $ns at 3.13 "$n(6) color green" $ns at 3.14 "$n(7) color pink" set cbr(1) [attach-CBR-traffic $n(1) $sink(7) 48 0.01] $ns at 3.14 "$cbr(1) start" $ns at 3.15 "$cbr(1) stop" $ns at 3.15 "$n(7) color green" $ns at 3.16 "$n(8) color pink" set cbr(1) [attach-CBR-traffic $n(1) $sink(8) 48 0.01] $ns at 3.16 "$cbr(1) start" $ns at 3.17 "$cbr(1) stop" $ns at 3.17 "$n(8) color green" $ns at 3.18 "$n(12) color pink" set cbr(1) [attach-CBR-traffic $n(1) $sink(12) 48 0.01] $ns at 3.18 "$cbr(1) start" $ns at 3.19 "$cbr(1) stop" $ns at 3.19 "$n(12) color green" $ns at 3.2 "$n(1) color green" $ns at 3.2 "$n(2) color magenta"

Prevention against Wormhole Attack in MANET

61

set cbr(1) [attach-CBR-traffic $n(2) $sink(1) 48 0.01] $ns at 3.2 "$cbr(1) start" $ns at 3.21 "$cbr(1) stop" $ns at 3.22 "$n(3) color pink" set cbr(1) [attach-CBR-traffic $n(2) $sink(3) 48 0.01] $ns at 3.22 "$cbr(1) start" $ns at 3.23 "$cbr(1) stop" $ns at 3.23 "$n(3) color green" $ns at 3.24 "$n(4) color pink" set cbr(1) [attach-CBR-traffic $n(2) $sink(4) 48 0.01] $ns at 3.24 "$cbr(1) start" $ns at 3.25 "$cbr(1) stop" $ns at 3.25 "$n(4) color green" $ns at 3.26 "$n(7) color pink" set cbr(1) [attach-CBR-traffic $n(2) $sink(7) 48 0.01] $ns at 3.26 "$cbr(1) start" $ns at 3.27 "$cbr(1) stop" $ns at 3.27 "$n(7) color green" $ns at 3.28 "$n(8) color pink" set cbr(1) [attach-CBR-traffic $n(2) $sink(8) 48 0.01] $ns at 3.28 "$cbr(1) start" $ns at 3.29 "$cbr(1) stop" $ns at 3.29 "$n(8) color green" $ns at 3.3 "$n(9) color pink" set cbr(1) [attach-CBR-traffic $n(2) $sink(9) 48 0.01] $ns at 3.3 "$cbr(1) start" $ns at 3.31 "$cbr(1) stop" $ns at 3.31 "$n(9) color green" $ns at 3.32 "$n(2) color green" $ns at 3.32 "$n(3) color magenta" set cbr(1) [attach-CBR-traffic $n(3) $sink(2) 48 0.01] $ns at 3.32 "$cbr(1) start" $ns at 3.33 "$cbr(1) stop" $ns at 3.34 "$n(4) color pink" set cbr(1) [attach-CBR-traffic $n(3) $sink(4) 48 0.01] $ns at 3.34 "$cbr(1) start" $ns at 3.35 "$cbr(1) stop"

Prevention against Wormhole Attack in MANET

62

$ns at 3.35 "$n(4) color green" $ns at 3.36 "$n(5) color pink" set cbr(1) [attach-CBR-traffic $n(3) $sink(5) 48 0.01] $ns at 3.36 "$cbr(1) start" $ns at 3.37 "$cbr(1) stop" $ns at 3.37 "$n(5) color green" $ns at 3.38 "$n(8) color pink" set cbr(1) [attach-CBR-traffic $n(3) $sink(8) 48 0.01] $ns at 3.38 "$cbr(1) start" $ns at 3.39 "$cbr(1) stop" $ns at 3.39 "$n(8) color green" $ns at 3.4 "$n(9) color pink" set cbr(1) [attach-CBR-traffic $n(3) $sink(9) 48 0.01] $ns at 3.4 "$cbr(1) start" $ns at 3.41 "$cbr(1) stop" $ns at 3.41 "$n(9) color green" $ns at 3.42 "$n(10) color pink" set cbr(1) [attach-CBR-traffic $n(3) $sink(10) 48 0.01] $ns at 3.42 "$cbr(1) start" $ns at 3.43 "$cbr(1) stop" $ns at 3.43 "$n(10) color green" $ns at 3.44 "$n(3) color green" $ns at 3.44 "$n(4) color magenta" set cbr(1) [attach-CBR-traffic $n(4) $sink(2) 48 0.01] $ns at 3.44 "$cbr(1) start" $ns at 3.45 "$cbr(1) stop" $ns at 3.46 "$n(3) color pink" set cbr(1) [attach-CBR-traffic $n(4) $sink(3) 48 0.01] $ns at 3.46 "$cbr(1) start" $ns at 3.47 "$cbr(1) stop" $ns at 3.47 "$n(3) color green" $ns at 3.48 "$n(5) color pink" set cbr(1) [attach-CBR-traffic $n(4) $sink(5) 48 0.01] $ns at 3.48 "$cbr(1) start" $ns at 3.49 "$cbr(1) stop" $ns at 3.49 "$n(5) color green" $ns at 3.5 "$n(9) color pink"

Prevention against Wormhole Attack in MANET

63

set cbr(1) [attach-CBR-traffic $n(4) $sink(9) 48 0.01] $ns at 3.5 "$cbr(1) start" $ns at 3.51 "$cbr(1) stop" $ns at 3.51 "$n(9) color green" $ns at 3.52 "$n(10) color pink" set cbr(1) [attach-CBR-traffic $n(4) $sink(10) 48 0.01] $ns at 3.52 "$cbr(1) start" $ns at 3.53 "$cbr(1) stop" $ns at 3.53 "$n(10) color green" $ns at 3.54 "$n(11) color pink" set cbr(1) [attach-CBR-traffic $n(4) $sink(11) 48 0.01] $ns at 3.54 "$cbr(1) start" $ns at 3.55 "$cbr(1) stop" $ns at 3.55 "$n(11) color green" $ns at 3.56 "$n(16) color pink" set cbr(1) [attach-CBR-traffic $n(4) $sink(16) 48 0.01] $ns at 3.56 "$cbr(1) start" $ns at 3.57 "$cbr(1) stop" $ns at 3.57 "$n(16) color green" $ns at 3.58 "$n(4) color green" $ns at 3.58 "$n(5) color magenta" set cbr(1) [attach-CBR-traffic $n(5) $sink(3) 48 0.01] $ns at 3.58 "$cbr(1) start" $ns at 3.59 "$cbr(1) stop" $ns at 3.6 "$n(4) color pink" set cbr(1) [attach-CBR-traffic $n(5) $sink(4) 48 0.01] $ns at 3.6 "$cbr(1) start" $ns at 3.61 "$cbr(1) stop" $ns at 3.61 "$n(4) color green" $ns at 3.62 "$n(10) color pink" set cbr(1) [attach-CBR-traffic $n(5) $sink(10) 48 0.01] $ns at 3.62 "$cbr(1) start" $ns at 3.63 "$cbr(1) stop" $ns at 3.63 "$n(10) color green" $ns at 3.64 "$n(11) color pink" set cbr(1) [attach-CBR-traffic $n(5) $sink(11) 48 0.01] $ns at 3.64 "$cbr(1) start"

Prevention against Wormhole Attack in MANET

64

$ns at 3.65 "$cbr(1) stop" $ns at 3.65 "$n(11) color green" $ns at 3.66 "$n(5) color green" $ns at 3.66 "$n(6) color magenta" set cbr(1) [attach-CBR-traffic $n(6) $sink(0) 48 0.01] $ns at 3.66 "$cbr(1) start" $ns at 3.67 "$cbr(1) stop" $ns at 3.68 "$n(1) color pink" set cbr(1) [attach-CBR-traffic $n(6) $sink(1) 48 0.01] $ns at 3.68 "$cbr(1) start" $ns at 3.69 "$cbr(1) stop" $ns at 3.69 "$n(1) color green" $ns at 3.7 "$n(7) color pink" set cbr(1) [attach-CBR-traffic $n(6) $sink(7) 48 0.01] $ns at 3.7 "$cbr(1) start" $ns at 3.71 "$cbr(1) stop" $ns at 3.71 "$n(7) color green" $ns at 3.72 "$n(12) color pink" set cbr(1) [attach-CBR-traffic $n(6) $sink(12) 48 0.01] $ns at 3.72 "$cbr(1) start" $ns at 3.73 "$cbr(1) stop" $ns at 3.73 "$n(12) color green" $ns at 3.74 "$n(18) color pink" set cbr(1) [attach-CBR-traffic $n(6) $sink(18) 48 0.01] $ns at 3.74 "$cbr(1) start" $ns at 3.75 "$cbr(1) stop" $ns at 3.75 "$n(18) color green" $ns at 3.76 "$n(6) color green" $ns at 3.76 "$n(7) color magenta" set cbr(1) [attach-CBR-traffic $n(7) $sink(0) 48 0.01] $ns at 3.76 "$cbr(1) start" $ns at 3.77 "$cbr(1) stop" $ns at 3.78 "$n(1) color pink" set cbr(1) [attach-CBR-traffic $n(7) $sink(1) 48 0.01] $ns at 3.78 "$cbr(1) start" $ns at 3.79 "$cbr(1) stop" $ns at 3.79 "$n(1) color green"

Prevention against Wormhole Attack in MANET

65

$ns at 3.8 "$n(2) color pink" set cbr(1) [attach-CBR-traffic $n(7) $sink(2) 48 0.01] $ns at 3.8 "$cbr(1) start" $ns at 3.81 "$cbr(1) stop" $ns at 3.81 "$n(2) color green" $ns at 3.82 "$n(6) color pink" set cbr(1) [attach-CBR-traffic $n(7) $sink(6) 48 0.01] $ns at 3.82 "$cbr(1) start" $ns at 3.83 "$cbr(1) stop" $ns at 3.83 "$n(6) color green" $ns at 3.84 "$n(8) color pink" set cbr(1) [attach-CBR-traffic $n(7) $sink(8) 48 0.01] $ns at 3.84 "$cbr(1) start" $ns at 3.85 "$cbr(1) stop" $ns at 3.85 "$n(8) color green" $ns at 3.86 "$n(12) color pink" set cbr(1) [attach-CBR-traffic $n(7) $sink(12) 48 0.01] $ns at 3.86 "$cbr(1) start" $ns at 3.87 "$cbr(1) stop" $ns at 3.87 "$n(12) color green" $ns at 3.88 "$n(13) color pink" set cbr(1) [attach-CBR-traffic $n(7) $sink(13) 48 0.01] $ns at 3.88 "$cbr(1) start" $ns at 3.89 "$cbr(1) stop" $ns at 3.89 "$n(13) color green" $ns at 3.9 "$n(14) color pink" set cbr(1) [attach-CBR-traffic $n(7) $sink(14) 48 0.01] $ns at 3.9 "$cbr(1) start" $ns at 3.91 "$cbr(1) stop" $ns at 3.91 "$n(14) color green" $ns at 3.92 "$n(7) color green" $ns at 3.92 "$n(8) color magenta" set cbr(1) [attach-CBR-traffic $n(8) $sink(1) 48 0.01] $ns at 3.92 "$cbr(1) start" $ns at 3.93 "$cbr(1) stop" $ns at 3.94 "$n(2) color pink" set cbr(1) [attach-CBR-traffic $n(8) $sink(2) 48 0.01]

Prevention against Wormhole Attack in MANET

66

$ns at 3.94 "$cbr(1) start" $ns at 3.95 "$cbr(1) stop" $ns at 3.95 "$n(2) color green" $ns at 3.96 "$n(3) color pink" set cbr(1) [attach-CBR-traffic $n(8) $sink(3) 48 0.01] $ns at 3.96 "$cbr(1) start" $ns at 3.97 "$cbr(1) stop" $ns at 3.97 "$n(3) color green" $ns at 3.98 "$n(7) color pink" set cbr(1) [attach-CBR-traffic $n(8) $sink(7) 48 0.01] $ns at 3.98 "$cbr(1) start" $ns at 3.99 "$cbr(1) stop" $ns at 3.99 "$n(7) color green" $ns at 4 "$n(9) color pink" set cbr(1) [attach-CBR-traffic $n(8) $sink(9) 48 0.01] $ns at 4 "$cbr(1) start" $ns at 4.01 "$cbr(1) stop" $ns at 4.01 "$n(9) color green" $ns at 4.02 "$n(12) color pink" set cbr(1) [attach-CBR-traffic $n(8) $sink(12) 48 0.01] $ns at 4.02 "$cbr(1) start" $ns at 4.03 "$cbr(1) stop" $ns at 4.03 "$n(12) color green" $ns at 4.04 "$n(13) color pink" set cbr(1) [attach-CBR-traffic $n(8) $sink(13) 48 0.01] $ns at 4.04 "$cbr(1) start" $ns at 4.05 "$cbr(1) stop" $ns at 4.05 "$n(13) color green" $ns at 4.06 "$n(14) color pink" set cbr(1) [attach-CBR-traffic $n(8) $sink(14) 48 0.01] $ns at 4.06 "$cbr(1) start" $ns at 4.07 "$cbr(1) stop" $ns at 4.07 "$n(14) color green" $ns at 4.08 "$n(15) color pink" set cbr(1) [attach-CBR-traffic $n(8) $sink(15) 48 0.01] $ns at 4.08 "$cbr(1) start" $ns at 4.09 "$cbr(1) stop"

Prevention against Wormhole Attack in MANET

67

$ns at 4.09 "$n(15) color green" $ns at 4.1 "$n(19) color pink" set cbr(1) [attach-CBR-traffic $n(8) $sink(19) 48 0.01] $ns at 4.1 "$cbr(1) start" $ns at 4.11 "$cbr(1) stop" $ns at 4.11 "$n(19) color green" $ns at 4.12 "$n(8) color green" $ns at 4.12 "$n(9) color magenta" set cbr(1) [attach-CBR-traffic $n(9) $sink(2) 48 0.01] $ns at 4.12 "$cbr(1) start" $ns at 4.13 "$cbr(1) stop" $ns at 4.14 "$n(3) color pink" set cbr(1) [attach-CBR-traffic $n(9) $sink(3) 48 0.01] $ns at 4.14 "$cbr(1) start" $ns at 4.15 "$cbr(1) stop" $ns at 4.15 "$n(3) color green" $ns at 4.16 "$n(4) color pink" set cbr(1) [attach-CBR-traffic $n(9) $sink(4) 48 0.01] $ns at 4.16 "$cbr(1) start" $ns at 4.17 "$cbr(1) stop" $ns at 4.17 "$n(4) color green" $ns at 4.18 "$n(8) color pink" set cbr(1) [attach-CBR-traffic $n(9) $sink(8) 48 0.01] $ns at 4.18 "$cbr(1) start" $ns at 4.19 "$cbr(1) stop" $ns at 4.19 "$n(8) color green" $ns at 4.2 "$n(10) color pink" set cbr(1) [attach-CBR-traffic $n(9) $sink(10) 48 0.01] $ns at 4.2 "$cbr(1) start" $ns at 4.21 "$cbr(1) stop" $ns at 4.21 "$n(10) color green" $ns at 4.22 "$n(13) color pink" set cbr(1) [attach-CBR-traffic $n(9) $sink(13) 48 0.01] $ns at 4.22 "$cbr(1) start" $ns at 4.23 "$cbr(1) stop" $ns at 4.23 "$n(13) color green" $ns at 4.24 "$n(14) color pink"

Prevention against Wormhole Attack in MANET

68

set cbr(1) [attach-CBR-traffic $n(9) $sink(14) 48 0.01] $ns at 4.24 "$cbr(1) start" $ns at 4.25 "$cbr(1) stop" $ns at 4.25 "$n(14) color green" $ns at 4.26 "$n(15) color pink" set cbr(1) [attach-CBR-traffic $n(9) $sink(15) 48 0.01] $ns at 4.26 "$cbr(1) start" $ns at 4.27 "$cbr(1) stop" $ns at 4.27 "$n(15) color green" $ns at 4.28 "$n(16) color pink" set cbr(1) [attach-CBR-traffic $n(9) $sink(16) 48 0.01] $ns at 4.28 "$cbr(1) start" $ns at 4.29 "$cbr(1) stop" $ns at 4.29 "$n(16) color green" $ns at 4.3 "$n(21) color pink" set cbr(1) [attach-CBR-traffic $n(4) $sink(10) 48 0.01] $ns at 3.52 "$cbr(1) start" $ns at 3.53 "$cbr(1) stop" $ns at 3.53 "$n(10) color green" $ns at 3.54 "$n(11) color pink" set cbr(1) [attach-CBR-traffic $n(4) $sink(11) 48 0.01] $ns at 3.54 "$cbr(1) start" $ns at 3.55 "$cbr(1) stop" $ns at 3.55 "$n(11) color green" $ns at 3.56 "$n(16) color pink"

Prevention against Wormhole Attack in MANET

69

You might also like