The American University in Cairo School of Sciences and Engineering Reputed Authenticated Routing for Ad Hoc Networks Protocol

(Reputed-ARAN)

A Thesis Submitted to The Department of Computer Science In partial fulfillment of the requirements for the degree of Master of Science in Computer Science By Abdalla Ahmed Fekry Mahmoud Bachelor of Science, Computer Science, AUC

Under the supervision of

Dr. Ahmed Sameh May, 2005

Dr. Sherif El-Kassas

The American University in Cairo Reputed Authenticated Routing for Ad Hoc Networks Protocol (Reputed-ARAN)
A Thesis Submitted by Abdalla Ahmed Fekry Mahmoud to Department of Computer Science May 2005 in partial fulfillment of the requirements for the degree of Master of Science has been approved by

Dr. Ahmed Sameh Thesis Committee Chair/Advisor__________________________________________ Affiliation ________________________________________________________

Dr. Sherif El-Kassas Thesis Committee Chair/Advisor_______________________________________ Affiliation ________________________________________________________

Dr. Mohy Mahmoud Thesis Committee Reader/Examiner_______________________________________ Affiliation ________________________________________________________

Dr. Awad Khalil Thesis Committee Reader/Examiner_______________________________________ Affiliation ________________________________________________________

Dr. Gamal Darwish Thesis Committee Reader/Examiner_______________________________________ Affiliation ________________________________________________________

___________________ Department Chair/ Program Director

_____________ Date

____________________ _______________ Dean Date

ii

To my Family and Friends

iii

iv . I must thank Allah for helping me and giving me the strength and patience to complete this work. I would like to pass many thanks and respect to my first supervisor. and his many helpful corrections and comments. Having accomplished this research work. for his patience and careful review of my thesis work. He made me believe that I can ace it. who has always worked as my counselor throughout my lifetime. I would like to express my deep gratitude to my parents. and my brother. I hope that I have succeeded in adding to the field of Mobile Ad Hoc Networks and now I am looking forward to having my spare time back to myself again. Those theses represent not only the work of their authors. Also. but also of all the reviewers and advisors who play a role in that long trail from thesis topic selection to its completion.DEDICATIONS AND ACKNOWLEDGEMENTS Writing this thesis work was a draining task. Dr. Also. First. this work would not exist. Rasha. Sherif El-Kassas. Without her constant pressure. many thanks go to my second supervisor. Ahmed Sameh. for his inspirational thoughts. Wished you were here to see me finishing my thesis work! In addition. Dr. Special thanks go to my uncle. valuable guidance and assistance throughout this work. I would like to dedicate special thanks to my lovely and always caring mother who has supported me all the way. my sister. It has given me a new insight into how all of those stacks of theses found at The American University in Cairo library actually got there. Mohamed. Most importantly. Mohamed Fawzi. tolerated me during my studies and always kept me on the right track.

Riham. Lilia. Santa Barbara.Besides. I had the pleasure to have Dr. I had the honor to have Dr. Mohy Mahmoud as my thesis committee members. v . I would like also to devote special thanks and admiration to my best friend and twin brother. I would really like to thank them for all the time and effort they have provided me with. I would really like to thank them a lot. Furthermore. Jawish. Khaled. for her enduring love. for his continuous support and mentoring throughout my academic and personal life. USA for their help and support during my work with the AODV and ARAN routing protocols. Sherif. I would really like to thank him for all his time and effort. Awad Khalil and Dr. They have always encouraged me to finish my thesis work. my greatest debt is to my fiancée. I can not forget all the encouragements shown by my friends: Ayyat. Hatim. Omar and Rifai. support and forbearance during my thesis work and for her lengthy exposure to more than she ever wanted to know about mobile ad hoc networks. In the meantime. Many thanks go to Dr. Elizabeth Belding-Royer and Miss Kimaya Sanzgiri. Gamal Darwish as my external examiner. Finally. University of California.

researchers started to study selfish nodes and their effects on mobile ad hoc networks. there has been a greater focus on the subject of securing such networks. A number of research papers discussing different cooperation enforcement schemes for detecting and defending against selfish nodes and their disturbance to mobile ad hoc networks were published. That resulted in creating a new thread of research in the MANET field. many papers have been written describing different proposed secure routing protocols that defend against malicious nodes’ attacks that MANETs face. security maintenance. Recently. quality of service. limited bandwidth and limited power supply. This means that all its nodes behave as routers and take part in its discovery and maintenance of routes to other nodes in the network. However. Still none of these proposed cooperation enforcement schemes were based on any existing MANET secure routing protocols. the majority of these MANET secure routing protocols did not provide a complete solution for all the MANETs’ attacks and assumed that any node participating in the MANET is not selfish and that it will cooperate to support different network functionalities.ABSTRACT A mobile ad hoc network (MANET) is a spontaneous network that can be established with no fixed infrastructure. The vi . With the increasing interest in MANETs. Out of the many discussions and research groups discussing the different security issues in the field of mobile ad hoc networks. These challenges set new demands on MANET routing protocols. My research strategy is to choose one of the secure routing protocols according to its security-effectiveness. Its routing protocol has to be able to cope with the new challenges that a MANET creates such as nodes mobility. study it and analyze its functionality and performance. All of these proposed schemes were based on routing protocols with no security measures at all.

The results of the experiments showed that in the presence of 30% selfish nodes and with node mobility of 10 m/s. Reputed-ARAN is capable of handling both selfish and malicious nodes’ attacks. the different existing cooperation enforcement schemes were surveyed so that to come up with a reputation-based scheme to integrate with the ARAN protocol.1%. from 38. The main contribution in this thesis: Reputed-ARAN proves to be more efficient and more secure than normal ARAN secure routing protocol in defending against both malicious and authenticated selfish nodes. vii . Consequently. Also. Then. The result of that integration is called: Reputed-ARAN. This improvement is obtained at the cost of a higher overhead percentage with minimal increase in the average number of hops.8% network throughput provided by normal ARAN. the newly proposed Reputed-ARAN protocol improves network throughput to 63.authenticated routing for ad hoc networks (ARAN) secure routing protocol was chosen for analysis. the Glomosim simulation package was chosen to carry out the experimental part of this thesis work.

4.4.4.4.2 The calculation of reputation values 4.4 MOBILE AD HOC NETWORKS’ CHARACTERISTICS AND CHALLENGES 1.2 COOPERATION SCHEMES 4.4.1 INTRODUCTION 3.1 Malicious attacks defended by ARAN 3.4 REPUTATION-BASED SCHEMES 4. CHAPTER FOUR: COOPERATION ENFORCEMENT SCHEMES 4.3 VIRTUAL CURRENCY-BASED SCHEMES 4.1.1 Active and Passive Attacks 3.6 SUMMARY 4.2.4.1 Certification Process 3.2 ATTACKS TARGETING ROUTING PROTOCOLS 3.4 Route Maintenance 3.3 Virtual Currency-based Schemes’ Shortcomings 4.4.4.1 INTRODUCTION 4.2 Sprite 4.1 TRADITIONAL ROUTING PROTOCOLS OVERVIEW 2.2 Authenticated Routing for Ad Hoc Networks 3.3 Routing Protocols’ Security Requirements 3.3 The update of reputation values 4.2.1.3 MOBILE AD HOC NETWORKS’ USAGES 1.2.2.3.3 Link state routing 2.2 Flooding 2.4 The detection of misbehavior 28 28 29 30 31 31 31 32 32 33 34 34 34 37 38 40 40 40 41 42 viii .4.1 Proactive and Reactive Routing Protocols 2.2.5 ARAN SECURITY ANALYSIS 3.2.4.2 Authenticated Route Discovery 3.5 PROBLEM DEFINITION 1.2 OVERVIEW OF MOBILE AD HOC NETWORKS 1.1 Nuglets 4.4.4.5.4 Reputation Systems implementation Issues 4. CHAPTER THREE: SECURITY ISSUES IN MANETS AND THE ARAN PROTOCOL 3.3 Ocean 4.Table of Contents 1.1 WIRELESS NETWORKING INTRODUCTION 1.3 SUMMARY 3.7 ORGANIZATION OF THE THESIS 2.5.1 Confidant 4.4.4.4. CHAPTER TWO: ROUTING PROTOCOLS’ OVERVIEW 2.3 SECURE AD HOC ROUTING PROTOCOLS 3.4.2 ROUTING IN A MANET 2.4 AUTHENTICATED ROUTING FOR AD HOC NETWORKS PROTOCOL (ARAN) 3.2 Core 4.6 THE SCOPE OF THE RESEARCH 1.1 Introduction 3.2 ARAN and Selfish node weakness 3.3.2 Ad Hoc Networks’ Routing Protocols list 2.4. CHAPTER ONE: INTRODUCTION 1.4.2.2.2 Malicious and Selfish Nodes in MANETs 3.1.1 Distance vector 2.5 Key Revocation 1 1 3 3 4 5 6 7 8 8 8 8 9 9 10 11 12 13 13 13 14 14 17 18 19 19 20 20 21 24 27 27 3.1 The assignment of initial reputation values 4.2.3 Authenticated Route Setup 3.4.2.3.

5.3 QualNet 6. CHAPTER EIGHT: SIMULATION RESULTS 8.4.1 Objective 8.5.4 Timeout Phase 44 44 45 45 46 47 48 49 51 51 5.2.1 INTRODUCTION 7.3 MOVEMENT AND COMMUNICATION PATTERNS 7.1.3.3.3.3.3.5 SUMMARY 6.2 SIMULATION ENVIRONMENT 7.2 CHOICE OF SIMULATOR 6.3 Reputation Phase 5.1 INTRODUCTION 8.2 PROBLEM DEFINITION 5.3.1 Objective 8.1 INTRODUCTION 5.4 Glomosim 6.1.3.6 SUMMARY 43 43 5.4.2 Results 8.5.2 Design Requirements 5.2 Overhead 7.3.3 Analysis 8.5.4 SELFISH NODES 7.5.2.2 Data Transfer Phase 5.5.3 Average Route Acquisition Latency 7.3. CHAPTER SIX: SIMULATION ENVIRONMENTS 6.3.1 Route Lookup Phase 5.4.3.2 NS2 6.1.3 Main Idea of the Reputation System 5.5 THE CHOICE OF COOPERATION ENFORCEMENT SCHEME 4.4.4.2 Results 8.3.3.5 METRICS 7.1.3 EXPERIMENT 2: OVERHEAD 8.4 ANALYSIS OF THE PROPOSED REPUTED-ARAN 5.1 INTRODUCTION 6.1 OPNET 6.1 Network Throughput 7.3 Analysis 8.5.5 EXPERIMENT 4: AVERAGE END-TO-END DELAY OF DATA PACKETS 8.4 EXPERIMENT 3: AVERAGE ROUTE ACQUISITION DELAY 8.1 Introduction 5.2 EXPERIMENT 1: NETWORK THROUGHPUT 8.2 Results 8.4.4 Average End-to-End Delay of Data Packets 7.1 Objective 8. CHAPTER FIVE: THE PROPOSED REPUTATION-BASED SCHEME: REPUTED-ARAN 44 5.3 Analysis 52 54 55 55 55 56 56 57 58 59 60 60 60 61 61 62 62 62 63 63 63 63 65 65 65 65 65 66 68 68 68 69 69 69 70 70 71 71 71 72 ix .5.2 Results 8.3 PROPOSED REPUTATION-BASED SCHEME 5.3.3 Analysis 8.5 Packets Reached 7.6 SUMMARY 8. CHAPTER SEVEN: SIMULATION METHODOLOGY 7.3 SUMMARY 7.2.1 Objective 8.5 The reaction to uncooperative behavior 43 4.

SH ARAN-SCRIPT-FOR-20-NODES-20SELFISH.TXT NETWORK THROUGHPUT.SH OVERHEAD-PACKETS.SH 20-10-ARAN-STAT#1.6 EXPERIMENT 5: PACKETS REACHED 8.2 Results 8.AWK OVERHEAD-PACKETS.7 SUMMARY 9.AWK AVERAGE-PATH-LENGTH.SH AVERAGE-END-TO-END-DELAY.8.3 Analysis 8.2 FUTURE WORK REFERENCES APPENDIX A: LIST OF PROTOCOLS PROACTIVE (TABLE DRIVEN) PROTOCOLS REACTIVE (ON-DEMAND) PROTOCOLS SECURITY ROUTING PROTOCOLS APPENDIX B: LIST OF ARAN’S FUNCTIONS WITH DOCUMENTATION APPENDIX C: PSEUDO CODE OF REPUTED-ARAN ROUTE LOOKUP PHASE DATA TRANSFER PHASE REPUTATION PHASE TIMEOUT PHASE APPENDIX D: GLOMOSIM’S CONFIGURATION FILES APPENDIX E: GLOMOSIM’S APPLICATION CONFIGURATION FILE APPENDIX F: DIFFERENT SIMULATION AND LINUX SCRIPTS ARAN-MAIN-SCRIPT.AWK AVERAGE-ROUTE-ACQUISITION-DELAY.6.1 Objective 8. CHAPTER NINE: CONCLUSION AND FUTURE WORK 9.SH OVERHEAD-BYTES.AWK OVERHEAD-BYTES.SH AVERAGE-ROUTE-ACQUISITION-DELAY.6.1 CONCLUSION 9.6.SH NETWORK-THROUGHPUT.SH AVERAGE-PATH-LENGTH.AWK 72 72 73 73 75 76 76 78 81 87 87 87 88 90 97 97 98 99 99 100 111 113 113 113 114 115 116 116 116 117 117 117 118 118 118 119 119 120 APPENDIX G: RANDOM NUMBER GENERATOR TO DESIGNATE SELFISH NODES x .AWK AVERAGE-END-TO-END-DELAY.

........................................ 27 FIGURE 4.................................................................................................8: ROUTE SETUP 1 ............ 2 FIGURE 1...........................................10: ROUTE SETUP 3 ....................3: REPLYING TO EACH RDP.......................................................................................................................................................................... 49 FIGURE 5.....................1: THE ARCHITECTURE OF SPRITE [18]....................................4: CHOOSING THE HIGHLY-REPUTED NEXT-HOP NODE ....................3: AVERAGE ROUTE ACQUISITION DELAY............................... 25 FIGURE 3........................................................................................................................................................................................................................................................................................................................6: ROUTE DISCOVERY 2.......2: AD HOC NETWORK......... 2 FIGURE 2......................................................................1: DIFFERENT SORTS OF ATTACKS [13] .................... 66 FIGURE 8............................................................ 49 FIGURE 5............................................................2: OVERHEAD PERCENTAGE ...................................... 14 FIGURE 3.................................................................................. 36 FIGURE 5................................. 71 FIGURE 8..............................................................5: ROUTE DISCOVERY 1..................... 24 FIGURE 3..... 12 FIGURE 3........................................................................................2: IMPERSONATION TO CREATE LOOPS ... 50 FIGURE 5...................................................................................................................2: THE ARCHITECTURE OF CONFIDANT [20] .............1: EFFECTS OF SELFISH NODES ON NETWORK THROUGHPUT .................. 16 FIGURE 3.................................................................................................................................................................................................. 21 FIGURE 3................................................................................ 70 FIGURE 8...............................1: INFRASTRUCTURE NETWORK.. 26 FIGURE 3................ 15 FIGURE 3..................4: CERTIFICATION PROCESS..............4: AVERAGE END-TO-END DELAY OF DATA PACKETS .................7: ROUTE DISCOVERY 3........................... 26 FIGURE 3............ 25 FIGURE 3................................List of Figures FIGURE 1..................................................11: ROUTE SETUP 4 .....................................................................3: WORMHOLE ATTACK ........................5: SENDING DATA ACKNOWLEDGEMENT FOR EACH RECEIVED DATA PACKET ........................................1: A MANET ENVIRONMENT .........5: PACKETS REACHED .............................. 50 FIGURE 8..1: AD-HOC ROUTING PROTOCOLS LIST................................................. 22 FIGURE 3............... 68 FIGURE 8...................................2: BROADCASTING RDP .............................................. 23 FIGURE 3.......................... 49 FIGURE 5............9: ROUTE SETUP 2 ..................................... 33 FIGURE 4........12: ROUTE MAINTENANCE ............................................................................................................ 73 xi ..................

..............List of Tables TABLE 2................................ 73 xii ...............................................................1: ATTACK TREE: SAVE OWN RESOURCES..........2: OVERHEAD PERCENTAGE DIFFERENCE .......................................... 11 TABLE 3..... 44 TABLE 5............................................................. 19 TABLE 3......................................................... 69 TABLE 8..................................1: EFFECT OF DIFFERENT PERCENTAGES OF SELFISH NODES ON NETWORK THROUGHPUT ..................5: PACKETS REACHED VALUES........3: AVERAGE ROUTE ACQUISITION DELAY VALUES ..... 70 TABLE 8................................4: AVERAGE END-TO-END DELAY OF DATA PACKETS VALUES .......... 48 TABLE 7............................2: ARAN SECURITY ANALYSIS [15]..........................................................................1: PROACTIVE VERSUS REACTIVE PROTOCOLS .........1: SECURE AD HOC ROUTING PROTOCOLS COMPARISON .............. 66 TABLE 8................................... 29 TABLE 5.......................................................................2: REPUTED-ARAN DEFAULT PARAMETERS .....................1: GENERAL SIMULATION PARAMETERS ................................................................................................... 64 TABLE 8........ 72 TABLE 8....................

When it goes out of range of one access point. Chapter One: Introduction 1. regardless of their geographic position. There are two distinct approaches for enabling wireless communications between mobile hosts. An example of this type of network is the cellular network infrastructure.1 shows a simple infrastructure network with three nodes. In this network. 1 . This has led to lower prices and higher data rates. Another issue is that networks based on a fixed infrastructure are limited to places where there exist such network infrastructures. it connects with a new access point within its range and starts communicating through it. The first approach is to use a fixed network infrastructure that provides wireless access points. a mobile host communicates with the network through an access point within its communication radius. which tries to handle the situation when a connection should be smoothly handed over from one access point to another access point without noticeable delay or packet loss. which are the two main reasons why mobile computing is expected to see increasingly widespread use and applications.1. Figure 1. A major problem of this approach is handoff.1 Wireless Networking Introduction Wireless networking is an emerging technology that allows users to access information and services electronically. The use of wireless communication between mobile users has become increasingly popular due to recent performance advancements in computer and wireless technologies.

2: Ad Hoc Network 2 .Figure 1. Figure 1. Laptops and personal digital assistants (PDAs) that communicate directly with each other are examples of nodes in an ad hoc network.2 shows a simple ad hoc network with three nodes. Nodes in the ad-hoc network are often mobile. Figure 1. Each of the nodes has a wireless interface and communicates with others over either radio or infrared channels.1: Infrastructure Network The second approach which is the focus of this thesis research is to form a wireless ad hoc network among users wanting to communicate with each other with no preestablished infrastructure. but can also consist of stationary nodes.

3 Mobile Ad Hoc Networks’ Usages Wireless ad-hoc networks can be deployed in areas where a wired network infrastructure may be undesirable due to reasons such as cost or convenience. So there is a plethora of applications for wireless ad-hoc networks.2 Overview of Mobile Ad Hoc Networks A Mobile Ad Hoc Network (MANET) consists of a set of mobile hosts that carry out basic networking functions like packet forwarding. the technology was initially developed keeping in mind the military applications. short-term needs. This ensures that the network will not cease functioning just because one of the mobile nodes moves out of the range of the others. Because of the limited transmitter range of the nodes. Nodes should be able to enter and leave the network as they wish. due to the limited range of each mobile host’s wireless transmissions. It can be rapidly deployed to support emergency requirements. such as battlefield in an unknown territory where an infrastructured 3 . routing. An ad hoc network uses no centralized administration. Not to mention. and service discovery without the help of an established infrastructure. This topological instability requires a routing protocol to run on each node to create and maintain routes among the nodes [1]. Thus. any day-to-day application such as electronic email and file transfer can be considered to be easily deployable within an ad hoc network environment. As a matter of fact.1. 1. join or leave the network. every node acts both as a host and as a router. and coverage in undeveloped areas. The topology of ad hoc networks varies with time as nodes move. multiple hops are generally needed to reach other nodes. Nodes of an ad hoc network rely on one another in forwarding a packet to its destination. Every node in an ad hoc network must be willing to forward packets for other nodes. Also. we need not emphasize the wide range of military applications possible with ad hoc networks.

4 Mobile Ad Hoc Networks’ Characteristics and Challenges MANETs have several significant characteristics and challenges. and so on. They are as follows: • Dynamic topologies: Nodes are free to move arbitrarily. it is often the case where people do need to have outside meetings to cooperate and exchange information on a given project. and may consist of both bidirectional and unidirectional links. In such situations. After all. In these scenarios. belt. As a result. localized network where nodes are usually associated with a given person. the need for collaborative computing might be more important outside office environments than inside.network is almost impossible to have or maintain.range. Thus. the ad hoc networks having self-organizing capability can be effectively used where other technologies either fail or cannot be deployed effectively. 1. as a result of natural disasters where the entire communications infrastructure is in disorder. some well-known ad hoc network applications are: • Collaborative Work: for some business environments. These nodes could be attached to someone’s pulse watch. • Crisis-management Applications: these arise. for example. By using ad hoc networks. Restoring communications quickly is essential. 4 . a communication channel could be set up in hours instead of days/weeks required for wire-line communications. the network topology may change randomly and rapidly at unpredictable times. mobility is only a major consideration when interaction among several PANs is necessary [2]. • Personal Area Networking and Bluetooth: a personal area network (PAN) is a short.

