This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
WIRELESS ad hoc networks are comprised of Mobile Nodes that are self-organizing and cooperating to ensure routing of packets among themselves. They provide robust communication in a variety of hostile environments, such as communication for the military or in disaster recovery situations when all infrastructures are down.
Since the network topology of ad hoc networks is unstable and changes frequently with nodes mobility, traditional routing protocols in static networks are not efficient for ad hoc networks. Routing protocols for ad hoc networks can be classified broadly as either proactive, reactive, or hybrid (combining both behaviors).
Proactive protocols continuously exchange network topology information so as to constantly monitor topology changes and use that knowledge for efficient, low latency data transmission. In their turn, proactive protocols can be classified into two categories: link state routing and distance vector routing. Common proactive routing protocols include Dynamic Destination-Sequenced Distance-Vector Routing (DSDV), Optimized Link State Routing (OLSR), Multicast Optimized Link State Routing (MOLSR), etc.
Since the topologies of ad hoc networks depend on node locations and since nodes are mobiles, updates of topologies may occur more frequently than static networks, especially at high node mobility. Due to the large number of control packets required by the proactive behavior that affects the battery longevity of the MNs and restricts the goodput on the channel.
Reactive protocols were introduced to remedy the above shortcomings. These adopt a lazy approach to communication requirements, where nodes reacts only on-demand to data transmission requests and perform path finding operations only when needed. Reactive protocols do effectively save channel and battery power usage as they generate fewer control packets when there is no demand for transmission. The most common reactive protocols include Ad Hoc On-Demand Distance Vector Routing (AODV), Dynamic Source Routing (DSR), Source Routing-Based Multicast Protocol (SRMP), etc.
1.2 AIM AND OBJECTIVES
When we are in the position to send the data packets an Ad-Hoc network is established. But the problem in such network is that when it broadcasts the data packet it is sent to all the nodes in the network. In such case there is possibility of misuse of data and data loss.
To prevent the data packets from such problem of misuse of data and data loss we are going to apply the encryption and decryption techniques on AODV protocol for its security. The technique can work as the data to be sent is encrypted at the source node and intermediate nodes can't identify the data and destination node decrypts the data and gains the required original data.
1.3 RESEARCH METHODS
In this direction we introduce some simple encryption and decryption technique using symmetric cryptography for Ad Hoc On Demand Distance Vector Routing Protocol using Network Simulator. In which one can easily know how exactly the network works in a specific environment without actually establishing it. For this some simple encryption, decryption algorithm are used in order to assure security of the data that is being send at the time of establishment of the path from source to the destination, so that only source node and destination node can identify the data rather than the intermediate nodes.
Besides protocol security, another equally important issue to consider in the design of security aware routing protocol for MANET is efficiency of any protocol regarding to the transfer of the data which is definitely served by this protocol.Also,as we are using Network Simulator, so the network need not to be established before assurance of efficient working of the protocol, which definitely enlarges the scope for the experimentation regarding the different routing and encryption algorithm. So by using this software we can develop secure protocol named the Security Aware Ad Hoc On Demand Distance Vector Routing Protocol having efficiency as well as security.
1.3 THESIS OUTLINE
Chapter 1 is about the scope and aim of the project work. It specifies the research methods to be used.
Chapter 2 gives a literature review describing the OSI model, Types of protocols, design parameters etc.
Chapter 3 describes about language being used to design project.
Chapter 4 provides a detail analysis report of what is routing, how AODV protocol works and security can be provided to it.
Chapter 5 provides the design outline of which methods are used and how the functions are to be implemented to design the software.
Chapter 6 gives the implementation.
Chapter 7 describes the complete testing.
Chapter 8 gives documentation on how to work with the protocols.
Chapter 9 gives the applications of the software.
Chapter 10 concludes the project and provides with the improvement in the design and security in the future.
Ad hoc networks are characterized by a lack of infrastructure, and by random and quickly changing network topology, thus the need of robust dynamic routing protocol that can accommodate such an environment. Consequently, many routing algorithms have come into existence to satisfy the need of communication in such network. A routing protocol is a protocol that specifies how routers communicate with each other to disseminate information that allows them to select router between the two nodes on a network. Typically, each router has a priori knowledge only of its immediate neighbors. A routing protocol shares this information so that routers have knowledge of the network topology at large.
2.2.1 REVIEW OF AD HOC NETWORK
According to Royer and Toh there are currently two variations of mobile wireless networks, infrastructure based network i.e. those networks with fixed and wired gateways. The bridges for these networks are base stations. A mobile unit within these networks connects to, and communicates with, the nearest base station that is within its communication radius. As the mobile travels out of range of one base station into the range of another, a \hand-oÂ® "occurs from the old base stations to the new, and the mobile is able to continue communication seamlessly throughout the network. Typical example is WLAN. Second type of mobile wireless network is infra-structure less network called as ad-hoc network, which has no fixed routers . All nodes are capable of movements and can be connected dynamically in an arbitrary manner. Nodes of this network functions as routers which discover route and maintain it for other nodes in the network.
Fig 2.1: Classification of Routing Protocol
2.2.2 WHAT IS ROUTING?
Routing is the act of moving information across an internet work from a source to destination. Along the way at least one intermediate node typically is encountered. Routing is often contrasted with bridging, which might seem to accomplish precisely the same thing to the casual observer. the primary difference between the two is that bridging occurs at Layer2(the link layer)of the OSI reference model, where as routing occurs at Layer 3(the network layer).this distinction provides routing and bridging with different information to use in process of moving information from source to destination ,so the two functions accomplish their tasks in different ways.
2.2.3 ROUTING COMPONENTS
Routing involves two basic activities: determining optimal routing paths and transporting information groups (typically called packets) through an internet work. In the context of routing process, the latter of these is referred to as packet switching. Although packet switching is relatively straight forward, path determination can be very complex.
2.3 OSI MODEL
The seven Layer of OSI model are:
Fig 2.2: OSI Model
The functions of the seven layers of the OSI model are:
The Application layer is responsible for providing end-user services, such as file transform, electronic messaging, e-mail, virtual terminal access, and network management. This is the Layer with which user interact.
The Presentation layer is responsible for defining the syntax, which two network host use to communicate. Encryption and compression should be presentation Layer function.
The Session Layer is responsible for establishing process-to-process communication between network hosts.
The Transport Layer is responsible for delivering messages between two hosts. The transport Layer should be responsible for fragmentation and reassembly.
The Network Layer is responsible establishing for data transfer through the network. Router operates in the network Layer.
Data Link Layer
The Data Link Layer is responsible for communication between adjacent network nodes. Hubs and switches operate at data link Layer.
The Physical Layer is responsible for bit-level transmission between network nodes. Physical Layer defines items such as: connector types, cable types, voltage and pin-out.
2.3 APPLICATION OF MOBILE AD HOC NETWORKS
A MANET is a dynamic multi hop wireless network that is established by a group of mobile nodes on a shared wireless channel. Mobile ad hoc networks can be military use, emergency use, wireless sensor networks and also can have mesh wireless network architecture.
2.3.1 MILITARY APPLICATIONS
Use of ad hoc networks in military becomes more and more popular; Using ad hoc networks makes the setting of communications between soldiers easy. In such applications, the used ad hoc networks need to be reliable and secure. The ability of multicast required when the group leader in the army want to give order to all his soldiers.
2.3.2 EMERGENCY OPERATIONS
In emergency situations such as earthquakes, the wired networks could be destroyed. There will be need of wireless network which could be deployed quickly for co ordination of rescue.
An example is the design for future public safety communications. An European project called Wireless Deployable Network System(WIDENS) concentrated their work on this field. WIDENS have an idea that using ad hoc network to incorporate with existing TETRA network is used for public safety.
2.3.3 WIRELESS MESH NETWORKS
Wireless mesh networks are ad hoc wireless networks which are formed to provide communication infrastructure using mobile or fixed nodes/users. The mesh topology provides alternative path for data transmission from the source to the destination. It gives quick reconfiguration when the firstly chosen path fails. Wireless mesh network should be capable of self-organization and self-maintenance.the main advantages of wireless mesh networks are high speed, low cost, quick deployment, high scalability and high availability.
It works on 2.4 GHz and 5GHz frequency bands, depending on the physical layer used. For example, if IEEE 802.11a is used, the speed can be up to 54 Mbps.An application example of wireless mesh network could be a wireless mesh networks in a residential zone. which the radio relay devices are built on top of the rooftops. In this situation, once one of the nodes in this residential area is equipped with the wired link to the internet, this node could be the gateway node. Others could connect to the internet from this node. Other possible deployments are highways, business zones and university campus.
2.3.4 WIRELESS SENSOR NETWORKS
Wireless sensor networks use sensors to provide a wireless communication infrastructure. Sensor nodes are tiny devices used for sensing physical parameters, processing data and communicating over the networks to the monitoring station. The application areas are military, health care, home security and environmental monitoring. There are some special characteristics which make sensor network different from other ad hoc networks.
In the sensor network, nodes could be assumed to be static, that is, sensor networks need not to be in all cases designed to support the mobility. In addition, power constraint is one of the most important factors that have to be considered carefully. The limitation of power is mainly caused by the working environment of sensor network which is often harsh. As a result, it is impossible to recharge a sensor node battery, so effective protocols are required. For example, in the network layer, people need to design a low power consumption routing protocol, and power consumption will give the first priority to be considered during the route selection phase.
2.4 DESIGN GOALS
Routing algorithm has one or more following design goals:
2. Simplicity and Low Overhead.
3. Robustness and Stability.
4. Rapid Convergence.
Optimality refers to the capability of the routing algorithm to select the best route, which depends on the metrics and metric weightings used to make the calculation for example, one routing algorithm may use a number of hops and delay, but it may weight delay more heavily in the calculation. Naturally, routing protocol must define their metric calculation algorithms strictly.
Smplicity and Low Overhead
Routing algorithm also are designed to be as simple as possible . in other words, the routing algorithm must offer its functionality efficiently, with a minimum of software and utilization overhead. Efficiency is particularly important when the software implementing the routing algorithm must run on a computer with limited physical resources.
Robustness and Stability
Routing algorithm must be robust, which means that should perform correctly in the face of unusual or unforeseen circumstances, such as hardware failures, high load conditions, and incorrect implementations. because router are located at network junction points, they can cause considerable problems when they fail. the best routing algorithms are often those have withstood the test of time and that have proven stable under verity of network conditions.
In addition routing algorithms must converge rapidly. Convergence is the process of agreement, by all routers, on optimal routers. When the network event causes router to either go down or become available, router distribute routing update messages that permeate networks, stimulating recalculation of optimal routes and eventually causing all routers to agree on these routes. Routing algorithms that converge slowly can cause routing loops or network outages.
Routing algorithms should also be flexible, which means that they should quickly and accurately adapt to a verity of network circumstances. Assume, for example, that a network segment goes down. As many routing algorithm become aware of the problem, they will quickly select the next best path for all routs normally using that segment. Routing algorithm can be program can be programmed to adopt to change in network bandwidth, router queue size, and network delay, among other variable.
2.5 TYPES OF ROUTING PROTOCOL
2.5.1 PROACTIVE ROUTING PROTOCOLS
In Proactive, i.e. Table-driven routing protocols attempt to maintain consistent, up-to-date routing information from each node to every other node in the network. These protocols require each node to maintain one or more tables to store routing information, and they respond to changes in network topology by propagating hello messages throughout the network in order to maintain a consistent network view.
Example: Destination- Sequenced-Distance-Vector Routing, Wireless Routing Protocol (WRP)
22.214.171.124 Destination- Sequenced-Distance-Vector Routing (DSDV):- Destination- Sequenced-Distance-Vector Routing is the table driven routing based on classical Bellman-ford routing mechanism. Every mobile node in the network maintains routing table in which all of the possible destinations within the network and the number of hops to each destination are recorded. Each entry is marked with the sequence number assigned by the destination node which is used to avoid formation of routing loops. Routing table updates are periodically transmitted in order to maintain consistency.
126.96.36.199 Wireless Routing Protocol (WRP):- The WRP protocol also guarantees loops freedom and it avoids temporary routing loops by using the predecessor information. However, WRP requires each node to maintain four routing tables. This introduces a significant amount of memory overhead at each node as the size of the network increases. Another disadvantage of WRP is that it ensures connectivity through the use of hello messages. These hello messages are exchanged between neighboring nodes whenever there is no recent packet transmission. This will also consume a significant amount of bandwidth and power as each node is required to stay active at all times (i.e., they cannot enter sleep mode to conserve their power). The Table 2.1 and Table 2.2 outline the basic characteristics and complexity of the two routing protocols discussed above.
2.5.2 REACTIVE ROUTING PROTOCOLS
Another approach used for routing is reactive approach. This type of routing creates routes only when desired by the source node. When a node requires a route to a destination, it initiates a route discovery process within the network. This process is completed once a route is found or all possible route permutations have been examined. Once a route has been established, it is maintained by a route maintenance procedure until either the destination becomes inaccessible along every path from the source or until the route is no longer desired.
Example: Dynamic State Routing (DSR), Ad hoc On-Demand Distance Vector (AODV), Temporally Ordered Routing Algorithm (TORA)
188.8.131.52 Dynamic State Routing (DSR):- The DSR protocol requires each packet to carry the full address (every hop in the route), from source to the destination. This means that the protocol will not be very effective in large networks, as the amount of overhead carried in the packet will continue to increase as the network diameter increases. Therefore, in highly dynamic and large networks the overhead may consume most of the bandwidth. However, this protocol has a number of advantages over other routing protocols, and in small to moderately size networks (perhaps up to a few hundred nodes), this protocol performs better. An advantage of DSR is that nodes can store multiple routes in their route cache, which means that the source node can check its route cache for a valid route before initiating route discovery, and if a valid route is found there is no need for route discovery. This is very beneficial in network with low mobility, because the routes stored in the route cache will be valid for a longer period of time. Another advantage of DSR is that it does not require any periodic beaconing (or hello message exchanges), therefore nodes can enter sleep node to conserve their power. This also saves a considerable amount of bandwidth in the network.
184.108.40.206 Ad hoc On-Demand Distance Vector (AODV):-The Ad hoc On-demand Distance Vector (AODV) protocol, one of the on-demand routing algorithms that has receive the most attention, however, does not utilize multiple paths. It joins the mechanisms of DSDV and DSR. The periodic beacons, hop-by-hop routing and the sequence numbers of DSDV and the pure on-demand mechanism of Route Discovery and Route Maintenance of DSR are combined. In AODV at Every instance, route discovery is done for fresh communication which consumes more bandwidth and causes more routing over head. The source prepares RREQ packet which is broadcast to it's neighboring nodes, if neighboring node will keep backward path towards source. As soon as destination receives the RREQ packet, it sends RREP packet on received path. This RREP packet is unicast to the next node on RREP path. The intermediate node on receiving the RREP packet make reversal of path set by the RREQ packet. As soon as RREP packet is received by the source, it starts data transmission on the forward path set by RREP packet. Sometimes while data transmission is going on, if path break occurs due to mobility of node out of coverage area of nodes on the active path, data packets will be lost. When the network track requires real time delivery (voice, for instance), dropping data packets at the intermediate nodes can be costly. Likewise, if the session is a best effort, TCP connection, packet drops may lead to slow start, timeout, and throughput degradation.
220.127.116.11 Temporally Ordered Routing Algorithm (TORA):-Temporally ordered routing algorithm (TORA) is a distributed routing algorithm. The basic underlying algorithm is the one in the family is referred to as link reversal algorithms. TORA is designed to minimize reaction to topological changes. The key concept is that control messages are typically localized to very small set of nodes. It guarantees that all routes are loop free and typically provides many routes to source/destination pair .It provides only the routing mechanism and depends upon Internet MANET Encapsulation Protocol (IMEP) for other underlying functions. Each node has a quintuple associated with it, as represented
â€¢ Logical time of link failure,
â€¢ The unique ID of the node that defined the new reference level,
â€¢ A reflection indicator bit,
â€¢ A propagation ordering parameter, and
â€¢ The unique ID of the node.
The first three elements collectively represent the reference level. A new reference level is defined each time a node loses its last downstream link due to link failure.
Tables 2.3 and 2.4 outline the basic characteristics and complexity of the three routing protocols discussed in this section
2.5.3 HYBRID ROUTING PROTOCOLS
Hybrid Routing Protocols combines the merits of proactive and reactive routing protocols by overcoming their demerits. In this section we put some light on existing hybrid routing protocol.
Example: Zone Routing Protocol (ZRP), Zone-based Hierarchical Link State (ZHLS)
18.104.22.168 Zone Routing Protocol (ZRP):-Zone routing protocol is a hybrid routing protocol which effectively combines the best features of proactive and reactive routing protocol [2, 17]. The key concept is to use a proactive routing scheme within a limited zone in the r-hop neighborhood of every node, and use reactive routing scheme for nodes beyond this zone. An Intra-zone routing protocol (IARP) is used in the zone where particular node employs proactive routing whereas inter-zone routing protocol (IERP) is used outside the zone. The routing zone of a given nodes is a subset of the network, within which all nodes are reachable within less than or equal to the zone radius hops. The IERP is responsible for finding paths to the nodes which are not within the routing zone. When a node S wants to send data to node D, it checks whether node D is within its zone. If yes packet is delivered directly using IARP. If not then it border casts (uses unicast to deliver the packet directly to border nodes) the RREQ packet to its peripherals nodes. If any peripheral nodes find D in its zone, it sends RREP packet; otherwise the node rebroadcasts the RREQ packet to the peripherals nodes. This procedure is repeated until node D is located.
22.214.171.124 Zone-based Hierarchical Link State (ZHLS):-Unlike ZRP, ZHLS routing protocol employs hierarchical structure. In ZHLS, the network is divided into non-overlapping zones, and each node has a node ID and a zone ID, which is calculated using a GPS. The hierarchical topology is made up of two levels: node level topology and zone level topology, as described previously. In ZHLS location management has been simplified. This is because no cluster-head or location manager is used to coordinate the data transmission. This means there is no processing overhead associated with cluster head or Location Manager selection when compared to HSR, MMWN and CGSR protocols . This also means that a single point of failure and traffic bottlenecks can be avoided. Another advantage of ZHLS is that it has reduced the communication overheads when compared to pure reactive protocols such as DSR and AODV. In ZHLS, when a route to a remote destination is required (i.e. the destination is in another zone), the source node broadcast a zone level location request to all other zones, which generates significantly lower overhead when compared to the flooding approach in reactive protocols. Another advantage of ZHLS is that the routing path is adaptable to the changing topology since only the node ID and the zone ID of the destination is required for routing. This means that no further location search is required as long as the destination does not migrate to another zone. However, in reactive protocols any intermediate link breakage would invalidate the route and may initiate another route discovery procedure. The Disadvantage of ZHLS is that all nodes must have a preprogrammed static zone map in order to function. This may not feasible in applications where the geographical boundary of the network is dynamic. Nevertheless, it is highly adaptable to dynamic topologies and it generates far less overhead than pure reactive protocols, which means that it may scale well to large networks.
2.6 ROUTING METRICS
Routing table information used by switching software to select the best route. But how, specifically, are routing table built? What is the specific nature of the information that they content? How routing algorithms determine that one route is preferable to others?
Routing algorithms can used many different metrics to determine the best route. Sophisticated routing algorithms can base route selection on multiple metrics, combining them in single (hybrid) metric. All of the following metric has been used:
Route Acquisition time
Packet Delivery ratio
Average End-to-End Delay
Percentage Out of Order Delivery
The short description of parameters is as below:
Route Acquisition Time
It is the time required to establish route(s) when requested and therefore is of good importance to on demand routing protocols.
Packet Delivery Ratio
The ratio of the data delivered to destination (i.e. throughput) to the data send out by the sources.
Average End-To-End Delay
The average time it takes for packet to reach the destination. It includes all possible delays in the source and each intermediate host, caused by routing discovery, queuing at the interface queue, transmission at the MAC layer, etc. . Only successfully delivered packets are counted.
It is the total consumed energy divided by the number of delivered packets. We measure the power consumption because it is one of the precious commodities in mobile communication.
The routing load per unit data successfully delivered to the destination. The routing load is measure as the number of protocol messages transmitted hop wise (i.e. the transmission on each hop is counted once). A unit data can be a byte or packet.
Percentage Out Of Order Delivery
An external measure of connectionless routing performance of particular interest to transport your protocol such as TCP, which prefer in order delivery.
3.1 SOFTWARE REQUIREMENTS
3.1.1 WHAT IS NETWORK SIMULATION?
Simulation can be defined as "Imitating or estimating how events might occur in a real situation". It can involve complex mathematical modeling, role-playing without the aid of technology, or combinations. The importance of simulation lies in the consideration of realistic conditions that change as a result of behavior of others involved and thus we can anticipate the sequence of events or the final outcome. Different simulators such as ns2, GloMoSim, OPNET etc., are being used by researchers in order to evaluate the routing protocols. We have used ns2 for the evaluation of the proposed routing protocol as the same is an open source , freely available and the programming languages used are C++, Tcl and OTcl.
The Network Simulator (ns) is an event driven network simulator developed at UC Berkeley that simulates variety of IP networks. It implements network protocols such as Transmission Control Protocol and User Datagram Protocol, traffic source behavior such as File Transfer Protocol, Telnet, Web, Constant Bit Rate and Variable Bit Rate, queue management mechanism, routing algorithms and more. ns also implements multicasting and some of the MAC layer protocols for LAN simulations. The ns project is now a part of the VINT project that develops tools for simulation results display, analysis and converters that convert network topologies generated by well-known generators to ns formats. Currently, ns (version 2) written in C++ and OTcl (Tcl script language with Object-oriented extensions developed at MIT) is available.
Figure 3.1, presents a simplified user's view, ns is Object-oriented Tcl (OTcl)script interpreter that has a simulation event scheduler and network component object libraries, and network setup module libraries.
To setup a simulation network, an OTcl script is written and to simulate it the script is executed which initiates an event scheduler and the network topology is setup using the network objects, controlling the traffic sources and the time to start and stop the transmitting of packets.Figure 3.2 shows the general architecture of ns. In this figure, a general user (notan ns developer) can be thought of standing at the left bottom corner, designing and running simulations in Tcl using the simulator objects in the OTcl library. The event schedulers and most of the network components are implemented in C++ and available to OTcl through the OTcl linkage that is implemented using tcl The whole thing together makes the ns, which is a OO extended Tcl interpreter with network simulator libraries.
FIGURE 3.2:ARCHITECTURAL VIEW OF NS
FIGURE 3.3:INTERNAL MECHANISM OF NS2 FOR ROUTING IN MANET
The biggest advantage of network animator (NAM) is that it provides a graphical user interface (GUI) for the different simulation environment according to the parameters specified by the user. The Xgraph utility generates the graphical output of the input data (or trace files).
FIGURE 3.4: DATA FLOWS INTO NAM FROM NETWORK DATA AND OTHER SOURCES AFTER PRE PROCESSING INTO NAM TRACE FORMAT
MINIMUM SYSTEM REQUIREMENTS TO INSTALL AND USE NETWORK SIMULATOR 2
RAM : 1 GB
PROCESSOR : Pentium 4
OPERATING SYSTEM : LINUX FEDORA 9(sulphur)
HARD DISK SPACE : 13.5 GB(Includes 500 MB free space on disk)
ANALYSIS OF PROJECT
An Ad-hoc network is a collection of wireless mobile hosts forming a temporary network without the aid of any established infrastructure or centralized administrator. In such an environment, it may be necessary for one mobile host to want the aid of other host in forwarding a packet to its destination, due to limited range of each mobile host's wireless transmission.
5.2 ROUTING IN MANETS
Efficient routing of packets is a primary MANET challenge. Conventional networks typically rely on distance-vector or Link-state algorithms, which depend on periodic broadcast advertisement of all routers to keep routing tables up-to-date. In some cases, MANETs also use these algorithms, which ensure that the route to every host is always known. However, this approach presents several problems:
Periodically updating the network topology increases bandwidth overhead.
Repeatedly awakening host to receive and send information quickly exhausts batteries.
The propagation of routing information, which depends on the number of existing host, causes overloading there by reducing scalability.
Redundant routes accumulate needlessly, and
Communication system often cannot respond to dynamic changes in the network topology quickly enough.
MANETs use multi-hop rather than single hop routing to deliver packets to their destination.
4.3 AD HOC ON-DEMAND DISTANCE VECTOR ROUTING PROTOCOL (AODV)
4.3.1 GENERAL WORKING OF AODV
Ad hoc On-Demand Distance Vector (AODV) routing is a routing protocol for mobile ad hoc networks and other wireless ad-hoc networks. It is jointly developed in Nokia Research Centre of University of California, Santa Barbara and University of Cincinnati by C. Perkins and S. Das. It is an on-demand and distance-vector routing protocol, meaning that a route is established by AODV from a destination only on demand.AODV is capable of both unicast and multicast routing. It keeps these routes as long as they are desirable by the sources. Additionally, AODV creates trees which connect multicast group members. The trees are composed of the group members and the nodes needed to connect the members. The sequence numbers are used by AODV to ensure the freshness of routes. It is loop-free, self-starting, and scales to large numbers of mobile nodes .AODV define three types of control messages for route maintenance:
Figure 4.1 Basic AODV Protocol
Figure 4.2 AODV Protocol Messaging
RREQ- A route request message is transmitted by a node requiring a route to a node. As an optimization AODV uses an expanding ring technique when flooding these messages. Every RREQ carries a time to live (TTL) value that states for how many hops this message should be forwarded. This value is set to a predefined value at the first transmission and increased at retransmissions. Retransmissions occur if no replies are received. Data packets waiting to be transmitted (i.e. the packets that initiated the REQ). Every node maintains two separate counters: a node sequence number and a broadcast_ id. The RREQ contains the following fields :-
The pair <source address, broadcast ID> uniquely identifies a RREQ. Broadcast_id is incremented whenever the source issues a new RREQ.
RREP- A route reply message is unicasted back to the originator of a RREQ if the receiver is either the node using the requested address, or it has a valid route to the requested address. The reason one can unicast the message back, is that every route forwarding a RREQ caches a route back to the originator.
RERR- Nodes monitor the link status of next hops in active routes. When a link breakage in an active route is detected, a RERR message is used to notify other nodes of the loss of the link. In order to enable this reporting mechanism, each node keeps a â€•precursor list'',containing the IP address for each its neighbors that are likely to use it as a next hop towards each destination.
Figure 4.3: A possible path for a route replies if A wishes to find a route to J 
The above Figure 4.3 illustrates an AODV route lookup session. Node A wants to initiate traffic to node J for which it has no route. A transmit of a RREQ has been done, which is flooded to all nodes in the network. When this request is forwarded to J from H, J generates a RREP. This RREP is then unicasted back to A using the cached entries in nodes H, G and D.
4.3.2 PHASES OF AODV
126.96.36.199 Route Discovery
Route discovery is the process of creating a route to a destination when a node lacks a route to it. When a node S wishes to communicate with a node T it initiates a Route Request (RREQ) message including the last known sequence number for T and a unique RREQ id that each node maintains and increments upon the sending of an RREQ. The message is flooded throughout the network in a controlled manner, i.e., a node only forwards an RREQ if it has not done so before; the RREQ id is used to detect duplicates. Each node forwarding the RREQ creates a reverse route for itself back to S using the address of the previous hop as the next hop entry for the node originating the RREQ.When the RREQ reaches a node with a route to T (possibly T itself) a Route Reply (RREP), containing the number of hops to T and the sequence number for that route, is sent back along the reverse path. An intermediate node must only reply if it has a fresh route, i.e., the sequence number for T is greater than or equal to the destination sequence number of the RREQ. Since replies are sent on the reverse path, AODV do not support asymmetric links. Each node receiving this RREP creates a forward route to T in its routing table, and adds the node that transmitted the RREP in precursor list for this entry. The precursor list is a list of nodes that might use this node as next hop towards a destination. Route discovery is illustrated in figure 4.4, where node 2 wants to communicate with node 9 and floods an RREQ message in the network. Node 9 replies with RREP.Intermediate nodes learn routes to both source and destination nodes via the RREQ and RREP packets.
Figure 4.4: Route discovery in AODV. Node 2 wants to communicate with
node 9. Each node forwarding the RREQ creates a reverse route to node 2
used when sending back the RREP.
If an intermediate node has a route to a requested destination and sends back an RREP, it must discard the RREQ. Furthermore, it may send a gratuitous RREP to the destination node containing address and sequence number for the node originating the RREQ. Gratuitous RREPs are sent to alleviate any route discovery initiated by the destination node. It might not have received any RREQs and has not learned a route to the originator of the RREQ.
Figure 4.5: Generation of an RREP by an intermediate node. Node 4 has a
route to node 9 and sends an RREP to node 2 and a gratuitous RREP to node 9
188.8.131.52 Route Maintenance
Route maintenance is the process of responding to changes in topology. To maintain paths, nodes continuously try to detect link failures (when a neighbor go out of range, the node itself moves, or some other event limiting the communication on the link). Nodes listen to RREQ and RREP messages to do this. Furthermore, each node promises to send a message every n seconds. If no RREQ or RREP is sent during that period, a Hello message is sent to indicate that the node is still present. Alternately, a link layer mechanism can be used to detect link failures. Beside the observation of a link failure, a node must also respond when it receives a data packet it does not have a route for. When a node detects a link break or it receives a data packet it does not have a route for, it creates and sends a Route Error (RERR) packet to inform other nodes about the error. The RERR contains a list of the unreachable destinations. If a link break occurs, the node adds the unreachable neighbor to the list. If a node receives a packet it does not have a route for, the node adds the unreachable destination to the list. In both cases, all entries in the routing table that make use of the route through the unreachable destination, are added to the list. The list is pruned, as destinations with empty precursor lists, i.e., destinations that no neighbors currently make use of, are removed. The RERR message is either unicasted (in case of a single recipient) or broadcasted to all neighbors having a route to the destinations in the generated list. This specific set of neighbors is obtained from the precursor lists of the routing table entries for the included destinations in the RERR list. When a node receives an RERR, it compares the destinations found in the RERR with the local routing table and any entries that have the transmitter of the RERR as the next hop, remains in the list of unreachable nodes. The RERR is then either broadcasted or unicasted as described above. The intention is to inform all nodes using a link when a failure occurs. For example, in figure 4.6, a link between node 6 and node 9 has broken and node 6 receives a data packet for node 9. Node 6 generates a RERR message, which is propagated backwards toward node 2.
Figure 4.6: Generation of RERR messages. The link between node 6 and
node 9 has broken, and node 6 generates an RERR.
To find a new route, the source node can initiate a route discovery for the unreachable destination, or the node upstream of the break may locally try to repair the route, in either cases by sending an RREQ with the sequence number for the destination increased by one.
4.3.3 CHARACTERISTICS OF AODV
Unicast, Broadcast, and Multicast communication.
On-demand route establishment with small delay.
Multicast trees connecting group members maintained for lifetime of multicast group.
Link breakages in active routes efficiently repaired.
All routes are loop-free through use of sequence numbers.
Use of Sequence numbers to track accuracy of information.
Only keeps track of next hop for a route instead of the entire route.
Use of periodic HELLO messages to track neighbors.
4.3.4 ADVANTAGES AND DISADVANTAGES
The main advantage of AODV protocol is that routes are established on demand and destination sequence numbers are used to find the latest route to the destination. The connection setup delay is less. The HELLO messages supporting the routes maintenance are range-limited, so they do not cause unnecessary overhead in the network. One of the disadvantages of this protocol is that intermediate nodes can lead to inconsistent routes if the source sequence number is very old and the intermediate nodes have a higher but not the latest destination sequence number, thereby having stale entries. Also multiple RouteReply packets in response to a single RouteRequest packet can lead to heavy control overhead. Another disadvantage of AODV is that the periodic beaconing leads to unnecessary bandwidth consumption.
4.4 ATTACKS AGAINST AODV
AODV implemented networks are subjected to two main kinds of attacks, passive attacks and active attacks. The passive attacks only intercept the message transmitted in the network without disturbing the transmission. By doing this, the attacker will be able to analyze the valuable information like network topology etc. Eavesdropping and subsequent analysis of the intercepted data may also jeopardize the entire network security. These kinds of attacks in ad hoc networks are difficult to detect. The other type of attacks, active attacks are carried out by malicious nodes with aim to disrupt transmission among other nodes . Our efforts here would focus on passive attacks only and would propose a solution that may contribute in security of data exchange. To adopt a systematic way to counter the passive attacks against AODV, a better understanding of security attributes and security mechanisms are required.
4.4.1 SECURITY ATTRIBUTES
Security is the combination of processes, procedures, and systems used to ensure confidentiality, authentication, integrity, availability, access control, and non repudiation.
It is to keep the information sent unreadable to unauthorized users or nodes. MANETs uses an open medium, so usually all nodes within the direct transmission range can obtain the data.
It enables a node to ensure the identity of the peer node it is communicating with. Without authentication, an adversary could masquerade a node, thus gaining unauthorized access to resource and sensitive information and interfering with the operation of other nodes.
It ensures to keep the message sent from being illegally altered or destroyed in the transmission. When the data is sent through the wireless medium, the data can be modified or deleted by malicious attackers. The malicious attackers can also resend it, which is called a replay attack.
It is related to a fact that if an entity sends a message, the entity cannot deny that the message was sent by it.
4.4.2 SECURITY MECHANISMS
A variety of security mechanisms are being used to counter malicious attacks. The conventional approaches such as authentication, access control, encryption, and digital signature provide a first line of defense. The first line of defense would be considered as the defense against the passive attacks. As a second line of defense, we have intrusion detection systems and cooperation enforcement mechanisms implemented in MANETs. These help to defend against active attacks and enforce cooperation i.e, reducing selfish node behavior.
â€¢ Preventive Mechanism
The conventional authentication and encryption schemes are based on cryptography, which includes asymmetric and symmetric cryptography. Cryptographic primitives such as hash functions (message digests) can be used to enhance data integrity in transmission. Threshold cryptography can be used to hide data by dividing it into a number of shares . Digital signatures can be used to achieve data integrity and authentication services . It is also necessary to consider the physical safety of mobile devices, since the hosts are normally small devices, which are physically vulnerable. For example, a device could easily be stolen, lost, or damaged. In the battlefield they are at risk of being captured. The protection of the sensitive data on a physical device can be enforced by some security modules, such as tokens or a smart
card that is accessible through PIN, pass phrases, or biometrics. Although in theory, these cryptographic primitives combined can prevent most attacks but in reality, due to the design, implementation selection of protocols and physical device restrictions, there are still a number of malicious attacks bypassing prevention mechanisms.
4.5 SECURITY AWARE AODV USING RSA ALGORITHM
Encryption is the act of encoding text so that others not privy to the decryption mechanism (the "key") cannot understand the content of the text. Encryption has long been the domain of spies and diplomats, but recently it has moved into the public eye with the concern of the protection of electronic transmissions and digitally stored data. Standard encryption methods usually have two basic flaws: A secure channel must be established at some point so that the sender may exchange the decoding key with the receiver; and There is no guarantee who sent a given message. Public key encryption has rapidly grown in popularity (and controversy, see, for example, discussions of the Clipper chip on the archives given below) because it offers a very secure encryption method that addresses these concerns. In a classic cryptosystem in order to make sure that nobody, except the intended recipient, deciphers the message, the people involved had to strive to keep the key secret. In a public-key cryptosystem. The public key cryptography solves one of the most vexing problems of all prior cryptography: the necessity of establishing a secure channel for the exchange of the key.
In cryptography, RSA (which stands for Rivest, Shamir and Adleman who first publicly described it) is an algorithm for public-key cryptography. It is the first algorithm known to be suitable for signing as well as encryption, and was one of the first great advances in public key cryptography. RSA is widely used in electronic commerce protocols, and is believed to be secure given sufficiently long keys and the use of up-to-date implementations.
The RSA algorithm involves three steps: key generation, encryption and decryption.
184.108.40.206 Key generation
RSA involves a public key and a private key. The public key can be known to everyone and is used for encrypting messages. Messages encrypted with the public key can only be decrypted using the private key. The keys for the RSA algorithm are generated the following way:
Choose two distinct prime numbers p and q.
For security purposes, the integers p and q should be chosen uniformly at random and should be of similar bit-length. Prime integers can be efficiently found using a primality test.
Compute nÂ =Â pq.
n is used as the modulus for both the public and private keys
Compute Ï†(pq) =Â (pÂ âˆ’Â 1)(qÂ âˆ’Â 1). (Ï† is Euler's totient function).
Choose an integer e such that 1Â <Â eÂ <Â Ï†(pq), and e and Ï†(pq) share no divisors other than 1 (i.e. e and Ï†(pq) are coprime).
e is released as the public key exponent.
e having a short bit-length and small Hamming weight results in more efficient encryption. However, small values of e (such as eÂ =Â 3) have been shown to be less secure in some settings.
Determine d (using modular arithmetic) which satisfies the congruence relation .
Stated differently, edÂ âˆ’Â 1 can be evenly divided by the quotient (pÂ âˆ’Â 1)(qÂ âˆ’Â 1).
This is often computed using the extended Euclidean algorithm.
d is kept as the private key exponent.
The public key consists of the modulus n and the public (or encryption) exponent e. The private key consists of the private (or decryption) exponent d which must be kept secret.
Destination node transmits its public key (n,e) to Source node and keeps the private key secret. then source wants to send message M to Destination It first turns M into an integer 0 < m < n by using an agreed-upon reversible protocol known as a padding scheme. It then computes the cipher text c corresponding to:
This can be done quickly using the method of exponentiation by squaring. Source then transmits c to Destination.
Destination can recover m from c by using her private key exponent d by the following computation:
Given m, Destination can recover the original message M by reversing the padding scheme.
220.127.116.11 Example Of RSA Algorithm
Example of RSA with small numbers:
p = 47, q = 71, compute n = pq = 3337
Compute phi = 46 * 70 = 3220
Let e be 79, compute d = 79-1 mod 3220 = 1019
Public key is n and e, private key d, discard p and q.
Encrypt message m = 688, 68879 mod 3337 = 1570 = c.
Decrypt message c = 1570, 15701019 mod 3337 = 688 = m.
Thus RSA is very useful algorithm in order to obtain the security aware AODV protocol as it uses both the public key as well as the private key.
Data Come to Lower layer From Upper layer
Apply RSA Public key to Encrypt data
Encrypted data send to destination from intermediate node
At destination data be Decrypt by RSA public Encryption.
Fig.Main flow of Project
Fig.Working of AODV
Fig. action of an AODV node when processing an incoming message
Fig. RSA public key Encryption.
Implementation encompasses all the processes involved in getting new software or hardware operating properly in its environment, including installation, configuration, running, testing, and making necessary changes. As such, implementation is the action that must follow any preliminary thinking in order for something to actually happen. Following models helps to get precise model of our project:
Fig snapshot of termainal
Fig snapshot of network animator
Technical investigations conducted for our project are self explained with respective snapshots
Fig: snapshot of terminal showing execution of aodv.tcl(Encrypting Data)
Fig: snapshot of terminal showing execution of aodv.tcl(Decrypting data)
Fig: snapshot of terminal showing execution of xgraph of aodv
fig snapshot shows the start of animator
Fig snapshot of nodes start the broadcasting
Fig snapshot shows the node range
Fig snapshot of multiple node broadcasting to finding a route
Fig snapshot of aodv protocol send a packet from source to destination
Fig snapshot of drop the packet
In this project, we have designed protocol foe mobile ad hoc network. The path in this protocol is found at the time of established so there are many chances of attacks to be happened so we have to implement the security while transferring the data.
So we have designed the Ad Hoc On Demand Distance Vector Routing Protocol having security using cryptographic techniques. For this we have used the simulator that is Network Simulator which is very useful for the simulation of the network without actual establishment of the network generally used on the LINUX Fedora platform having features as mentioned in the Chapter 3.
To work with this project, initially you have to start the terminal of the User's home menu which will have the commands and we have to enter the commands as per the requirement. The AODV for NS2 requires many files such as packet.h,.cc etc files in order to run the protocol correctly. So initially we have to compile the code using make command on the terminal. After successful compilation of the protocol again user command appears for which we have to now run the protocol using ns file_name.tcl command which will then give the output.
Now as for this project, we have implemented the security using cryptographic techniques, so at the time of running it will first ask the user to enter the data to be transferred so that the NS can encrypt the data in order to prevent the data loss due to attacks. It also shows the steps to be followed by the simulator to establish the path in between source and the destination, thus tracing becomes easier. Once the data is encrypted and the path is established it will show that data is decrypted at the destination node and it has reached there safely and no intermediate node come to know about actual data.
As the security part can be seen on the terminal, the actual working of the AODV protocol can be seen on the network animator which is the main part of Network Simulator. For this, initially a graph appears on the screen showing the comparison of packets send by the source node and the packets received by the destination node as well as the intermediate nodes. Now to actually enter in the animator we have to close the graph and then we can see the working of AODV protocol in the simulator.
In this, we can see the broadcasting by the source node by sending route request and the reply send by the intermediate nodes till the path is established. Once the path is established the data packets are sent by source node to destination nodes using intermediate nodes in the path. The speed of the animator can either be increased or decreased as per the requirement so it becomes easier for us to keep up the update of each and every step followed at the time of working of AODV.
By this one can easily say that use of Network Simulator gives the scope to try new things as the network is not established but only environment is formed.
The primary application areas for MANETs are in domains where there is no readily available infrastructure and where networks of various sizes must be configured quickly and dynamically. Typical examples for such environments include disaster recovery and emergency services. There are situations where potentially large numbers of recovery workers potentially from multiple organizations and even multiple nations must corporate and coordinate in areas where natural or man-made disasters have damaged or destroyed much of the infrastructure including telecommunications services.
Related considerations also apply where the regular infrastructure may be temporarily overwhelmed by demand but secure and reliable communications are still required such as during major cultural and sports events. Similar, but more constrained applications are also found in the military domain. Search and rescue missions, potentially in a hostile environment, do not require networking of troops to assure command and control and to avoid friendly fire even in heterogeneous coalition environments but also add concerns about emanation security, jamming, and compromised nodes to the threat environment to be considered.
The protocol is applied where we need to ensure the authentication, no repudiation and integrity of the important routing information in AODV protocol
The major application area lies in the field of vehicular ad-hoc networks (VANETs) here, direct communication between vehicles without the need for cellular Infrastructure permits flexible civilian applications such as traffic monitoring and emergency assistance services but also have significant applications in the defense sector.
CONCLUSION AND FUTURE WORK
In our project, we design, implement and provide security to the protocol to provide reliable efficient data transfer. Here we implement the Ad hoc On Demand Distance Vector (AODV) protocol and provide the security by using Asymmetric technique.
The AODV network protocol establishes at the time of broadcasting. To prevent the data loss and misuse of data we have implemented the security using Asymmetric technique. The encryption and decryption techniques are used for the security in AODV protocol.
The Asymmetric technique uses the RSA encryption method for the encoding of the data to be sent. Thus with the use of broadcasting methods of AODV the network is established and data packets are sent to the destination nodes.
Finally, the project gives the successful output of sending data packets to the destination node in AODV using RSA Asymmetric technique. Though there are spaces for the development, the project is very efficient for the small data packets sending from source node destination node in a particular network.
The project SAODV using RSA algorithm is applied on the network of few nodes. The project uses the encryption technique & decryption technique for providing security to the data packets sent.