You are on page 1of 42

Wireless Sensor Networks :

An Overview

- Under the Guidance of - Presented by


Dr. K. Shyamala V. Harshika
Wireless Sensor Networks
• Wireless Sensor Network (WSN) refers to a group of spatially dispersed and dedicated sensors
for monitoring and recording the physical conditions of the environment and organizing the
collected data at a central location.

• The WSN is built of "nodes" – from a few to several hundreds or even thousands, where each
node is connected to one (or sometimes several) sensors. Each such sensor network node has
typically several parts: a radio transceiver with an internal antenna or connection to an external
antenna, a microcontroller, an electronic circuit for interfacing with the sensors and an energy
source, usually a battery or an embedded form of energy harvesting.
Communication in WSNs

• Communication in WSNs takes place in the form of packet switching.

• Packet Switching is a method of grouping data that is transmitted over a digital network
into packets. A packet is made of a Header and a Payload. Data in the header is used by
networking hardware to direct the packet to its destination where the payload is extracted and
used by application software.

• In simple words, Packet Switching is the routing and transferring of data by means of addressed
packets so that a channel is occupied during the transmission of the packet only, and upon
completion of the transmission the channel is made available for the transfer of other traffic.
Constraints

• Size and cost constraints on sensor nodes result in corresponding constraints on resources such as
energy, memory, computational speed and communications bandwidth.

• The topology of the WSNs can vary from a simple star network to an advanced multi-
hop wireless mesh network. The propagation technique between the hops of the network can
be Routing or Flooding.
Routing
• Routing is the process of selecting a path for traffic in a network or between or across multiple
networks. In packet switching networks, routing is the higher-level decision making that
directs network packets from their source toward their destination through intermediate network
nodes by specific packet forwarding mechanisms.

• Packet forwarding is the transit of network packets from one network interface to another.
Intermediate nodes are typically network hardware devices such as routers, gateways, firewalls,
or switches.

• The routing process usually directs forwarding on the basis of routing tables. Routing tables
maintain a record of the routes to various network destinations. Routing tables may be specified
by an administrator, learned by observing network traffic or built with the assistance of routing
protocols.
Routing Protocols
• A routing protocol specifies how routers communicate with each other, distributing information
that enables them to select routes between any two nodes on a computer network.

• Routers perform the "traffic directing" functions on the internet; data packets are forwarded
through the networks of the internet from router to router until they reach their destination
computer.

• Routing algorithms determine the specific choice of route. Each router has a prior knowledge
only of networks attached to it directly.
Contd..
• A routing protocol shares this information first among immediate neighbors, and then throughout
the network. This way, routers gain knowledge of the topology of the network. The ability of
routing protocols to dynamically adjust to changing conditions such as disabled data lines and
computers and route data around obstructions is what gives the internet its survivability and
reliability.

• The specific characteristics of routing protocols include the manner in which they avoid routing
loops, the manner in which they select preferred routes, using information about hop costs, the
time they require to reach routing convergence, their scalability, and other factors.
Types of Routing Protocols

 Based on Routing Information Update : Proactive, Reactive, Hybrid routing

 Based on Temporal Info For Routing : Path History, Future Prediction routing
 Based on Topology Info : Flat, Hierarchial routing
 Based on Utilization of Specific Resources
Types of Routing Protocols based on Routing Information Update
 Table-driven (Proactive) routing
Maintains fresh lists of destinations and their routes by periodically distributing routing
tables throughout the network.
Ex: OLSR, DVR (Distance Vector Routing), DSDV(Destination-Sequenced Distance
Vector)
 On-demand (Reactive) routing
Finds a route on demand by flooding the network with route request (RREQ) packets.
Ex: DSR(Dynamic Source Routing), AODV (Adhoc On-Demand Distance Vector)
 Hybrid (Both Proactive and Reactive) routing
Combines the advantages of proactive and reactive routing.
Ex: CEDAR(Core Extraction Distributed Adhoc Routing), ZRP (Zonal Routing Protocol)
Proactive Routing Protocols
• Every node maintain routing table containing information about network topology

• Routing tables are updated periodically whenever the network topology changes

• These protocols maintain different numbers of routing tables varying from protocol to protocol

• Advantages :

 Route immediately available

 Minimize flooding
Optimized Link State Routing

• Proactive (table-driven) routing protocol

• A route is available immediately when needed

• Based on the link-state algorithm

• Traditionally, all nodes flood neighbor information in a Link-state protocol, but not in OLSR
Link State Algorithms

 Each node shares its link information so that all nodes


can build a map of the full network topology.

 Assuming the topology is stable for a sufficiently


long period, all nodes will have the same topology
information.
Contd..
 Link information is updated when a link changes state
(goes up or down)

• by sending small “hello” packets to neighbors.

 Nodes A and C propagate the existence of link A-C to


their neighbors and, eventually, to the entire network.
Contd..
• An optimization of link state protocol

• Reduces size of control packets : nodes advertise information only about links with neighbors
who are in its multipoint relay selector set.

• Reduces number of control packets by reducing duplicate transmissions : reduces flooding by


using only multipoint relay nodes to send information in the network.
Multi-point Relays
 MPRs = set of selected neighbor nodes
 Minimize the flooding of broadcast packets
 Each node selects its MPRs among its one hop neighbors
• the set covers all the nodes that are two hops away
 These nodes retransmit the packets
 The neighbors of any node, which are not in its MPR set,