after accounting for the effects of multiple access. Existing secure routing protocols were studied such as ARAN [35]. Then more interest in secure routing protocols and their different mechanism in defending against the malicious. In addition. noise. the realized throughput of wireless communications. I started researching by reading about the different research directions in this huge field and analyzed the different existing routing protocols and their various types [10] and [41]. I ended up interested in the AODV protocol [36] and studied its source code. variable capacity links: Wireless links will continue to have significantly lower capacity than their hardwired counterparts. semi-static topology of the fixed Internet. The increased possibility of eavesdropping. is often much less than a radio's maximum transmission rate. power awareness. spoofing. So. fading. compromised and selfish nodes in the mobile ad hoc network was developed. there are lot of problems to be tackled such as Quality of service. and interference conditions. the most important system design optimization criteria may be energy conservation. In this thesis. 1.• Bandwidth-constrained. • Energy-constrained operation: Some or all of the nodes in a MANET may rely on batteries or other exhaustible means for their energy. These characteristics and challenges create a set of underlying assumptions and performance concerns for protocol design which extend beyond those guiding the design of routing within the higher-speed. the main interest is in the security issues related to routing protocols in MANETs. For these nodes. routing optimization and security issues. • Security: Mobile wireless networks are generally more prone to physical security threats than fixed-cable nets.5 Problem Definition In the field of mobile ad hoc networks routing protocols. Ariadne 5 . selfish behavior and denial-of-service attacks should be carefully considered.

Then. punish and isolate selfish nodes. 6 . 1.6 The Scope of the Research The current existing Authenticated Routing for Ad Hoc Networks (ARAN) secure routing protocol is capable of defending itself against most malicious nodes and their different attacks. the decision to work with the ARAN protocol was taken after having read many papers about it. SRP [38] and others [37] [39]. the objective of my thesis is to make the Authenticated Routing for Ad Hoc Networks secure routing protocol capable of defending itself against authenticated selfish nodes participating in the mobile ad hoc network. Therefore. by doing more research in the field of MANETs. This is that all of these secure routing protocols do not account for selfish nodes whether by detecting or isolating them from the network. one major flaw in any of the existing secure routing protocols was discovered. The ARAN protocol was observed to defend almost against all security attacks in MANETs. However. This work is done by integrating a reputation-based scheme. However. getting in contact with its author and doing some comparisons and analysis with other secure routing protocols. SAODV [40]. to currently existing ARAN protocol and then measuring the effectiveness of that integration. The resulting new protocol is called Reputed-ARAN. to detect. ARAN is not capable of defending itself against any authenticated selfish node participating in the network.[34]. So I decided to read about the different types of cooperation enforcement schemes in mobile ad hoc networks and then to design and integrate a reputation-based scheme with the ARAN routing protocol to end up with Reputed-ARAN that is capable of defending itself against both malicious and authenticated selfish nodes.

As for chapter 4. Then. Reputed-ARAN. in chapter 9.1. Chapter 7 then presents the used simulation environment. Chapter 5 will present the newly proposed and designed reputation-based scheme. Chapter 3 addresses security issues in MANET routing protocols and presents the ARAN routing protocol that will be modified. its different techniques.7 Organization of the Thesis The thesis is organized as follows: The subsequent chapter introduces the subject of routing. Last but not least. 7 . Later on in chapter 8. the simulation results showing that the network throughput of the newly proposed Reputed-ARAN is higher than normal ARAN in the presence of different percentages of selfish nodes are presented. in chapter 6. existing routing protocols and their categories. the different simulation parameters that are set and a definition of the various metrics that are measured in the simulations is given. an extensive account of the existing cooperation enforcement schemes and their different types. a discussion about the different simulation environments and choice of one of them is presented. and a comparison of the best design methodologies of reputation systems are given. a conclusion about the proposed work is drawn and future work that can be added to the proposed thesis work in particular and to the field of mobile ad hoc networks in general is mentioned.

These nodes then conduct a comparison between their own routing table and the received one. except the one it received it from. in term do the same and so on.2 Flooding With this technique every packet is sent to every node in the network and is broadcasted by the receiving nodes exactly once [5]. To avoid retransmitting the same packet twice every packet is tagged with a source address and a sequence number which serve as 8 . [4] is based on that every node maintains a forwarding table with the best route to every node in a network. neighboring nodes.1 Distance vector The distance vector technique [3]. Each node receiving the packet broadcasts it to every neighboring node. If the distance between any nodes in the received table is smaller compared to the one at hand. 2.2. Chapter Two: Routing Protocols’ Overview 2. the node updates the forwarding table regardless of if the value is bigger than the existing one. These. This procedure is continuous so that each and every node has an updated forwarding table with the shortest path to all nodes in the network. flooding and source routing. 2. it is a good idea to take a look at conventional routing algorithms such as distance vector. the node updates the routing table with the new value. link state. This is because many of the routing protocols for a MANET have roots in traditional routing concept as underlying algorithm.1.1 Traditional Routing Protocols Overview To understand routing principles in a MANET.1. In a certain time interval the information is sent to every neighboring node in the network. If the value that is in the forwarding table is from the node that now is sending a new value.

What differentiates them is how the table is updated. With these identifiers each node keeps track of which packets they have transmitted. From this map every node can use a shortest path algorithm to decide which way is the shortest to each destination and hence know what the next hop should be in the forwarding table. All nodes receive the message and update their maps accordingly. easier to detect errors and consume less bandwidth. On the other hand it results in an extremely high delivery ratio. When there is a change in the network. If this method is compared with the method used in distance vector.2 Routing in a MANET It has become clear that routing in a MANET is fundamentally different from traditional routing found on infrastructured networks. selection of routers. This is because link state routing uses eventtriggered updates instead of periodic updates as in distance vector. it makes link state routing more reliable. a message is sent throughout the network to announce the change. 2. The message is called a link state advertisement (LSA) and is passed through the network by flooding. initiation of request and specific underlying characteristic that could serve as a heuristic in finding the path quickly and 9 . This approach has a very high consumption of network resources since every packet is sent to every possible node to ensure that the packet arrives to its destination. [6] works almost like distance vector when it comes to the usage of a forwarding table. 2.3 Link state routing Link state routing [5]. Link state generates its table so that every node keeps a map over the nodes in the network.1.a unique identifier. Routing in a MANET depends on many factors including topology. for example a node connects or disconnects.

2. In the reactive routing protocol.efficiently. 2. When a route is found.1 Proactive and Reactive Routing Protocols Ad hoc routing protocols can be broadly classified as being Proactive (or tabledriven) or Reactive (on-demand). Furthermore. a connection between two nodes is only created when it is asked for by a source. it is kept by a route maintenance procedure until the destination no longer exists or is needed [9]. the network topology can change quite often in an ad hoc network. The low resource availability in these networks demands efficient utilization and hence the motivation for optimal routing in ad hoc networks. Changes in the network topology are continually updated as they occur. The following tabular present a comparison between proactive and reactive routing protocols: 10 . One of the major challenges in designing a routing protocol [7] for ad hoc networks stems from the fact that. as the number of network nodes can be large. Also. a node needs to know at least the reachability information to its neighbors for determining a packet route and. finding route to the destinations also requires large and frequent exchange of routing control information among the nodes. High mobility nodes can impact route maintenance overhead of routing protocols in such a way that no bandwidth might remain leftover for the transmission of data packets [8]. thus motivating the study of protocols which aim at achieving routing stability. Thus. In a proactive routing protocol. the amount of update traffic can be quite high. on one hand. all the routes to each destination are kept in an up-to-date table. on the other hand. and it is even higher when high mobility nodes are present. the highly dynamic nature of these networks imposes severe restrictions on routing protocols specifically designed for them.

reactive and secure routing protocol was compiled. while some proposals using a hybrid approach have been suggested. a list of every proactive. The detailed list can be found in Appendix A. It is a fact that this list does not cover every routing protocol that exists as there are so many new and different variations of protocols being developed all the time.2 Ad Hoc Networks’ Routing Protocols list During the research. advantages.1: Proactive versus Reactive Protocols In brief. disadvantages in order to choose one for this thesis research. o Have higher latencies when it comes to route discovery. o Takes a lot of bandwidth. Enough time was spent for compiling this list and reading about the various protocols to get a clear picture about their functions. Disadvantages o Produces more control traffic. Table 2.1. 2. a conclusion can be drawn that no protocol is suited for all possible environments. o Produces network congestion. The list of protocols that was collected [10] is shown in figure 2. o More energy-efficient.2. 11 .Protocol Points(+/-) Advantages Proactive Reactive o A route can be selected immediately without delay. o Lower bandwidth is used for maintaining routing tables. o Effective route maintenance.

a discussion about existing routing protocols. reactive and secure MANET routing protocols was given. within this period of research. In the next chapter. all depending on their functionality. for more see appendix A. 12 . a list of existing proactive. Some of them were stand-alone protocols and other worked together with a routing protocol. That resulted in finding several different security protocols that solve different security threats. a discussion about the different security threats to MANETs will be given and one of the secure routing protocols will be delved into. a thorough look at security aspects was accomplished. Then.1: Ad-hoc routing protocols List In addition. the mobile ad hoc networks routing protocols’ two types and their advantages and disadvantages was presented.Figure 2.3 Summary In this chapter. These protocols were added to the presented list as well. 2.

external and internal attackers [12].1 illustrates the different attacks that can be made towards a network [13]. In fact. An external attacker can be in the form of an adversary who injects erroneous information into the network and cause the routing to stop functioning properly. Figure 3. Network operation can be easily jeopardized if security countermeasures are not embedded into basic network functions at the early stages of their design.3. network basic functions like packet forwarding. 3. which might feed other nodes with incorrect information.1 Introduction Security in MANET is an essential component for basic network functionalities like packet forwarding and routing. the security problems specific to a mobile ad hoc network can be traced back to this very difference. In mobile ad hoc networks. The internal attacker is a node that has been compromised. 13 . one has to find other ways to solve this because the nodes of a mobile ad hoc network can not be trusted in this way [11]. the different types of attacks in MANETs will be presented. routing and network management are performed by all nodes instead of dedicated ones. Chapter Three: Security Issues in MANETs and the ARAN protocol 3. Instead of using dedicated nodes for the execution of critical network functions. In the following section.2 Attacks targeting Routing Protocols There are basically two types of security threats to a routing protocol.

In active attacks. 3. selfish nodes can severely degrade network performances and eventually partition the network by simply not participating in the network operation [14].2. On the other side. the misbehaving node has to bear some energy costs in order to perform some harmful operation. it is mainly about lack of cooperation with the purpose of energy saving. Nodes that perform active attacks with the aim of damaging other nodes by causing network outage are considered to be malicious while nodes that perform passive attacks with the aim of saving battery life for their own communications are considered to be selfish.Figure 3. by fabricating false routing information and by impersonating other nodes.1: Different sorts of attacks [13] 3.2 Malicious and Selfish Nodes in MANETs Malicious nodes can disrupt the correct functioning of a routing protocol by modifying routing information. In passive attacks. 14 .1 Active and Passive Attacks Security exposures of ad hoc routing protocols are due to two different types of attacks: active and passive attacks.2.

moves closer to B and out of the range of A. to go through A. At this point a loop is formed and X is unreachable from the four nodes. deny communication to legitimate nodes (denial of service) and compromise the integrity of routing computations in general. M changes its MAC address to match A’s. A special case of integrity attacks is spoofing whereby a malicious node impersonates a legitimate node due to the lack of authentication in the current ad hoc routing protocols.2: Impersonation to create loops In the above figure. can form a routing loop so that none of the four nodes can reach the destination. It then sends an RREP to B that contains a hop count to X that is less than the one sent by C. 15 . Malicious nodes can easily perpetrate integrity attacks by simply altering protocol fields in order to subvert traffic. C then routes to X through B.In existing ad hoc routing protocols. and then sends to C an RREP with a hop count to X lower than what was advertised by E. M. a malicious attacker. A M B C E X M B C E X D A D A M B D C E X Figure 3. redirected to a different destination or to take a longer route to the destination increasing communication delays. To start the attack. As a result the attacker can cause network traffic to be dropped. for example zero. The main result of spoofing attacks is the misrepresentation of the network topology that possibly causes network loops or partitioning. X. M then changes its MAC address to match B’s. nodes are trusted in that they do not maliciously tamper with the content of protocol messages transferred among nodes. B therefore changes its route to the destination. moves closer to C and out of range of B.

Solid lines denote actual paths between nodes. and the dotted line denotes the path that M1 and M2 falsely claim is between them. This exploit allows a node to short-circuit the normal flow of routing messages creating a virtual vertex cut in the network that is controlled by the two colluding attackers. After route discovery. the thin line denotes the tunnel. M1 encapsulates the RDP and tunnels it to M2 through an existing data route. When M1 receives a RDP from S. Neither M1 nor M2 update the packet header to reflect that the RDP also traveled the path {A->B->C}. When M2 receives the encapsulated RDP. M1 and M2 are malicious nodes collaborating to misrepresent available path lengths by tunneling route request packets.3: Wormhole Attack In the above figure. it forwards the RDP on to D as if it had only traveled {S->M1->M2->D}. Fabrication attacks cannot be detected without strong authentication means and can cause severe problems ranging from denial of service to route subversion. it appears to the destination that there are two routes from S of unequal length: {S->A->B->C->D} and {S- 16 . A more subtle type of active attack is the creation of a tunnel (or wormhole) in the network between two colluding malicious nodes linked through a private connection bypassing the network. M1 Falsely tunneled path M2 Encap S A B Decap C D Figure 3.Lack of integrity and authentication in routing protocols can further be exploited through “fabrication” referring to the generation of bogus routing messages. in this case {M1->A->B->C>M2}. Let us say that node S wishes to form a route to D and initiates route discovery.

CPU cycles and bandwidth for its own communication can endanger the correct network operation by simply not participating in the routing protocol or by not forwarding packets and dropping them whether control or data packets. battery power. confidentiality.>M1->M2->D}. This type of attack is called the black-hole attack. This is especially important in a military scenario where strategic and tactical 17 . An attack can be in the form of a denial of service or an employed jamming to interfere with the communication. These requirements are: availability. The node itself can also be the problem to availability. S would falsely consider the path to D via M1 a better choice (in terms of path length) than the path to D via A. Other possible threats to the availability are if an attacker disrupts the routing protocol or some other high-level service and disconnects the network. • Confidentiality: provides secrecy to sensitive material being sent over the network. If M2 tunnels the RREP back to M1. A selfish node that wants to save battery life. Current Ad Hoc routing protocols do not address the selfishness problem and assumes that all nodes in the MANET will cooperate to provide the required network functionalities. This is if the node is selfish and will not provide its services for the benefit of other nodes in order to save its own resources like.3 Routing Protocols’ Security Requirements To solve the security issue in an ad hoc network and make it secure we have to look at a number of requirements that have to be achieved. 3. Another exposure of current ad hoc routing protocols is due to node selfishness that results in lack of cooperation among ad hoc nodes.2. • Availability: the network must at all times be available to send and receive messages despite if it is under attack. authentication and non-repudiation [12]. integrity.

A knows that it is B who is receiving the message. The sender can not deny having sent the message and are therefore responsible for its contents. • Authentication: ensures the identity of the nodes in the network. In the coming section. it is possible for an outsider to masquerade a node and then be able to send and receive messages without anybody noticing it. It is particularly useful for detection of compromised nodes.3 Secure Ad Hoc Routing Protocols Throughout the exhaustive research and readings in the field of mobile ad hoc networks and the many security challenges and issues related to their routing protocols. many different approaches have been made which focus on different parts of the problems. Also B knows that it is A who is sending the message. If this information would fall into enemy hands it could have devastating ramifications. If the authentication is not working. • Integrity: ensures that messages being sent over the network are not corrupted. a comparison of some of the existing secure mobile ad hoc routing protocols with respect to most of the fundamental performance parameters will be given. If A is sending to B. As a result of this diversity.information is sent. • Non-repudiation: makes it possible for a receiving node to identify another node as the origin of a message. Also different applications will have different security requirements to take into consideration. Possible attacks that would compromise the integrity are malicious attacks on the network or benign failures in the form of radio signal failures. 18 . However. thus gaining access to sensitive information. 3. analysis of various secure routing protocols proposed in the literature has been performed. because there are so many threats to protect from [49]. there can not be a general solution to them all.

which is based on some type of query-reply dialog. In the following section. it will be shown how this ARAN protocol was built based upon the early above mentioned security requirements in its design and implementation. it invokes a function to find a route to the 19 .As a result. which is Authenticated routing for ad hoc networks (ARAN) is analyzed. 3.1 Introduction In this section. but rather when there is a need. one of the secure mobile ad hoc networks protocols. a comparison between some of the most–established secure routing protocols with respect to some performance and security parameters is given so that to facilitate the choice of one of them to work on: Protocol ARAN [35] ARIADNE [34] SAODV[40] SEAD [37] SRP [38] Performance Parameters Type Reactive Encryption Asymmetric Algorithm MANET Protocol AODV/DSR Synchronization No Central Trust Certificate Authority Authority (CA) Required Authentication Yes Confidentiality Yes Integrity Yes Non-Repudiation Yes Anti-Spoofing Yes DoS Attacks No Reactive Symmetric DSR Yes Key Distribution Center (KDC) Required Yes No Yes No Yes Yes Reactive Proactive Reactive Asymmetric Symmetric Symmetric AODV No CA Required Yes No Yes Yes Yes No DSDV Yes CA Required Yes No No No No Yes DSR/ZRP No CA Required Yes No Yes No Yes Yes Table 3.4 Authenticated Routing for Ad Hoc Networks Protocol (ARAN) 3. in the following table. I ended up choosing to work with Authenticated Routing for Ad Hoc Networks Protocol (ARAN) as the selected secure routing protocol. That means ARAN does not attempt to continuously maintain the up-to-date topology of the network.4.1: Secure Ad Hoc Routing Protocols Comparison As a result of this comparison. Such protocol is classified as a secure reactive routing protocol.

