Improvement Of DSR Protocol


Published on

Interim Report on thesis we've worked...
"Reactive Routing Protocols for Ad-Hoc Networks : Improvement of DSR Protocol"

  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Improvement Of DSR Protocol

  1. 1. 1 Design and Implementation of Reactive Routing Protocols for Wireless AD-Hoc Networks Project Guide : Dr. Chiranjeev Kumar PROJECT TEAM: RAJESH KUMAR K(9724) VINAY MAJETY(9604) LAKSHMIPATHI SASTRY CH(9586) 1
  2. 2. 2|Page Acknowledgement We express thanks and gratitude to Dr.Chiranjeev Kumar (Asst. Professor, Dept. Of CSE ,ISM) for his encouraging support and guidance in carrying out the project. I extend my gratefulness to Dr.G.P.Biswas , HOD , Dept of CSE for trusting us and helped in providing us with the project. Last but not the least; we are indebted a lot to our PARENTS with out whom we are no where. Vinay Majety Lakshmipathi Sastry CH Rajesh Kumar K
  3. 3. 3|Page Contents Introduction…………………………………………………..04 Dynamic Source Routing…………………………………….15 Modifications to Dynamic Source Routing………………….25 Our proposal…………………………………………………30 Network Simulator-2………………………………………...32 Bibliography…………………………………………………33
  4. 4. 4|Page INTRODUCTION Two variants of wireless networks-infrastructure based, AD-HOC. Many WLAN require infrastructure networks. Infra networks---provide access to other networks, MAC, forwarding functions etc. WIRELESS ACCESS POINT: a wireless access point (AP) is a device that allows wireless communication devices to connect to a wireless network using Wi-Fi, Bluetooth or related standards. The WAP usually connects to a wired network, and can relay data between the wireless devices (such as computers or printers) and wired devices on the network. WAP functions as a gateway for clients to access the wired network. The access point not only controls medium access, but also acts as a bridge to other wired or wireless networks. Most of the network functionality lies within access point. APPLICATIONS-HOME WIRELESS NETWORKS,CELLULAR PHONES FOR WIDE AREAS. DISADVANTAGES OF ACCESS POINTS: • Infrastructure based networks lose some flexibility that wireless networks offer. One IEEE 802.11 WAP can typically communicate with 30 client systems located within a radius of 10000 m. • The actual range of communication can vary significantly, depending on such variables as indoor or outdoor placement, height above ground, nearby obstructions, other electronic devices that might actively interfere with the signal by broadcasting on the same frequency, type of antenna, the current weather, operating radio frequency, and the power output of devices. • Network designers can extend the range of WAPs through the use of repeaters and reflectors. • Adjacent WAPs will use different frequencies to communicate with their clients in order to avoid interference between the two nearby systems. However, the limited number of frequencies becomes problematic in crowded downtown areas with tall buildings using multiple WAPs. In such an environment, signal overlap becomes an issue causing interference, which results in signal dropage and data errors. AD HOC NETWORKS:
  5. 5. 5|Page A wireless ad hoc network is a decentralized wireless network. An Ad-Hoc network uses a connection between two or more devices without using an access point: the devices communicate directly. An Ad-Hoc network is used in situations such as a quick data exchange or a multiplayer LAN game because it is easy to set up and does not require an access point. Due to its peer-to-peer layout, Ad-Hoc connections are similar to Bluetooth ones and are generally not recommended for a permanent installation.Nodes with in ad hoc can communicate if one node is in other’s radio range or if one node can forward message to other.Complexity of every node increases as each node has to implement MAC, priority mechanisms etc. NOTE: AD HOC networks may have only selected nodes within range to forward data.Most of the nodes have to connect to a special node to transmit data if the receiver node is not in the range. A mobile ad hoc network (MANET), sometimes called a mobile mesh network, is a self-configuring network of mobile devices connected by wireless links. Each device in a MANET is free to move independently in any direction, and will therefore change its links to other devices frequently. Each must forward traffic unrelated to its own use, and therefore be a router. The primary challenge in building a MANET is equipping each device to continuously maintain the information required to properly route traffic. Commercial Applications • Emergency services • Damaged infrastructure • Difficult to set up infrastructure • Sensor network AD HOC NETWORKS HISTORY Inspired by the ALOHA network and the early development of fixed network packet switching, DARPA began work, in 1973, on the PRnet (packet radio network)Ña multihop network.2 In this context, multihopping means that nodes cooperated to relay traffic on behalf of one another to reach distant stations that would otherwise have been out of range. PRnet provided mechanisms for managing operation centrally as well as on a distributed basis. As an additional benefit, it was realized that multihopping techniques increased network capacity,since the spatial domain could be reused for concurrent but physically separate multihop sessions. Although many experimental packetradio networks were later developed, these wireless systems did not ever really take off in the consumer segment. When developing IEEE 802.11Ña standard for wireless local area networks (WLAN)Ñthe Institute of Electrical and Electronic Engineering (IEEE) replaced the term packet-radio network with ad hoc network.
  6. 6. 6|Page AD HOC NETWORKS:PROTOCOLS,PERFORMANCE,ISSUES The IEEE 802.11 standard defines two operational modes for WLANs: infrastructure-based and infrastructure-less or adhoc. Network interface cards can be set to work in either of these modes but not in both simultaneously. The drawbacks of an infrastructure-based WLAN are the costs associated with purchasing and installing the infrastructure. These costs may not be acceptable for dynamic environments where people and/or vehicles need to be temporarily interconnected in areas without a pre-existing communication infrastructure (e.g., inter-vehicular and disaster networks), or where the infrastructure cost is not justified (e.g., in-building networks, specific residential communities networks, etc.). Any station that is within the transmission range of any other, after a synchronization phase, can start communicating. if one of the stations operating in the ad hoc mode also has a connection to the wired network, stations forming the ad hoc network have a wireless access to the Internet. Routing extends the range of the ad hoc network beyond the transmission radium of the source station. Routing solutions designed for wired networks (e.g., the Internet) are not suitable for the ad hoc environment, primarily due to the dynamic topology of ad hoc networks. In AD HOC networks(limitation) the transmission range is limited since the RF-RADIO FREQUENCY energy disperses as the distance from the transmitter increases. So, if the bit rate is increased.... The characteristics of the wireless medium and the dynamic nature of ad hoc networks make (IEEE 802.11) multi-hop networks fundamentally different from wired networks. the behavior of an ad hoc network that relies upon a carrier-sensing random access protocol, such as the IEEE 802.11, is further complicated by the presence of hidden stations, exposed stations, “capturing” phenomena [XuS01, XuS02], and so on. The DCF provides the basic access method of the 802.11 MAC protocol and is based on a
  7. 7. 7|Page Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) scheme. The PCF is implemented on top of the DCF and is based on a polling scheme. It uses a Point Coordinator That cyclically polls stations, giving them the opportunity to transmit. PCF cannot be adopted in ad hoc mode, it will not be considered hereafter. This is due to the fact that there is no central authority to act as a PointCoordinator (PC). Peer-to- peer ad-hoc mode in the IEEE802.11 standard only implements the DistributedCoordination Function (DCF). COMMON PROBLEMS IN WIRELESS AD HOC NETWORKS • The wireless medium has neither absolute nor readily observable boundaries outside of which stations are known to be unable to receive network frames; • The channel is unprotected from outside signals; • The wireless medium is significantly less reliable than wired media; • The channel has time-varying and asymmetric propagation properties. • Since ad hoc networks rely on forwarding data packets sent by other nodes, power consumption becomes a critical issue • The wireless medium characteristics generate complex phenomena such as the hidden-station and exposed-station problems. THE ABOVE PROBLEM CAN BE SOLVED BY USING VIRTUAL CARRIER SENSING MECHANISM Request To Send (RTS) and Clear To Send (CTS), This information can be read by any listening station that uses this information to set up a timer called Network Allocation Vector (NAV). While the NAV timer is greater than zero the station must refrain from accessing the wireless medium.
  8. 8. 8|Page The “exposed station” problem may thus result in a throughput reduction. Ad Hoc Networking Support IEEE 802.11 standard, an ad hoc network is named Independent Basic Service Set (IBSS).
  9. 9. 9|Page Due to the flexibility of the CSMA/CA protocol, to receive and transmit data correctly it is sufficient that all stations within the IBSS are synchronized to a common clock. The standard specifies a Timing Synchronization Function (TSF) to achieve clock synchronization between stations. In an IBSS, due to the lack a centralized station, clock synchronization is achieved through a distributed algorithm. In both cases synchronization is obtained by transmitting special frames, called beacons, containing timing information. In an infra-structured network the clock synchronization is provided by the AP, and all stations synchronizes their own clock to the AP’s clock. In an IBSS, due to the lack a centralized station, clock synchronization is achieved through a distributed algorithm. The TSF requires two fundamental functionalities, namely synchronization maintenance And synchronization acquirement, that will be sketched below. SYNCHRONIZATION MAINTANANCE: Each station has a TSF timer (clock) with modulus 264 counting in increments of microseconds. Stations expect to receive beacons at a nominal rate defined by the a BeaconPeriod parameter. This parameter is decided by the station initiating the IBSS, and is then used by any other station joining the IBSS. Stations use their TSF timers to determine the beginning of beacon intervals or periods. At the beginning of a beacon interval each station performs the following procedure: i. it suspends the decrementing of the backoff timer for any pending (non-beacon) transmission; ii. it generates a random delay interval uniformly distributed in the range between zero and twice the minimum value of the Contention Window. iii. it waits for the random delay; iv. if a beacon arrives before the random delay timer has expired, it stops the random delay timer, cancel the pending beacon transmission, and resumes the backoff timer; v. if the random delay timer has expired and no beacon has been received, it sends a beacon frame. Synchronization acquirement. This functionality is necessary when a station wants to join an already existing IBSS. POWER MANAGEMENT: Power management functionalities are extremely important both in the infrastructure-based and in the ad hoc modes as portable devices have limited energetic resources since they are Powered through batteries. A station may be in one of two different power states: awake (station is fully powered) or doze (the station is not able to transmit or receive).
  10. 10. 10 | P a g e All awake stations are made to know the directed frames destined to a power-conse power conserving station using Ad hoc Traffic Indication Map(ATIM). A station operating in the PS mode Map(ATIM listens to these announcements and, based on them, decides whether it has to remain awake or not. AD HOC NETWORKS VS WIRELESS NETWORKS ROUTING FOR AD HOC NETWORKS An ad hoc routing protocol is a convention, or standard, that controls how nodes decide which way to route packets between computing devices in a mobile ad-hoc network . CHARACTERISTICS AND DESIRED PROPERTISE OF AD HOC ROUTING PROTOCOLS Distributed operation: A node in an ad hoc network cannot rely on a network in the background to support security and routing functions. Instead these functions must be designed so that they can operate efficiently under distributed conditions. Dynamic network topology: In general, the nodes will be mobile, which sooner or n later will result in a varying network topology. Nonetheless, connectivity in the network should be b maintained to allow applications and services to operate undisrupted
  11. 11. 11 | P a g e Loop Free: Routes supplied must be loop free. Demand based operation: The protocol must not broadcast control information periodically.Only when necessary.TO MINIMIZE OVERHEAD ON NETWORK. Security The radio system is vulnerable to attacks.So authentication techniques like encryption and decr. Must be followed and problem here is in distributing keys. Power Consumption Multiple routes To reduce the no. of reactions to topological changes and congestion, multiple routes is followed as even if 1 gets invalid…. DESIGN ISSUES OF AD HOC ROUTING PROTOCOLS Network Architecture: In most self-organized networks, the hosts will be acting as independent. routers, which implies that routing architecture should conceptually be flat, that is, each address serves only as an identifier and does not convey any information about one host that is topologically located with respect to any other node. In a flat self-organized network, the mobility management is not necessary because all of the nodes are visible to each other via routing protocols. In flat routing algorithms such as Destination-Sequenced Distance Vector (DSDV) and Wireless Routing Protocol (WRP), the routing tables have entries to all hosts in the self-organized network. However, a flat routing algorithm does not have good scalability. The routing overhead increases rapidly when the network becomes larger. Clustering is the most common technique employed in hierarchicalrouting architectures. When an ordinary node wants to send a packet, the node can send the packet to the clusterhead that routes the packet toward the destination. Unidirectional Links Support Almost every existing routing protocol tends to assume that all links are bidirectional. However, there are a number of factors that will make wireless links unidirectional. They are as follows: Different radio capabilities: Radios within a network can have different Transmit powers or receive sensitivities. Interference: This is due to either hostile jammers or friendly interference, which will reduce a nearby receiver’s sensitivity. For example, host A can receive packets from host B as there is very little interference in A’s vicinity. However, B may be in the vicinity of an interference node, and therefore cannot receive packets from A. So, the link between A and B is directed from B to A. Mute mode: An extreme instance, applicable only in tactical mobile networks, is when hosts cannot transmit due to an impending threat. In such a case,
  12. 12. 12 | P a g e it still needs to receive information; however, it cannot participate in bidirectional communications. The state of link direction is time varying: The directional state of the wireless link may be either a persistent or a transient phenomenon. The frequency of such transitions and the duration of stay in each state will be a function of offered traffic, terrain, mobility patter, and energy availability. Quality of Service (QoS) Routing For datagram traffic, shortest path routing may be sufficient. However, these wireless links in self- organized networks, typically scarce and dynamic, make it difficult to perform efficient resource utilization or to execute critical real-time applications in such environments. QoS routing means that it selects routes with sufficient resources for the requested QoS parameters. The goal of QoS routing has two points. The first one is to meet the QoS requirements for each admitted connection, and the second one is to achieve global efficiency in resource utilization. In a selforganized network, there are many metrics to be considered: the (1) most reliable path, (2) most stable path, (3) maximum total power remained path, (4) maximumavailable bandwidth path, and so forth. Multicast Support multicast routing is a network-layer function that constructs paths along which data packets from a source are distributed to reach many, but not all, destinations in a communication network. In contrast to unicast routing, multicast routing is a very useful and efficient way to support group communication STANDARD ROUTING PROTOCOLS Proactive Routing Protocols •It is a table driven routing that computes routing path • Both link-state and distance vectorare “proactive,” that is, routes are established and updated even if they are never needed. • If there is almost no mobility, proactive algorithms are superior because they never have to exchange information and find optimal routes easily. Reactive Routing Protocols • Flooding is “reactive,” but does not scale • If mobility is high and data transmission rare, reactive algorithms are superior; in the extreme case of almost no data and very much mobility the simple flooding protocol might be a good choice. Classification of Routing Protocols by Cast Property : Unicast Routing Protocals
  13. 13. 13 | P a g e Multicast Routing Protocals Geocast/Broad Cast Routing Protocals On the basis of fundamental design and implementation Communication Model: Seperate protocols designed for multichannel and single channel transmission. Multi channel routing protocols combine channel assignment and routing functionality. Eg:Clustered gateway switched routing. STRUCTURE: ROUTING protocols can be classified as uniform and non-uniform protocols. • No node takes a distinguishing role, i.e all nodes are alike and they accept and send frames. • Scalability becomes a problem in large networks. NON-UNIFORM- • Reduce routing complexity by reducing the number of nodes for routing computation. • Reduces scalability and communication overhead. • Supports load branching and QoS. o OF TWO TYPES-protocols in which routing depends on neighbouring routers o Protocols in which network is topologically partitioned,i.e,nodes are partitioned into clusters. Some nodes acts as cluster heads. STATE INFORMATION: On the basis of state information obtained at each nodes and/or exchanged among nodes. • TOPOLOGY BASED PROTOCOLS: Every node maintains topology information. Eg. Link state protocols. Each node advertises its connectivity with its neighbours to all other nodes.So based on it short path info is found. Effective for routing in fixed networks. • Destination based Protocols: Do not maintain large scale topological information.
  14. 14. 14 | P a g e Eg.-Distance vector routing.Each node maintains hop count and vector to a destination. SCHEDULING Depends on when a source obtains scheduling information. • Proactive protocols(Table driven) • Reactive protocols(On demand) Unicast,Establishing and Maintaining efficient,current route between pair of nodes. MANETS are subdivided into three types. Pro-Active Routing Protocols Re-Active Routing Protocols Hybrid Routing Protocols Pro-Active Routing Protocols : Derived from Distance-Vector(DV) and Link-State(LS) routing Protocols. It is the constant maintanance of a route by each node to all other n/w nodes and updates routing information for each pair,by propagating pro-actively,updates at fixed intervals of time.Routing info is usually maintained in table,so its known as “Table-Driven Protocols.” Re-Active Routing Protocols : Route between two nodes is discovered only when needed.i.e only when Source is requests a route to Destination.Special route request packets are flooded over the n/w.once route is discovered Route Req. Comes to an end.Route maintanance procedure maintains active routes till completion of Communication.
  15. 15. 15 | P a g e DYNAMIC SOURCE ROUTING INTRODUCTION: Source routing is a routing technique in which the sender of a packet determines the complete sequence of nodes through which to forward the packet; the sender explicitly lists this route in the packet’s header, identifying each forwarding “hop” by the address of the next node to which to transmit the packet on its way to the destination host. The DSR protocol is designed mainly for mobile ad hoc networks of up to about two hundred nodes and is designed to work well even with very high rates of mobility. In designing DSR, we sought to create a routing protocol that had very low overhead yet was able to react very quickly to changes in the network The DSR protocol is composed of two main mechanisms that work together to allow the discovery and maintenance of source routes in the ad hoc network. • Route Discovery is the mechanism by which a node S wishing to send a packet to a destination node D obtains a source route to D. Route Discovery is used only when S attempts to send a packet to D and does not already know a route to D. • Route Maintenance is the mechanism by which node S is able to detect, while using a source route to D, if the network topology has changed such that it can no longer use its route to D because a link along the route no longer works. When Route Maintenance indicates a source route is broken, S can attempt to use any other route it happens to know to D, or it can invoke Route Discovery again to find a new route for subsequent packets to D. Route Maintenance for this route is used only when S is actually sending packets to D. This entirely on-demand behavior and lack of periodic activity allows the number of overhead packets caused by DSR to scale all the way down to zero, when all nodes are approximately stationary with respect to each other and all routes needed for current communication have already been discovered. Advantages over conventional routing protocols: • Our protocol uses no periodic routing advertisement messages, thereby reducing network bandwidth • Overhead, particularly during periods when little or no significant host movement is taking place. Battery power is also conserved on the mobile hosts, both by not sending the advertisements and by not needing to receive them. • The operation of both Route Discovery and Route Maintenance in DSR are designed to allow unidirectional links and asymmetric routes to be supported. In particular, as noted in Section 2, in wireless networks, it is possible that a link between two nodes may not work equally well in both directions, due to differing transmit power levels or sources of interference. In response to a single Route Discovery (as well as through routing information from other packets overheard), a node may learn and cache multiple routes to any destination. This support for multiple routes allows the reaction to routing changes to be much more rapid, since a node with multiple routes to a destination can try another cached route if the one it has been using should fail. This caching of multiple routes also avoids the overhead of needing to perform a new Route Discovery each time a route in use breaks. Assumptions:
  16. 16. 16 | P a g e • In particular, each host participating in the network should also be willing to forward packets for other hosts in the network. • Number of hops necessary for a packet to reach from any host located at one extreme Edge of the network to another host located at the opposite extreme, as the diameter of the network. Hosts can move but the speed is moderate We assume that a node receiving a corrupted packet can detect the error, such as through a standard link-layer checksum or Cyclic Redundancy Check (CRC), and discard the packet. Operates in promiscuous receive mode. When a network card receives a packet, it normally drops it unless the packet is addressed to that card. In promiscuous mode, however, the card allows all packets through, thus allowing the computer to read packets intended for other machines or network devices. DSR Overview: • The sender constructs a source route in the packet’s header, giving the address of each host. Each mobile host participating in the ad hoc network maintains a route cache in which it caches source routes that it has learned. When one host sends a packet to another host, the sender first checks its route cache for a source route to the destination. If a route is found, the sender uses this route to transmit the packet. If no route is found, the sender may attempt to discover one using the route discovery protocol. • The host may buffer the original packet in order to transmit it once the route is learned from route discovery, or it may discard the packet, relying on higher-layer protocol software to retransmit the packet if needed. Each entry in the route cache has associated with it an expiration period, after which the entry is deleted from the cache. ROUTE DISCOVERY: • In addition to the address of the original initiator of the request and the target of the request, each route request packet contains a route record, in which is accumulated a record of the sequence of hops taken by the route request packet as it is propagated through the ad hoc network during this route discovery. • Each route request packet also contains a unique request id, set by the initiator from a locally-maintained sequence number. In order to detect duplicate route requests received, each host in the ad hoc network maintains a list of the initiator address, request id pairs that it has recently received on any route request. When any host receives a route request packet, it processes the request according to the following steps: 1. If the pair <initiator address, request id> for this route request is found in this host’s list of recently seen requests, then discard the route request packet and do not process it further.
  17. 17. 17 | P a g e 2. Otherwise, if this host’s address is already listed in the route record in the request, then discard the route request packet and do not process it further. 3. Otherwise, if the target of the request matches this host’s own address, then the route record in the packet contains the route by which the request reached this host from the initiator of the route request. Return a copy of this route in a route reply packet to the initiator. 4. Otherwise, append this host’s own address to the route record in the route request packet, and re-broadcast the request. Destination returning route reply to the source: A is source & E is destination. • Node E will typically examine its own Route Cache for a route back to A and, if one is found, will use it for the source route for delivery of the packet containing the Route Reply. • Otherwise, E SHOULD perform its own Route Discovery for target node A. But to avoid possible infinite recursion of Route Discoveries, it MUST in this case piggyback this Route Reply on the packet containing its own Route Request for A. • It is also possible to piggyback other small data packets, such as a TCP SYN packet, on a Route Request using this same mechanism. • Node E could instead simply reverse the sequence of hops in the route record that it is trying to send in the Route Reply and use this as the source route on the packet carrying the Route Reply itself. Regarding Send buffer: • When initiating a Route Discovery, the sending node saves a copy of the original packet (that triggered the discovery) in a local buffer called the "Send Buffer". • Each packet in the Send Buffer is logically associated with the time that it was placed into the Send Buffer and is discarded after residing in the Send Buffer for some timeout period Send Buffer Timeout. Limiting of route discoveries: • The node MUST limit the rate at which such new Route Discoveries for the same address are initiated, since it is possible that the destination node is not currently reachable. • In order to reduce the overhead from such Route Discoveries, a node SHOULD use an exponential back-off algorithm to limit the rate at which it initiates new Route Discoveries for the same target, doubling the timeout between each successive discovery initiated for the same target. ROUTE MAINTANENCE:
  18. 18. 18 | P a g e • At each hop, the host transmitting the packet for that hop can determine if that hop of the route is still working. If the data link level reports a transmission problem for which it cannot recover this host sends a route error packet to the original sender of the packet encountering the error. The route error packet contains the addresses of the hosts at both ends of the hop in error: the host that detected the error and the host to which it was attempting to transmit the packet on this hop. • Or, After sending a packet to the next hop mobile host, the sender may be able to hear that host transmitting the packet again. This type of acknowledgement is known as a passive acknowledgement. • As a last resort, a bit in the packet header could be included to allow a host transmitting a packet to request an explicit acknowledgement from the next-hop receiver. If no other acknowledgement signal has been received in some time from the next hop on some route, the host could use this bit to inexpensively probe the status of this hop on the route. • If a built-in acknowledgement mechanism is not available, the node transmitting the packet can explicitly request that a DSR-specific software acknowledgement be returned by the next node along the route; this software acknowledgement will normally be transmitted directly to the sending node, but if the link between these two nodes is unidirectional, this software acknowledgement could travel over a different, multi-hop path. Host returning route error packet to Source: • If this host has an entry for the original sender in its route cache, it may send the route error packet using that route. • Otherwise, this host may reverse the route from the packet in error. • Perform route discovery from the host. ADDITIONAL ROUTE DISCOVERY FEATURES: Caching Overheard Routing Information: A node forwarding or otherwise overhearing any packet SHOULD add all usable routing information from that packet to its own Route Cache. The usefulness of routing information in a packet depends on the directionality characteristics of the physical medium, as well as on the MAC protocol being used. Specifically, three distinct
  19. 19. 19 | P a g e Cases are possible: 1. Links in the network frequently are capable of operating only unidirectionally (not bidirectionally), and the MAC protocol in use in the network is capable of transmitting unicast packets over unidirectional links: The route being returned in a Route Reply SHOULD all be cached by any node in The "forward" direction ONLY. 2. Link bidirectional& Unidirectional Occasional & MAC unidirectional: The links described above SHOULD be cached in both directions. 3. MAC bidirectional for unicast operation: (DOUBT) links from a source route SHOULD be cached in both directions, except when the packet also contains a Route Reply, in which case only the links already traversed in this source route SHOULD be cached. However, the links not yet traversed in this route SHOULD NOT be cached. Replying to Route Requests Using Cached Routes: Before transmitting a Route Reply packet that was generated using information from its Route Cache in this way, a node MUST verify that the resulting route being returned in the Route Reply, after this concatenation, contains no duplicate nodes listed in the route record. Route Request Hop Limits: Each Route Request message contains a "hop limit" that may be used to limit the number of intermediate nodes allowed to forward that copy of the Route Request. This hop limit is implemented using the Time-to-Live (TTL) field in the IP header of the packet carrying the Route Request. As the Request is forwarded, this limit is decremented, and the Request packet is discarded if the limit reaches zero before finding the target. Eg: Implementing a non propagating route request: A node using this technique sends its first Route Request attempt for some target node using a hop limit of 1, such that any node receiving the initial transmission of the Route Request will not forward the Request to other nodes by re-broadcasting it. This form of Route Request is called a "non-propagating" Route Request.
  20. 20. 20 | P a g e If no Route Reply is received after a short timeout, then the node sends a "propagating" Route Request for the target node (i.e., with hop limit as defined by the value of the DiscoveryHopLimit configuration variable). Additional Route Maintenance Features: Packet Salvaging: When an intermediate node forwarding a packet detects through Route Maintenance that the next hop along the route for that packet is broken, if the node has another route to the packet's destination in its Route Cache, the node SHOULD "salvage" the packet rather than discard it. When salvaging a packet, a count is maintained in the packet of the number of times that it has been salvaged, to prevent a single packet from being salvaged endlessly. Otherwise, since the TTL is decremented only once by each node, a single node could salvage a packet an unbounded number of times. Even if we chose to require the TTL to be decremented on each salvage attempt, packet salvaging is an expensive operation, so it is desirable to bound the maximum number of times a packet can be salvaged independently of the maximum number of hops a packet can traverse. Queued Packets Destined over a Broken Link: In addition to handling that packet as defined for Route Maintenance, the node SHOULD also handle in a similar way any pending packets that it has queued that are destined over this new broken link. Automatic Route Shortening: Source routes in use MAY be automatically shortened if one or more intermediate nodes in the route become no longer necessary. If a node is able to overhear a packet carrying a source Route then this node examines the unexpended portion of that source route. In this case, this node (node D) SHOULD return a "gratuitous" Route Reply to the original sender of the packet (node A). In this example, the route returned in the gratuitous Route Reply message sent from D to A gives the new route as the sequence of hops from A to B to D to E. (THIS DONE ON THE BASIS OF SIGNAL TO NOISE RATIO). Increased Spreading of Route Error Messages: When a source node receives a Route Error for a data packet that it originated, this source node propagates this Route Error to its neighbors by piggybacking it on its next Route Request. In this way, stale information in the caches of nodes around this source node will not generate Route Replies that contain the same invalid link for which this source node received the Route Error.
  21. 21. 21 | P a g e Conceptual Data Structures: Route Cache: Anytime a node adds new information to its Route Cache, the node SHOULD check each packet in its own Send Buffer to determine whether a route to that packet's IP Destination Address now exists in the node's Route Cache (including the information just added to the Cache). If so, the packet SHOULD then be sent using that route and removed from the Send Buffer. The Route Cache SHOULD support storing more than one route to each destination. The following properties describe this searching function on a Route Cache: • Each implementation of DSR at any node MAY choose any appropriate strategy and algorithm for searching its Route Cache and selecting a "best" route to the destination from among those found. • If there are multiple cached routes to a destination, the selection of routes when searching the Route Cache SHOULD prefer routes that do not have the External flag set on any link. This preference will select routes that lead directly to the target node over routes that attempt to reach the target via any external networks connected to the DSR ad hoc network.(WHY?) The following properties describe the management of available space within a node's Route Cache: • Each implementation of DSR at each node MAY choose any appropriate policy for managing the entries in its Route Cache when memory of route cache is limited. Eg: "least recently used" (LRU) cache replacement policy. • However, the Route Cache replacement policy SHOULD allow routes to be categorized based upon "preference", where routes with a higher preferences are less likely to be removed from the cache. Any suitable data structure organization, consistent with this specification, MAY be used to implement the Route Cache in any node. For example, the following two types of organization are possible: • By caching each of these paths separately, a "path cache" organization for the Route Cache can be formed. To search for a route in a path cache data structure, the sending node can simply search its Route Cache for any path (or prefix of a path) that leads to the intended destination node. • A "link cache" organization could be used for the Route Cache, in which each individual link (hop) in the routes returned in Route Reply packets (or otherwise learned from the header of overhead packets) is added to a unified graph data structure of this node's current view of the network topology. To search for a route in link cache, the sending node must use a more
  22. 22. 22 | P a g e complex graph search algorithm, such as the well-known Dijkstra's shortest-path algorithm, to find the current best path through the graph to the destination node. However, a link cache organization is more powerful than a path cache organization, in its ability to effectively utilize all of the potential information that a node might learn about the state of the network. Send Buffer: • Queue of packets that cannot be sent by that node because it does not yet have a source Route to each such packet's destination. • a FIFO strategy SHOULD be used to evict packets before they time out to prevent the buffer from overflowing. Route Request Table: • Records information about Route Requests that have been recently originated or forwarded by this node. The table is indexed by IP address. • The Route Request Table on a node records the following information About nodes to which this node has initiated a Route Request: • The Time-to-Live (TTL) field used in the IP header of the Route Request for the last Route Discovery initiated by this node for that target node. • The time that this node last originated a Route Request for that target node. • The number of consecutive Route Discoveries initiated for this target since receiving a valid Route Reply giving a route to that target node. • The remaining amount of time before which this node MAY next attempt at a Route Discovery for that target node. A node MUST implement a back-off algorithm in determining this timeout. In addition, the Route Request Table on a node also records the following information about initiator nodes from which this node has received a Route Request: • A FIFO cache of size RequestTableIds entries containing the Identification value and target address from the most recent Route Requests received by this node from that initiator node.(DOUBT) DSR Options Header Format • IS included in existing IP packet. • Small fixed-sized, 4-octet portion followed by a sequence of zero or more DSR options carrying optional information. • For IPv4, the DSR Options header MUST immediately follow the IP header in the packet followed by traditional (e.g., TCP or UDP) transport layer header. Fixed Portion of DSR Options Header:
  23. 23. 23 | P a g e If any headers follow the DSR Options header in a packet, the total length of the DSR Options header (and thus the total, combined length of all DSR options present) MUST be a multiple of 4 octets. Next Header: 8-bit selector. Identifies the type of header immediately following the DSR Options header. 59, "No Next Header" Flow State Header (F): Flag bit. MUST be set to 0. This bit is set in a DSR Flow State header and clear in a DSR Options header. Payload Length The length of the DSR Options header, excluding the 4-octet fixed portion. Options: One or more pieces of optional information encoded in type-length-value (TLV) format. Each DSR option is assigned a unique Option Type code. • The most significant bit in the Option Type value (that is, Option Type & 0x80) represents whether or not a node receiving this Option Type (when the node does not implement processing for this Option Type) SHOULD respond to such a DSR option with a Route Error of type OPTION_NOT_SUPPORTED. • he two following bits in the Option Type value (that is, Option Type & 0x60) are a two-bit field indicating how such a node that does not support this Option Type MUST process the packet: 00 = Ignore Option 01 = Remove Option 10 = Mark Option 11 = Drop Packet The following types of DSR options are defined in this document for use within a DSR Options header: - Route Request option - Route Reply option - Route Error option - Acknowledgement Request option
  24. 24. 24 | P a g e - Acknowledgement option - DSR Source Route option - Pad1 option - PadN option Optimizations: Full Use of route cache: • A host can add entries to its route cache any time it learns a new route. • We avoid the problems of many simultaneous replies and attempt to eliminate replies indicating routes longer than the shortest reply, by causing each mobile host to delay slightly before replying from its cache. Before replying from its route cache, a host performs the following actions: 1. Pick a delay period D=H*(h-1+r) , where is the length in number of network hops for the route to be returned in this host’s reply, is a random number between 0 and 1, and is a small constant delay to be introduced per hop. 2. Delay transmitting the route reply from this host for a period of . 3. Within this delay period, promiscuously receive all packets at this host. If a packet is received by this host during the delay period addressed to the target of this route discovery (the target is the final destination address for the packet, through any sequence of intermediate hops), and if the length of the route on this packet is less than, then cancel the delay and do not transmit the route reply from this host; this host may infer that the initiator of this route discovery has already received a route reply, giving an equal or better route. Improved handling of errors: • The case in which the network effectively becomes partitioned. • Two hosts that wish to communicate are not within transmission range of each other, and there are not enough other mobile hosts between them to form a sequence of hops through which they can forward packets.
  25. 25. 25 | P a g e Modifications to DSR Scalability Improvement in DSR DSR: Abstract: The Overhead in finding Source Route to Destination in a Large Network is Destination more. Thus it reduces the Efficiency of DSR Protocol. A Modification is proposed for odification DSR, has less overhead and delay compared to Conventional DSR. , Introduction: At Moderate traffic load , DSR performed better than AODV , indicates limited Scalability of DSR. Reduce Overhead by Reducing the number of RREP packets and header size of DSR Data Packets. Modification: Limit the number of RREP Packets to one. Sent through the route from which first RREQ Received. This route is Active and transmission is fast in this route. Hence it reduces Delay and Overhead in RREP Packets(Like Congestion & Wasta Wastage of Power). Less no. of Control Packets and Higher Packet Delivery Ratio. Modification in DSR Data Packet:
  26. 26. 26 | P a g e Algorithm: Source broadcasts RREQ packets which are heard by nodes within the coverage area. The neighboring nodes re-broadcast the received RREQ till it reaches the destination. re broadcast Destination initiates a RREP only to the first received RREQ. Every node which receives the RREP checks whether a RREP with same sequence number is already received. If so, RREP is dropped. Else, the following step is performed. Node checks whether its address is present in the RREP. If so, it designates itself as intermediate node and performs the following step. Else it drops the packet. The intermediate node stores the source address, destination address and precursor node address in memory before broadcasting the RREP. Every intermediate node performs steps 4, 5, and 6 till the RREP reaches source node. Upon receiving the RREP, source starts to transmit the data packet. The data packet contains only source and destination addresses in its header.
  27. 27. 27 | P a g e As the data packet travels from source to destination, every node confirms whether it acts as intermediate node for the source destination pair. Only the intermediate nodes broadcast the data packet towards destination. Other nodes drop the packet. After broadcasting data packet, acknowledgement is sent to the precursor node. Fuzzy Logic QoS Dynamic Source Routing: Most of the existing algorithms couldn’t provide QoS. Extension to DSR protocol. Factors: Bandwidth, End to End delay, Cost of path. Assumption: Maximum hop count<10 Route Discovery: Three main tasks: ◦ Multiple paths establishment ◦ Link state collection ◦ Fuzzy QoS route choosing a) Multiple paths establishment b) Link state collection: Node must keep updated informatiion about all outgoing links. a) Done by using MAC layer. Residual bandwidth calculated using resource reservation function. Correspondingly, additional fields in route cache are added.
  28. 28. 28 | P a g e C) Fuzzy QoS route choosing: • Source waits for multiple paths from route discovery. • Finds out which one is most appropriate. Traffic Fuzzy Controller: • The request of bandwidth is divided among 5 categories:lower,low,medium,high,higher(R1,R2,R3,R4,R5). lower,low,medium,high,higher(R1,R2,R3,R4,R5). • End to End delay is represented as short,middle,long(S,M,L)
  29. 29. 29 | P a g e Traffic Fuzzy Controller: We use fuzzy decision theory to define fuzzy rules: Route Fuzzy Controller & QoS Matching Controller: Route Fuzzy Controller: It’s structure & functioning is same as that of route fuzzy controller. Here the input linguistics are “path delay” & “path bandwidth”. QoS Matching Controller: The control rules of this element are based on the match degree(MD) between “Integrative Fuzzy Request” & “Integrative Route state”. Route Selecting: If “path bandwidth” >= “Request bandwidth” goto 2 else goto 4. If there are two or more paths which satisfy condition 1, the route which has the least cost will be selected else goto 3. Select the route & transmit the packet & exit. If no route satisfies the condition, the request of the route is refused. Conclusion: Supporting uni-directional links are possible. Decision is taken without a considerable increase in controller capacity. QoS achieved. Suitable only for smaller MANETS, further study to be made to implement them for massive MANETS.
  30. 30. 30 | P a g e Our Proposal: Proposed theory & Study QoS routing in ADHOC networks accompanied by Route Cache Optimization: Need for the design: • Most of the existing algorithms couldn’t provide QoS. • Extension to DSR protocol. • Factors: Bandwidth, End to End delay, Cost of path, link stability. In the traditional DSR algorithm: • No mechanism to select optimal QoS route. • Selects the route randomly. • No mechanism to improve route cache. Problems identified with fuzzy logic approach: • Implementing Fuzzy logic is complex & time taking. • Link stability factor not considered. Main problems identified with route cache: • Presence of stale routes. • Inability to access new routes. Modified DSR for Route cache optimization: • After every regular intervals, perform route discovery from source to destination to cache some new routes. • After regular intervals, some node will generate a test packet that traverses each and every node to check the network topology. NEED FOR OUR PROPOSAL: To perform QoS routing, giving preference to path stability followed by bandwidth,delay & hop count. To perform route cache optimization in a much better & optimal way. A proposal to optimize sending route error using promiscuous mode is also made. Algorithm: • When performing route discovery, wait at the receiver for some timeout to receive other RREQ packets. • When the route request packets are received, perform route selection using Selection algorithm or Genetic algorithm. • Send route reply & piggyback only first two optimal routes. • Source uses the first route until error occurs. When error occurs, perform route error reply using proposed scheme. • Now, packet is sent through second route & receiver is informed regarding breaking of first path. • Receiver performs route discovery & sends next optimal route.
  31. 31. 31 | P a g e Selection algorithm: • Let the priorities be bandwidth, delay, hop count.(These priorities are secondary) • Now, consider some thresholds for each factor. • Consider some threshold distance R corresponding to each factor. Eg: let threshold bw=b , bandwidth of a path=b1 if |b1-b|>=R then put the value in selection matrix as 1 else 0. • Selection matrix is N*3 Matrix. Now, calculate no. of 1’s in each row. • Select the path with maximum no. of 1’s. • If some clash arises, use priority. Optimization in case of an error: • When a node leaves a network, the node sends BYE packets to its neighbours. • So the neighbours will know that a link has broken. • A separate field is placed in the route cache to indicate that a link is broken. • Now, a node wants to access a previous path, so it sends a packet through it as it is unaware regarding the breaking of the link. • When the packet reaches one of the neighbours of the node that has left the network, from the special field that has been included in the table the packet realises that the link has been broken. So, the node doesn’t wait for the ACK and this saves time. • The node in turn doesn’t send a RERR packet. • Now, a special field is included in the packet header to indicate that the link is broken. • The node checks if there is any path to destination. • If the path is found, packet is sent. • As all the nodes are in promiscuous mode, the neighbours of the tends to cache to packet being sent by it & from the special field indicated, they too update their route cache. • When the next time a packet is sent through same path, when the packet reaches the neighbour of the node, since their is special field in route cache of neighbour, RERR will be sent. • Advantage is that hop count of RERR is minimized & delay is reduced.
  32. 32. 32 | P a g e Network Simulators NS NS-2: What is ns-2? • Ns-2 stands for network simulator version 2. 2 • Ns-2: • It is a discrete event simulator for network research. • Work at packet level. • Provide substantial support to support bunch of protocols like TCP,UDP,FTP & DSR. • Simulate wired & wireless networks. • Use TCL as its scripting language.
  33. 33. 33 | P a g e Bibliography: • Wireless ad hoc networking—The art of networking without a network by Magnus Frodigh, Per Johansson and Peter Larsson-Ericsson Review No. 4, • A Taxonomy for routing protocols in mobile ADHOC networks-Laura Maria Feeny- SICS Technical report. • IEEE 802.11 Ad Hoc Networks: Protocols, Performance and Open Issues-Giuseppe Anastasi Marco Conti, Enrico Gregori • The Dynamic Source Routing Protocol (DSR) for Mobile Ad Hoc Networks for IPv4- - D. Johnson,Rice University,Y. Hu UIUC,D. Maltz,Microsoft Research ,February 2007---RFC:4728 • Scalability Improved DSR Protocol for MANETs-M.Tamilaras, Shyam Sunder V R2 , Udara Milinda Haputhanthri , International Conference of computational Intelligence & Multimedia applications-2007. • Fuzzy Logic QoS dynamic source routing for mobile ADHOC networks—Xu ZHANG-IEEE Xplore. • Sprite: A Simple, Cheat-Proof, Credit-Based System for Mobile Ad-Hoc Networks. • Route cache optimization using watch packets--ACM Mobile Networks and Ap- plications Journal, pp. 183-197, Oct. 2006.