read and process the packet but do not retransmit the
broadcast packet received from original node
Reactive Routing Protocols
Reactive Routing Protocol (RRP) is a bandwidth-efficient on-demand routing protocol for
MANETs. In this protocol the originator node initiates the route search process, whenever it needs
to send data packets to a target node. Thus the need for a route triggers the process of route search,
hence the name Reactive Routing Protocol.

RRP is different from other suggested on-demand routing protocols, mainly in the way that it does
not use any broadcast based method for new route discovery but uses the Incremental Search
Method (ISM), thus making it more bandwidth-efficient and reducing the number of links traversed
for the same routes discovered as compared to a broadcast based method.
Dynamic Source Routing
• Each packet header contains a route, which is represented as a complete sequence of nodes
between a source-destination pair

• Protocol consists of two phases


 Route discovery

 Route maintenance

• Optimizations for efficiency


 Route cache

 Piggybacking

 Error-handling
Contd..
• Source broadcasts route request (id, target)

• Intermediate node action

• Discard if node is source or node is not in route record

• If node is the target, route record contains the full route to the target; return a route reply

• Else append address in route record; rebroadcast

• Use existing routes to source to send route reply; else piggyback


Route Discovery In DSR

• Destination D on receiving the first RREQ, sends a route reply (RREP).

• RREP is sent on a route obtained by reversing the route appended to received RREQ.

• RREP includes the route from S to D on which RREQ was received by node D.
Contd..
• Node S on receiving RREP, caches the route included in the RREP.

• When node S sends a data packet to D, the entire route is included in the packet header. Hence the
name Source Routing.

• Intermediate nodes use the source route included in a packet to determine to whom a packet
should be forwarded.
DSR Optimization: Route Caching
• Each node caches a new route it learns by any means.

• When node S finds route [S,E,F,J,D] to node D, node S also learns route [S,E,F] to node F.

• When node K receives route request [S,C,G], node K learns route [K,G,C,S] to node S.

• When node F forwards route reply RREP [S,E,F,J,D], node F learns route [F,J,D] to node D.

• When node E forwards data [S,E,F,J,D] it learns route [E,F,J,D] to node D.

• A node may also learn a route when it overhears data.


Advantages of DSR
• Routes maintained only between nodes who need to communicate.

• Reduces overhead of route maintenance.

• Route caching can further reduce route discovery overhead.

• A single route discovery may yield many routes to the destination, due to intermediate nodes
replying from local caches.
Disadvantages of DSR

• Packet header size grows with route length due to source routing.
• Flood of route requests may potentially reach all nodes in the network.
• Potential collisions between route requests propagated by neighboring nodes.
• Increased contention if too many route replies come back due to nodes replying using their local
cache
• Route reply storm problem
• Stale caches will lead to increased overhead.
Types of Routing Protocols based on Temporal Info for Routing

 Past History

DSDV and AODV

 Future Prediction

LBR (Load-Balancing Routing)

Addresses load balancing in an energy efficient manner by maintaining a reliable set of parent
nodes. This allows sensor nodes to quickly find a new parent upon parent loss due to the
existing of node failure or energy hole.
Types of Routing Protocols based on Topology Info

 Flat

DSR and AODV

 Hierarchial

The choice of proactive and of reactive routing depends on the hierarchic level in which a node
resides (Cluster-based Routing).

CGSR
Types of Routing Protocols based on Utilization of Specific Resources

 Flooding

 Geographical

 Power - aware
Network Simulation
 Event-driven
 Every event provides a reference to the next event (e.g. using pointer)

A B C

 Simulation finishes
 When there are no more events
 At pre-specified time

 NS2 is a discrete event simulator


NS2 (Network Simulator)
It provides support for:

 Simulation of TCP

 Routing

 Huge number of protocols ranging from wired to wireless networks

 Supports the addition of new entities like agent, packet, application, queue, protocol, routing etc.

Note:

NS2 is not a polished or a finished product. Errors/bugs are being discovered and corrected. This is
because NS2 is very old and compilers are new.
NS2 Architecture
NS2 generally works best in Linux when compared to Windows.
It consists of :
 C++ (Internally)
 OTCL (User Interface) - Scripting
 TclCL (Interface between C++ and OTCL) – TCL with Classes
Simulation of Wireless Sensor Networks
Simulation of Wired Sensor Networks
Contd..
OTCL
 NS2 is an OTCL interpreter with network simulation object libraries

 Relation between TCL and OTCL is similar to C & C++

 To run a TCL file and an animation file -

 ns filename.tcl (or) tclsh filename.tcl

 nam filename.nam
Advantages of WSNs
• The information is local; this means that a node only keeps information of its neighborhood (one-
or two-hop neighbors).
• Distributed algorithms are considered scalable. Reconfiguration is made locally on the affected
part; since nodes are autonomous, the decisions are made by every node according to its position
or its activities. The priorities and available information in the network are defined by every role.
When a node dies, the network will remain in operation and the performance is not affected
considerably.
• The distributed approach allows dealing with noisy environments including obstacles.
• The energy consumption is reduced by every node; usually, the routing starts whether an event is
detected or there is a target to follow; this implies that there is no unnecessary depletion of energy
before the procedure starts.
Limitations of WSNs

• The connectivity of the entire network cannot be assured, because nodes only have local
information.
• When the transmission is by multi-hop and there is only a sink node, bottlenecks can arise. In
such cases, the network stops.
• Nodes mobility requires more energy.
Any Questions??
THANK YOU!!

You might also like