You are on page 1of 23

CHAPTER 1 INTRODUCTION 1.

1 Definition of ad hoc network


There is no unique definition what an ad-hoc network is, but one which describes the subject very well was formulated by the IETF work group on Mobile Ad-hoc Networks (MANET): A mobile ad hoc network is an autonomous system of mobile routers connected by wireless links the union of which form an arbitrary graph. The routers are free to move randomly and organize themselves arbitrarily; thus, the network's wireless topology may change rapidly and unpredictably. Such a network may operate in a standalone fashion, or may be connected to the larger Internet.

1.2 How they work


To give a very simple example, let us assume that there is already a small ad-hoc network in place. When a new node in this example it can be the PDA of Tom joins the ad-hoc network, there are a number of things to do: The device needs to set up contact to other nodes in range, telling them: I am here. By this, the new node learns who the neighbor nodes are, and vice versa. Another point is that the new node, in this example the PDA, needs a unique identifier to make it addressable an IP address in IP networks. For all this, the new node is on its own, as there is neither a central controlling entity nor a pre-existing fixed infrastructure in ad-hoc networks. When Tom wants to send a message from his PDA to that of Maria, other nodes serve as a relay station in a process called multi-hop routing, if the PDA of Maria is not in direct reach, using one of the routing protocols designed for ad-hoc networks. This small example shows a few imminent advantages of ad-hoc networks: They can extend the range of the wireless technology in use, e.g. WLAN or Bluetooth, they can reduce the nodes power consumption due to a lower transmission power required, and they increase the nodes mobility. To make this work, though, ad-hoc networks require a critical mass of wellbehaving nodes, willing to forward others traffic.

1.3 Future for mobile ad-hoc networks


Ad-hoc networks have already been specified in the early seventies, but there has not been a commercial breakthrough since then. Nevertheless, ad-hoc networks have received an
1

increased attention recently. For example, among the topics where papers could be submitted to this years IST Mobile Summit, the area of ad-hoc and sensor networks has received the highest number of submissions. One reason for the current uptake of ad-hoc networks are certainly the great advances in wireless technologies over the last years. Examples are the IEEE 802.11 series (many DSL users have their own hot-spot at home), the recent 802.16 WiMAX specification, which enables a significantly larger range of up to 10 km, or Bluetooth for shorter distances. Another focus of current research are 4G mobile networks. 4G networks aim at integrating the various access and network technologies in order to implement ubiquitous services. Ad-hoc networks are one piece of this concept. The Suburban Ad Hoc (Area) Networking group focuses its research activities on techniques for implementing Suburban Ad Hoc Networks. These are self organizing, quasi-static ad hoc (typically wireless) networks which provide an alternative technology for providing high speed digital connectivity to households, small businesses and distributed campuses. Specific areas of research interest include security, low level routing protocols, access controls and propagation behavior. The ad hoc network is a communication network without a pre-exist network infrastructure. In cellular networks, there is a network infrastructure represented by the base-stations, Radio network controllers, etc. In ad hoc networks every communication terminal (or radio terminal RT) communicates with its partner to perform peer to peer communication. If the required RT is not a neighbor to the initiated call RT (outside the coverage area of the RT), then the other intermediate RTs are used to perform the communication link. This is called multi-hope peer to peer communication. This collaboration between the RTs is very important in the ad hoc networks. In ad hoc networks all the communication network protocols should be distributed throughout the communication terminals (i.e. the communication terminals should be independent and highly cooperative).

1.4 Creation of ad hoc network


Ad hoc networks are temporary wireless networks that allow two computers to share files and an Internet connection. Computers can create a wireless network without the need for a router, especially for a quick network setup. Any computer with a wireless card can connect to one central computer, which acts like a router. Ad hoc networks can be secured with