Shields and Belding-Royer [35] uses cryptographic certificates to prevent and detect most of the security attacks that most of the ad hoc routing protocols face.4. whose public key is known to all valid nodes. message integrity and non-repudiation as part of a minimal security policy for the ad hoc environment. each node must request a certificate from T.4. This protocol introduces authentication. Thus.destination. 3. Levine. the routing messages are authenticated end-to-end and only authorized nodes participate at each hop between source and destination.t. the details of the different phases of the ARAN secure routing protocol are presented. ARAN consists of a preliminary certification process followed by a route instantiation process that guarantees end-to-end authentication. Laflamme. Keys are pre-generated and exchanged through an existing out of band relationship between T and each node.e]KT- 20 .2. Before joining the ad hoc network. Each node receives exactly one certificate after securely authenticating their identity to T.1 Certification Process ARAN requires the uses of a trusted certificate server T. So a node A receives a certificate from T as follows: T ->A:certA = [IPA. appendix B presents documentation for all the functions of ARAN secure mobile ad hoc network routing protocol. Furthermore.2 Authenticated Routing for Ad Hoc Networks The ARAN secure routing protocol proposed by Sanzgiri. In the following subsections.KA+. 3. Dahill.

begins route instantiation to destination D by broadcasting to its neighbors a route discovery packet (RDP): A->brdcast:[RDP.2. A.4. a timestamp t of when the certificate was created (t) and a time (e) at which the certificate expires. Nodes use these certificates to authenticate themselves to other nodes during routing messages exchange [11]. The source trusts the destination to select the return path. The source node. the public key of A (KA+). 3.IPD.certA 21 .NA]KA-. These variables are concatenated and signed by T (KT-).Public Key A IP Address A Create Time Expiry Time Signature by T Certificate A A Certificate B B Certificate C C Certificate D D Trusted certificate server T Figure 3.4: Certification Process The certificate contains the IP address of A.2 Authenticated Route Discovery The goal of end-to-end authentication is for the source to verify that the intended destination was reached.

since nodes do not forward messages with already-seen tuples. A’s certificate (certA) and all signed by A’s private key (KA-). upon receiving a reply message. When a node receives an RDP message. it is ready. to validate the signature and verify that A’s certificate has not expired. 22 . The signature prevents spoofing attacks that may alter the route or form loops. Each time A performs route discovery. And it also checks the {NA. the receiving nodes uses A’s public key. This nonce variable is large enough so that not to need to be recycled throughout the lifetime of the network. Furthermore.IP Address D Certificate A Nonce A Create Time Signature by A Initial RDP packet RDP: A -> D A B C D Figure 3. appends its own certificate and broadcasts the message to each of its neighbors. which it extracts from A’s certificate. the IP address of the destination D (IPD). The purpose of the nonce is to uniquely identify an RDP coming from a source. it setups up a reverse path back to the source by recording the neighbor from which it received the RDP. Then the receiving node signs the content of the message. to forward back to the source. a nonce (NA). IPA} tuple to verify that it has not already processed this RDP.5: Route Discovery 1 The RDP includes a packet type identifier (“RDP”). Therefore. it monotonically increases the nonce.

records B as its predecessor. certB Intermediate RDP Packet RDP: A -> D Signature by B Certificate B RDP: A -> D B C D verified A Figure 3. certC 23 .certA. signs the contents of the messages originally broadcast by A and appends its own certificate.Let B be a neighbor that has received from A the RDP broadcast. B’s neighbor C validates the signatures for both A.KB-.IPX.6: Route Discovery 2 Upon receiving the RDP.certA. C then rebroadcast the RDP: C->brdcast:[[RDP.NA]KA-]. which it subsequently rebroadcasts: B->brdcast:[[RDP. C then removes B’s certificate and signature. the RDP initiator.NA]KA-]KC-.IPD. using the certificates in the RDP. the neighbor it received the RDP from. and B.

3.3 Authenticated Route Setup Afterwards. So by receiving the RDP. Let the first node that receives the RREP sent by D to be node C: D->C:[RREP.certD 24 . the message is received by the destination.2. There is no guarantee that the first RDP received traveled along the shortest path from the source. the destination unicasts a Route Reply (RREP) packet back along the reverse path to the source.IPA. D.7: Route Discovery 3 Each intermediate node in the path repeats the same steps as C [15].RDP: A -> D Signature by C Certificate C verified A B verified C RDP: A -> D D Figure 3.4.NA]KD-. Because RDPs do not contain a hop count or specific recorded source route and since messages are signed at each hop. who replies to the first RDP that it receives for a source and a given nonce. malicious nodes have no opportunity to redirect the traffic.

IPA.NA]KD-]KC-. the nonce sent by A. KD-. the D’s certificate and all signed by D’s private key.certC Intermediate RREP Packet RREP: A -> D Signature by C Certificate C RREP: A->D verified A B verified C verified verified D Figure 3.9: Route Setup 2 25 . Nodes that receive the RREP forward the packet back to the predecessor from which they received the original RDP. Each node along the reverse path back to the source signs the RREP and appends its own certificate before forwarding the RREP to the next hop. Now let C’s next hop to the source be node B: C->B:[[RREP.8: Route Setup 1 The route reply includes a packet type identifier (“RREP”).IP Address A Certificate D Nonce A Create Time Signature by D Initial RREP packet RREP: A->D verified A B verified C verified D *Replies to first RDP packet* Figure 3.certD. the IP address of A.

when the source receives the RREP.certD.10: Route Setup 3 Each node checks the nonce and signature of the previous hop as the RREP is returned to the source. verified verified verified A verified B verified C verified D Figure 3. and then signs the contents of the message and appends its own certificate before unicasting the RREP to A: B->A:[[RREP. Finally.IPA. it verifies the destination’s signature and the nonce returned by the destination [15]. This avoids the attacks where malicious nodes instantiate routes by impersonation and replay D’s message.certB RREP: A -> D Signature by B Certificate B RREP: A->D verified verified verified A B verified C verified D ` Figure 3.NA]KD-]KB-.B validates C’s signature on the received message. removes the signature and certificate.11: Route Setup 4 26 .

Moreover.4. So a node that transmits a large number of RERR messages.3. Data received on an inactive route causes nodes to generate a Route Error (RERR) message.2.4. all RERR messages are signed.12: Route Maintenance On the other hand. sends a broadcast message to the ad hoc network announcing the revoked node. T. IP Address A IP Address D Certificate C Nonce C Create Time Signature by C RERR: A->D B A C Link broken! D Figure 3. nodes use RERR messages to report links in active routes that are broken due to node movement. Of course. whether the RERR messages are valid or fabricated should be avoided [11]. the trusted certificate server.2. it is extremely difficult to detect when RERR messages are fabricated for links that are truly active and not broken. Also. And any node receiving this message rebroadcasts it to its neighbors. revocation-notices need to be stored until the revoked certificate expire normally [11]. 27 . the route is simply deactivated in the routing table.5 Key Revocation In the event that a certificate needs to be revoked. That is why having messages signed prevents impersonation and enables non-repudiation. 3.4 Route Maintenance When no traffic has occurred on an existing route for that route’s lifetime.

Similarly. ensuring that only the destination can respond to route discovery. 28 . This prevents impersonation attacks where either the source or destination node is spoofed. ARAN ensures non-repudiation and prevents spoofing and unauthorized participation in routing. Since both packet types are signed by the initiating node. the authorization mechanisms employed by the trusted authority. • Spoofed Route Signaling: Route discovery packets contain the certificate of the source node and are signed with the source's private key. the strength of the issued certificates.1 Malicious attacks defended by ARAN In this section.3. • Fabricated Routing Messages: Since all routing messages must include the sending node's certificate and signature. reply packets include the destination node's certificate and signature. and the revocation mechanism. any alterations in transit would be detected. modification attacks are prevented in ARAN.5 ARAN Security Analysis 3. an analysis of the robustness of the Authenticated Routing for Ad Hoc Networks in the presence of the different attacks introduced in earlier sections is given [15]: • Unauthorized participation: Since all ARAN packets must be signed. and the altered packet would be subsequently discarded. • Alteration of Routing Messages: ARAN specifies that all fields of RDP and RREP packets remain unchanged between source and destination. Thus. a node can not participate in routing without authorization from the trusted certificate server. This access control therefore rests in the security of the trusted authority.5.

In the certificate-less case. if an authenticated selfish node does not forward or intentionally drop 29 .2 ARAN and Selfish node weakness It is clear from the above mentioned security analysis of the ARAN protocol that ARAN is a secure MANET routing protocol providing authentication. confidentiality and non-repudiation by using certificates infrastructure. However.• Denial-of-Service Attacks: Denial-of-service (DoS) attacks can be conducted by nodes with or without valid ARAN certificates. nodes with valid certificates can conduct effective DoS attacks by sending many unnecessary route requests and they will go undetected as the current existing ARAN protocol can not differentiate between legitimate and malicious RREQs coming from authenticated nodes.2: ARAN Security Analysis [15] 3. fabrication.5. This results in that ARAN fails to detect and defend against an authenticated selfish node participating in the mobile ad hoc network. erratic behavior can come from a malicious node. The currently existing ARAN secure routing protocol does not account for attacks that are conducted by authenticated selfish nodes as these nodes trust each other to cooperate in providing network functionalities. Thus. DoS and disclosure attacks. As a consequence. ARAN is capable of defending itself against spoofing. message integrity. • The below table gives a summary of the different attacks that ARAN defends against: Table 3. which will be defended against successfully by existing ARAN protocol. all possible attacks are limited to the attacker's immediate neighbors because unsigned route requests are dropped. modification. However. and can also come from an authenticated node.

In chapter 5. a solution is proposed to account for this type of attack.control or data packets. a comparison among some of the existing secure mobile ad hoc routing protocols was given. Also. it was proven that the currently existing specification of the ARAN secure routing MANET protocol does not defend against attacks performed by authenticated selfish nodes. 3. As one of the secure routing protocols built following the fundamental secure routing protocols design methodology. the Authenticated Routing for Ad Hoc Networks protocol (ARAN) was presented. Then. This weakness in ARAN specification will result in the disturbance of the ad hoc network and the waste of the network bandwidth. modification and disclosure ones was given. the current specification of ARAN routing protocol can not detect or defend against such authenticated selfish nodes. Afterwards. the fundamental requirements for designing a secure routing protocol to defend against security breaches were mentioned. the different types of attacks targeting MANET routing protocols were explored and a discussion of the difference between malicious and selfish nodes and their associated attacks was presented. a discussion about how ARAN defends against most of the attacks that are conducted by malicious nodes such as spoofing. Last but not least.6 Summary In this chapter. fabrication. 30 .

no packet can be forwarded. Reputation-based schemes. virtual currency-based schemes use some form of incentive to enforce nodes’ cooperation. Chapter Four: Cooperation Enforcement Schemes 4.1 Introduction Current routing protocols and the majority of secure routing protocols for mobile ad hoc networks are based on the assumption that all nodes will cooperate. If a node does not have any incentives. Nodes get the incentives upon serving the network and use these to gain service from the network.4. let alone any network applications. it will not get any service from the network. cooperative behavior such as forwarding other node’s messages cannot be taken for granted. the different methods of enforcing cooperation between nodes in mobile ad hoc networks will be discussed. On the other hand. 4. no route can be established. Without node cooperation. In this chapter. reputation schemes use the nodes’ reputation to mitigate selfish behavior. The description of both schemes’ types and some examples of each will be presented in the following sections.2 Cooperation Schemes Schemes [46] and [47] that stimulate cooperation and mitigate the damaging effect of uncooperative nodes in mobile ad hoc network can be classified as: • • Virtual Currency-based schemes. However. 31 . On one hand. Nodes maintain the reputation of other nodes based on direct observation or indirect observation by the exchange of reputation messages with other nodes.

tamper-proof hardware security module is required at each node to prevent the node from illegitimately 32 . Each intermediate node takes some nuglets for the forwarding service.3.3 Virtual Currency-based Schemes Since forwarding a message will deserve a cost of energy and other resources to a node. in which the destination is charged. In the packet purse model. A node receives a virtual payment for forwarding the message of another node and this payment is deducted from the sender (or the destination node). when sending the packet. Two models were presented for using the nuglets: packet purse model. an uncooperative node will need an incentive in order to forward messages of other nodes. In this way. Each intermediary node buys the packet from the previous node for some nuglets and sells it to the next node for more nuglets. To implement either the packet purse model or the packet trade model. Nuglets and Sprite schemes are considered two examples of such a virtual currency-based scheme which are discussed below [16]. 4. the source loads it with a number of nuglets sufficient to reach the destination. packets are traded for nuglets by intermediate nodes. In the packet trade model. in which the source of the packet is charged and packet trade mode.4.1 Nuglets Buttyan and Hubaux introduced a virtual currency called nuglets and presented a mechanism of charging/rewarding service usage/provision to stimulate cooperation in self-organized mobile ad hoc network [17]. every intermediate node gains nuglets for forwarding and the total cost of forwarding the packet is paid by the destination node. Virtual currency-based schemes use credit or micro payments to compensate for the service of a node.

the node keeps a receipt of the message and later reports it to the CCS when the node has a fast connection with the CCS. the sender is charged for every packet it sends. So. this scheme helps to prevent a denial-of-service attack to the destination by sending it a large amount of traffic as the sender will be very conservative in its usage.2 Sprite Sprite [18] is a simple cheat-proof.1: The Architecture of Sprite [18] 33 . Credit Clearance System Internet Wide-area wireless network Figure 4. The basic idea of this scheme is that a Credit Clearance Service (CCS) is introduced to determine the charge and credit to each node involved in the transmission of a message. Payments and charges are determined from a game theory perspective. It uses credit to provide incentives for mobile nodes to cooperate and report actions honestly. A node that has tried to forward a message is compensated. but the credit that a node receives depends on whether or not its forwarding action is successful.3. Below is an architectural figure of the Sprite System.increasing its own nuglets and to ensure that the correct amount of nuglets is deducted or credited at each node. When a node receives a message. In this scheme. credit-based system for mobile ad hoc networks. 4. Forwarding is considered successful if and only if the next node on the path reports a valid receipt to the CCS [18].

these approaches suffer from the location privilege problem. it works as an extension to the Dynamic Source Routing (DSR) on demand routing protocol [33]. Usually. Nodes rely on passive observation of all 34 . Confidant stands for Cooperation of Nodes: Fairness In Dynamic Ad-hoc Network. Confidant aims at detecting and isolating uncooperative nodes so that to make it unattractive for nodes to deny cooperation. 4. or require a central server to determine the charge and credit to each node involved in the transmission of a message. In the following subsections.4.1 Confidant Buchegger and Boudec presented a reputation-based protocol called Confidant for making misbehavior unattractive [20]. They rely on neighbor monitoring to mitigate selfishness and stimulate cooperation in mobile ad hoc network. However. Core and Ocean is given. 4. Nodes in different locations of the network will have different chances to earn virtual currency.3. the next subsection presents the reputation-based schemes upon which the proposed Reputed-ARAN design is built.4.3 Virtual Currency-based Schemes’ Shortcomings The basic problem with virtual currency schemes is they either depend on the use of tamper-proof hardware to monitor the increase or decrease of the virtual currency as Nuglets does. a discussion of the following reputation systems: Confidant. which may not be fair for all nodes. nodes at the periphery of the network will have less chance to be rewarded [19]. these two approaches may not be appropriate for truly mobile ad hoc network scenarios. In addition. Accordingly. as the case with Sprite.4 Reputation-based Schemes Reputation systems are applied to wireless mobile ad hoc network to address threats arising from uncooperative nodes.

It consists of the following components: • • An alarm table containing information about received alarms. • The monitor is the equivalent of a neighbor watch. a trust manager. Outgoing ALARM messages are generated by the node itself after having experienced. With Confidant. originated from either outside friends or other nodes. The source of any Incoming ALARM messages. which are administered in a friends list. A node can detect deviation by its neighbor on the source route by listening to the transmission of its neighbor. The rating is changed only when there is sufficient evidence of malicious behavior that is significant for a node and that has occurred a number 35 .packets within a one-hop neighborhood. ALARM messages containing the type and frequency of protocol violations are sent by the trust manager of a node to warn others of malicious nodes. • The trust manager makes decisions about providing or accepting route information. has to be checked for trustworthiness before triggering a reaction. observed. A trust table managing trust levels for nodes to determine the trustworthiness of an alarm. The monitor reports any suspicious events and any incoming ALARM messages to the trust manager. each node has the following four components: a monitor. where nodes locally monitor deviating behavior. These components interact with each other to provide and process protocol information. or received a report of malicious behavior. • A friends list containing all the friends that the node may sends alarms to. accepting a node as part of a route. a reputation system and a path manager. or taking part in a route originated by another node. • The reputation system in this protocol manages a table consisting of entries for nodes and their rating. The recipients of these ALARM messages are so-called friends.

deletion of paths containing malicious nodes. If the event is significant for the node. To avoid a centralized rating. the information is relayed to the path manager. Figure 4. If a certain threshold is exceeded. If the rating turns out to be intolerable. local rating lists and/or black-lists are maintained at each node and potentially exchanged with friends. which proceeds to delete all routes containing the misbehaving node from the path cache [21]. the information is given to the reputation system. Below is an architectural figure of the Confidant System. Each node monitors the behavior of its neighbors. action on receiving a request for a route from a malicious node and action on receiving request for a route containing a malicious node in the source route.of times exceeding a threshold to rule out coincidences. If a suspicious event is detected. it is checked whether the event has occurred more than a predefined threshold that is high enough to distinguish deliberate malicious behavior from simple coincidences such as collisions. the reputation system updates the rating of the node that caused the event.2: The Architecture of Confidant [20] 36 . • The path manager performs the following functions: path re-ranking according to reputation of the nodes in the path.

2 Core A mechanism called Core (COllaborative REputation mechanism). route discovery. where each function is given a weight as to its importance. network management and location management and is mainly an extension to the DSR on demand routing protocol. are gradually excluded from the community. In this mechanism. was proposed in [22] to enforce node cooperation in mobile ad hoc network. Functional reputation is related to a certain function. It is a generic mechanism that can be integrated with any network function like packet forwarding. data packet forwarding may be deemed to be more important than forwarding packets with route information. 37 . node X calculates the reputation of a neighbor node Y at a given time for a particular function.4. Members that have a good reputation can use the resources while members with a bad reputation. To eliminate an attack where a malicious node disseminates false negative reputation information. b. Subjective reputation is a reputation value which is locally calculated based on direct observation. Indirect reputation is second hand reputation information which is established by other nodes. Core stimulates node cooperation by using a collaborative monitoring technique and a reputation mechanism. reputation is a measure of someone’s contribution to network operations. For example. For example. only positive reputation information is distributed in Core. because they refused to cooperate.4. node X will accept the indirect reputation of node Y from node Z. so data packet forwarding will be given greater weight in the reputation calculations. For example. c. This reputation system defines three types of reputation [23]: a.

Each row of the table consists of four entries: the unique identifier of the entity. with every positive action resulting in an increment (+1) of the rating. • The reputation table is a data structure stored in each node. the node is added to a faulty list. Once the rating of a node falls below a certain faulty threshold (-40). When a node forwards a packet. Bansal et al. The faulty list represents a list of misbehaving nodes. a list of the recent indirect reputation values provided by other entities and the value of the reputation evaluated for a predefined function.4. Ocean avoids indirect (second hand) reputation information and uses only direct first hand observations of other nodes behavior. then it is considered as misbehaving [24]. 38 . the node’s watchdog verifies that the next node in the path also forwards the packet. In Ocean. A node makes routing decisions based solely on direct observations of its neighboring nodes interaction. the rating of each node is initialized to Neutral (0). In contrast to Confidant and Core. If the next node does not forward the packet. The watchdog does this by listening promiscuously to the next node’s transmissions. Core consists of two basic components: • The watchdog mechanism is used to detect misbehavior nodes.Each node computes a reputation value for every neighbor using a sophisticated reputation mechanism that differentiates between subjective reputation.3 Ocean S. indirect reputation and functional reputation. 4. a collection of recent subjective observations made on that entity’s behavior. proposed an Observation-based Cooperation Enforcement in Ad hoc Networks (Ocean) [25]. and every negative action resulting in a decrement (-2) of the rating.

is added to the DSR Route-Request Packet (RREQ) to avoid routes containing nodes in the faulty list. Ocean focuses on the robustness of packet forwarding: maintaining the overall packet throughput of mobile an ad hoc network with the existence of misbehaving nodes at the routing layer. called the avoid-list. which maintains ratings of the neighbor nodes. A timeout approach is used where a misbehaving node is removed from the faulty list after a fixed period of inactivity. NeighborWatch reports to the RouteRanker. Even though the node is removed from the faulty list. • Second Chance Mechanism allows nodes previously considered misbehaving to become useful again. • Rank-Based Routing uses the information from NeighborWatch to make the decision of selection of routes. • Malicious Traffic Rejection rejects traffic from nodes which is considered misbehaving. All traffic from a misbehaving node is rejected so that a node is not able to relay its own traffic under the guise of forwarding it on. • RouteRanker maintains a rating for each of its neighboring nodes. its rating is not increased so that it can quickly be added back to the faulty list if it continues the misbehavior. Routing decisions are made based solely on direct observations of neighboring nodes’ 39 .Ocean has five components reside in each node to detect and mitigate misbehavior: • NeighborWatch observes the behavior of the neighbors of a node. Whenever misbehavior is detected. The rating is initialized to Neutral and is incremented and decremented based on observed events from the NeighborWatch component. An additional field. Ocean’s approach is to disallow any second hand reputation exchanges. It works the same way as watchdog [24].

where nobody knows about its reputation and an initial reputation value should be given. In most reputation systems. The reaction to uncooperative behavior.behavior. The detection of misbehavior.4 Reputation Systems implementation Issues Although the reputation based schemes applied to mobile ad hoc networks may be different in implementation. A node with a good reputation means it behaves well and thus is 40 .1 The assignment of initial reputation values In this phase. we have to give each node in the MANET a reputation value according to its behavior.2 The calculation of reputation values In this phase. One method is by assigning a very low reputation value to a new node so that to force it to perform positive work to gain a good reputation. Confidant.4. reputation value is a metric for trust. But this method may not be feasible in an ad hoc network. This eliminates most trust management complexity. as the network will not know how a new node will behave. where instantaneous connection is required and nodes are more mobile. Core and Ocean systems [23]. they are all composed of essentially five different phases: • • • • • The assignment of initial reputation values. The calculation of reputation values. 4. Each reputation system has a learning period. Core and Ocean. A common way of assigning an initial reputation value for new nodes is to assign them null values like what is done in Confidant. when a new node enters the network or a node moves to a new location. The update of reputation values. It may take too much time for a new node to establish its reputation.4.4.4. Ocean reputation system is mainly an extension to the DSR on demand routing protocol 4.4. Last but not least. 4.

4.4.3 The update of reputation values In this phase. storing such information requires more storage at each node and of course the exchange of such reputation information throughout the network results in greatly increasing the volume of network traffic. by direct observation. every node deals with the received indirect reputation information based on its own judgment. the reputation value for the same node may vary. There are two ways for the calculation of this reputation value [21]: • The direct reputation system is derived from first hand experience. Thus. since each node maintains reputation values of every other node. every time a node receives indirect reputation information. every node may have different reputation information about other nodes since a node may behave differently when interacting with different nodes. 4. Since indirect reputation information may be from an untrustworthy node. usually its one-hop neighbor. either false accusation or false praise. while nodes with bad reputation are uncooperative and not trustworthy. as this reputation information may be either incompatible with node’s experience or the node does not trust the sender. most reputation systems using global reputation information. it has to decide whether to accept or not. suffer from false rating. That way. we have to decide whether to update the nodes’ reputation values using the global or the local reputation systems: • The global reputation system is achieved by the exchange of indirect reputation messages among the network nodes. Moreover. Also. 41 . Last but not least. Using this way. such as Confidant and Core. • The indirect reputation system is derived from second hand experience. A node gets such information about another node from other nodes. A node gets such information about another node.trustworthy. Sure this causes additional computation at each node.

4 The detection of misbehavior In this phase. 42 . For example. All of these mentioned issues make global reputation methods unreliable and complex reputation system [23].reputation information. • The local reputation system is based on direct first hand observations of one-hop neighbors. reputation systems such as Confidant. in terms of network throughput. replayed or accidentally lost during transmission. An example of such system is Ocean which uses only local reputation.4. For example. compared with global reputation. Ocean achieves a reasonable performance. Any second hand reputation exchanges are disallowed. Y forwards a packet to Z but do not report to X when Z drops the packet. and according to their simulation. Core and Ocean rely on promiscuous observation for monitoring function operations. as data packet.4. Thus. passive observation presents several weaknesses when used within mobile ad hoc network as it might not detect a misbehaving node in the presence of [24]: • Limited transmission power in which the signal is strong enough to be overheard by the previous node but too weak to be received by the true recipient. while being less complex and less vulnerable to false accusations [25]. could be modified. local reputation mechanism has low cost and is more reliable and more efficient. 4. However. nodes will need a reliable way of detecting good or bad behavior. • Collusion in which multiple nodes in conspiracy can mount a more sophisticated attack. • Partial dropping in which a node dropping packets at a lower rate than the configured minimum misbehavior threshold.

4.6 Summary In this chapter. so the main objective is to force the nodes to cooperate and benefit each other [19]. In addition. The description of the two used types of cooperation schemes. neighbors of the uncooperative node refuse to forward any packets originated from the convicted node. the virtual currency-based and the reputation-based. their shortcomings and implementation issues. an uncooperative node should be punished temporally and be given chance to behave normally again. 4. However.5 The reaction to uncooperative behavior In this phase once an uncooperative node has been identified. depriving the network services.4. some examples of each scheme and the different issues in each scheme’s design were studied. 43 . like what happens in the Ocean reputation system by using the Second Chance Mechanism. it is usually isolated from the network. Thus.5 The choice of cooperation enforcement Scheme After the above presentation and discussion of the virtual currency-based and reputation-based schemes. was given. a discussion of the different cooperation enforcement schemes used in mobile ad hoc networks was presented. 4. the design of the newly proposed Reputed-ARAN will follow the local direct reputation-based scheme.4. Finally. since the function of a mobile ad hoc network depends on the participation of all nodes.

Do not relay route requests 2.1: Attack Tree: Save own resources 44 . but not contribute to the services of the system [26]. Do not participate in routing 1.2 Problem Definition Whereas most of the attacks performed by malicious nodes can be detected and defended against by the use of the secure routing ARAN protocol. as was explained earlier. To illustrate these two possible attacks that a selfish node can use to save its resources in a MANET communication. 5. Drop data packets Table 5. In the below table. Do not relay data packets 1. There are two attacks that an authenticated selfish node can perform that the current ARAN protocol can not defend against. the attack-tree notation proposed by Bruce Schneier [27] that allows the categorization of attacks that lead an attacker to reach a specific goal is used. selfish nodes. are presented.1 Introduction Performance of Mobile Ad Hoc Networks is well known to suffer from free-riding. there remain the attacks that an authenticated selfish node can perform. the attack tree that can not be detected by current ARAN protocol is shown: Attack tree: Save own resources OR 1. Chapter Five: The Proposed Reputation-based Scheme: ReputedARAN 5. Do not relay routing data OR 1. the definition of selfish behavior and the newly designed reputation-based scheme. to be integrated with normal ARAN routing protocol ending up having Reputed-ARAN. Do not relay route replies 2.5. In the following sections. as there is a natural incentive for nodes to only consume.

Sometimes authenticated nodes are congested and they can not fulfill all control packets broadcasted in the MANET so they choose not to reply to other requests in order to do their own assigned load according to their battery. they expect their neighbors to relay packets meant for far off destinations. it will relay it and will not cheat. as they focus only on the detection of malicious nodes’ attacks and not the authenticated selfish nodes’ attacks. In the upcoming subsections.3. the current node sends the data packet to the next hop in the route as soon as possible.As shown in the above table.1 Introduction As nodes in mobile ad hoc networks have a limited transmission range. 5. a discussion of a simple reputation-based scheme to detect and defend against authenticated selfish nodes’ attacks in MANETs built upon the ARAN protocol is presented.1 attack.3 Proposed Reputation-based Scheme 5. when nodes simply drop packets (case 1. based on their past history of relaying packets. by considering the reputation value of the node asking others to forward its packets. all the security features of ARAN fail to detect or defend against these attacks. This assumption becomes invalid when the nodes in the network have tangential or contradictory goals. This scheme helps in encouraging the nodes to participate 45 . If the packet has originated from a low-reputed node.1 in the attack tree). These networks are based on the fundamental assumption that if a node promises to relay a packet. the packet is put back at the end of the queue of the current node and if the packet has originated from a high-reputed node. can be used by their neighbors to ensure that the packet will be relayed by the node. The reputations of the nodes. My scheme does take into consideration the case 1.1 and 2. performance and congestion status. ARAN protocol assumes that authenticated nodes are to cooperate and work together to provide the routing functionalities. do not forward control packets.

This is done by giving incentives to the participating nodes for their cooperation. Nodes should be able to punish other selfish nodes in the MANET by providing them with a bad reputation. The system should be built so that there is an injection of motivation to encourage cooperation among nodes. my scheme will account for the case 2.2 Design Requirements The following requirements are set while designing the reputation-based scheme to be integrated with the ARAN protocol: a. e. My work is partially following the same methodology that Prashant.1 attack in which authenticated nodes promise to route data packets by replying to control packets showing their interest in cooperation in forwarding these data packets but then they become selfish and start dropping the data packets. The collection and storage of nodes’ reputation values are done in a decentralized way. the proposed solution uses local direct reputations only like in Ocean reputation-based scheme. Each node keeps only the reputation values of all direct nodes it dealt with. The reputation information should be easy to use and the nodes should be able to ascertain the best available nodes for routing without requiring human intervention. c. d. discussed in chapter 4. 46 . b. 5. Moreover. Partha and Amiya used in their paper about reputation systems for AODV [42]. The proposed scheme is called Reputed-ARAN.and cooperate in the ad hoc network effectively. These reputation values are based on the node’s first hand experience with other nodes. Different from global indirect reputation-based schemes like Confidant and Core. The system should not have a low performance cost because low routing efficiency can drastically affect the efficiency of the applications running on the ad hoc network.3.

f. Also. all the nodes in the mobile ad hoc network will be assigned an initial value of null (0) as in the Ocean reputation-based scheme [25].3 Main Idea of the Reputation System In the proposed reputation scheme. The system must succeed in increasing the average throughput of the mobile ad hoc network or at least maintain it. get a recommendation of (-2). the source gives a recommendation of (-2) to the first hop on the route. So. The intermediate nodes also give a recommendation (-2) to their next hop in the route up to the node that dropped the packet. After that. the source does not receive any DACK for the data packet in appropriate time. As a consequence. If there is a selfish node in the route. the destination will unicast a RREP for each RDP packet it receives and forward this RREP on the reverse-path. the source node sends the data packet to the node with the highest reputation. including the selfish node. The idea of giving (-2) to selfish nodes per each data packet dropping is due to the fact that negative behavior should be given greater weight than positive behavior. Then the intermediate node forwards the data packet to the next hop with the highest reputation and the process is repeated till the packet reaches its destination. the data packet does not reach its destination. all the nodes between the selfish node and the sender. this way prevents a selfish node from dropping alternate packets in order to keep 47 . This process continues until the RREP reaches the sender. the functionality of the normal ARAN routing protocol in the authenticated route setup phase will be modified so that instead of the destination unicasts a RREP to the first received RDP packet of a specific sender only. The destination acknowledges the data packet (DACK) to the source that updates its reputation table by giving a recommendation of (+1) to the first hop of the reverse path. As a result. All the intermediate nodes in the route give a recommendation of (+1) to their respective next hop in the route and update their local reputation tables. In addition.3. 5. The next-hop node will relay this RREP.

Moreover.3. the default Reputed-ARAN parameters are listed: Initial Reputation Positive Recommendation Negative Recommendation Selfish drop Threshold Re-induction timeout 0 +1 -2 -40 5 minutes Table 5. Each intermediate node receiving this RREP updates its routing table for the next-hop of the route reply packet and then unicasts this 48 . nonce.3.its reputation constant. the selfish node will be isolated if its reputation reached a threshold of (-40) as in the Ocean reputation-based scheme [25]. In this phase. each intermediate node inserts a record of the source. the source node broadcasts a route discovery packet (RDP) for a route from node S to node D. In the following table. Each intermediate node interested in cooperating to route this control packet broadcasts it throughout the mobile ad hoc network. if a source node S has packets for the destination node D.1 Route Lookup Phase This phase mainly incorporates the authenticated route discovery and route setup phases of the normal ARAN secure routing protocol.2: Reputed-ARAN Default parameters The proposed protocol will be structured into the following four main phases [42]. This makes it more difficult for a selfish node to build up a good reputation to attack for a sustained period of time [23]. This process continues until this RDP packet reaches the destination. in addition. Then the destination unicasts a route reply packet (RREP) for each RDP packet it receives back using the reverse-path. which will be explained in the subsequent subsections: • • • • Route Lookup Phase Data Transfer Phase Reputation Phase Timeout Phase 5. destination and previous-hop of this packet in its routing records.

1: A MANET Environment RDP A RDP RDP C RDP S RDP RDP RDP RDP D B E Figure 5. the source node S chooses the highly-reputed next-hop node for its data transfer.3.2 Data Transfer Phase At this time.RREP in the reverse-path using the earlier-stored previous-hop node information. If two next-hop nodes have the same reputation. the 49 . So. Finally. the source node will start a timer before it should receive a data acknowledgement (DACK) from the destination for this data packet. In the below figures. A S C D B E Figure 5. stores its information in the sent-table as the path for its data transfer. This process repeats until the RREP packet reaches the source node S. Afterwards. S will choose one of them randomly. Also.3. the source node S and the other intermediate nodes have many RREPs for the same RDP packet sent earlier.2: Broadcasting RDP RREP A RREP C RREP RREP RREP S RREP RREP RREP D E B Figure 5.3: Replying to each RDP 5. the source node S inserts a record for the destination node D in its routing table for each received RREP. illustrating the two phases of it. the route lookup phase is presented in details. the authenticated route discovery phase and the authenticated route setup phase.

chosen next-hop node will again choose the highly-reputed next-hop node from its routing table and will store its information in its sent-table as the path of this data transfer. Also, this chosen node will start a timer, before which it should receive the DACK from the destination for this data packet. This process continues till the data packet reaches the destination node D. And of course in this phase, if the data packet has originated from a low-reputed node, the packet is put back at the end of the queue of the current node. If the packet has originated from a high-reputed node, the current node sends the data packet to the next highly-reputed hop in the route discovered in the previous phase as soon as possible. Once the packet reaches its destination, the destination node D sends a signed data acknowledgement packet to the source S. The DACK traverses the same route as the data packet, but in the reverse direction. In the following figures, the data transfer phase is illustrated:
Next Hop C E Reputation 20 -5

Data

A

Data

C

Data

Next Hop A B

Reputation 10 5

S

D B E

Figure 5.4: Choosing the highly-reputed next-hop node
DACK

A

DACK

C

DACK

S

D

E B Figure 5.5: Sending Data Acknowledgement for each received data packet

50

5.3.3.3 Reputation Phase

In this phase, when an intermediate node receives a data acknowledgement packet (DACK), it retrieves the record, inserted in the data transfer phase, corresponding to this data packet then it increments the reputation of the next hop node. In addition, it deletes this data packet entry from its sent-table. Once the DACK packet reaches node S, it deletes this entry from its sent-table and gives a recommendation of (+1) to the node that delivered the acknowledgement.
5.3.3.4 Timeout Phase

In this phase, once the timer for a given data packet expires at a node, the node retrieves the entry corresponding to this data transfer operation returned by the timer from its sent-table. Then, the node gives a negative recommendation (-2) to the next-hop node and deletes the entry from the sent-table. Later on, when the intermediate nodes’ timers up to the node that dropped the packet expire, they give a negative recommendation to their next hop node and delete the entry from their sent-table. As a consequence, all the nodes between the selfish node and the sender, including the selfish node, get a recommendation of (-2). Now, if the reputation of the next-hop node goes below the threshold (-40), the current node deactivates this node in its routing table and sends an error message RERR to the upstream nodes in the route. Then the original ARAN protocol handles it. Now, it is the responsibility of the sender to reinitiate the route discovery again. In addition, the node whose reputation value reached (-40) is now temporally weeded out of the MANET for five minutes and it later joins the network with a value of (0) so that to treat it as a newly joined node in the network.

51

5.4 Analysis of the proposed Reputed-ARAN
In this section, an analysis of the proposed reputation-based scheme is given by discussing different authenticated selfish nodes’ forms of attacks and presenting ways of counteracting them by the introduced reputation-based scheme. • An authenticated selfish node might make a false claim of knowing the route to a destination and generate a RREP for a destination for which it does not have a route. This attack can be foiled by the proposed reputation-based scheme routing. After receiving the data packet for the corresponding destination, this authenticated selfish node will have to drop the data packet. The sender and the intermediate nodes until this selfish node will give a negative recommendation to it. Thus, once the reputation of this selfish node falls below the threshold reputation, it will be considered as selfish and will eventually be temporary ostracized. • An authenticated selfish node might not reveal that it knows the route to the destination by not replying to or forwarding control packets so that to save its resources, such as energy and processing power; by doing this selfish behavior, it will not be able to inflict any damage to the network as it will not be able to drop the data packets routed via other paths. To face this type of selfish attack, the proposed scheme considers the reputation value of the node asking others to forward its packets. If the packet has originated from a low-reputed node, the packet is assigned lowermost priority and if the packet has originated from a highreputed node, the current node sends the data packet to the next hop in the route as soon as possible. Hence, these selfish nodes will see a considerable increase in network latency. So, the proposed scheme helps in encouraging the nodes to participate and cooperate in the ad hoc network effectively.

52

eventually this selfish node will be caught. In such a scenario. the target (node soliciting reputation of another node) will have to consider the credibility of the information source (node providing reputation of another node). This is due to that if the nodes exchange the reputations of other nodes. The downside of my scheme is that an authenticated selfish node can move around the network and selectively drop packets from different neighbors without getting caught for a long time. As the sender relays the packet only to highly reputed neighbors. However. the upstream neighbor of the node will give it a negative recommendation and the reputation of the node will be reduced. Since the nodes in an ad hoc network are semi-autonomous. The presented scheme can prevent such attack. it reduces the risk that its neighbors will intentionally drop the packet. • Authenticated selfish nodes might collude by giving positive recommendations to each other so that to increase their reputations. it is not incorporated in my scheme. The neighbors in turn forward the packets to nodes that have a high reputation with 53 . As a result. this will imply more work for the nodes at the routing layer and will also increase the volume of the network traffic [20].• An authenticated selfish node might promise to route data packets. the proposed reputation-based scheme motivates them to allocate their resources to other nodes in the network. • An authenticated selfish node might continuously drops data packets to decrease the throughput of the mobile ad hoc network. the node will be weeded out of the network for a period of time. but then it starts to drop all the data packets that it receives. The presented reputation-based scheme foils this attack. The proposed reputation-based scheme prevents this attack by having the nodes rely on their own experience rather than the experience of their peers. Eventually. Although the exchange of reputation information among the nodes will make the system more robust.

performance and congestion status. while the other nodes become totally free [26].5 Summary The field of ad hoc mobile networks is rapidly growing and changing. the number of packets intentionally dropped is reduced and the throughput of the system rises. As a result. This problem is prevented in the proposed scheme as when authenticated nodes are congested and they can not fulfill all control packets broadcasted in the MANET. they can choose not to reply to other nodes’ requests in order to do their own assigned load according to their battery. and while there are still many challenges that need to be met. appendix C. it is likely that such networks will see widespread use within the next few years. As a result. In this chapter. • An authenticated well-behaved node might become a bottleneck since in the presented reputation-based scheme the node with the highest reputation is selected as the next hop by its neighbor. a new reputation-based scheme to be integrated with one of the secure routing MANET protocols. 54 .them. An explanation of the different phases of this scheme and analysis of the various forms of selfish attacks that this scheme defends against are presented. Last but not least. ARAN. to make it detect and defend against selfish nodes and their misbehavior is presented. 5. the nodes with higher reputations will become overloaded. a whole appendix is dedicated for presenting the Reputed-ARAN pseudo code.

1. They are a leading provider of management software for networks and applications. QualNet and Glomosim is performed in order to determine the most suitable simulator to use [28]. OPNET provides a software platform called the OPNET Modeler. On their homepage [29] there are technical resources with a FAQ and product updates as well as a forum for OPNET users. application performance troubleshooting. application deployment planning.1 OPNET OPNET is a simulation tool that is developed by OPNET Technologies Inc [29].1 Introduction As there are several different simulation packages that can be used for MANET simulation. In the following subsections. technologies and applications. network configuration auditing. This software also contains a large number of different models for simulating network protocols. For simulating a MANET. To be able to participate in the forum and download the documents. OPNET have a number of solutions that aim to help the customer in different areas like. Although OPNET is rather intended for companies to diagnose and organize their networks. Chapter Six: Simulation Environments 6. one could use it to develop and implement ones own protocol or modify existing implementations of standard protocols. 6. There are a wireless model included that provides the two routing protocols DSR and TORA. The software tends to be well documented and there should not be any problems either with the installation or support. NS2. one has to acquire a license since 55 . network capacity and resiliency planning. a survey of the commonly used simulators: OPNET.6. each of these simulation packages will be presented.

3 QualNet QualNet [31] is developed by Scalable Network Technologies (SNT) and is a network simulation software. the software is very expensive and not easy to obtain for individuals. the CMU Monarch projects and Sun Microsystems. If one wants to simulate other protocols. free of charge. Unix and Windows. DSDV. Ariadne. On the negative part. Many wireless extensions have been contributed from the UCB Daedelus. The QualNet software consists of five tools plus integration modules and model libraries. MAODV. AODV+. In NS2. The source code can be downloaded. ODMRP. However. and compiled on different platforms. e. there are extensions that support ADMR. There is an extensive manual for the installation and use of the software in the NS2 homepage. the Information Sciences Institute at the USC School of engineering. 6. this animator can be used to display the 56 .1.g. SEAD and ZRP [30]. the documentation of these extensions is not always as extensive as one would like it to be and even the developers of NS do not always support them. DSR and TORA. it is possible to alter and write ones own code to make it more suitable for ones own scenarios.1. 6. SNT claims that one can use QualNet when one wants to design a network or if one wants to optimize a network device in order to save time and money.2 NS2 NS2 [30] stands for the Network Simulator 2 and is developed by ISI. AODV-UU. There are also many different extensions developed by varies researchers to this software. In addition.they are protected by passwords. The most recent version of NS2 supports AODV. QualNet Animator allows for graphically designing the network model using a wide library of components.

It is only possible to download the current version. one can get good help from the documentation. This version is extended in some areas. STAR. Fisheye. QualNet Designer is for streamline code development.1. GloMoSim stand for Global Mobile information systems Simulation library and supports protocols for a purely wireless network [32]. One can also make adjustments to already made protocol models. shadowing. if one would run into trouble while installing. At their homepage. It is developed at UCLA Parallel Computing Laboratory (UCLA PCL) and is intended for academic institutions for research purposes. fading.0 (December 2000). The QualNet model library is a large library of networking options and contains the MANET library. LAR. One can generate code for ones protocol from scratch and make special statistic reports. discussed earlier. ZRP and ODMRP. There are manuals as well as a FAQ and a forum [31]. In order to get Glomosim to work one has to install Parsec. mobility. one can find much documentation and help. which is a C-based simulation language developed by PCL at UCLA.simulation as it runs. There is good documentation of the installation procedure and it is very easy to install. 6. One can read more about it in the previous section. It includes models for providing wireless dynamic routing. If commercial users want to use Glomosim they have to obtain the commercial version called QualNet. QualNet Analyzer is a graphic tool that presents statistics of different experiments in graphs. OLSR. 57 . In any case. Glomosim 2. detailed physical layer effects such as steerable directional antennas and complex modulation schemes.4 Glomosim This simulator is probably the most commonly used software of the four. Routing protocols provided are DSR. from the Glomosim homepage if the user is within the edu domain.

The question also arises of what open source code that is publicly available.2 Choice of simulator None of the four simulation packages currently include any of the secure routing protocols’ source code. Fisheye. First. the reasons behind the decision of using the Glomosim simulation package in the experimental work are given. 6. which lies in my interest. performing a simulation in NS2 is very complicated and requires more effort and work. Even after installing it. QualNet and OPNET are well-developed commercial software products and should be easier to use than the other simulation packages. the question of which routing protocol to be simulated and which simulations to be conducted are of great importance. it is possible. 58 . Glomosim’s documentation is very good and it is easy to get support from the many researchers using it. This is an important factor since there is no enough time to implement the ARAN routing protocol from the beginning. which was done. if I want to simulate ARAN. But to do so. when choosing a simulation package. These are AODV. Furthermore. one should have some familiarity with Parsec. I have to implement it on my own. Last but not least. ODMRP and WRP. However. In addition. many papers related to my field of research have used and recommended using glomosim to simulate MANET protocols. Therefore. Second. the newly-developed features can be downloaded by communicating with the MANET special interest group. Also. it is easy to lose the way in its many modules and components and the manual is not that good. However. NS2 is free to download and some researchers for simulating mobile ad hoc networks use it. it is quite a complex task to install it and have it work right. LAR.Glomosim support some protocols. the problem is that they cost a lot of money. DSR. So in this section. If one want to develop ones own protocols in Glomosim.

Thus. as it was my second choice for a simulation package. after the continuous communication with the author of the ARAN protocol at the University of California at Santa Barbara. as Glomosim provided the best overall solution for my purpose and I got the ARAN protocol source code developed under it. Then. I did not reinvent the wheel and rewrite the protocol in NS2.3 Summary In this chapter. justifications for the choice of the Glomosim simulation environment to be used to conduct all the experimental parts of this thesis work were presented. I got the source code of ARAN protocol implemented under the Glomosim package. 6.Most importantly. the different simulation packages that are used in mobile ad hoc networks were surveyed. having this code implemented under Glomosim. 59 . Altogether the choice of the simulation package was quite clear.

several simulation and Linux shell scripts are developed to help in conducting the various simulation experiments. In addition. These scripts can be found in appendix F Each cycle of the simulation runs for 15 minutes. Chapter Seven: Simulation Methodology 7. Each simulation experiment is repeated five times and then average values of their results are taken to ensure integrity. This involves the selection of the simulation package. all the measured metrics and their definitions are presented. 7.2 Simulation Environment All simulation experiments are developed and simulated on an Intel 1.11 is used. the IEEE 802. The simulated network consists of 20 randomly allocated nodes in a space of 670*670 square-meters. the simulation parameters. The node transmission range was 250 meters and the propagation limit of each node is set to -111dBm. Also. a library-based sequential and parallel simulator for wireless mobile adhoc networks.0 with 256 MB RAM and the network simulator Glomosim [32].7. 60 . The choice of this simulation package in specific is due to the various reasons that were presented earlier in chapter 6.1 Introduction This chapter will be presenting the simulation methodology that was followed.4 GHz machine using Linux Red Hat 9. As for the MAC layer communication. the selfish nodes selection criteria and reputation default values.

Also. As mentioned earlier. a selfish node is one that agrees to participate in forwarding packets but then haphazardly drops all data packets that are routed through it. This is called the random waypoint model [50]. as shown in appendix E. 5 and 10 m/s. Each generator produces 1000 data packets of 512 bytes each at the rate of 4 packets per second.4 Selfish Nodes Of the 20 nodes simulated. Once the node reaches its destination. 7. 61 . That means for example that the group of the selfish nodes in the 20% case is a superset of the group of the selfish in the 10% case. Besides. that ensures that the impediments present in lower percentage selfish nodes runs are also present in higher percentage selfish nodes runs. some variable percentage of the nodes is selfish. a node chooses a destination and moves in a straight line towards the destination at a speed uniformly distributed between 0 m/s and some maximum speed. This is shown in appendix G. The maximum speed was limited to 10 m/s and ran simulations for constant node speeds of 0. a random number generator to designate selfish nodes randomly was developed. 1. in all node movement scenarios. The percentage of the selfish nodes was varied from 0% to 30% in 10% increments. In the meantime. the nodes communicate using five constant Bit Rate generators (CBR) over UDP with random source and destination pairs.3 Movement and Communication Patterns In the application layer. the same seed across the 0% to 30% variations of the selfish nodes parameter was used.7. All of these parameters were set in the Glomosim’s application configuration file. with pause time fixed at 30 seconds. Thus. it waits for a pause time before choosing another random destination and repeats the process.

7. 7.1 Network Throughput This value represents the ratio of the total number of packets that reach their destination. Then. As a consequence. and performance is compared to normal ARAN. A comparison between both of these protocols using the metrics explained is presented in the following subsections. the negative recommendation is (-2). the initial reputation value of each node in the mobile ad hoc network is (0). It is calculated according to this formula: Throughput = Packets Received / Packets Sent. an analysis of normal well-behaved ARAN network is done. The network throughput is directly influenced by packet loss.5. RREP. Following that. which may be caused by general network faults or uncooperative behavior. which is the value that specifies the time duration for which a selfish node should be punished. the newly designed reputation-based scheme is added to normal ARAN. to become ReputedARAN. to the total number of packets sent by the source. the positive recommendation is (+1). RERR and DACK in case of Reputed-ARAN) to data transmissions in a simulation run. both protocols are run under identical mobility and traffic scenarios.2 Overhead This is the ratio of routing-related transmissions (RDP. some uncooperative nodes are introduced to the normal ARAN network and analysis of the performance is done. which is the value that specifies when a node is marked as selfish. First. the selfish drop threshold is (-40). in the proposed reputation-based scheme the default reputation-related parameters which were presented earlier in chapter 5 were used.In addition. and last but not least the re-induction timeout is for five minutes. In the calculation of this 62 .5.5 Metrics In order to compare the performance of Reputed-ARAN and normal ARAN. 7.

the different chosen simulation parameters. 7. the selected MAC layer. the transmission of a control byte at each hop along the route was counted as one transmission. 7. The selection criteria of selfish nodes and the different percentages simulated and the default reputation values that were used for the Reputed-ARAN proposed scheme were presented.4 Average End-to-End Delay of Data Packets This is the average delay between the sending of the data packet by the constant bit rate source and its receipt at the corresponding constant bit rate receiver.metric.5.5 Packets Reached This metric indicates the fraction of data packets that reached when using each routing protocol. a whole section was dedicated to present the different metrics and their definitions. the number of nodes participating and their distribution. the movement and communication patterns were described. 7. the followed simulation methodology was introduced and a description of the used simulation environment. In the meantime. In addition. in the presence of different percentages of selfish nodes. This metric is very important as it gives us another view of the network throughput with regard of number of data packets reached. and the area of the network were also given.5.6 Summary In this chapter.5.3 Average Route Acquisition Latency This is the average delay between the sending of a route request/discovery packet by a source for discovering a route to a destination and the receipt of the first corresponding route reply. The below table summarized the different configuration values that were used in all the performed 63 . 7.

simulations. Parameter MANET Area Total number of nodes % of Selfish Nodes Simulated Movement Pattern Node Speed Application Number of generated Packets Size of Packet Simulation Time Value 670*670 m2 20 0% up to 30% Random Waypoint 0 up to 10 m/s Five Constant Bit Rate (CBR) 1000 packets per CBR 512 bytes 15 minutes Table 7. Also. appendix D has the different Glomosim’s configuration files that were created and used. which will be presented and discussed in the next chapter.1: General Simulation Parameters 64 .

1 Objective In this experiment. Chapter Eight: Simulation Results 8.8. 65 . discussed earlier in chapter seven. to simulate the newly proposed Reputed-ARAN.2 Experiment 1: Network Throughput 8. The node speed and the percentage of selfish nodes participating in the mobile ad hoc network are varied to compare the results. the results of the various performed simulations are presented. The first scenario is to simulate routing performed without using the reputation scheme that is proposed in this thesis work. in other words. In the following sections.1 Introduction In this chapter.2.2 Results The below figure shows the results of the network throughput of both protocols: normal ARAN and Reputed-ARAN with different node speed and different percentages of selfish nodes. The main focus of the simulations is two scenarios. are presented. 8. in other words. to simulate normal ARAN secure routing protocol. The second scenario is to simulate the routing performed with the proposed reputation scheme. 8. the results of the simulation runs comparing between normal ARAN and the Reputed-ARAN and using different simulation metrics.2. the network throughput is being measured for the normal ARAN secure routing protocol and the Reputed-ARAN.

5103 Table 8.27907 76 50 34.1 0.6 84 9.1: Effects of Selfish nodes on Network Throughput Also.3 55 25.2.7 21.100 80 Reputed-ARAN with 0% selfish ARAN with 0% selfish Reputed-ARAN with 10% selfish ARAN with 10% selfish Reputed-ARAN with 20% selfish ARAN with 20% selfish Reputed-ARAN with 30% selfish ARAN with 30% selfish Throughput (%) 60 40 20 0 0 1 Node Speed (m/s) 5 10 Figure 8.3 Analysis From the above graph and its corresponding table.70732 1 94.48276 74.1: Effect of different percentages of Selfish nodes on Network Throughput 8.11111 81 62 23.10112 82 56 31.2 90 0.1 36.1 12. in the below table. This graph shows the 66 .97577 63.45533 10 89.21053 5 92 92. it is clear that the lack of cooperation has fatal effect on the efficient working of the MANET. Node Speed(m/s) Used Protocol Reputed-ARAN with 0% selfish ARAN with 0% selfish Throughput Improvement Reputed-ARAN with 10% selfish ARAN with 10% selfish Throughput Improvement Reputed-ARAN with 20% selfish ARAN with 20% selfish Throughput Improvement Reputed-ARAN with 30% selfish ARAN with 30% selfish Throughput Improvement 0 97 97 0 95 88 7.4 44.1 38.755124 90 79.630915 92. all the different results of the network throughput simulation runs are listed.4 14.7 0.45679 69.368421 89 72 19.5 95.287257 86 67.8 38.888889 87 74.

in the same circumstances. the network throughput diminishes as the network in general gets more fragile. The different curves show a network of 20 nodes with different percentages of selfish nodes. This proves that the Reputed67 . The outcome of dropping packets affects the normal ARAN protocol during the full life of the MANET.1% with Reputed-ARAN. 5.8% with normal ARAN. and moving at different speeds. the throughput of the network is reduced to 38. Thus. The increase of throughput of the network in the case of using ReputedARAN is attributed to that each node uses its local table of other nodes’ reputation values in the selection of the next-hop node for establishing the data route. However. This proves that the Reputed-ARAN protocol is as efficient as ARAN in delivering the packets and discovering routes to any destination. 4. Also. Here are some points that can be observed in this graph: 1. In the case that there are no selfish nodes in the mobile ad hoc network. as the percentage of selfish nodes participating in the mobile ad hoc network increase.dramatic fall in normal ARAN’s network throughput with increasing percentage of selfish nodes. it is just affected partially as by time the selfish node will be identified and weeded out of the network. the throughput decreases because these selfish nodes tend to drop packets that they beforehand promised to forward. 3. It can be noted that in both ARAN and Reputed-ARAN when the node movement speed rises. from 0% up to 30%. the throughput of the network is reduced to only 63. but in case of Reputed-ARAN. when 30% of the nodes are selfish and moving at speed of 10 m/s. both ARAN and Reputed-ARAN have almost identical network throughput values. 2.

3 Experiment 2: Overhead 8.1 Objective In this experiment. in the below table. 30 Overhead % (# of control bytes per data packet delivered ) 28 26 24 22 20 18 16 14 12 10 8 6 4 2 0 0 1 Node Speed (m/s) 5 10 Reputed-ARAN ARAN Figure 8. 8. all the different results of the overhead percentage simulation runs are listed.ARAN increases the network throughput by 38.3.2 Results The below figure shows the results of the overhead metric of both protocols: normal ARAN and Reputed-ARAN with different node speed.3.5% over normal ARAN secure routing protocol. 8. 68 . the overhead for the normal ARAN secure routing protocol and the Reputed-ARAN is measured.2: Overhead Percentage Also. The speed of the nodes: from no mobility up to 10 m/s is varied to compare the results.

4 Experiment 3: Average Route Acquisition Delay 8. it is clear that the newly proposed Reputed-ARAN protocol has a higher overhead than the normal ARAN secure routing protocol. but in the Reputed-ARAN protocol.1 10 26. in case of Reputed-ARAN. the average route acquisition delay for the normal ARAN secure routing protocol and the Reputed-ARAN is measured.3 11. to 26. this reputation-based scheme still improves considerably the network throughput.9 5 18.3 6. Thus. in the authenticated route setup phase of normal ARAN protocol. the destination unicasts a RREP for the first received RDP. when nodes are moving at speed of 10 m/s. 69 . This DACK packet is used to give positive recommendations after each successful data packet transfer.2: Overhead Percentage Difference 8.4. the overhead percentage rises from 18%. 8.4 3.1 Objective In this experiment. Though the overhead percentage added by the Reputed-ARAN is significant. This is due to the fact that the Reputed-ARAN uses extra data acknowledgement (DACK) packet for each data packet sent. in case of normal ARAN.3 1 15.4 12. These extra RREPs are used later for the choice of the highly-reputed next-hop node in the data transfer phase.3. as shown in the previous section. The percentage of selfish nodes participating in the mobile ad hoc network is varied to compare the results. In addition.7 Table 8. the destination unicasts a RREP for each received RDP.7 3.7 18 8.7%.3 Analysis From the above graph and its corresponding table.Node Speed(m/s) Used Protocol Reputed-ARAN ARAN Overhead% Difference 0 12 8.

setup and maintenance of the route.2 Results The below figure shows the results of the average route acquisition delay metric of both protocols: normal ARAN and Reputed-ARAN with different percentage of selfish nodes. all the different results of the average route acquisition delay simulation runs are listed.3 Analysis From the above graph and its corresponding table. it can be seen from the graph that in both protocols. the average route acquisition delay increases with the increase of the selfish nodes.8. Also.3: Average Route Acquisition Delay Values 8. This is due to the dropping of packets 70 . in the below table.4.3: Average Route Acquisition Delay Also. as no changes were done in these phases while designing the Reputed-ARAN. % of Selfish Nodes Used Protocol Reputed-ARAN ARAN 0 54 53 10 64 63 20 69 68 30 75 74 Table 8. Average Route Acquisition Delay00(ms) 80 60 40 Reputed-ARAN ARAN 20 0 0 10 % of Selfish Nodes 20 30 Figure 8. it is clear that the newly proposed Reputed-ARAN protocol has an identical route acquisition delay as normal ARAN.4. This is due to that both protocols have the same steps for the discovery.

1 Objective In this experiment.2 Results The below figure shows the results of the average end-to-end delay of data packets metric of both protocols: normal ARAN and Reputed-ARAN with different percentage of selfish nodes. 35 Average End-to-End Delay of Data Packets (ms) 30 25 20 Reputed-ARAN ARAN 15 10 5 0 0 10 % of Selfish Nodes 20 30 Figure 8. in the below table. The percentage of selfish nodes participating in the mobile ad hoc network is varied to compare the results.5 Experiment 4: Average End-to-End Delay of Data Packets 8. 8. 71 . the average end-to-end delay of data packets for the normal ARAN secure routing protocol and the Reputed-ARAN is measured.5. 8.4: Average End-to-End Delay of Data Packets Also. all the different results of the average end-to-end delay of data packets simulation runs are listed.5.because of link failures and also because of the selfish behavior which results in reissuing a route discovery or taking a longer route to reach the destination.

This is due to the fact that in the Reputed-ARAN. each node checks its reputation table to choose the highly-reputed next-hop node that has route to the destination and data packets received from low-reputed nodes are put back at the end of the queue. the Reputed-ARAN protocol can end up choosing a longer selfish-free route to the destination with extra number of hops.3 Analysis From the above graph and its corresponding table. it is clear that the newly proposed Reputed-ARAN protocol has a higher average end-to-end delay of data packets than the normal ARAN secure routing protocol. the packets reached metric for the normal ARAN secure routing protocol and the Reputed-ARAN is measured. Also. The speed of the nodes and the percentage of selfish nodes participating in the mobile ad hoc network are varied to compare the results. as each extra hop costs 2 ms.5.5 30 33 27 6 Table 8.5 26 4. 8. at each hop and before sending or forwarding data packets.6 Experiment 5: Packets Reached 8.% of Selfish Nodes Used Protocol Reputed-ARAN ARAN Delay Difference (ms) 0 26 23 3 10 28 24 4 20 30. maximum two extra hops. 72 .6. as the percentage of selfish nodes increase in the mobile ad hoc network.1 Objective In this experiment.4: Average End-to-End Delay of Data Packets Values 8.

8.6.2 Results The below figure shows the results of the packets reached metric of both protocols: normal ARAN and Reputed-ARAN with different node speed and different percentages of selfish nodes.
Packets Reached
1000 Packets Reached (out of 1000) 900 800 700 600 500 400 300 200 100 0 0 10 20 30 % of Selfish Nodes Reputed-ARAN with no mobility ARAN with no mobility Reputed-ARAN with 1 m/s ARAN with 1 m/s Reputed-ARAN with 5 m/s ARAN with 5 m/s Reputed-ARAN with 10 m/s ARAN with 10 m/s

Figure 8.5: Packets Reached Also, in the below table, all the different results of the packets reached simulation runs are listed.
% of Selfish Nodes Used Protocol Reputed-ARAN with no mobility ARAN with no mobility Reputed-ARAN with 1 m/s ARAN with 1 m/s Reputed-ARAN with 5 m/s ARAN with 5 m/s Reputed-ARAN with 10 m/s ARAN with 10 m/s 0 970 970 945 951 920 927 892 900 10 950 880 926 840 900 791 870 744 20 890 720 860 677 810 620 743 550 30 820 560 760 500 694 441 631 388

Table 8.5: Packets Reached Values 8.6.3 Analysis From the above graph and its corresponding table, it is clear that with increasing the percentage of selfish nodes in the MANET, there is a remarkable fall in normal ARAN’s number of packets reached metric. The different bars show a network of 20 nodes with

73

different percentages of selfish nodes, from 0% up to 30%, and moving at different speeds. Here are some points that can be observed in this graph: 1. In the case that there are no selfish nodes in the mobile ad hoc network, both ARAN and Reputed-ARAN have almost identical number of packets reaching their destinations. This proves that the Reputed-ARAN protocol is as efficient as ARAN in delivering the packets and discovering routes to any destination. 2. It can be noted that in both ARAN and Reputed-ARAN when the nodes’ speed rises, the number of packets reached diminishes as the network in general gets more fragile. 3. Also, as the percentage of selfish nodes participating in the mobile ad hoc network increase, the number of packets reached decreases because these selfish nodes tend to drop packets that they beforehand promised to forward. The outcome of dropping packets affects the normal ARAN protocol during the full life of the MANET, but in case of Reputed-ARAN, it is just affected partially as by time the selfish node will be identified and weeded out of the network. 4. The increase in the number of packets reached in the case of using ReputedARAN is attributed to that each node uses its local table of other nodes’ reputation values in the selection of the next-hop node for establishing the data route. 5. Thus, the number of packets reached is reduced to 388 packets with normal ARAN, when 30% of the nodes are selfish and moving at speed of 10 m/s. However, the number of packets reached is reduced to only 631 packets with Reputed-ARAN, in the same circumstances. This proves that the Reputed74

ARAN increases the number of packets reached by 243 packets over normal ARAN secure routing protocol.

8.7 Summary
In this chapter, the different results of the experimental work were presented. Throughout the different sections, the experiments’ objective, result and analysis were stated. Also, this chapter ended up by showing that the Reputed-ARAN protocol increased the network throughput by 38.5% in a network of 20 nodes moving at speed of 10 m/s and having 30% of them selfish. However, this throughput increase resulted in the increase of the overhead percentage to 8.7% over the normal ARAN protocol.

75

9. To my knowledge. Chapter Nine: Conclusion and Future Work 9. there is no previously published work on detecting and defending against malicious and authenticated selfish nodes together in the field of MANETs’ routing protocols. Throughout this thesis research. Also. a comparison between some the existing secure mobile ad hoc routing protocols was presented. Security solutions for MANET have to cope with a challenging environment including scarce energy and computational resources and lack of persistent structure to rely on for building trust. [35]. it is likely that such networks will see widespread use within the next few years. even in the proposed secure routing protocols [34]. reactive and secure MANET routing protocols was compiled. an in-depth talk about the Authenticated Routing for Ad Hoc Networks 76 . [40] and [38].1 Conclusion The field of MANETs is rapidly growing and changing. the difference between malicious and selfish nodes and their associated attacks were discussed and a presentation of the fundamental requirements for the design of a secure routing protocol to defend against these security breaches was given. Furthermore. Security of mobile ad hoc networks has recently gained momentum in the research community. One of these challenges is security. a discussion of existing mobile ad hoc networks' routing protocols’ types and their advantages and disadvantages was given and a list of existing proactive. Then. Due to the open nature of ad hoc networks and their inherent lack of infrastructure. security exposures [48] can be an impediment to basic network operation and countermeasures should be included in network functions from the early stages of their design. the different types of attacks targeting MANET routing protocols’ security were explored. Then. While there are still many challenges that need to be met.

Examples of each scheme and the different issues involved in the design of each were given. 77 . In this proposal. an analysis of the various forms of selfish attacks that the proposed reputation-based scheme defends against was presented. the proposed design. some time was invested in surveying the different simulation packages that are used in mobile ad hoc networks. to make it detect and defend against selfish nodes and their misbehavior. proves to be more efficient and more secure than normal ARAN secure routing protocol in defending against both malicious and authenticated selfish nodes. That resulted in proposing a new design of a reputation-based scheme to integrate it with one of the secure routing MANET protocols. Also. Thus. modification and disclosure ones was presented. ARAN. Afterwards. Then. In addition. the different phases of the proposed reputation-based scheme were explained. according to the many simulations that were performed. Thus. Last but not least. fabrication. The solution presented in this thesis only cover a subset of all threats and is far from providing a comprehensive answer to the many security problems in the MANETs field. I moved on discussing the different existing MANET cooperation enforcement schemes by stating their types: the virtual currency-based and the reputation-based schemes. built on top of normal ARAN secure routing protocol. the newly proposed reputation-based scheme.protocol (ARAN) as one of the secure routing protocols built following the fundamental secure routing protocols design methodology was given. achieves a higher throughput than the normal ARAN in the presence of selfish nodes. That resulted in proving that the currently existing specification of the ARAN secure routing MANET protocol does not defend against attacks performed by authenticated selfish nodes. a discussion of how ARAN defends against most of the attacks that are conducted by malicious nodes such as spoofing. Reputed-ARAN. many justifications for the choice of the Glomosim simulation package to conduct all the experimental part of the thesis work were given.

a newly-designed local direct reputation-based scheme that is built on top of the ARAN secure routing protocol was presented. Non-cooperative nodes are slowly weeded out of the network.2 Future Work MANETs are an increasingly promising area of research with practical applications. Some of the ideas that can be further integrated to the proposed reputation-based scheme are presented as follows: • An authenticated selfish node might propagate a false route error (RERR) and advertise the route again on subsequent RDP from the source. my scheme works as follows: the sender only sends the packet to highly reputed nodes. Also. is capable of detecting and defending against malicious and authenticated selfish nodes’ attacks. 78 . To detect and foil such a selfish attack. but they are vulnerable in many settings to malicious and selfish nodes’ attacks. MANETs rely on cooperation of the network nodes for routing. In this thesis work. the number of intentionally dropped packets is reduced and hence the throughput of the system is higher. the nodes having low reputation do not receive any packet and hence can not inflict any damage by dropping packets. This proposed design. based on their reputation value. As a result. In brief. A node held by an individual who does not want to cooperate with the other nodes in the MANET start accumulating negative reputation. The neighbors in turn forward the packets to nodes having high reputation.9. Reputed-ARAN. This attack can significantly increase the network latency. so that to lower the risk that its neighbors will intentionally drop the packets. Reputation of the nodes and the subsequent advantages associated with having high reputation can provide the motivation for the node to commit their own resources to others. Thus. In the absence of a common goal. the nodes need an external motivation to cooperate.

their reputation goes below the threshold. If node P fails to route a packet sent by another node. • The proposed reputation-based scheme does not differentiate between nodes with sufficient resources and others with limited resources. This acknowledgement increases the network traffic. • In the proposed reputation-based scheme. the destination of the packet acknowledges receiving each packet. which possesses half the memory and half the processing power of most of the other nodes in the network. In this way. For example. To account for this overhead.the node just before the authenticated selfish node in the route can maintain a history of RREPs received from the authenticated selfish node. this class of nodes is penalized for failing to route packets. the system is democratized [26]. This approach will reduce the traffic volume considerably. such as PDAs. alternatively the sender can intercept the returned TCP acknowledgement to ascertain that the previous packet has reached its destination. In addition to the above specific add-ons that can be integrated to the proposed Reputed-ARAN secure routing protocol. via the path traversed by the packet. are unable to route packets for other nodes due to the scarcity of resources. poor nodes with lower resources. So in this scheme. to the source of the packet. but the penalty inflicted on them is only a fraction of what is inflicted on a node with a large volume of resources. This problem can be solved by attaching a list of the resources of a node in its identity certificate. That way. consider node P. Eventually. and these nodes are considered as selfish nodes. Such nodes lose reputation as these nodes drop packets due to the shortage of resources. the research in the area of MANETs is far from being exhaustive and much of the effort so far has been on devising routing protocols to 79 . it gets a recommendation of (-1) instead of (-2).

as well as in Mobile IP. however there is still a lot more work to be done.g. there are still many topics that deserve further investigation such as: • • Scalability: to what extent can an ad hoc network grow? Address configuration: the address scheme used in wired networks (e. DHCP).. However. • Interoperation with the Internet: how can ad hoc networks seamlessly and efficiently access the Internet in order to obtain advanced services? • Improvement of interaction between layers: would it be better to have layers interact in order to achieve better performance? • Quality of service (QoS): is it feasible for bandwidth/delay-constrained applications to run well in a MANET [44]? • • Applications for MANET: have we found a killer application? Power control: how can battery life be maximized [43]? The research community is already investigating some answers to these questions. might not be adequate in a MANET.support the effective and efficient communication between nodes that are part of the network. 80 . A new addressing approach may be required for MANETs.

Thesis. Department of Electrical and Computer Science. J. The design and implementation of fisheye routing protocol for mobile ad hoc networks. Gothenburg. The free Encyclopedia.S. 5. http://en. March 2002. 81 . Analysis of Routing Algorithms for Mobile Ad-Hoc Networks.php. 7. Proceedings of the IEEE MILCOM. Chalmers University of Technology. Thesis. P. March 1988. 4. May 2002. 9.cx/link_state. Laigar. Sun. Cordeiro and D. pages 225-229. Duggirala. M. 2003. Firewall. University of Cincinnati.org/wiki/Distancevector_routing_protocol. University of Cincinnati.htm. Corson.org/CIE/RFC/1058/6. Truong. Agrawal. M. 8. Proceedings of INFOCOM. http://www. 3. October 1996. http://www. 2. R.firewall.References 1. 6. Architectural Considerations for Mobile Mesh Networking. J. Mobile Ad hoc Networking. Distributed Algorithm for Efficient and Interferencefree Broadcasting in Radio Networks. A Novel Route Maintenance Technique for Ad Hoc Routing Protocols. MIT. Jubin and T. OBR Research Center for Distributed and Mobile Computing. ECECS. Freesoft. Wikipedia.wikipedia. C. pages 1119-1124. Macker and S. M. Department of Computer Engineering. The Site For Networking Professionals. Batsell.S. Distance Vector Algorithms.freesoft. November 2000. Cincinnati. A.

Zhou and Z. Personal Wireless Communication. DSC/2001. Royer. April 1999. Technical Report No. J. D. Shields and E. 11. Securing Wireless Ad Hoc Networks. 12. 13. L. Buttyan and J. Royer and C. P. Simulation-based Analysis of Security Exposures in Mobile Ad Hoc Networks. C. E. Chen. ISS Master. pages 46-55. March 2003. Yang. 15. Zhong. Security in Ad hoc Networks. Gayraud and B. IEEE Personal Communications. Proceedings of European Wireless Conference. IEEE Networks Special Issue on Network Security. A Review of Current Routing Protocols for Ad Hoc Mobile Wireless Networks. March 2005. Dahill. pages 756-775. 82 . pages 24-30. Levine. Michiardi and R. April 2003. October 2003. K. Hubaux. Nuglets: a Virtual Currency to Stimulate Cooperation in Self Organized Mobile Ad Hoc Networks. L. Toh. November/December 1999. Stimulating Cooperation in Self-Organizing Mobile Ad Hoc Networks.10. pages 579-592. September 2003. and Y. 16. pages 1987-1997. 17. Buttyan and J. Sprite: A simple. Tharon. An Authenticated Routing for Secure Ad Hoc Networks. ACM/Kluwer MONET. Cheat-proof. S. 18. Proceedings of IEEE Infocom. Sanzgiri. Securing Ad Hoc Networks. 14. MP 71 project. Journal on Selected Areas in Communications special issue on Wireless Ad hoc Networks. Laflamme. February 2002. V. Hubaux. R. Haas. Molva. B. L. Michiardi. Credit-based System for Mobile Ad hoc Networks. B. Molva and P.

July 2003. Performance Analysis of the CONFIDANT Protocol: Cooperation of Nodes. S. Proceedings of IEEE/ACM Symposium on Mobile Ad Hoc Networking and Computing. and M. Lai. June 2004. P. 21. and Wireless Networks: Third International Conference. Reputation methods for routing security for mobile ad hoc networks. IFIPCommunication and Multimedia Security Conference. July 2004. Marti.NI/0307012. 24. Joint IST Workshop on Mobile Future and Symposium on Trends in Communications. Dasgupta. Molva. P. Proceedings of SympoTIC. June 2002. K. 23. September 2002. Dewan and P. Giruka and M. Fairness In Dynamic Ad-hoc NeTworks. Bansal and M. First International Workshop on Wireless Security and Privacy in 83 . S. Proceedings of the Second Workshop on the Economics of Peer-to-Peer Systems. Michiardi and R. Wang.19. pages 130-137. http://arxiv. pages 211-224. Proceedings of MOBICOM. August 2000. Ad-Hoc. Buchegger and J. 25. Mitigating routing misbehavior in mobile ad hoc networks. Buchegger and J. Baker. Mitchell. V. pages 107-121. ADHOC-NOW. Baker. A Robust Reputation System for P2P and Mobile Ad-hoc Networks. P. 20. MobiHoc.org/pdf/cs. 26. T. Observation-based Cooperation Enforcement in Ad Hoc Networks. Le Boudec. S. Y. Le Boudec. 22. October 2003. Yau and C. Core: A COllaborative REputation mechanism to enforce node cooperation in Mobile Ad Hoc Networks. A Fair Distributed Solution for Selfish Nodes Problem in Wireless Ad Hoc Networks. Giuli. Singhal. S. Mobile. Trusting Routers and Relays in Ad hoc Networks.

27. and A. OPNET. Dahill. Johnson. Schneier.cs. Shields. 30. B. On the Accuracy of MANET Simulators. A Secure Routing Protocol for Ad hoc Networks. A. Royer and C. and D. ACM Principles of Mobile Computing. and D. In Proceedings of the Eighth Annual International Conference on Mobile Computing and Networking. Ariadne: A Secure On-Demand Routing Protocol for Ad Hoc Networks. Sasson.isi. The Network Simulator.edu/projects/glomosim. B. Scalable Network Technologies. Sanzgiri. The Dynamic Source Routing Protocol for Mobile Ad Hoc Networks. 35. Johnson. NS2. November 2002. December 1999.scalable- networks. Perrig. Internet-Draft. K. 32. October2003.ucla. http://www. D. http://www. B. pages 12-23. pages 78-87. About GloMoSim. 31. pages 3843. 84 .txt. Attack Trees: Modeling security threats. Maltz. GloMoSim. Cavin.conjunction with IEEE International Conference on Parallel Processing Workshops (ICPP). Schiper. QualNet. 34. October 2002. Hu. J. draft-ietf-manet-dsr03.opnet. October 1999. http://pcl. Y. 28. Levine. Broch. Making Networks and Applications Perform. 33. Proceedings of the tenth IEEE International Conference on Network Protocols. D.edu/nsnam/ns. E. B. http://www.com. September 2002. 29. Y.com. Dr Dobb’s Journal.

Dorf. P. Ad-Hoc On-Demand Distance Vector Routing. December 2002. Mishra. S. 37. Perrig. Zapata and N. IEEE MobiWac. Dasgupta and A. Hu. Cano and D. P. Papadimitratos. Publisher CRC Press. September 2003. Chakrabarti and A. 44. 10th International Conference on Parallel and Distributed Systems. February 2001. SEAD: Secure Efficient Distance Vector Routing in Mobile Wireless Ad Hoc Networks. pages 41-50. QoS Issues in Ad Hoc Wireless Networks.36. M. pages 142-148. D. July 2004. On using reputation in ad hoc networks to counter malicious nodes. In Proceedings of the ACM Workshop on Wireless Security. 85 . Investigating Performance of Power-aware Routing Protocols for Mobile Ad Hoc Networks. In Fourth IEEE Workshop on Mobile Computing Systems and Applications. IEEE Communication Magazine. draft-papadimitratos-securerouting-protocol-00. Papadimitratos and Z. 41. Y. Dewan. C. Johnson. Royer. The Secure Routing Protocol (SRP) for Ad Hoc Networks. Perkins and E. M. P. Haas. The Electrical Engineering Handbook Series archive. P. and A. 39. 42. 38.txt. Internet-Draft. pages 3-13. Ilyas and R. September 2002. February 1999. Kim. Secure data transmission in mobile ad hoc networks. Asokan. June 2002. 40. Samar. Securing Ad Hoc Routing Protocols. 2003. Bhattacharya. Haas and P. J. Proceedings of WiSe. The handbook of ad hoc wireless networks. pages 90-100. October 2002. Z. Proceedings of the Second IEEE Workshop on Mobile Computing Systems and Applications. pages 1-10. 43.

D. Maltz. J. Gibbens. October 1998. M. Crowcroft. DNVR (Dynamic NIx-Vector Routing) for Mobile Ad Hoc Networks. March 2003. WiOpt. March 2005. J. Capkun. Bonuccelli and S. F. 48. The Quest for Security in Mobile Ad Hoc Networks. 86 . A Performance Comparison of Multi-Hop Wireless Ad Hoc Network Routing Protocols.45. WiOpt. A. Giordano. Modeling Cooperation in Mobile Ad Hoc Networks: a Formal Description of Selfishness. D. 49. Modeling Incentives for Collaboration in Mobile Ad Hoc Networks. J. 46. Perrig and D. pages 85-97. A. L. Proceedings of the second ACM Symposium on Mobile Ad Hoc Networking and Computing. Hubaux. March 2003. Lee and G. Rushing attacks and defense in wireless ad hoc network routing protocols. Östring. 50. 47. Kelly and S. Riley. Broch. Y. Buttyan and S. Proceedings of the Fourth Annual ACM/IEEE International Conference on Mobile Computing and Networking. Proceedings of second ACM Wireless Security. Hu and J. Hu. pages 146-155. Jetcheva. Y. R. Johnson. Y. Urpi. Johnson. Proceedings of the IEEE Wireless Communications and Networking Conference. September 2003. October 2001. pages 30-40.

Appendix A: List of Protocols The following list is not comprehensive. Proactive (Table Driven) Protocols • • • • CGSR (Clusterhead Gateway Switch Routing) DBF (Distributed Bellman-Ford routing protocol) DSDV (Destination-Sequenced Distance-Vector) DTDV (Highly Dynamic Destination-Sequenced Distance Vector routing protocol) • • • • • • • HSLS (Hazy Sighted Link State routing protocol) HSR (Hierarchial State Routing protocol) LCA (Linked Cluster Architecture) MMRP (Mobile Mesh Routing Protocol) OLSR (Optimized Link State Routing Protocol) STAR (Source Tree Adaptive routing protocol) TBRPF (Topology Dissemination Based on Reverse-Path Forwarding) WRP (Wireless Routing Protocol) Reactive (On-Demand) Protocols • • • • ABR (Associativity-Based Routing) AODV (Ad Hoc On-Demand Distance Vector) AOMDV (Ad hoc On-demand Multipath Distance Vector) ARA (Ant-based Routing-Algorithm) 87 . New routing protocols are always in the making. For example one of the most recent protocols is DNVR (Dynamic NIx-Vector Routing) for Mobile Ad Hoc Networks [45].

• • • • • • • • • • • • • BSR (Backup Source Routing protocol) CHAMP (CacHing And MultiPath routing protocol) DSR (Dynamic Source Routing protocol) DSRFLOW (Flow State in the Dynamic Source Routing protocol) FORP (Flow Oriented Routing Protocol) LBR (Link life Based Routing) LMR (Lightweight Mobile Routing protocol) LUNAR (Lightweight Underlay Network Ad hoc Routing) PLBR (Preferred link based routing) RDMAR (Relative-Distance Micro-discovery Ad hoc Routing protocol) SSR (Signal Stability Routing) SMR (Split Multipath Routing) TORA (Temporally Ordered Routing Algorithm) Security Routing Protocols • • • • • • • • • ARAN (Authenticated Routing for Ad hoc Networks) Ariadne LHAP (Lightweight Hop-by-hop Authentication Protocol) SAODV (Secure Ad hoc On-demand Distance Vector) SAR (Security-aware Ad hoc Routing) SEAD (Secure Efficient Ad hoc Distance vector routing protocol) SLSP (Secure Link State Protocol) SMT (Secure Message Transmission) SPAAR (Secure Position Aided Ad hoc Routing) 88 .

• •

SRP (Secure Routing Protocol) TESLA (Time Efficient Stream Loss-tolerant Authentication)

89

Appendix B: List of ARAN’s functions with documentation
This appendix presents the functions of the normal ARAN secure routing protocol with its inline documentation:
//------------------------------------------------------------------/* * RoutingAranInit * Initialization function for ARAN protocol */ void RoutingAranInit(GlomoNode *node,GlomoRoutingAran **aranPtr,const GlomoNodeInput *nodeInput) //------------------------------------------------------------------/* * RoutingAranInitStats * Initialize all the stat variables */ void RoutingAranInitStats(GlomoNode *node) //------------------------------------------------------------------/* * RoutingAranInitRouteTable * Initialize the route table */ void RoutingAranInitRouteTable(ARAN_RT *routeTable) //------------------------------------------------------------------/* * RoutingAranInitSeenTable * Initialize the seen table */ void RoutingAranInitSeenTable(ARAN_ST *seenTable) //------------------------------------------------------------------/* * RoutingAranInitBuffer * Initialize the buffer */ void RoutingAranInitBuffer(ARAN_BUFFER *buffer) //------------------------------------------------------------------/* * RoutingAranInitSent * Initialize the sent table */ void RoutingAranInitSent(ARAN_SENT *sent) //------------------------------------------------------------------/* * RoutingAranInitNonce * Initialize the nonce */ void RoutingAranInitNonce(GlomoNode *node) //------------------------------------------------------------------/* * RoutingAranInitCAKey * Initialize the Ca Public Key */ void RoutingAranInitCAKey(GlomoNode *node) //-------------------------------------------------------------------

90

/* * RoutingAranInitKeyPair * Initialize the node's public and private keys, and certificate */ void RoutingAranInitKeyPair(GlomoNode *node) //------------------------------------------------------------------/* * RoutingAranMacLayerStatusHandler * Reacts to the signal sent by the MAC protocol after link failure */ void RoutingAranMacLayerStatusHandler(GlomoNode *node, const Message* msg) //------------------------------------------------------------------/* * RoutingAranPacketDropNotificationHandler * Reacts to the signal sent by the MAC protocol after link failure */ void RoutingAranPacketDropNotificationHandler(GlomoNode *node, const Message* msg,const NODE_ADDR nextHopAddress) //------------------------------------------------------------------/* * RoutingAranRouterFunction * Determine the routing action to take for a the given data packet * set the PacketWasRouted variable to TRUE if no further handling of * this packet by IP is necessary */ void RoutingAranRouterFunction(GlomoNode *node,Message *msg,NODE_ADDR destAddr,BOOL *packetWasRouted) //------------------------------------------------------------------/* * RoutingAranCheckRouteExist * Returns TRUE if a route between the source and the destination is * known */ BOOL RoutingAranCheckRouteExist(GlomoNode* node, NODE_ADDR destAddr, NODE_ADDR srcAddr, ARAN_RT *routeTable) //------------------------------------------------------------------/* * RoutingAranLookupBuffer * Returns TRUE if any packet is buffered to the destination * NOTE: Buffer is only used at the source node * */ BOOL RoutingAranLookupBuffer(NODE_ADDR destAddr, ARAN_BUFFER *buffer) //------------------------------------------------------------------/* * RoutingAranInsertBuffer * Insert a packet into the buffer if no route is available * NOTE: Buffer is only used at the source node */ static void RoutingAranInsertBuffer(Message* msg,NODE_ADDR destAddr,ARAN_BUFFER* buffer) //------------------------------------------------------------------/* * RoutingAranHandleData * Processing procedure when data is received * This is only called at non-source nodes * If I am an intermediate node then Relay the packet to the next hop * of the route */

91

NODE_ADDR srcAddr. Message *msg. NODE_ADDR destAddr) //------------------------------------------------------------------/* * RoutingAranUpdateLifetime * Update the lifetime field of the route entry in the route table * corresponding to the given source destination pair */ void RoutingAranUpdateLifetime(NODE_ADDR destAddr. ARAN_RT *routeTable) //------------------------------------------------------------------/* * RoutingAranSetTimer * Set timers for protocol events */ void RoutingAranSetTimer(GlomoNode *node. NODE_ADDR destAddr) //------------------------------------------------------------------void RoutingAranCopyCertificate(ARAN_Certificate* src. GlomoRoutingAran* aran) //------------------------------------------------------------------void RoutingAranINSignRDP(ARAN_RDP_Packet* rdpPkt. GlomoRoutingAran* aran) //------------------------------------------------------------------void RoutingAranINSignREP(ARAN_REP_Packet* repPkt. NODE_ADDR destAddr) //------------------------------------------------------------------/* * RoutingAranGetNextHop * Looks up the routing table to obtain next hop to the destination * If no entry found.void RoutingAranHandleData(GlomoNode *node. NODE_ADDR srcAddr. Message *msg. GlomoRoutingAran* aran) //------------------------------------------------------------------- 92 . NODE_ADDR srcAddr. GlomoRoutingAran* aran) //------------------------------------------------------------------void RoutingAranInitiatorSignERR(ARAN_ERR_Packet* errPkt. ARAN_Certificate* target) //------------------------------------------------------------------void RoutingAranSourceSignRDP(ARAN_RDP_Packet* rdpPkt. NODE_ADDR destAddr. long eventType. ARAN_RT *routeTable) //------------------------------------------------------------------/* * RoutingAranInitiateRDP * Initiate a Route Discovery packet when no route to destination is * known * Assuming that no RDP has been previously sent for this destination */ void RoutingAranInitiateRDP(GlomoNode *node. GlomoRoutingAran* aran) //------------------------------------------------------------------void RoutingAranDestSignREP(ARAN_REP_Packet* repPkt. clocktype delay) //------------------------------------------------------------------/* * RoutingAranTransmitData * Forward the data packet to the next hop * This is called at non-destination nodes */ void RoutingAranTransmitData(GlomoNode *node. returns ANY_DEST */ NODE_ADDR RoutingAranGetNextHop(NODE_ADDR destAddr.

NODE_ADDR predecessor.NODE_ADDR nextHop. int ttl) //------------------------------------------------------------------/* * RoutingAranReplaceInsertRouteTable * Insert/Update an entry into the route table */ static void RoutingAranReplaceInsertRouteTable(NODE_ADDR srcAddr.int nonce.NODE_ADDR srcAddr. ARAN_RDP_Packet* rdpPkt) //------------------------------------------------------------------BOOL RoutingAranVerifyDestCertAndSignInREP(GlomoNode* node. ARAN_SENT *sent) //------------------------------------------------------------------/* * RoutingAranHandleRDP * Processing procedure when RDP is received * Process only if the packet is not a duplicate and Verify that * packet is correct .NODE_ADDR destAddr.ARAN_ST *seenTable) //------------------------------------------------------------------/* * RoutingAranInsertSent * Insert an entry into the sent table if RDP is sent */ static void RoutingAranInsertSent(NODE_ADDR destAddr. int nonce.clocktype lifetime.ARAN_RT* routeTable) //------------------------------------------------------------------/* * RoutingAranLookupSeenTable * Returns TRUE if the RDP packet is processed before */ BOOL RoutingAranLookupSeenTable(NODE_ADDR srcAddr.ARAN_SENT *sent) //------------------------------------------------------------------/* * RoutingAranCheckSent * Check if RDP has been sent. clocktype timestamp. Message *msg. ARAN_REP_Packet* repPkt) //------------------------------------------------------------------BOOL RoutingAranVerifyLastNodeCertAndSignInREP(GlomoNode* node. ARAN_ST *seenTable) //------------------------------------------------------------------BOOL RoutingAranVerifySourceCertAndSignInRDP(GlomoNode* node. return TRUE if sent */ BOOL RoutingAranCheckSent(NODE_ADDR destAddr. ARAN_REP_Packet* repPkt) //------------------------------------------------------------------/* 93 . ARAN_RDP_Packet* rdpPkt) //------------------------------------------------------------------BOOL RoutingAranVerifyLastNodeCertAndSignInRDP(GlomoNode* node./* * RoutingAranInsertSeenTable * Insert an entry into the seen table */ static void RoutingAranInsertSeenTable(GlomoNode *node. * If I am destination then Send a Reply packet and Add reverse route *to routing table * If I am intermediate node then Relay the packet only if TTL is not * zero */ void RoutingAranHandleRDP(GlomoNode *node.BOOL activated.int ttl.

ARAN_SENT *sent) //------------------------------------------------------------------/* * RoutingAranGetBufferedPacket * Extract the packet that was buffered */ Message* RoutingAranGetBufferedPacket(NODE_ADDR destAddr. Return TRUE if deleted */ BOOL RoutingAranDeleteBuffer(NODE_ADDR destAddr. Message *msg. Message *msg. Message *msg. ARAN_RT *routeTable) //------------------------------------------------------------------/* * RoutingAranRelayREP * Forward the REP packet */ void RoutingAranRelayREP(GlomoNode *node. Message *msg) //------------------------------------------------------------------/* * RoutingAranHandleREP * Processing procedure when REP is received * Verify that packet is correct * If I am an intermediate node then Forward the packet to the * upstream of the route */ void RoutingAranHandleREP(GlomoNode *node. NODE_ADDR destAddr) //------------------------------------------------------------------/* * RoutingAranHandleProtocolPacket * Called when the packet is received from MAC * RDP * REP * ERR 94 .* RoutingAranRelayRDP * Forward (re-broadcast) the RDP */ void RoutingAranRelayRDP(GlomoNode *node. NODE_ADDR srcAddr. NODE_ADDR destAddr) //------------------------------------------------------------------/* * RoutingAranDeleteSent * Remove an entry from the sent table */ void RoutingAranDeleteSent(NODE_ADDR destAddr. ARAN_BUFFER *buffer) //------------------------------------------------------------------/* * RoutingAranDeleteBuffer * Remove a packet from the buffer. ARAN_BUFFER *buffer) //------------------------------------------------------------------/* * RoutingAranActivateRoute * Activate a route in the route table */ void RoutingAranActivateRoute(NODE_ADDR destAddr. int ttl) //------------------------------------------------------------------/* * RoutingAranInitiateREP * Destination of the route sends REP in reaction to RDP */ void RoutingAranInitiateREP(GlomoNode *node. NODE_ADDR srcAddr.

ARAN_SENT *sent) //------------------------------------------------------------------/* * RoutingAranInactivateRoutesAndGetDestinations * Inactivate routes that use the broken link * Returns the srcAddr and destAddr for the routes (only those where * this node is not the source) */ void RoutingAranInactivateRoutesAndGetSrcDestPairs(GlomoNode* node. ARAN_SENT *sent) //------------------------------------------------------------------/* * RoutingAranGetTimestamp * Obtains the timestamp when the RDP was sent */ clocktype RoutingAranGetTimestamp(NODE_ADDR destAddr. NODE_ADDR destAddr) //------------------------------------------------------------------/* * RoutingAranIncreaseTimes * Increase the number of times RDP sent in TTL = ARAN_NET_DIAMETER */ void RoutingAranIncreaseTimes(NODE_ADDR destAddr. NODE_ADDR srcAddr. 95 .*/ void RoutingAranHandleProtocolPacket(GlomoNode *node. NODE_ADDR destAddr. Message *msg. ARAN_RT *routeTable) //------------------------------------------------------------------/* * RoutingAranGetTimes * Obtains the number of times the RDP was sent in TTL = * ARAN_NET_DIAMETER */ int RoutingAranGetTimes(NODE_ADDR destAddr. int ttl) //------------------------------------------------------------------/* * RoutingAranHandleProtocolEvent * Handles all the protocol events: * Remove the route that has not been used for awhile * Check if REP is received after sending RDP */ */ void RoutingAranHandleProtocolEvent(GlomoNode *node. NODE_ADDR srcAddr. Message *msg) //------------------------------------------------------------------/* * RoutingAranRetryRDP * Send RDP again after not receiving any REP */ void RoutingAranRetryRDP(GlomoNode *node. ARAN_SENT *sent) //------------------------------------------------------------------/* * RoutingAranDeleteSeenTable * Remove an entry from the seen table */ void RoutingAranDeleteSeenTable(ARAN_ST *seenTable) //------------------------------------------------------------------/* * RoutingAranDeleteRouteTable * Remove an entry from the route table */ void RoutingAranDeleteRouteTable(NODE_ADDR destAddr.

ARAN_RT* routeTable.int maxNumberPairs. NODE_ADDR destAddr. NODE_ADDR destAddr. NODE_ADDR srcAddr) //------------------------------------------------------------------/* * RoutingAranHandleERR * Processing procedure when ERR is received */ void RoutingAranHandleERR(GlomoNode *node. NODE_ADDR srcAddr.NODE_ADDR nextHop. ARAN_RT *routeTable) //------------------------------------------------------------------/* * RoutingAranFinalize * Called at the end of the simulation to collect the results */ void RoutingAranFinalize(GlomoNode *node) //------------------------------------------------------------------- 96 .ARAN_SrcDestPair srcDestPairs[].int* numberPairs) //------------------------------------------------------------------void RoutingAranInitiateERR(GlomoNode* node. NODE_ADDR srcAddr) //------------------------------------------------------------------/* * RoutingAranMarkRouteBroken * Mark the route with the given source and destination broken */ void RoutingAranMarkRouteBroken(GlomoNode *node. Message *msg.

Let the source node be S. nonce. Reputed-ARAN. I: Broadcast RDP for D in the MANET using the normal standard ARAN secure routing protocol. the destination node be D. destination and previous-hop of this packet in its routing table. Initially the reputations of all the nodes are zero. any intermediate cooperative node be I. While (I<>S) Do I: Update its routing table for the next-hop of the RREP. 97 . these reputation values are only based on the previous routing history of the node and not on second-hand experience of other nodes.Appendix C: Pseudo code of Reputed-ARAN This appendix presents the main pseudo code of the newly proposed reputationbased scheme. So. Route Lookup Phase S: Has data to send for D. The Reputed-ARAN assumes that each node stores other nodes’ reputation values locally and they do not exchange these reputation values. End D: Unicast a route reply packet (RREP) for each RDP packet it receives back using the reverse-path. While (I <> D) Do I: Insert a record of the source. S: Broadcast route discovery packet (RDP) for D in the MANET. any node be A and any selfish node be denoted by E.

S: Start a timer before it should receive a data acknowledgement (DACK) for the data packet from the destination. While (I <>D) Do If (I received data packet from low-reputed node) then Put at the end of the data queue Else Send as soon as possible I: Choose the highly-reputed next-hop node for its data transfer. I chooses one of them randomly. S: Store the chosen node information in its sent-table as the path for data transfer. If two next-hop nodes have the same reputation. I: Store the chosen node information in its sent-table as the path for data transfer.I: Unicast this RREP in the reverse-path using the earlier-stored previous-hop node information. End S: Insert a route record for D in its routing table for each received RREP. but in the reverse direction. End D: Send a signed DACK to the source S traversing the same route as the data packet. Data Transfer Phase S: Choose the highly-reputed next-hop node for its data transfer. 98 . I: Start a timer before it should receive a data acknowledgement (DACK) for the data packet from the destination. S chooses one of them randomly. If two next-hop nodes have the same reputation.

A: Deactivate this node in its routing table. Timeout Phase Event: a timer for a given data packet expires at A. A: Send an error message RERR to the upstream nodes in the route. A: Delete the entry from the sent-table. End S: Increment the reputation of the next hop node. Event: Next-hop node’s reputation goes below the threshold. A: Give a negative recommendation to the next-hop node. S: Delete this data packet entry from its sent-table. E: Is now temporally weeded out of the MANET for five minutes.Reputation Phase While (I<>S) Do I: Increment the reputation of the next hop node. 99 . I: Delete this data packet entry from its sent-table.

such as the number of nodes. the simulated routing protocol and simulation time are set. In these files. This can be used to vary the seed of the simulation to see the consistency of the results of the simulation.100 hours # 100D . # ##################################################################### ########## # # The following parameter represents the maximum simulation time. All range parameters are in terms of meters.100 seconds # 100 . # For example: # 100NS .100 nano-seconds # 100MS . The # numbered portion can be followed by optional letters to modify the # simulation time. TERRAIN-DIMENSIONS (670. their speed. For example. SEED # # # # # # # # 1 The following two parameters stand for the physical terrain in which the nodes are being simulated. 670) 100 . So they do not move at all. The other configuration file has nodes moving at a fixed speed of 10 m/s. the different simulation parameters.100 milli-seconds # 100S .100 minutes # 100H . Terrain Area we are simulating. The first configuration file simulates only static nodes.100 seconds (default case) # 100M . This is the first Glomosim configuration file: # ***** GloMoSim Configuration File ***** # # Anything following a "#" is treated as a comment.100 days # SIMULATION-TIME # # # # # # 15M The following is a random number seed used to initialize part of the seed of various randomly generated numbers in the simulation. the following represents an area of size 100 meters by 100 meters.Appendix D: Glomosim’s Configuration Files This appendix presents two sample Glomosim configuration files of the many that were created and used.

The number # of nodes has to be square of an integer.UNIFORM: Based on the number of nodes in the simulation. as # long as the new position is within the physical terrain. y-1). than there is no movement of nodes in the model. if a node is currently at position (x. the # physical terrain is divided into a number of cells. #. y+1). (x+1. the node stays # there for MOBILITY-WP-PAUSE time period. For random # waypoint. The MOBILITY-INTERVAL is # used in some models that a node updates its position every # MOBILITY-INTERVAL time period. y). On each # line of the file. it # can possibly move to (x-1. a node is placed randomly./nodes.RANDOM: Nodes are placed randomly within the physical terrain.GRID: Node placement starts at (0. # # NODE-PLACEMENT FILE # NODE-PLACEMENT-FILE . y).FILE: Position of nodes is read from NODE-PLACEMENT-FILE./mobility. If MOBILITY is set # to NO.# # The following parameter represents the number of nodes being # simulated. # MOBILITY NONE # Random Waypoint and its required parameters. The MOBILITY-D-UPDATE is used that a # node updates its position based on the distance (in meters).input # NODE-PLACEMENT GRID # GRID-UNIT 30 #NODE-PLACEMENT UNIFORM NODE-PLACEMENT RANDOM # # The following represent parameters for mobility. #. #MOBILITY RANDOM-WAYPOINT #MOBILITY-WP-PAUSE 30S #MOBILITY-WP-MIN-SPEED 0 #MOBILITY-WP-MAX-SPEED 0 #MOBILITY TRACE #MOBILITY-TRACE-FILE . the x and y position of a single node is # separated by a space. 0) and are placed in grid # format with each node GRID-UNIT away from its neighbors.in #MOBILITY PATHLOSS-MATRIX # The following parameters are necessary for all the mobility models 101 . It moves in the direction of the destination in a speed # uniformly chosen between MOBILITY-WP-MIN-SPEED and MOBILITY-WP-MAX# SPEED (meter/sec). For the # RANDOM-DRUNKEN model. and (x. Within each # cell. After it reaches its destination. # NUMBER-OF-NODES 20 # #The following parameter represents the node placement strategy. y). (x. #. #. a node randomly selects a destination from the physical # terrain.

0. # (path loss exponent. This value must be smaller than # RADIO-RX-SENSITIVITY + RADIO-ANTENNA-GAIN of any node # in the model.0) for near sight and plane earth # path loss (4. # PATHLOSS-MATRIX: # #PROPAGATION-PATHLOSS FREE-SPACE PROPAGATION-PATHLOSS TWO-RAY #PROPAGATION-PATHLOSS PATHLOSS-MATRIX # # NOISE-FIGURE: noise figure # NOISE-FIGURE 10. 0. # PROPAGATION-LIMIT -111. simulation results may be # incorrect.MOBILITY-POSITION-GRANULARITY 0.0 # # PROPAGATION-PATHLOSS: pathloss model # FREE-SPACE: # Friss free space model.0. sigma) = (2. Lower value should make the simulation more # precise.5 ##################################################################### # # PROPAGATION-LIMIT: # Signals with powers below PROPAGATION-LIMIT (in dBm) # are not delivered. It uses free space path loss # (2. but it also make the execution time longer.0 ######################################### # # RADIO-TYPE: radio model to transmit and receive packets # RADIO-ACCNOISE: standard radio model # RADIO-NONOISE: abstract radio model # (RADIO-NONOISE is compatible with the current version (2.0.0) # TWO-RAY: # Two ray model. The antenna # height is hard-coded in the model (1.4e9 # # RADIO-BANDWIDTH: bandwidth (in bits per second) 102 . Otherwise. 0.0 # # TEMPARATURE: temparature of the environment (in K) # TEMPARATURE 290.1b5) # of ns-2 radio model) # RADIO-TYPE RADIO-ACCNOISE #RADIO-TYPE RADIO-NONOISE # # RADIO-FREQUENCY: frequency (in heltz) (Identifying variable for # multiple radios) # RADIO-FREQUENCY 2.5m).0) for far sight. 0.

# BER-BASED: # It looks up Bit Error Rate (BER) in the SNR ./ber_bpsk. # RADIO-RX-SNR-THRESHOLD needs to be specified.0 # # RADIO-RX-THRESHOLD: Minimum power for received packet (in dBm) # RADIO-RX-THRESHOLD -81. Setting it to "NO" may save a trivial amount 103 .0 #RADIO-RX-SNR-THRESHOLD 8.9 # 15. Otherwise the packet is dropped.11 CSMA MACA #MAC-PROTOCOL TSMA #TSMA-MAX-NODE-DEGREE 8 #MAC-PROPAGATION-DELAY 1000NS # # # # # PROMISCUOUS-MODE defaults to YES and is necessary if nodes want to overhear packets destined to the neighboring node.49583 #RADIO-RX-TYPE #BER-TABLE-FILE BER-BASED . # RADIO-RX-TYPE SNR-BOUNDED RADIO-RX-SNR-THRESHOLD 10.in # # RADIO-TX-POWER: radio transmition power (in dBm) # RADIO-TX-POWER 7.# RADIO-BANDWIDTH 2000000 # # RADIO-RX-TYPE: packet reception model # SNR-BOUNDED: # If the Signal to Noise Ratio (SNR) is more than # RADIO-RX-SNR-THRESHOLD (in dB).0 # # RADIO-ANTENNA-GAIN: antenna gain (in dB) # RADIO-ANTENNA-GAIN 0.0 # # RADIO-RX-SENSITIVITY: sensitivity of the radio (in dBm) # RADIO-RX-SENSITIVITY -91.0 # ############################## # MAC-PROTOCOL #MAC-PROTOCOL #MAC-PROTOCOL 802. it receives the signal # without error.BER table # specified by BER-TABLE-FILE. Currently this option needs to be set to YES only for DSR is selected as routing protocol.

NETWORK-PROTOCOL IP NETWORK-OUTPUT-QUEUE-SIZE-PER-PRIORITY 100 #RED-MIN-QUEUE-THRESHOLD 150 #RED-MAX-QUEUE-THRESHOLD 200 #RED-MAX-MARKING-PROBABILITY 0. All the statistics are compiled together into a file called "GLOMO. By specifying the following parameters as YES. Layer: RadioNoCapture. #PROMISCUOUS-MODE NO ############################## # # Currently the only choice. If you need the statistics for a particular node or particular protocol.1 #RED-QUEUE-WEIGHT .# of time for other protocols.STAT" that is produced at the end of the simulation.IN The following is used to setup applications such as FTP and Telnet. the simulation will provide you with statistics for that particular layer. APP-CONFIG-FILE # # # # # # # # # # # # # . Total number of collisions is 0 APPLICATION-STATISTICS TCP-STATISTICS UDP-STATISTICS ROUTING-STATISTICS YES YES YES YES 104 . it is easy to do the filtering.conf The following parameters determine if you are interested in the statistics of a single or multiple layer. The file will need to contain parameters that will be use to determine connections and other characteristics of the particular application. Every single line in the file is of the following format: Node: 9.0001 #RED-TYPICAL-PACKET-TRANSMISSION-TIME 64000NS ############################## # #ROUTING-PROTOCOL BELLMANFORD #ROUTING-PROTOCOL AODV #ROUTING-PROTOCOL DSR #ROUTING-PROTOCOL LAR1 #ROUTING-PROTOCOL WRP #ROUTING-PROTOCOL FISHEYE #ROUTING-PROTOCOL #ZONE-RADIUS ROUTING-PROTOCOL #ROUTING-PROTOCOL #STATIC-ROUTE-FILE # # # # # # ZRP 2 ARAN STATIC ROUTES./all-app.

100 hours # 100D .100 seconds # 100 . # For example: # 100NS . The # numbered portion can be followed by optional letters to modify the # simulation time. For example. TERRAIN-DIMENSIONS # (670. the following represents an area of size 100 meters by 100 meters.100 minutes # 100H . All range parameters are in terms of meters. SEED # # # # # # # # 1 The following two parameters stand for the physical terrain in which the nodes are being simulated. 670) 105 .100 nano-seconds # 100MS .100 seconds (default case) # 100M . Terrain Area we are simulating.100 days # SIMULATION-TIME # # # # # # 15M The following is a random number seed used to initialize part of the seed of various randomly generated numbers in the simulation. # ##################################################################### ########## # # The following parameter represents the maximum simulation time.NETWORK-LAYER-STATISTICS MAC-LAYER-STATISTICS RADIO-LAYER-STATISTICS CHANNEL-LAYER-STATISTICS MOBILITY-STATISTICS YES YES YES YES YES # # GUI-OPTION: YES allows GloMoSim to communicate with the Java Gui # Vis Tool # NO does not GUI-OPTION GUI-RADIO GUI-ROUTING YES YES YES This is the second Glomosim configuration file: # ***** GloMoSim Configuration File ***** # # Anything following a "#" is treated as a comment.100 milli-seconds # 100S . This can be used to vary the seed of the simulation to see the consistency of the results of the simulation.

a node randomly selects a destination from the physical # terrain. y). # # NODE-PLACEMENT FILE # NODE-PLACEMENT-FILE . the x and y position of a single node is # separated by a space. y).GRID: Node placement starts at (0. For the # RANDOM-DRUNKEN model. # #MOBILITY NONE # Random Waypoint and its required parameters. For random # waypoint. a node is placed randomly. it # can possibly move to (x-1. than there is no movement of nodes in the model. It moves in the direction of the destination in a speed # uniformly chosen between MOBILITY-WP-MIN-SPEED and MOBILITY-WP-MAX# SPEED (meter/sec). 0) and are placed in grid # format with each node GRID-UNIT away from its neighbors. (x. # NUMBER-OF-NODES 20 # #The following parameter represents the node placement strategy. The MOBILITY-D-UPDATE is used that a # node updates its position based on the distance (in meters). On each # line of the file. (x+1. Within each # cell. y-1)./nodes. #.RANDOM: Nodes are placed randomly within the physical terrain. the # physical terrain is divided into a number of cells. #.in #MOBILITY PATHLOSS-MATRIX # The following parameters are necessary for all the mobility models MOBILITY-POSITION-GRANULARITY 0.FILE: Position of nodes is read from NODE-PLACEMENT-FILE.# The following parameter represents the number of nodes being # simulated. After it reaches its destination./mobility. If MOBILITY is set # to NO. #.input # NODE-PLACEMENT GRID # GRID-UNIT 30 #NODE-PLACEMENT UNIFORM NODE-PLACEMENT RANDOM # # The following represent parameters for mobility. y+1).5 106 . The number # of nodes has to be square of an integer.UNIFORM: Based on the number of nodes in the simulation. y). MOBILITY RANDOM-WAYPOINT MOBILITY-WP-PAUSE 30S MOBILITY-WP-MIN-SPEED 10 MOBILITY-WP-MAX-SPEED 10 #MOBILITY TRACE #MOBILITY-TRACE-FILE . as # long as the new position is within the physical terrain. #. The MOBILITY-INTERVAL is # used in some models that a node updates its position every # MOBILITY-INTERVAL time period. if a node is currently at position (x. the node stays # there for MOBILITY-WP-PAUSE time period. and (x.

Otherwise. Lower value should make the simulation more # precise.0. # (path loss exponent.0 ######################################### # # RADIO-TYPE: radio model to transmit and receive packets # RADIO-ACCNOISE: standard radio model # RADIO-NONOISE: abstract radio model # (RADIO-NONOISE is compatible with the current version (2.4e9 # # RADIO-BANDWIDTH: bandwidth (in bits per second) # RADIO-BANDWIDTH 2000000 107 . # PROPAGATION-LIMIT -111. The antenna # height is hard-coded in the model (1.0) for far sight.##################################################################### # # PROPAGATION-LIMIT: # Signals with powers below PROPAGATION-LIMIT (in dBm) # are not delivered.0) for near sight and plane earth # path loss (4.0. It uses free space path loss # (2.0 # # TEMPARATURE: temparature of the environment (in K) # TEMPARATURE 290. 0. # PATHLOSS-MATRIX: # #PROPAGATION-PATHLOSS FREE-SPACE PROPAGATION-PATHLOSS TWO-RAY #PROPAGATION-PATHLOSS PATHLOSS-MATRIX # # NOISE-FIGURE: noise figure # NOISE-FIGURE 10. sigma) = (2.5m).1b5) # of ns-2 radio model) # RADIO-TYPE RADIO-ACCNOISE #RADIO-TYPE RADIO-NONOISE # # RADIO-FREQUENCY: frequency (in heltz) (Identifying variable for # multiple radios) # RADIO-FREQUENCY 2. but it also make the execution time longer.0 # # PROPAGATION-PATHLOSS: pathloss model # FREE-SPACE: # Friss free space model. 0.0. This value must be smaller than # RADIO-RX-SENSITIVITY + RADIO-ANTENNA-GAIN of any node # in the model. simulation results may be # incorrect.0) # TWO-RAY: # Two ray model. 0.

/ber_bpsk.49583 #RADIO-RX-TYPE #BER-TABLE-FILE BER-BASED .9 # 15.0 # # RADIO-RX-SENSITIVITY: sensitivity of the radio (in dBm) # RADIO-RX-SENSITIVITY -91.0 #RADIO-RX-SNR-THRESHOLD 8.11 CSMA MACA #MAC-PROTOCOL TSMA #TSMA-MAX-NODE-DEGREE 8 #MAC-PROPAGATION-DELAY 1000NS # # # # # # PROMISCUOUS-MODE defaults to YES and is necessary if nodes want to overhear packets destined to the neighboring node.0 # # RADIO-RX-THRESHOLD: Minimum power for received packet (in dBm) # RADIO-RX-THRESHOLD -81. Otherwise the packet is dropped.0 # # RADIO-ANTENNA-GAIN: antenna gain (in dB) # RADIO-ANTENNA-GAIN 0. 108 . it receives the signal # without error.in # # RADIO-TX-POWER: radio transmition power (in dBm) # RADIO-TX-POWER 7. Setting it to "NO" may save a trivial amount of time for other protocols. # RADIO-RX-SNR-THRESHOLD needs to be specified. # BER-BASED: # It looks up Bit Error Rate (BER) in the SNR . # RADIO-RX-TYPE SNR-BOUNDED RADIO-RX-SNR-THRESHOLD 10.BER table # specified by BER-TABLE-FILE.0 # ############################## # MAC-PROTOCOL #MAC-PROTOCOL #MAC-PROTOCOL 802.# # RADIO-RX-TYPE: packet reception model # SNR-BOUNDED: # If the Signal to Noise Ratio (SNR) is more than # RADIO-RX-SNR-THRESHOLD (in dB). Currently this option needs to be set to YES only for DSR is selected as routing protocol.

0001 #RED-TYPICAL-PACKET-TRANSMISSION-TIME 64000NS ############################## # #ROUTING-PROTOCOL BELLMANFORD #ROUTING-PROTOCOL AODV #ROUTING-PROTOCOL DSR #ROUTING-PROTOCOL LAR1 #ROUTING-PROTOCOL WRP #ROUTING-PROTOCOL FISHEYE #ROUTING-PROTOCOL #ZONE-RADIUS ROUTING-PROTOCOL #ROUTING-PROTOCOL #STATIC-ROUTE-FILE # # # # # # ZRP 2 ARAN STATIC ROUTES. By specifying the following parameters as YES. The file will need to contain parameters that will be use to determine connections and other characteristics of the particular application. it is easy to do the filtering.conf The following parameters determine if you are interested in the statistics of a single or multiple layer. Layer: RadioNoCapture.IN The following is used to setup applications such as FTP and Telnet. If you need the statistics for a particular node or particular protocol.#PROMISCUOUS-MODE NO ############################## # # Currently the only choice. Every single line in the file is of the following format: Node: 9. All the statistics are compiled together into a file called "GLOMO. the simulation will provide you with statistics for that particular layer. APP-CONFIG-FILE # # # # # # # # # # # # # . NETWORK-PROTOCOL IP NETWORK-OUTPUT-QUEUE-SIZE-PER-PRIORITY 100 #RED-MIN-QUEUE-THRESHOLD 150 #RED-MAX-QUEUE-THRESHOLD 200 #RED-MAX-MARKING-PROBABILITY 0./all-app.1 #RED-QUEUE-WEIGHT . Total number of collisions is 0 APPLICATION-STATISTICS TCP-STATISTICS UDP-STATISTICS ROUTING-STATISTICS NETWORK-LAYER-STATISTICS MAC-LAYER-STATISTICS YES YES YES YES YES YES 109 .STAT" that is produced at the end of the simulation.

RADIO-LAYER-STATISTICS CHANNEL-LAYER-STATISTICS MOBILITY-STATISTICS YES YES YES # # GUI-OPTION: YES allows GloMoSim to communicate with the Java Gui # Vis Tool # NO does not GUI-OPTION GUI-RADIO GUI-ROUTING YES YES YES 110 .

no other items are sent. <dest> is the server node. CBR will run until the specified <end time> or until the end of the simulation. The inter-departure time for each item is 1 second. the following format is needed: In order to use CBR. <interval> is the inter-departure time between the application layer items. The inter-departure time for each item is 1 second. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # --------------------------------------------------------------CBR CBR simulates a constant bit rate generator. or the simulation ends. which ever comes first. <end time> is reached. This file is used to set the traffic generators for the data of the simulations. which ever comes first. <end time> is when to terminate CBR during the simulation. CBR will run until all <items to send> is transmitted or until the end of simulation. If <end time> is set to 0. If <items to send> is set to 0. <item size> is size of each application layer item. c) CBR 0 1 0 1460 1S 0S 0S Node 0 continuously sends node 1 items of 1460B each at the start of the simulation up to the end of the simulation. <items to send> is how many application layer items to send. 111 . <start time> is when to start CBR during the simulation. b) CBR 0 1 0 1460 1S 0S 600S Node 0 continuously sends node 1 items of 1460B each at the start of the simulation up to 600 seconds into the simulation. If the ten items are sent before 600 seconds elapsed. The inter-departure time for each item is 1 second. If <items to send> and <end time> are both greater than 0. CBR <src> <dest> <items to send> <item size> <interval> <start time> <end time> where <src> is the client node. CBR will will run until either <items to send> is done.Appendix E: Glomosim’s Application Configuration File This appendix presents the Glomosim’s application configuration file. EXAMPLE: a) CBR 0 1 10 1460 1S 0S 600S Node 0 sends node 1 ten items of 1460B each at the start of the simulation up to 600 seconds into the simulation. which ever comes first.

25S 0S 0S CBR 13 12 1000 512 0.25S 0S 0S CBR 14 17 1000 512 0.25S 0S 0S CBR 19 0 1000 512 0.25S 0S 0S 112 .# # --------------------------------------------------------------CBR 18 16 1000 512 0.25S 0S 0S CBR 10 12 1000 512 0.

1.sh This is one of the files that the main script calls to start the Glomosim simulation package with a specific configuration file passed to it.txt date.txt.date.txt .txt |grep SELFISH > 20-10-aranstats/20percent-selfish/20-10-aran-selfish#1.txt.cat /mnt/hgfs/ARAN/why.. 5 and 10 (m/s).date.txt |grep SELFISH > 20-1-aranstats/20percent-selfish/20-1-aran-selfish#1.sh This is the main script that is called under Linux to run different shell scripts that were created for different percentages of selfish nodes./glomosim 20-10-aran-config./glomosim 20-1-aran-config. Then.sh .sh aran-script-for-20-nodes-20selfish.txt. Its content is as follows: .cat /mnt/hgfs/ARAN/why.txt .mv glomo./glomosim 20-0-aran-config.Appendix F: Different Simulation and Linux Scripts This appendix presents the different simulation and Linux scripts that were created and used to facilitate the analysis and correlation of the Glomosim simulation runs.txt |grep SELFISH > 20-5-aran-stats/20percentselfish/20-5-aran-selfish#1.txt.rm -f /mnt/hgfs/ARAN/why.txt.txt date.txt date./aran-script-for-20-nodes-20selfish.cat /mnt/hgfs/ARAN/why.sh .date.txt 113 .stat 20-0-aran-stats/20percent-selfish/20-0-aran-stat#1./aran-script-for-20-nodes-10selfish..txt .mv glomo.rm -f /mnt/hgfs/ARAN/why.stat 20-10-aran-stats/20percent-selfish/20-10-aranstat#1.txt.txt .rm -f /mnt/hgfs/ARAN/why.in >/mnt/hgfs/ARAN/why.txt.mv glomo.txt./aran-script-for-20-nodes-0selfish. Each of these passed configuration files represent different nodes’ speeds: 0./aran-script-for-20-nodes-30selfish.rm -f /mnt/hgfs/ARAN/why.cat /mnt/hgfs/ARAN/why. aran-main-script. the output of the simulation is archived for further analysis of it later on.stat 20-1-aran-stats/20percent-selfish /20-1-aranstat#1..mv glomo..in >/mnt/hgfs/ARAN/why. Its content is as follows: date.in >/mnt/hgfs/ARAN/why./glomosim 20-5-aran-config.txt |grep SELFISH > 20-0-aran-stats/20percentselfish/20-0-aran-selfish#1.date.in >/mnt/hgfs/ARAN/why.stat 20-5-aran-stats/20percent-selfish/20-5-aran-stat#1.sh .

Layer: RoutingAran. Layer: RadioAccnoise.11. Node: 0. Layer: RoutingAran. Node: 0. Layer: RadioAccnoise. 13 Node: 0. Node: 0. chanl: 207 Node: 0.11. Layer: RoutingAran. Layer: RadioAccnoise. Txed = 21 Node: 0.11. Channel 121 Node: 0. 51 Node: 0. 0 Node: 0. Layer: 802.11. Layer: RoutingAran.11. Layer: RoutingAran. Layer: RoutingAran. Layer: 802. Layer: RoutingAran. above RX threshold: 21376 Node: 0. Layer: 802.txt This is a part of one of the files that was generated by the Glomosim simulation package as a result of one of my simulation runs. Layer: RoutingAran. Originated = 0 Node: 0. Node: 0.11. Layer: RoutingAran. Node: 0. Node: 0. Txed = 180 Node: 0. Layer: 802. Layer: RoutingAran. REP) Txed = 201 Node: 0. Node: 0. above RX sensitivity: 47109 Node: 0. Layer: RoutingAran. Layer: RoutingAran. Layer: RoutingAran. Layer: 802. to MAC: 18433 Node: 0. Re-sent = 0 Node: 0.11.039 Node: 0. Node: 0. Discovered = 0 Node: 0. Layer: RadioAccnoise. Txed = 4 Node: 0.11. Layer: 802. Layer: RadioAccnoise. Malicious Nodes = 0 Node: 0. Layer: 802.20-10-aran-stat#1. 225. Layer: RoutingAran.11. Its content is as follows: Node: 0. Layer: RadioAccnoise. Layer: 802. Node: 0. Layer: 802. Node: 0.11. Layer: 802. 42 Node: 0. from Source (after finding route) = 0 Node: 0. Passed Through Malicious Nodes = 213 Signals transmitted: 3073 Signals arrived with power Signals arrived with power Signals received and forwarded Collisions: 1326 Energy consumption (in mWhr): pkts from network: 0 UCAST (non-frag) pkts sent to BCAST pkts sent to chanl: 180 UCAST pkts rcvd clearly: 1179 BCAST pkts rcvd clearly: 1091 retx pkts due to CTS timeout: retx pkts due to ACK timeout: pkt drops due to retx limit: 2 RTS Packets ignored due to Busy RTS Packets ignored due to NAV Number of Route Requests (RDP) Number of Route Replies (REP) Number of Route Errors (ERR) Number of Route Errors (ERR) Number of CTRL Packets (RDP + Number of Routes Selected = 0 Number of Total Routes Number of Routes Containing Number of Hop Counts = 0 Total Route Acquisition Delay = Number of Data Txed = 184 Number of Data Packets Number of Data Packets Sent Out Number of Data Packets That 114 .

transmitted = 205 Node: 0. for Route = 0 Node: 0. Layer: RoutingAran. Another Node: 184 Node: 0.771668389 Node: 0. Layer: AppCbrServer. Layer: RoutingAran. because Node was Unreachable: 0 Node: 0. Layer: TransportUdp. this Node: 986 Node: 0. received: 986 Node: 0. Node: 0. 1854 Node: 0. Layer: AppCbrServer. received: 504832 Node: 0. Layer: NetworkIp. Layer: AppCbrServer. = 986 Node: 0. Then. Layer: RoutingAran. Layer: NetworkIp. the results of this 115 . Layer: RoutingAran. Layer: NetworkIp. Layer: RoutingAran.044893348 Node: 0. Node: 0. transmitted = 45692 Node: 0.023759505 Node: 0. Layer: AppCbrServer. 0. Layer: RoutingAran. Layer: TransportUdp. because TTL expired: 0 Node: 0. Node: 0.txt. 986. [s]: 249. Layer: NetworkIp. The Glomosim output file. Layer: AppCbrServer.Node: 0. Layer: AppCbrServer. Node: 0. such as the above 20-10-aran-stat#1. [s]: 0.sh This shell script file is used to measure the network throughput metric. Layer: RoutingAran. Layer: RoutingAran. Initial TTL 1.000000 Node: 0. Packets: 61250 Node: 0. Node: 0. second): 16172 Number of Data Packets Received Number of Data Packets Hops = Number of Packets Dropped = 0 Number of Packets Left waiting Number of Broken Links = 2 Number of Broken Link Retries = Number of Control bytes Number of Control packets Number of Packet Attempted to Number of Packets Routed For Number of Packets Delivered To Total of the TTL's of Delivered Average Hop Count Assuming 64 Number Fragments dropped Number Fragments dropped Number of pkts from application Number of pkts to application (0) Client address: 19 (0) First packet received at (0) Last packet received at (0) Average end-to-end delay (0) Session status: Closed (0) Total number of bytes (0) Total number of packets (0) Throughput (bits per Network Throughput. Layer: NetworkIp. Node: 0. Layer: AppCbrServer. 0 Node: 0. is being passed to this shell script to collect values related to the network throughput metric. Layer: NetworkIp. [s]: 0. be Sent to MAC: 389 Node: 0. Layer: NetworkIp. Layer: AppCbrServer.

awk This AWK script file is used to do the calculation of the network throughput metric and then print it out. Its content is as follows: BEGIN { sumctrlbytes = 0.awk This AWK script file is used to do the calculation of the overhead metric in bytes and then print it out. printf("Packet sent = %d \n".sumcountsent). is being passed to this shell script to collect values related to the overhead metric.shell script are redirected to another Linux AWK script to do the actual calculation.sumcountrcv). The Glomosim output file.txt. sumcountsent=0 } { if ($4=="AppCbrServer.awk Overhead-bytes. Number of Control bytes transmitted =' $1 | awk -f Overhead-bytes." && $10=="sent:"){sumcountsent+=$11} } END { printf("Packet received = %d \n".awk Network-Throughput. Then." && $7=="Data" && $8=="Txed"){sumdatapkts+=$10} 116 . such as the above 20-10-aran-stat#1. the results of this shell script are redirected to another Linux AWK script to do the actual calculation. Its content is as follows: BEGIN { sumcountrcv = 0. (0) Total number of packets sent:' $1 | awk -f Network-Throughput. sumdatapkts=0 } { if ($4=="RoutingAran. Number of Data Txed =' -e 'RoutingAran. printf("Network Throughput = %f \n". Its content is as follows: grep -e 'RoutingAran." && $10=="received:"){sumcountrcv+=$11} if ($4=="AppCbrClient.sumcountrcv/sumcountsent)} Overhead-bytes. (0) Total number of packets received:' -e 'AppCbrClient." && $7=="Control" && $8=="bytes"){sumctrlbytes+=$11} if ($4=="RoutingAran.sh This shell script file is used to measure the overhead metric in bytes. Its content is as follows: grep -e 'AppCbrServer.

} END { if (sumdatapkts>0) {printf("Routing Control bytes = %d \n". printf("Routing Data packets = %d \n".txt." && $7=="Data" && $8=="Txed"){sumdatapkts+=$10} } END { if (sumdatapkts>0) {printf("Routing Control packets = %d \n".sh This shell script file is used to measure the average end-to-end delay metric. The Glomosim output file." && $7=="Control" && $8=="packets"){sumctrlpkts+=$11} if ($4=="RoutingAran. Its content is as follows: BEGIN { sumctrlpkts = 0. is being passed to this shell script to collect values related to the overhead metric. Then.sumctrlpkts). Its content is as follows: grep -e 'RoutingAran.sumdatapkts).sh This shell script file is used to measure the overhead metric in packets. Number of Control packets transmitted =' $1 | awk -f Overhead-packets. Number of Data Txed =' -e 'RoutingAran. The Glomosim output file. printf("Overhead(bytes) = %f \n". the results of this shell 117 .sumctrlbytes).txt.awk Overhead-packets. such as the above 20-10-aran-stat#1. printf("Overhead(packets) = %f \n".sumctrlpkts/sumdatapkts)} } Average-end-to-end-delay. such as the above 20-10-aran-stat#1.sumctrlbytes/sumdatapkts)} } Overhead-packets. printf("Routing Data packets = %d \n". is being passed to this shell script to collect values related to the end-to-end delay metric. sumdatapkts=0 } { if ($4=="RoutingAran. the results of this shell script are redirected to another Linux AWK script to do the actual calculation. Then.awk This AWK script file is used to do the calculation of the overhead metric in packets and then print it out.sumdatapkts).

awk This AWK script file is used to do the calculation of the average route acquisition delay metric and then print it out.sum_average_end_to_end_delay/count)} Average-Route-Acquisition-Delay. printf("Count of Average-end-to-end-delay = %f \n". the results of this shell script are redirected to another Linux AWK script to do the actual calculation.awk Average-Route-Acquisition-Delay. 118 . count= 0 } { if ($4=="AppCbrServer." && $7="Acquisition" && $8=="Delay"){sum-routeacq-delay+=$10. Its content is as follows: BEGIN { sum-route-acq-delay = 0.script are redirected to another Linux AWK script to do the actual calculation.count). Total Route Acquisition Delay =' $1 | awk -f Average-Route-Acquisition-Delay.txt. The Glomosim output file.awk This AWK script file is used to do the calculation of the average end-to-end delay metric and then print it out. Its content is as follows: grep -e 'AppCbrServer. (0) Average end-to-end delay' $1 | awk -f Average-end-to-end-delay. Then. Its content is as follows: grep -e 'RoutingAran. is being passed to this shell script to collect values related to the route acquisition delay metric.awk Average-end-to-end-delay.sh This shell script file is used to measure the average route acquisition delay metric. count+=1} } END { printf("End-to-end-delay = %f \n". count = 0 } { if ($4=="RoutingAran. printf("Average-end-to-end-delay = %f \n". such as the above 20-10-aran-stat#1.sum_average_end_to_end_delay)." && $6=="Average" && $7=="end-toend"){sum_average_end_to_end_delay +=$10. Its content is as follows: BEGIN { sum_average_end_to_end_delay = 0.

the results of this shell script are redirected to another Linux AWK script to do the actual calculation.count).sum-route-acq-delay/count)} } Average-Path-Length. printf("Routing Data packets = %f \n".sumroute-acq-delay). Its content is as follows: grep -e 'RoutingAran.txt. printf("Count of Route Acquisition Delay = %d \n".count+=1} } END { if (count>0) {printf("Routing: Route Acquisition Delay = %d \n". printf("Routing: Average Route Acquisition Delay = %d \n"." && $7=="Data" && $8=="Txed") {sumdatapkts+=$10} if ($4=="RoutingAran.sumdatapkts/sumdatapktshops)} } { 119 . Its content is as follows: BEGIN { sumdatapktshops = 0. printf("Average Path Length = %f \n".awk Average-Path-Length.awk This AWK script file is used to do the calculation of the average path length metric and then print it out.sumdatapktshops). Number of Data Txed =' -e 'RoutingAran.sh This shell script file is used to measure the average path length metric. is being passed to this shell script to collect values related to the average path length metric. sumdatapkts = 0 } { if ($4=="RoutingAran.sumdatapkts). The Glomosim output file. such as the above 20-10-aran-stat#1. Number of Data Packets Hops =' $1 | awk -f Average-Path-Length. Then." && $7="Data" && $9=="Hops") {sumdatapktshops+=$11} } END if (sumdatapktshops>0) {printf("Routing Data Packets Hops = %f \n".

} if(SelfishNodesPercentage >= 30) { if(node->nodeAddr % 10 == 7) aran->isSelfish = 1. I set the percentage of selfish nodes in my MANET environment and then I mod the nodes’ addresses over the percentage of selfish nodes and those resulting in a predefined result are designated as selfish nodes. } 120 . } if(SelfishNodesPercentage >= 20) { if(node->nodeAddr % 10 == 6) aran->isSelfish = 1. aran->isSelfish = if(SelfishNodesPercentage >= 10) { if(node->nodeAddr % 10 == 5) aran->isSelfish = 1. Here is the code that was used: //Setting the selfish nodes’ percentage SelfishNodesPercentage=10.Appendix G: Random number generator to designate selfish nodes This appendix presents the source code of the random number generator that is used to select the selfish nodes.

Sign up to vote on this title
UsefulNot useful