Professional Documents
Culture Documents
An Overview
• 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
• 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 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 :
Minimize flooding
Optimized Link State Routing
• Traditionally, all nodes flood neighbor information in a Link-state protocol, but not in OLSR
Link State Algorithms
• Reduces size of control packets : nodes advertise information only about links with neighbors
who are in its multipoint relay selector set.
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
Route maintenance
Piggybacking
Error-handling
Contd..
• Source broadcasts route request (id, target)
• If node is the target, route record contains the full route to the target; return a route reply
• 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.
• 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
Future Prediction
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
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
Simulation of TCP
Routing
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
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!!