passwords to prevent outside access. Windows provides users with a quick way to create ad hoc networks and share their Internet connections in the process 1.Select your central computer. This computer must remain on at all times in order for other computers to connect to the ad hoc network. 2. Click "Start" and press "Connect To." Choose "Show All Connections." If you don't see "Connect To," go to "Control Panel" and select "Network Connections." 3. Click "Set up a connection or network" for Vista operating systems. Choose "Set up an ad hoc network" and click "Next." Follow the steps in the network creation wizard to create your network. For XP systems, continue to Step 4. Vista users continue to Step 6. 4.Right-click your wireless connection under "Network Connections." Choose "Properties." Click the "Wireless Networks" tab. 5. Press "Add" to create a new network. Type a short name for your network in the "Network Name" box. Add a password to your network by choosing "WEP" from the "Network Authentication" drop down box. Type a password into the two password boxes. Check the "This is a computer to computer (ad hoc) network" checkbox at the bottom of the screen. Press "OK" to create the network. Right-click your Internet connection and choose "Properties." Go to "Advanced" and check the "Allow other users to connect through this computer's Internet connection" box. Choose "Wireless" as your connection type. Press "OK" to share your Internet connection. 6. Connect other computers to the ad hoc network. Open the computer's "Network Connections" as stated in Step 2. Right-click the computer's wireless connection and select "View Available Wireless Networks." Select the ad hoc network and press "Connect

1.5 Characteristics
Mobile Ad hoc Network (MANET) is a collection of independent mobile nodes that can communicate to each other via radio waves. The mobile nodes that are in radio range of each other can directly communicate, whereas others need the aid of intermediate nodes to route

their packets. These networks are fully distributed, and can work at any place without the help of any infrastructure. This property makes these networks highly expiable and robust. The characteristics of these networks are summarized as follows: Communication via wireless means. Nodes can perform the roles of both hosts and routers. No centralized controller and infrastructure. Intrinsic mutual trust. Dynamic network topology. Frequent routing updates. Autonomous, no infrastructure needed. Can be set up anywhere. Energy constraints Limited security Generally, the communication terminals have a mobility nature which makes the topology of the distributed networks time varying. The dynamical nature of the network topology increases the challenges of the design of ad hoc networks. Each radio terminal is usually powered by energy limited power source (as rechargeable batteries). The power consumption of each radio terminal could be divided generally into three parts, power consumption for data processing inside the RT, power consumption to transmit its own information to the destination, and finally the power consumption when the RT is used as a router, i.e. forwarding the information to another RT in the network. The energy consumption is a critical issue in the design of the ad hoc networks. The mobile devices usually have limited storage and low computational capabilities. They heavily depend on other hosts and resources for data access and information processing. A reliable network topology must be assured through efficient and secure routing protocols for Ad Hoc networks.

1.6 Attacks in Ad Hoc Network


The fundamental aspects of computer security like confidentiality, integrity, authentication and non-repudiation are valid when production of routing in network is discussed. Confidentiality ensures that classified information in the network is never disclosed to unauthorized entities. Sensitive information, such as strategic military decisions or location
4

information requires confidentiality. Leakage of in the network. Availability implies that the requested services (e.g. bandwidth and connectivity) are available in a timely manner even though there is a potential problem in the system. Availability of a network can be tempered for example by dropping off packets and by resource depletion attacks. Authenticity is a network service to determine a users identity. Without authentication, an attacker can impersonate any node, and in this way, one by one node, it can gain control over the entire network. finally, non-repudiation ensures that the information originator cannot deny having sent the message. Non-repudiation is useful for detection and isolation of compromised nodes such information to enemies could have devastating consequences. Integrity guarantees that a message being transferred between nodes is never altered or corrupted. Data can be altered either intentionally by malicious nodes in the network or accidentally because of benign failures, such as radio propagation impairment or through hardware glitches.

1.6.1 Passive attacks: A passive attack does not disrupt the normal operation of the
network; the attacker snoops the data exchanged in the network without altering it. Here the requirement of confidentiality gets violated. Detection of passive attack is very difficult since the operation of the network itself doesnt get affected. One of the solutions to the problem is to use powerful encryption mechanism to encrypt the data being transmitted, there by making it impossible for the attacker to get useful information from the data overhead.

1.6.2 Active attacks: An active attack attempts to alter to destroy the data being exchanged
in the network there by disrupting the normal functioning of the network. Active attacks can be internal or external. External attacks are carried out by nodes that do not belong to the network. Internal attacks are from compromised nodes that are part of the network.

Type Of Attacks
Passive Attacks: An attacker stay quietly and listening to the route traffic. The purpose of passive attack is to discover routing information, relationship between nodes, and the network topology. Active Attacks: An attacker performs actions which to cause interruption and congestion to the network traffic by modifying the content of routing packet, broadcasting wrong information or old information.
5

Denial of Service Attacks: An attack on the network that causes a loss of service to other nodes, either by consuming the bandwidth or overloading the system. Impersonation Attacks: An attacker broadcast wrong routing information to other nodes and terminates the traffic for the desired destination node. Military Attacks: An attempt to destruct enemy networks in preparation for battle including intelligence gathering. An attacker use passive attack to gathering information about network topology. To disable some part of the network temporarily by using denial of service attacks

1.7 Security in ad hoc


Among the requirements, the protection of information plays a central role. The concept of anonymity is quite recent: users want that no one can determine with whom they communicate, implying the necessity to hide the user identity from eavesdroppers and to resist against traffic analysis. To protect information, data can be ciphered using a secret key cryptosystem which decreases the performance. We propose an original solution inspired by network coding techniques and the McEliece public key cryptosystem (see [9]). This technique has the advantage to provide anonymity and confidentiality without affecting too much the quality of service. However we do not claim to guarantee perfect security (which is impossible) but rather an average security. We focus on a solution that ensures a relative security for information during a relatively limited period of time. The main objective of our solution is to discourage attackers by requiring too much effort to recover the information compared to the time when the information is relevant. Our proposal assumes that a multipath routing or forwarding protocol is available. Multiple paths between a source and a destination ensure packet diver- sity, which improves anonymity: the information is scattered into several packets which belong to different flows. This strong requirement for network protocols allows us to detect intrusion and to protect information as described later in the document.

1.8 Solutions improving network performances


The above deviation from a pure on-demand routing approach is also tackled by MASK [35] to improve not only directly privacy protection but also anonymous routing performances in term of network capacity. MASK integrates a proactive neighbor detection protocol to create one-hop anonymous links with its neighbors prior to on-demand route discovery scheme to establish virtual anonymous circuit. This knowledge of the node neighborhood aims at reducing crypto-functions processing overheads naturally induced by a
6

pure reactive approach (through its on-demand route discovery function). This proactive neighbor detection scheme is identity-free (as originally proposed globally by ANODR) and is performed through a pairing-based anonymous handshake [28] between any pair of neighbors. For key exchanges between a given node and its new detected neighbors, MASK relies on a three step handshake. Once the handshake procedure is ended, each pair of nodes shares a chain of secret keys and locally unique link identifiers pair that corresponds to the pseudonyms used during handshake. In the proactive neighbor detection part of MASK, HELLO messages are periodically sent to hold the pairing cryptographic materials. Then, MASK relies on classical pure on-demand route discovery scheme. As for ASR, intermediary forwarding node keeps an information state about previously RREQ message sent by a source node. Once it receives a RREP message, this information is used by each intermediary node to decide whether it should forward the information and to which node. However, MASK presents some drawbacks concerning privacy protection by focusing on the improvement of network capacity, contrary to ASR or SDAR. For example, as summarized by [27], the final destination appeared in plain text in each RREQ. Moreover, MASK relies on a tight synchronization between keys and pseudonyms of neighboring nodes. More recently, ODAR [52] has been proposed to tackle also performance issues at different levels, necessary to design a suitable anonymous routing solution for Ad Hoc networks: storage, processing and communication. This approach is based on a reactive routing approach and relies on Bloom filters, previously used in [44] to provide node, link, path anonymity and efficiency at once. By definition, the wireless environment is constraining because communication performance largely depends on the quality of the radio transmission and on the capacity of the networked device. Errors bits or burst due to this transmission are common in such an environment, the capacity could be weak (50kits/sec) and the mobile devices like PDAs and laptops are not so efficient as an actual fixed computer. This means that such an environment has also to face CPU-related constraints, and it is a difficult, but interesting challenge to propose some solution which may improve or at least not degrade the performance of a given service and which warrants the users privacy. For sensor networks, energy is an additional constraint which is an important factor. In fact, many efficient solutions can be found in the literature but they rarely treat simultaneously privacy in a very constraining context. Traditionally, strong security and communication service are complementary; it is very often a question of trade-off. A strong security is time consuming and needs a large resource which can alter the quality of the services.

CHAPTER 2 PROJECT DESCRIPTION 2.1 Problem definition


Mobile Ad-Hoc networks, nodes are able to move and synchronize with their neighbors. Due to mobility, connections in the network can change dynamically and nodes can be added and removed at any time. We are going to compare Mobile Ad-Hoc network routing protocols TORA, AODV and DSR using network simulator NS 2.34. We have compared the performance of three protocols together and individually too. The performance matrix includes PDR (Packet Delivery Ratio), Throughput, End to End Delay, Routing overhead. We are comparing the performance of routing protocols when packet size changes, when time interval between packet sending changes, when mobility of nodes changes. In Ad-Hoc networking the method which is already existed used to have some drawbacks such as delay in packet transmission, data dropping, data corruption, Attacks in nodes, time taken for route selection etc.. Space allocation for this network also considerable. These factors are based on the routing algorithm used in the Ad hoc network. The problems which is above mentioned and energy conservation for movement of nodes are can be modified by using the routing algorithm used in the Ad hoc network, because of these problems the Ad hoc network is get delay to develop.

2.2 Block Diagram:

Fig 2.1 Block diagram of Ad hoc

CHAPTER 3
3.1. CLUSTERS IN WIRELESS SENSOR NETWORKS Grouping sensor nodes into clusters has been widely pursued by the research community in order to achieve the network scalability objective. Every cluster would have a leader, often referred to as the cluster-head (CH). Although many clustering algorithms have been proposed in the literature for ad-hoc networks, the objective was mainly to generate stable clusters in environments with mobile nodes. Many of such techniques care mostly about node reach ability and route stability, without much concern about critical design goals of WSNs such as network longevity and coverage. Recently, a number of clustering algorithms have been specifically designed for WSNs.

In addition to supporting network scalability, clustering has numerous advantages. It can localize the route set up within the cluster and thus reduce the size of the routing table stored at the individual node. Clustering can also conserve communication bandwidth since it limits the scope of inter-cluster interactions to CHs and avoids redundant exchange of messages among sensor nodes . Moreover, clustering can stabilize the network topology at the level of sensors and thus cuts on topology maintenance overhead. Sensors would care only for connecting with their CHs and would not be affected by changes at the level of interCH tier .

The CH can also implement optimized management strategies to further enhance the network operation and prolong the battery life of the individual sensors and the network lifetime. A CH can schedule activities in the cluster so that nodes can switch to the lowpower sleep mode most of the time and reduce the rate of energy consumption. Sensors can be engaged in a round-robin order and the time for their transmission and reception can be determined so that the sensors reties are avoided, redundancy in coverage can be limited and medium access collision is prevented. Furthermore, a CH can aggregate the data collected by the sensors in its cluster and thus decrease the number of relayed packets.

3.2. CLUSTERING OBJECTIVE Often the clustering objective is set in order to facilitate meeting the applications requirements. For example if the application is sensitive to data latency, intra and intercluster connectivity and the length of the data routing paths are usually considered as criteria for CH selection and node grouping. The following discussion highlights popular objectives for network clustering: i)Load balancing: Even distribution of sensors among the clusters is usually an objective for setups where CHs perform data processing or significant intra-cluster management duties . Given the duties of CHs, it is intuitive to balance the load among them so that they can meet the expected performance goals . ii)Fault-tolerance: In many applications, WSNs will be operational in harsh environments and thus nodes are usually exposed to increased risk of malfunction and physical damage. Tolerating the failure of CHs is usually necessary in such applications in order to avoid the loss of important sensors data. The most intuitive way to recover from a CH failure is to re-cluster the network. However, re-clustering is not only a resource burden on the nodes, it is often very disruptive to the on-going operation. Rotating the role of CHs among nodes in the cluster can also be a means for fault-tolerance in addition to their load balancing advantage. iii) Increased connectivity and reduced delay: Unless CHs have very long-haul communication capabilities, e.g. a satellite link, inter-CH connectivity is an important requirement in many applications. This is particularly true when CHs are picked from the sensors population. The connectivity goal can be just limited to ensuring the availability of a path from every CH to the base-station or be more restrictive by imposing a bound on the length of the path. When some of the sensors assume the CH role, the connectivity objective makes network clustering one of the many variant of the connected dominating set problem. On the other hand, when data latency is a concern, intra-cluster connectivity becomes a design objective or constraint. Delay is usually factored in by setting a maximum number of hops K allowed on a data path. K-hop clustering is K-dominating set problem iv) Minimal cluster count: This objective is particularly common when CHs are specialized resource-rich nodes. The network designer often likes to employ the least number of these nodes since they tend to be more expensive and vulnerable than sensors.
10

v) Maximal network longevity: Since sensor nodes are energy-constrained, the networks lifetime is a major concern; especially for applications of WSNs in harsh environments. When CHs are richer in resources than sensors, it is imperative to minimize the energy for intra-cluster communication . If possible, CHs should be placed close to most of the sensors in its clusters . On the other hand, when CHs are regular sensors, their lifetime can be extended by limiting their load . Combined clustering and route setup has also been considered for maximizing networks lifetime . Adaptive clustering is also a viable choice for achieving network longevity .

3.3. CLUSTERING PROCESS The coordination of the entire clustering process and the characteristics of the algorithms vary significantly among published clustering schemes. The following attributes are deemed relevant: Methodology: When CHs are just regular sensors nodes, clustering has to be performed in a distributed manner without coordination. In few approaches, a centralized authority partitions the nodes offline and controls the cluster membership. Hybrid schemes can also be found; especially when CHs are rich in resources. In the later case, inter-CHs coordination is performed in a distributed manner, while each individual CH takes charge of forming its own cluster. Objective of node grouping: As discussed in the previous section, several objectives have been pursued for forming clusters. Examples include fault-tolerance, load balancing, network connectivity, etc. Cluster-head selection: CHs can be pre-assigned or picked randomly from the deployed set of nodes. Algorithm complexity: Depending on the objective and the methodology, numerous clustering algorithms have been proposed. The complexity and convergence rate of these algorithms can be constant or dependent on the number of CHs and/or sensors.

11

Fig 3.1. Taxonomy of different attributes of clustering of WSNs

12

3.4. CLUSTERING ALGORITHMS FOR WSN Given that scalability is regarded as the main advantage of network clustering, the surveyed algorithms are grouped according to their convergence rate into two subsections for variable and constant convergence time algorithms, respectively. 3.4.1. Variable convergence time algorithms Time is a significant factor in the convergence of clustering algorithms. Some of the proposed clustering algorithms such as LCA, RCC and CLUBS, have O(n) convergence time, where n represent the number of sensor nodes in the network. It is thus practical to implement these types of clustering algorithms to the networks having small number of nodes.

1.Linked cluster algorithm (LCA): The focus is mainly on forming an efficient network topology that can handle the mobility of nodes. By clustering, CHs are hoped to form a backbone network to which cluster members can connect while on the move. The objective of the distributed algorithm is to form clusters such that a CH is directly connected to all nodes in its cluster. LCA is thus geared for maximizing network connectivity. The algorithm assumes synchronized nodes and time-based medium access. A node is assigned the slot in the frame that matches its ID. First, each node broadcasts its ID and listens to transmission of other nodes. In the next round, a node broadcast the set of neighbors that it heard from and thus every node will eventually know its 1-hop and 2-hop neighbors. A node x becomes a CH if it has the highest ID among its neighbors or does not have the highest ID in its 1-hop neighborhood, but there exists at least one neighboring node y such that x is the highest ID node in ys 1-hop neighborhood. LCA yields excessive number of clusters.

2.Random competition based clustering (RCC): RCC mainly focuses at cluster stability in order to support mobile nodes. The RCC algorithm applies the First Declaration Wins rule, in which any node can govern the rest of the nodes in its radio coverage if it is the first to claim being a CH. After hearing the claim which is broadcasted by the first node, neighboring nodes join its cluster as member and give
13

up their right to be a CH. To maintain clusters, every CH in the network broadcast a CH claim packet periodically. Since there is a time delay between broadcasting a claim packet and receiving it, concurrent broadcast can possibly create a conflict. Being unaware of ongoing claims, many neighboring nodes may broadcast CH claim packets concurrently. To avoid such a problem RCC explicitly employs a random timer and uses the node ID for arbitration. Each node in the network reset its random time value, every time before broadcasting its CH claim packet. During this random time if it receives a broadcast message carrying CH claim packet from another node, it simply ceases the transmission of its CH claim. Since random timer is not a complete solution, RCC resolve further the concurrent broadcast problems by using the node ID. RCC is shown to be more stable than conventional clustering schemes.

3.CLUBS: Basically, cluster formation in CLUBS is based on the following three characteristics: Every node in the network must be connected to a cluster. Maximum diameter of all clusters in the network should be same. Clusters should support the intra-cluster communication, which means nodes in a cluster must be able to communicate with each others. The algorithm forms clusters with a maximum of two hops. Each node in the network takes part in the cluster formation process by choosing a random number from a fixed integer range. Then it counts down from that number silently. If the count down was not interrupted from any other neighboring node and it reaches zero, it announces itself CH and broadcasts a recruit message. When a neighboring node receives the recruit message that comes within two-hop diameter boundary, it stops the count down, accepts the invitation and joins the cluster. A node that has joined a cluster is called follower is no longer allowed to compete for being a CH. Since CLUBS allows overlapping, follower nodes keep listening to additional recruit messages and can be follower of more than on CH. If a node that is competing to become a CH detects a collision or received a garbled message, it becomes a follower node and assumes that multiple CHs attempted to recruit it at the same time. It can find out its CH later.
14

The algorithm does not terminate unless all nodes in the network join some cluster as a CH or as a follower. 3.4.2. Constant convergence time algorithms

Clustering algorithms that converge completely in a fixed number of iterations, regardless of the size of the nodes population are called constant convergence time clustering algorithms. These algorithms usually pursue a localized strategy in which nodes execute the algorithm independently and base their cluster membership decisions on their own state and the state of their neighbors.

1.Low Energy Adaptive Clustering Hierarchy (LEACH): LEACH is one of the most popular clustering algorithms for WSNs . It forms clusters based on the received signal strength and uses the CH nodes as routers to the base-station. All the data processing such as data fusion and aggregation are local to the cluster. LEACH forms clusters by using a distributed algorithm, where nodes make autonomous decisions without any centralized control. Initially a node decides to be a CH with a probability p and broadcasts its decision. Each non-CH node determines its cluster by choosing the CH that can be reached using the least communication energy. The role of being a CH is rotated periodically among the nodes of the cluster in order to balance the load. It is not applicable to networks deployed in large regions.

2. Fast Local Clustering service (FLOC): FLOC is a distributed technique that produces approximately equal sized clusters with minimum over-lap. The assumed radio model classifies nodes based on their proximity to the CH into inner (i-band) and outer (o-band). I-band nodes will suffer very little interference communicating with the CH, while message from o-band nodes may be lost. FLOC favors i-band membership in order to increase the robustness of the intra-cluster traffic. A node stays idle waiting for some random duration to receive an invitation from any potential CH. If the node gets no invitation, it becomes a candidate CH and broadcasts a
15

candidacy message (transition 1). Upon hearing the candidacy message a recipient node k that is already an i-band member of a cluster Ck, will reply back to inform the candidate CH about such membership.

Fig. 3.2.State Transition for FLOC Algorithm.

The candidate CH will then realize the conflict and join Ck as an o-band node (transition 3). If the candidate CH receives no conflict messages, it becomes a CH and starts inviting members to its cluster (transition 4).An idle node would join a cluster as an o-band node (transition 5) if it does not receive an invitation from a closer CH (transition 2). That decision can be changed, if the node later receives an invitation from a closer CH, i.e. the node switch its membership to a better cluster.

3. Hybrid Energy-Efficient Distributed Clustering (HEED):

HEED is a distributed clustering scheme in which CH nodes are picked from the deployed sensors. HEED considers a hybrid of energy and communication cost when selecting CHs. Unlike LEACH, it does not select cell-head nodes randomly. Only sensors that have a high residual energy can become cell-head nodes. HEED has three main characteristics:

The probability that two nodes within each others transmission range becoming CHs is small. Unlike LEACH, this means that CHs are well distributed in the network.
16

Energy consumption is not assumed to be uniform for all the nodes. For a given sensors transmission range, the probability of CH selection can be adjusted to ensure inter-CH connectivity.

In HEED, each node is mapped to exactly one clusterand can directly communicate with its CH. The algorithm is divided into three phases: 1.Initialization phase. 2.Repeatation phase. 3.Finalization phase.

17

CHAPTER 4

4.1. STUDY OF NS-2


Ns is a discrete event simulator targeted at networking research. Ns provides substantial support for simulation of TCP, routing, and multicast protocols over wired and wireless (local and satellite) networks.

Ns began as a variant of the REAL network simulator in 1989 and has evolved substantially over the past few years. In 1995 ns development was supported by DARPA through the VINT project at LBL, Xerox PARC, UCB, and USC/ISI. Currently ns development is support through DARPA with SAMAN and through NSF with CONSER, both in collaboration with other researchers including ACIRI. Ns has always included substantial contributions from other researchers, including wireless code from the UCB Daedelus and CMU Monarch projects and Sun Microsystems. 4.2. BASICS OF NS-2 Ns simulator is based on two languages: an object oriented simulator, written in C++ and a OTcl(an object oriented extension of Tcl) interpreter, used to execute users command scripts.Ns has a rich library of network and protocol objects. There are two class hierarchies: the compiled C++ hierarchy and the interpreted OTcl one, with one to one correspondence between them. The compiled C++ hierarchy allows us to achieve efficiency in thet simulation and faster execution times. This is in particular useful for the detailed definition and operations of protocols. This allows one to reduce packet and event processing time. Then in the OTcl script provided by the user, we can define a particular network topology, the specific protocols and applications that we wish to simulate and the form of the output that we wish to obtain from the simulator. The OTcl can make use of the objects compiled in C++ through an OTcl linkage that creates a matching of OTcl object for each of the C++.

18

Ns is a discrete event simulator, where the advance of time depends on the timing of events which are maintained by a scheduler. An event is an object in the C++ hierarchy with an unique ID, a scheduled time and the pointer to an object that handles the event. The scheduler keeps an ordered data structure with the events to be executed and fires them one by one, invoking the handler of the event. 4.3.TCL PROGRAMMING Tool Command Language(Tcl) is a language with very simple syntax and it allows a very easy integration with other languages. Characteristics of Tcl language are:

It allows a fast development. It provides a graphic interface. It is compatible with many platforms. It is flexible for integration. It is easy to use.

Fig.4.1NAM Graphic interface 4.4.NAM ANIMATOR Ns simulation can produce both the visualization trace (for NAM) as well as ascii file trace corresponding to the events registered at the network.

19

CHAPTER- 5 LITERATURE REVIEW [1] K. Fall, A delay-tolerant network architecture for challenged Internets, in Proc. ACM SIGCOMM, pp. 2734, 2003.

[2] S. Burleigh, A. Hooke, L. Torgerson, K. Fall, V. Cerf, B. Durst, K. Scott, and H. Weiss, Delay-tolerant networkingan approach to interplanetary Internet, IEEE Commun. Mag., vol. 41, no. 6, pp. 128 136, 2003.

[3] http://www.princeton.edu/ mrm/zebranet.html.

[4] T. Small and Z. J. Haas, The shared wireless infostation model: a new ad hoc networking paradigm (or where there is a whale, there is a way), in Proc. MobiHOC, pp. 233244, 2003.

[5] T. Small and Z. J. Haas, Resource and performance tradeoffs in delaytolerant wireless networks, in Proc. ACM SIGCOMM Workshop on Delay Tolerant Networking and Related Topics, pp. 260267, 2005.

[6] Y. Wang and H. Wu, DFT-MSN: the delay fault tolerant mobile sensor network for pervasive information gathering, in Proc. 26th Annual Joint Conference of the IEEE Computer and Communications Societies (INFOCOM07), pp. 12351243, 2006.

[7] Y. Wang and H. Wu, Delay/fault-tolerant mobile sensor network (DFTMSN): a new paradigm for pervasive information gathering, IEEE Trans. Mobile Computing, vol. 6, no. 9, pp. 10211034, 2007.

[8] Y. Wang, H. Wu, F. Lin, and N.-F. Tzeng, Cross-layer protocol design and optimization for delay/fault-tolerant mobile sensor networks, IEEE J. Sel. Areas
20

Commun, vol. 26, no. 5, pp. 809819, 2008. (A preliminary version was presented at IEEE ICDCS07.)

[9] H. Wu, Y. Wang, H. Dang, and F. Lin, Analytic, simulation, and empirical evaluation of delay/fault-tolerant mobile sensor networks, IEEE Trans. Wireless Commun., vol. 6, no. 9, pp. 32873296, 2007.

[10] M. Musolesi, S. Hailes, and C. Mascolo, Adaptive routing for intermittently connected mobile ad hoc networks, in Proc. IEEE 6th International Symposium on a World of Wireless, Mobile and Multimedia Networks (WOWMOM), pp. 17, 2005.

[11] J. LeBrun, C.-N. Chuah, and D. Ghosal, Knowledge based opportunistic forwarding in vehicular wireless ad hoc networks, in Proc. IEEE Vehicular Technology Conference (VTC) Spring, pp. 15, 2005.

[12] W. Zhao, M. Ammar, and E. Zegura, A message ferrying approach for data delivery in sparse mobile ad hoc networks, in Proc. MobiHOC, pp. 187198, 2004.

[13] A. Lindgren, A. Doria, and O. Scheln, Probabilistic routing in intermittently connected networks, in Proc. First International Workshop on Service Assurance with Partial and Intermittent Resources, pp. 239254, 2004.

[14] P. Hui, A. Chaintreau, J. Scott, R. Gass, J. Crowcroft, and C. Diot, Pocket switched networks and human mobility in conference environments, in Proc. ACM SIGCOMM Workshop on DTN and Related Topics, pp. 244251, 2005.

[15] T. Spyropoulos, K. Psounis, and C. S. Raghavendra, Spray and wait: an efficient routing scheme for intermittently connected mobile networks, in Proc. ACM SIGCOMM Workshop on DTN and Related Topics, pp. 252259, 2005.

[16] C. Liu and J. Wu, Scalable routing in delay tolerant networks, in Proc. ACM MobiHoc, 2007.

21

[17] A. Chaintreau, P. Hui, J. Crowcroft, C. Diot, R. Gass, and J. Scott, Impact of human mobility on the design of opportunistic forwarding algorithms, in Proc. IEEE INFOCOM, pp. 113, 2006.

[18] M. Kim, D. Kotz, and S. Kim, Extracting a mobility model from real user traces, in Proc. IEEE INFOCOM, pp. 113, 2006.

[19] T. Spyropoulos, K. Psounis, and C. Raghavendra, Performance analysis of mobilityassisted routing, in Proc. MobiHoc 06: 7th ACM International Symposium on Mobile Ad Hoc Networking and Computing, pp. 4960, 2006.

[20] J. Leguay, T. Friedman, and V. Conan, DTN routing in a mobility pattern space, in Proc. WDTN 05: 2005 ACM SIGCOMM Workshop on Delay-tolerant Networking, pp. 276 283, 2005.

[21] http://www.cs.dartmouth.edu/ campus/data.html.

22

CHAPTER- 6 CONCLUSION Work done so for:


Analyzed the features of Delay Tolerant Network. Literature survey. Study of clustering in Wireless sensor networks. Study of ns-2 software.

Work to be done:

Analyze the efficiency of routing algorithms in clustered wireless sensor networks. Study of OTcl programming in NS-2. Developing prototypes to find the optimum size of clusters. Analyze the efficiency of proposed Inter cluster routing protocol

23

You might also like