Professional Documents
Culture Documents
Anamitra Deshmukh-Nimbalkar
CTO & Chief Software Trainer, Mentor
(PGDBM, PGDPC, NET, SET, MCS)
® ®
TECHNICAL
PUBLICATIONS
SINCE 1993 An Up-Thrust for Knowledge
(i)
Ad Hoc and Wireless Sensor Networks
Subject Code : EC8702
Published by :
® ®
Amit Residency, Office No.1, 412, Shaniwar Peth,
TECHNICAL Pune - 411030, M.S. INDIA, Ph.: +91-020-24495496/97
PUBLICATIONS
SINCE 1993 An Up-Thrust for Knowledge Email : sales@technicalpublications.org Website : www.technicalpublications.org
Printer :
Yogiraj Printers & Binders
Sr.No. 10/1A,
Ghule Industrial Estate, Nanded Village Road,
Tal. - Haveli, Dist. - Pune - 411041.
ISBN 978-93-90450-02-2
9 789390 450022 AU 17
Author
Anamitra Deshmukh-Nimbalkar
(iii)
Dedicated To,
My Life Partner,
(iv)
Syllabus
Ad Hoc and Wireless Sensor Networks - EC8702
UNIT I Ad Hoc Networks - Introduction and Routing Protocols
Elements of Ad hoc Wireless Networks, Issues in Ad hoc wireless networks, Example
commercial applications of Ad hoc networking, Ad hoc wireless Internet, Issues in
Designing a Routing Protocol for Ad Hoc Wireless Networks, Classifications of Routing
Protocols, Table Driven Routing Protocols - Destination Sequenced Distance Vector
(DSDV), On-Demand Routing protocols - Ad hoc On–Demand Distance Vector Routing
(AODV). (Chapters - 1, 2)
(v)
Table of Contents
Unit - I
Chapter - 1 Wireless Networks and Ad hoc Networks (1 - 1) to (1 - 48)
(vi)
1.2.4.7 Disaster Rescue Ad hoc Network......................................................................... 1 - 27
(vii)
2.2.3 Hybrid Routing Protocols .................................................................................. 2 - 27
2.2.3.1 Core Extraction Distributed Ad-hoc Routing Protocol ......................................... 2 - 28
Unit - II
(viii)
3.4.1 Terrestrial WSN ................................................................................................. 3 - 10
3.4.2 Underground WSNs........................................................................................... 3 - 11
3.4.3 Under Water WSNs ........................................................................................... 3 - 12
3.4.4 Multimedia WSNs.............................................................................................. 3 - 13
3.4.5 Mobile WSNs ..................................................................................................... 3 - 13
3.5 Enabling Technologies for Wireless Sensor Networks .................................... 3 - 14
3.6 WSNs Applications .......................................................................................... 3 - 15
3.7 Sensor Networks - Design Challenges ............................................................. 3 - 17
3.8 Sensor Network Architecture .......................................................................... 3 - 18
3.8.1 Layered Architecture and Unified Network Protocol Framework (UNPF) ........ 3 - 18
3.8.2 Clustered Architecture and Low-Energy Adaptive
Clustering Hierarchy (LEACH) ............................................................................ 3 - 21
3.9 Sensor Network Scenarios............................................................................... 3 - 23
3.9.1 Types of Sources and Sinks................................................................................ 3 - 23
3.9.2 Sensor Network Scenarios................................................................................. 3 - 24
3.9.3 Mobility and Types of Mobility ......................................................................... 3 - 27
3.10 Optimization Goals and Figures of Merit ...................................................... 3 - 29
3.10.1 Quality of Service ............................................................................................ 3 - 29
3.10.2 Energy Efficiency ............................................................................................. 3 - 30
3.10.3 Scalability......................................................................................................... 3 - 32
3.10.4 Robustness ...................................................................................................... 3 - 32
3.11 Transceiver Design Considerations in WSNs in a Physical Layer ........................ 3 - 33
3.11.1 Issues in Physical Layer Design in Wireless Sensor Networks ......................... 3 - 33
3.11.2 Energy Usage Profile and the Power Consumption in a Transceiver .............. 3 - 33
3.11.3 Choice of Modulation Scheme for the Transceiver ......................................... 3 - 34
3.11.4 Dynamic Modulation Scaling ........................................................................... 3 - 36
3.11.5 Antenna Considerations .................................................................................. 3 - 36
3.12 Two Marks Questions with Answers [Part - A] ........................................ 3 - 37
3.13 Long Answered Questions [Part - B] ........................................................ 3 - 38
(ix)
Unit - III
Chapter - 4 Wireless Sensor Networks - Medium Access Control
Protocols (4 - 1) to (4 - 54)
4.1 Medium Access Control Protocols for Wireless Sensor Networks ................... 4 - 2
4.2 Self Organizing MAC for Sensor (SMACS) Networks ......................................... 4 - 2
4.3 Eavesdrop and Register (EAR) Protocol ............................................................ 4 - 3
4.4 Hybrid TDMA/FDMA ......................................................................................... 4 - 5
4.5 Low Duty Cycle Protocols and Wakeup Concepts ............................................. 4 - 5
4.6 The Mediation Device Protocol ......................................................................... 4 - 7
4.7 Contention-based Protocols - CSMA-based MAC Protocols ........................... 4 - 10
4.7.1 Sensor-MAC (S-MAC)......................................................................................... 4 - 10
4.7.2 Timeout-MAC (T-MAC) ...................................................................................... 4 - 10
4.7.3 D-MAC ............................................................................................................... 4 - 11
4.7.4 Berkley-Media Access Control (B-MAC) ............................................................ 4 - 11
4.7.5 X-MAC................................................................................................................ 4 - 11
4.7.6 Wise-MAC .......................................................................................................... 4 - 11
4.7.7 PAMAS (Power Aware Multiaccess with Signaling)........................................... 4 - 11
4.8 Wireless Sensor Networks - Schedule‐based MAC Protocols ......................... 4 - 14
4.8.1 Schedule-based MAC Protocol - Challenges...................................................... 4 - 14
4.8.2 Schedule-based MAC Protocol - Features ......................................................... 4 - 14
4.8.3 Various Schedule-based MAC Protocols for WSNs ........................................... 4 - 15
4.8.3.1 LEACH (Low Energy Adaptive Clustering Hierarchy) ............................................ 4 - 15
4.8.3.2 SMACS ................................................................................................................. 4 - 16
4.8.3.3 TRAMA................................................................................................................. 4 - 18
4.8.3.7 MC-LMAC............................................................................................................. 4 - 23
(x)
4.8.4 Comparison of Schedule based WSN-MAC Protocols ....................................... 4 - 26
4.9 IEEE 802.15.4 and Zigbee ................................................................................ 4 - 28
4.9.1 Protocols in IEEE 802.15.4 Family ..................................................................... 4 - 28
4.9.2 Zigbee Technology............................................................................................. 4 - 29
4.9.2.1 Zigbee Fundamental ............................................................................................ 4 - 29
(xi)
4.11.2.5 Directed Diffusion.............................................................................................. 4 - 47
5.4 Energy Efficient Routing and Various Energy Efficient Routing Protocols ...... 5 - 14
5.4.1 Energy Efficient Routing .................................................................................... 5 - 14
(xii)
5.4.2 Energy Efficient Unicast Protocols Approaches and Examples ......................... 5 - 17
5.5 Two Marks Questions with Answers [Part - A] .......................................... 5 - 21
5.6 Long Answered Questions [Part - B].......................................................... 5 - 23
(xiii)
Unit - IV
7.2.1.3 Network Layer Attacks (Sybil, Wormhole, Black hole) and Solutions.................. 7 - 11
Unit - V
(xvi)
UNIT - I
1 Wireless Networks
and Ad hoc Networks
Syllabus
Elements of Ad hoc Wireless Networks, Issues in Ad hoc wireless networks, Example commercial
applications of Ad hoc networking, Ad hoc wireless Internet.
Contents
1.1 Wireless Network
1.2 Wireless Ad hoc Network
1.3 Two Marks Questions with Answers [Part - A]
1.4 Long Answered Questions [Part - B]
(1 - 1)
Ad hoc and Wireless Sensor Networks 1-2 Wireless Networks and Ad hoc Networks
1. Satellite Communication
Satellite communication is one type of self contained wireless communication
technology, it is widely spread all over the world to allow users to stay connected
almost anywhere on the earth. When the signal (a beam of modulated microwave)
is sent near the satellite then, satellite amplifies the signal and sent it back to the
antenna receiver which is located on the surface of the earth. Satellite
communication contains two main components like the space segment and the
ground segment. The ground segment consists of fixed or mobile transmission,
reception and ancillary equipment and the space segment, which mainly is the
satellite itself.
2. Infrared Communication
Infrared wireless communication communicates information in a device or
systems through IR radiation . IR is electromagnetic energy at a wavelength that is
longer than that of red light. It is used for security control, TV remote control and
short range communications. In the electromagnetic spectrum, IR radiation lies
between microwaves and visible light. So, they can be used as a source of
communication. For a successful infrared communication, a photo LED
transmitter and a photo diode receptor are required. The LED transmitter
transmits the IR signal in the form of non visible light, that is captured and saved
by the photoreceptor. So the information between the source and the target is
transferred in this way. The source and destination can be mobile phones, TVs,
security systems, laptops etc. supports wireless communication.
3. Broadcast Radio
The first wireless communication technology is the open radio communication to
seek out widespread use, and it still serves a purpose nowadays. Handy
multichannel radios permit a user to speak over short distances, whereas citizen’s
band and maritime radios offer communication services for sailors. Ham radio
enthusiasts share data and function emergency communication aids throughout
disasters with their powerful broadcasting gear, and can even communicate
digital information over the radio frequency spectrum.
Mostly an audio broadcasting service, radio broadcasts sound through the air as
radio waves. Radio uses a transmitter which is used to transmit the data in the
form of radio waves to a receiving antenna (Different types of antennas). To
broadcast common programming, stations are associated with the radio N/W’s.
The broadcast happens either in simulcast or syndication or both. Radio
broadcasting may be done via cable FM, the net and satellites. A broadcast sends
information over long distances at up to two megabits/Sec. (AM/FM Radio).
Radio waves are electromagnetic signals, that are transmitted by an antenna.
These waves have completely different frequency segments, and user will be
ready to obtain an audio signal by changing into a frequency segment.
For example, consider a radio station. When the RJ says you are listening to 92.7
BIG FM, what RJ really means is that signals are being broadcasted at a frequency
of 92.7 megahertz, that successively means the transmitter at the station is
periodic at a frequency of 92.700,000 Cycles/second.
When listener would like to listen to 92.7 BIG FM, listener has to tune in the radio
to just accept that specific frequency and will receive perfect audio reception.
4. Microwave Communication
Microwave wireless communication is an effective type of communication, mainly
this transmission uses radio waves, and the wavelengths of radio waves are
measured in centimeters. In this communication, the data or information can be
transfers using two methods. One is satellite method and another one is terrestrial
method.
Wherein satellite method, the data can be transmitted though a satellite, that orbit
22,300 miles above the earth. Stations on the earth send and receive data signals
from the satellite with a frequency ranging from 11 GHz - 14 GHz and with a
transmission speed of 1 Mbps to 10 Mbps. In terrestrial method, in which two
microwave towers with a clear line of sight between them are used, ensuring no
obstacles to disrupt the line of sight. So it is used often for the purpose of privacy.
The frequency range of the terrestrial system is typically 4 GHz - 6 GHz and with
a transmission speed is usually 1 Mbps to 10 Mbps.
The main disadvantage of microwave signals is, they can be affected by bad
weather, especially rain.
5. Wi-Fi
Wi-Fi is a low power wireless communication, that is used by various electronic
devices like smart phones, laptops, etc.In this setup, a router works as a
communication hub wirelessly. These networks allow users to connect only
within close proximity to a router. WiFi is very common in networking
applications which affords portability wirelessly. These networks need to be
protected with passwords for the purpose of security, otherwise it will access by
others
Cellular systems
Cellular telephone systems are very popular and used worldwide. They were
primarily designed in the 1960’s to provide analog communication and later it was
enhanced to provide digital communication between mobile devices. The main goal of
cellular communication systems is to provide voice and data communication to
international level coverage. The working of cellular system is as follows,
The coverage area of cellular system is divided into non-overlapping cells which
comprises several mobile devices.
Communication between the mobile devices is controlled by a fixed point base
station which is connected with a Mobile Switching Center (MSC).
Each MSC acts as a central controller and takes the responsibility of allocating
channels within cells and managing hand-offs between MSCs.
The essential components used in cellular systems are cheaper, faster and smaller in
size and require less power for radio propagation.
The various developments of cellular systems are as follows : The first generation (1G)
cellular system is called the Advance Mobile Phone Service (AMPS) which is based on
FDMA with 30 kHz FM-modulated voice channels. The second generation (2G) digital
systems called Global System for Mobile communication (GSM) provides data rates of up
to 100 kbps. The third generation (3G) cellular system provides different data rates
depending on mobility and location.
Cordless Phones
Cordless telephones were first appeared in the late 1970’s. These phones are basically
designed for providing low cost, short wireless link communication. These devices use
radio waves with specific frequency for communication. Cordless phones replace the
handset cord or landline phone to radio link. The functionality of cordless phones is given
below :
The cordless phone uses a base station and the handset which can be used
anywhere and at any time within a specified distance from the base station.
The base station is connected to the phone line through a wire.
Base station acts as a normal telephone. It receives calls through the phone line as
electrical signals. Then it converts the received electrical signals to a radio signal
and forwards that signal to the handset of the user.
The transmitted radio signal from the base station is received by the handset. This
signal is converted back to electrical signal and sent to the speaker.
The speaker converts the electrical signal into the sound form that can be head.
Again, when one talks via the handset, the voice is transmitted to the base station
as radio signal where it is converted to electrical signal and transmitted through
the phone line.
The base station and handset operate on a frequency pair that allows to talk and listen
at the same time.
7. Bluetooth Technology
The main function of the Bluetooth technology is that it permits user to connect
various electronic devices wirelessly to a system for the transferring of data. Cell phones
are connected to hands free earphones, mouse, wireless keyboard. By using Bluetooth
device the information from one device to another device. This technology has various
functions and it is used commonly in the wireless communication market.
8. ZigBee
This wireless technology is mainly used in mesh networks and allows nodes to be
connected together through multiple pathways. This radio specification is mainly used
for providing communication with low cost and power consumption than Bluetooth
technology.
The main objective of using ZigBee technology is to provide radio communication for
prolong period without recharging. So, this technology is suitable in sensor networks and
inventory tags. ZigBee technology was originally standardized as IEEE 802.15.4. ZigBee is
designed specifically to be used in Machine to Machine (M2M) networks.
ZigBee supports data rates of up to 250 kbps at a coverage range of upto 30 m.
However, these data rate is lower than Bluetooth technology. Furthermore, it consumes
less power and having more coverage area than Bluetooth technology.
9. WiMax
Worldwide Interoperability for Microwave Access (WiMax) is one of the broadband
wireless technologies. This technology was standardized as IEEE 802.16. This wireless
technology allows data to be transferred at a rate of 30 - 40 megabits per second. WiMax
would operate similar to WLAN, but it transfers data at higher speeds over greater
distances and for a large number of users. It has the ability to provide service in the places
where implementing wired infrastructure is difficult.
Most of the modern day devices have built-in wireless capabilities, either
802.11b/g, 802.11b/g/n, or even 802.11ac. These devices will be able to connect
directly to the wireless router.
3. Ad-hoc node (Mesh) - Some wireless devices (laptops, smart phones, or
wireless routers) support a mode called Ad-hoc. This allows those devices to
connect together directly, without an Access Point in-between controlling the
connection. This forms a different type of network - in Ad-hoc mode, all
devices are responsible for sending and receiving messages to the other devices
- without anything else in between. In an Ad-hoc network, every device must
be in this role, and using the same configuration to participate. Not all devices
use this mode, and some have it as a “hidden” feature. Ad-hoc devices are
used to create a mesh network, so when they are in this mode, they are called
“Mesh Nodes”.
An Ad-hoc or mesh node is similar to an individual in a group or roundtable
discussion. They can take equal part in the conversation, raising their hand
when they want to speak so the others will listen. If someone at the end of the
table cannot hear, one of the individuals in-between can repeat the original
message for the listener.
6. When can not be It can’t be used in critical It is not always fully connected as
used situations like disaster relief two mobile nodes may temporarily
where no infrastructure is left. be out of range.
7. Channel Access Most infrastructure based Most Ad-hoc based WLAN uses
WLAN uses TDMA-based contention MAC protocols (e.g.
protocols. CSMA).
8. Topology Based on topology, one main Ad-hoc WLANs are easier to set-up
advantage is the ability of and require no infrastructure.
infrastructure WLANs to
provide wired network
applications and services.
10. Figurative
depiction
11. Connection set up Requires less time for Requires more time for
connection set up. connection set up.
12. Quality of service Quality of service is better. Quality of service is poor due
to higher jitter, delays and
longer connection set up times.
Since the devices in the Ad-hoc network can access each other's resources directly
through a basic point-to-point wireless connection, central servers are unnecessary for
functions such as file shares or printers. In a wireless Ad-hoc network, a collection of
devices (or nodes) is responsible for network operations, such as routing, security,
addressing and key management.
11. In Ad hoc network multi hop routing is required as per situation. When a
node tries to send information to other nodes which is out of its
communication range, the packet should be forwarded via one or more
intermediate nodes.
12. High user density and large level of user mobility.
13. In ad hoc networks no central management hub is required from where all
devices can be controlled.
14. In Ad hoc network operations are performed in distributed manner.
Distributed nature of operation for security, routing and host configuration. A
centralized firewall is absent here. There is no background network for the
central control of the network operations, the control of the network is
distributed among the nodes. The nodes involved in a MANET should
cooperate with each other and communicate among themselves and each node
acts as a relay as needed, to implement specific functions such as routing and
security.
The mobile devices which are in the coverage range of other devices can communicate
with each other directly. Otherwise, if a mobile node (source) wants to transmit a message
to another mobile node (destination) which is in out of the communication range of
source node, then multiple intermediate nodes are used to forward the same message to
the designated destination.
Location service is used to dynamically map the logical address of the receiver
device to its current location in the network.
3. Middleware and applications
Ad hoc systems do not have a middleware. However, it is developed to rely on
each application to handle all the services it needs in different environments.
Ad hoc networking applications are suitable mainly in specialized fields such
as emergency services, disaster recovery and environmental monitoring. In
addition, Ad hoc system can be widely used in home networking, search and
rescue operations, commercial and educational applications, sensor networks
etc.
1.2.3.2 Communication
There are two types of Ad hoc communication namely,
1. Single hop communication - Here, Direct Communication is possible between
two mobile nodes.
2. Multi-hop communication - Here, each node forwards the message through
multiple hops (nodes) to deliver to the designated node (destination) which is
far away to source node.
environment. Ad hoc routing protocols are broadly classified into three categories
namely,
1. Proactive or table-driven routing protocol
2. On-demand or reactive routing protocol
3. Hybrid routing protocol.
1. Proactive routing protocol - Each node maintains a routing table to listen and
update the details of its neighbours. Each node exchanges hello packet
including node identifier, message and time-to-live parameters. The node
which receives the hello packet will response using hello reply message. These
messages are used to update the routing table. So, whenever a mobile node
wants to transmit a packet to other node in the network, it can easily find the
route from its routing table. Thus, these type of protocols are reducing the time
needed to determine a route for data transmission. One of the examples of pro
active routing protocol is Destination Sequenced Distance Vector (DSDV)
routing protocol.
2. Reactive routing protocol - Each node determines a routing path whenever it
is required to transmit a packet from a source node to the destination. Each
protocol uses two key phases for finding a route : Route discovery and route
maintenance. Route discovery phase uses route request and route reply
messages. If any reliable path is broken, then route maintenance phase can be
used. Route maintenance phase uses Route Error message for intimating the
broken route to the sender and will try to determine alternate route to reach
the source and destination. Some of the examples of reactive routing protocols
are Dynamic Source Routing (DSR) protocol and Ad hoc On demand Distance
Vector (AODV) routing protocol.
3. Hybrid routing protocol - This type of protocols combines the advantages of
proactive and reactive routing protocols. Each node uses proactive algorithm
within its visibility and uses reactive algorithm when a node wants to
communicate with other node which is in it’s out of the coverage area. Zone
Routing Protocol (ZRP) and Order One MANET Routing Protocol (OORP) are
the examples of hybrid routing protocols.
These impromptu on-demand networks are useful for putting together a small,
inexpensive all-wireless LAN. They also work well as a temporary fallback mechanism if
equipment for an infrastructure mode network fails.
The importance of Ad hoc network has been highlighted in many fields as described
below,
1. Provincial level - Ad hoc networks can build instant link between multimedia
network using notebook computers or palmtop computers to spread and share
information among participants (e.g. Conferences).
2. Personal area network and home and enterprise network - A personal area
network is a short range, localized network where nodes are usually associated
with a given range. Conference meetings and lectures can be arranged.
3. Industry sector - Ad hoc network is widely used for commercial applications.
Ad hoc network can also be used in emergency situation such as disaster relief.
The rapid development of non-existing infrastructure makes the Ad hoc
network easily to be used in emergency situation.
4. Bluetooth - Bluetooth can provide short range communication between the
nodes such as a laptop and mobile phone.
5. Tactical/military networks - Military communication and operations can be
carried out. In this network the coordination of military object moving at high
speeds such as fleets of airplanes or ship can achieved. An Ad hoc networking
allows the military battle ground to maintain an information network among
the soldiers, vehicles and headquarters. Automated battlefields can be set such
as in determining the position of troops during war fare.
6. Sensor networks - These network support collection of embedded sensor
devices used to collect real time data to automate everyday functions. Sensor
network can be deployed in the monitoring and measurement of variables
such as change in pressure, temperature etc especially in pipelining. This
network can be use in tracking of positions and movement of objects and
animals.
7. Emergency services - Ad hoc network can be used in search, rescue, crowd
control operations and in disaster control and recovery. It can be used in
replacement of a fixed infrastructure in case of earthquakes, hurricanes, fire
etc. It can be deployed for policing and fire-fighting. It can support doctors and
nurses in medical field.
4. Ad hoc networks are more prone to attacks due to limited physical security. If
an attacker comes within range of the ad hoc network, the attacker can easily
get in inside the network.
5. For file and printer sharing, all users need to be in the same workgroup, or if
one computer is joined to a domain, the other users have to have accounts on
that computer in order to access shared items.
usually impossible to detect this attack, as it does not produce any new traffic
in the network.
(ii) Active Attacks - Active attacks are designed to disrupt the network by sending
signals or data. An active attack attempts to destroy or modify the data being
exchanged in the network, hence disrupting the normal functioning of attacks.
In contrast to passive attack, during an active attack, information is inserted
into the network. Active attacks involve actions such as the replication,
modification and deletion of exchanged data. Certain active attacks can be
easily performed against an Ad hoc network. These attacks can be classified as
impersonation, denial of service, and Disclosure attack. Denial of service attack
is one of the major active attacks causing the communication channel to be
blocked.
Further these attacks are divided into two categories,
External attacks - These are carried out by the outsider nodes, those nodes that do not
belong to the concerned network.
Internal attacks - These attacks occur because of compromised nodes present inside
the network.
Routing Attacks - These attacks are aimed on the routing protocols and are being
performed in a manner to disrupt the operation of the network. These attacks are
further categorized as routing table overflow and routing table poisoning.
1.2.8 Ad hoc Wireless and Cellular Network and their Comparative Analysis
A cellular network is a radio network distributed over land through cells where each
cell includes a fixed location transceiver known as base station. These cells together
provide radio coverage over larger geographical areas. User Equipment (UE), such as
mobile phones, is therefore able to communicate even if the equipment is moving through
cells during transmission.
Cellular networks give subscribers advanced features over alternative solutions,
including increased capacity, small battery power usage, a larger geographical coverage
area and reduced interference from other signals. Popular cellular technologies include
the global system for mobile communication, general packet radio service, 3GSM and
code division multiple access.
Cellular network technology supports a hierarchical structure formed by the Base
Transceiver Station (BTS), Mobile Switching Center (MSC), location registers and Public
Switched Telephone Network (PSTN). The BTS enables cellular devices to make direct
communication with mobile phones. The unit acts as a base station to route calls to the
destination base center controller. The Base Station Controller (BSC) coordinates with the
MSC to interface with the landline-based PSTN, Visitor Location Register (VLR), and
Home Location Register (HLR) to route the calls toward different base center controllers.
7. Cost and time for Higher cost and takes more Lower cost and does not
installation time for deployment take more time for
deployment
Table 1.2.1 Difference between cellular networks and Ad-hoc networks in tabular form
to other node. The major design issues of a routing protocol are as follows :
Mobility, bandwidth constrained, error-prone and shared channel, location
dependent contention and other resource constraints such as computing and
battery power, storage capacity etc.
Other requirements of routing protocols in Ad hoc networks are minimum
route acquisition delay, quick route reconfiguration, loop free routing,
distributed routing approach, minimum control overhead, scalability,
provisioning of Quality of Service (QoS), support for time sensitive traffic and
security.
3. Multicasting - Transmission of same message to a group of mobile nodes in
single transmission is called multicasting. The major design issues of
multicasting protocols are as follows : Robustness, efficiency, control overhead,
QoS, efficient group management, scalability and security.
4. Transport layer protocols - Transport layer protocols are used to set up and
maintain end-to-end connection. Further, it provides reliable data delivery in
wired networks. It is also focused to perform flow control and congestion
control.
Transmission Control Protocol (TCP) is one of the reliable connection oriented
protocols which is widely used in wired networks. However, the performance
of TCP is degraded in Ad hoc networks due to the factors such as frequent
path breaks, high mobility, bandwidth and power constrained, high channel
error rate and frequent network partitions. If a TCP connection is divided into
two in Ad hoc network, then it will lead to much packet loss. This would be an
intolerable when the network partitions exist for prolong period. Therefore, the
development of transport protocols for Ad hoc networks should take into
consideration the aforementioned issues.
5. Pricing scheme - In Ad hoc network, if any mobile node is not interested in
relaying a packet to its neighbours, it can decide to power off. In spite of that a
node is having an optimal path to communicate with other node and any
intermediate node on the path supposed to relay the packet is decided to
power down, then the sender node cannot use that optimal path; instead it
may force to determine or consider a costlier alternate path which is non-
optimal, consumes more resources and hence highly affects the throughput of
the system.
In general, passive attacks would be caused by malicious nodes present in the network
to obtain the information being exchanged in the network. This type of attack would not
interfere in network operations. Active attacks would disturb the network operation. If
the network operation is disrupted by mobile nodes (attackers) available within the
network are called internal attackers; if the network operation is interrupted by the
mobile nodes (attackers) which is in external network are called as external attackers.
Some of the security threats exist in ad hoc wireless network are Denial-of-Service (DoS),
resource consumption, host impersonation, information disclosure and interference.
9. Addressing and service discovery - Address of a mobile node is a globally
unique identifier used for communication in Ad hoc wireless network. Since
nodes join into a new network and leave from the current network any time,
any auto-configuration addressing scheme is required to allocate non-duplicate
addresses to the nodes. Ad hoc wireless network also requires a duplicate
address-detection mechanism in order to maintain unique addressing
throughout the network. Since the Ad hoc network forms frequent dynamic
topology, efficient service advertisement mechanism also required to locate
services that other nodes provide.
10. Energy management - It is the process of managing the sources and consumers
of energy in a node to boost up the lifetime of the node in the network. Energy
management can be classified into four categories -
I. Transmission power management
II. Battery energy management
III. Processor power management
IV. Device power management.
Some of the functions of energy management mechanisms are enhancing battery life of
a node by shaping the energy discharge pattern, determining routing path with minimum
energy consumption, using distributed scheduling schemes to enhance battery life of a
node and to minimize the power consumption of processor and other computing devices
during data transfer.
11. Deployment considerations - The deployment considerations of Ad hoc
wireless networks when compare with wired networks are low cost of
deployment, incremental deployment, short deployment time, re-
configurability and non-estimation of future traffic growth in network.
Fig. 1.2.13 Ad hoc wireless internet protocol stack and structure of network
4. Transport layer protocol - Even though several solutions for transport layer
protocols exist for Ad hoc wireless networks, unlike other layers, the choice lies
in favor of TCP's extensions proposed for Ad hoc wireless networks. Split
approaches that use traditional wired TCP for the wired part and a specialized
transport layer protocol for the Ad hoc wireless network part can also be
considered where the gateways act as the intermediate nodes at which the
connections are split. Various factors are required to be considered here, like
the state maintenance overhead at the gateway nodes.
5. Load balancing - There is 100 % chance that the Ad hoc wireless Internet
gateways experience heavy traffic. Hence the gateways can be saturated much
earlier than other nodes in the network. Load balancing techniques are
essential to distribute the load so as to avoid the situation where the gateway
nodes become bottleneck nodes.
snoop on important information sent unprotected over the air. Hence security
is a prime concern in the Ad hoc wireless Internet.
Since the end users can utilize the Ad hoc wireless Internet infrastructure to
make e-commerce transactions, it is vital aspect to include security
mechanisms in the Ad hoc wireless Internet.
8. QoS support - Voice over IP (VoIP) is widely used all over and there is huge
multimedia applications usage over the Internet. Therefore, provisioning of
QoS support in the Ad hoc wireless Internet becomes a very important issue.
Below Fig. 1.2.14 depicts wireless mesh network that connects several houses
to the Internet through a gateway node. Such networks can provide highly
reliable broadband wireless networks for the urban as well as the rural
population in a cost-effective manner with fast deployment and
reconfiguration. This wireless mesh network is a special case of the Ad hoc
wireless Internet where mobility of nodes is not a major concern as most relay
stations and end users use fixed transceivers. In the Fig. 1.2.14 House-1 is
connected to the Internet over multiple paths (path 1 and path 2).
Notes
Syllabus
Issues in Designing a Routing Protocol for Ad Hoc Wireless Networks, Classifications of
Routing Protocols, Table Driven Routing Protocols - Destination Sequenced Distance Vector
(DSDV), On-Demand Routing protocols - Ad hoc On–Demand Distance Vector Routing
(AODV).
Contents
2.1 Introduction to Routing
2.2 Types of Ad hoc Routing Protocols
2.3 Advantages and Disadvantages of Ad hoc Wireless Routing Protocols
2.4 Two Marks Questions with Answers [Part A]
2.5 Long Answered Questions [Part B]
(2 - 1)
Ad hoc and Wireless Sensor Networks 2-2 Routing in Ad hoc Networks
1. Node Mobility
The nodes used in ad hoc network are highly dynamic due to the movement of nodes.
Mobility nature of nodes causes frequent path break. Sometimes, the node which acts as a
forwarder node may move away and leads to path break. The frequent path break occurs
due to the movement of intermediate nodes or end nodes along the path. So the design of
routing protocol has to consider this issue to introduce efficient algorithms for
determining alternate path with little delay.
2. Bandwidth Constraint
Wireless link has limited bandwidth due to limited radio spectrum. Hence the wireless
links carrying large amount of data is not possible in ad hoc network. Frequent dynamic
topology leads to high control overhead. The bandwidth is affected by multiple access,
fading, noise, interference conditions etc. Message aggregation exceeds network capacity
frequently.
reply message, node-B transmits CTS packet to node-A, this can be received by node-A
and heard by node-C. So, node-C defers its transmission for the time period specified in
CTS packet as there is a transmission between node-A and node-B.
Consider the scenario where node-D exists in the transmission range of node-C. When
node-B wants to transmit to node-A, at the same time, node-C cannot communicate with
node-D due to false conclusion by node-C. This problem is often referred to as “the
exposed terminal problem”. Both the hidden and the exposed terminal problems cause
reduction of network throughput when the traffic load is high.
5. Resource Constraints
Mobile nodes have limited battery power, processing power, memory and energy.
Increasing the battery power and processing ability makes the nodes bulky and less
portable. Hence the design of a routing protocol has to consider the resource constraints
of mobile nodes.
6. Security Issues
Mobile ad hoc wireless networks are prone to security threats. The attacks such as
eavesdropping, spoofing, and denial-of-service should be considered while designing a
new routing protocol. Unauthorized access of others data is known as snooping.
Tunneling a packet between two colluding attackers is referred to as a wormhole. In
wormhole attack, a malicious node receives packets at one location in the network and
forwards them to another location where these packets are resent into the network. In
black hole attack, a node (attacker) designs a routing protocol as having a shortest path
between itself and the node whose packets it wants to intercept.
network must not cause updates in the topology information maintained by the
node.
10. It should be able to provide a certain level of Quality of Service (QoS) as
demanded by the applications, and should also offer support for time-sensitive
traffic.
Advantage
1. Minimum time is required to find out a route for data transmission
Disadvantages
1. Due to the frequent change of network topology, the exchange of up-to-date
information has to be done periodically
2. Network overload is high
3. Bandwidth consumption is high in large networks
4. This type of protocol is not suited for large networks
According to the shortest path information, each node constructs another routing
table where the node has recently updated route information to reach destination
with minimum distance.
This new routing table will be broadcast to its
neighbours.
On receipt of these messages, the neighbour
nodes update its routing table. Fig. 2.2.1 Network topology in
In the Fig. 2.2.1, the connectivity between nodes are DSDV
shown using wireless links. The routing table
maintained at node-A is shown in Table 2.2.1.
B B 1 342
C C 1 168
D B 2 121
E C 2 24
If node-B is the destination for node-A, then node-A can directly transmit the packet
with metric 1 and next hop is node-B. But, if node-A wants to transmit a packet to node-E,
then it can find the route from the routing table. In this case, the node-E is not in the
visibility of node-A. Therefore, the packet can be transmitted through the next hop C with
metric 2.
• When a node receives more than one packet, then the update packet with smallest
metric value will be considered to ensure the shortest path. Other packets will be
ignored.
1. Distance Table
In this table, each node contains information such as destination node, next hop,
distance and the previous node (predecessor) of the destination.
2. Routing Table
It contains the shortest distance and the up-to-date information of all destinations. In
order to determine the shortest path, each node maintains the ID of destination node, next
hop, distance (cost) and predecessor node.
3. Link-Cost Table
Each node contains the cost of link and the ID of direct nodes with which the node can
communicate directly. The cost of other links is represented as infinity.
Table Maintenance
This protocol requires larger memory to store four tables and more processing for
maintaining accurate information about nodes in the network.
It is also not suitable for large networks with high mobility.
In order to update the table, each node periodically
broadcast hello message to its neighbours. If the sending
node is a new one, then all the neighbouring nodes will
update its table. Otherwise, the nodes will ignore the
message. The exchange of hello message is used to ensure Fig. 2.2.2 Example topology
the availability and the connectivity of node in the network. for WRP protocol
Fig. 2.2.2 shows an example network topology of WRP
protocol.
Consider that node-A is the source and node-E is the destination. The routing table
maintained at each node with destination node-E is shown in Table 2.2.2.
Node ID Next Hop Predecessor Cost
A C C 7
B D C 6
C E C 2
D C C 5
E E E 0
From the routing table, node-A can identify that there is a path to node-E with next
hop C and the predecessor is also C with cost value 7.
Route Maintenance
When a link break occurs, the node which detects link breakage will send an update
message by setting the cost of broken link to infinity. The nodes receive this update
message will update its routing table. The node which had been initiated the update
packet will detect an alternate path and broadcast the new path information to its
neighbors. Based on the reception of this message, all the neighbors will update its
routing table.
Otherwise, the packet has to be forwarded to other cluster using gateways. This
step will be repeated until finding the destination node’s cluster-head.
Once the destination node’s cluster-head is identified, then the packet is
transmitted to the cluster-head of the destination node. This cluster-head will in
turn forward the packet directly to the intended destination.
In the above Fig. 2.2.3, cluster-heads, border nodes (gateways) and cluster members
are shown. When node H wants to transmit a packet to node M, it follows the path H-A-
F-B-L-C-M. Packet transmission between clusters is carried out through border nodes.
Since node F and node L are border nodes, the packet transmission between node H and
node M are taken place through these border nodes. If a path break occurs or any node
moves away, then the source node will reestablish the path between the source and
destination. If any cluster-head or border node moves away, then the time taken to find
an alternate path by the source node will lead to long delay.
1. Neighbour Discovery - Each node maintains neighbour list and topology table.
Initially these tables are maintained as empty. Once the node initiates this
neighbour discovery phase, then it can fill the table with neighbour relationships. In
order to identify the presence of neighbours, each node broadcasts ‘hello’ packet
including its ID, time-to-live parameters. The nodes hearing the packet will
response with the reply message. Thus each node maintains relationship between
each other.
Information Dissemination - This phase propagates Link State Packets (LSP). This
phase handles two functions namely, LSP integrity and updating interval. In LSP
integrity, when a node generates a new LSP, it must be flooded throughout the
network. Most recently generated LSP contains highest sequence number. Each
node keeps track of sequence number that it is used for the last LSP and inserts a
next sequence number for the new LSP. A sequence number is a counter value. For
each new LSP, counter value is incremented. Most recent sequence number
indicates the freshness of the message. The update interval is that the time gap
between sending first LSP and next LSP by a node.
When a node receives a LSP to retransmit, it calculates interval time to wait before
sending out the LSP to other nodes based on Update_Interval calculation.
Update_Interval = Constant_Time * hop_count^
Where, Constant_Time is the user defined refresh period to send out LSPs (in the 1st
scope), hop_count is the number of hops the LSP has traversed, alpha is a parameter that
determines how much effect each scope has on the Update_Interval. Values for alpha are
0 or ≥ 1.
Route Computation - This phase is responsible for computing route based on the
information available in LSP. Using Dijkstra's algorithm, each node computes
shortest path to reach other nodes. The hop count value is taken as cost of the path.
Data can be transmitted through shortest path.
3. In order to find a route, the sender node has to broadcast route discovery control
messages to neighbor nodes until receiving reply from the intended receiver.
Advantages
1. Needs to broadcast less control messages for discovering route when required
2. Network overhead is low
3. Suitable for large networks
4. Bandwidth wastage is low.
Disadvantage
1. Time taken to discover a route is non-predictable.
node has to exchange control messages to establish a path between source and the
destination. DSR protocol comprises two phases : Route discovery and route
maintenance.
When node A wants to transmit a packet to node F, it broadcasts RREQ packet in the
network. The key fields of RREQ packet are ID of source node and ID of destination node.
The RREQ packet is received by node B. Node B checks that whether the packet has to be
rebroadcast or not. If so, it attaches its own ID and rebroadcast it. This happens until the
packet received by node F. Node F may receive multiple RREQ packets with different
Route Discovery
In AODV, each node maintains a routing cache to save the information about the
reachable destinations. When to a node wants to transmit a packet to the destination the
sender node initiates to broadcast the RREQ packet. All the neighbouring nodes receive
the RREQ packet and rebroadcast it if it is not the intended recipient. The RREQ contains
the following information.
ID of source node
ID of destination node
Most recent sequence number
Broadcast ID
Hop count
Time-to-live.
Each broadcast packet contains broadcast ID. The hop count is the number of hops the
packet passes through to discover the destination. If any one of the neighboring nodes
which had received the RREQ packet and knows the path for destination, then it sends
RREP packet through a selected path to the sender node. Otherwise, the neighbor node
rebroadcasts the RREQ packet.
Consider that node-A wants to send a packet to node H. Node-A initiates broadcasting
RREQ packet. Node-B and node-C are the neighbors of node-A and received the packet. If
node-B and node-C has route information of node-H, then it replies with RREP packet.
Otherwise, node-B and node-C will re-broadcast the RREQ packet which is shown in
Fig. 2.2.6 (a).
Finally, node-H receives more number of RREQ packets through different paths. In
general, a shortest path will be selected
to route the RREP packet. When the
RREP sends back to the sender node-
A, all the intermediate nodes on the
path will update their routing cache
with the reachable destination
information. Fig. 2.2.6 (b) shows the
transmission of RREP packet from
Fig. 2.2.6 (b) Transmission of RREP packet in
node-H to the source node-A. AODV protocol
Once the sender node receives RREP packet, then it saves the route in the cache and
starts to send the packet to the destination through the established path. Unlike DSR, in
AODV, each node does not store the complete path required for data transmission.
Instead, each node stores only the next hop information of the established path. The
routing packets are transmitted by specifying sequence numbers to indicate the freshness
of the packet.
Route Maintenance
When a node moves away or fails from the established path, then the broken path has
to be intimated by sending Route Error (RERR) packet to the sender node. RERR message
can also be sent when a node has no route or if the node cannot communicate with its
neighbors.
Route Discovery
When a node wants to transmit a packet to the
destination, it starts route discovery. A destination
oriented Directed Acyclic Graph (DAG) is formed
using TORA. DAG is a directed graph with no
cycles. If a DAG does not have any downstream
nodes then it is called as destination oriented
DAG. DAG can be created based on two
Fig. 2.2.7 (a) Operation of TORA
messages, Query and Update messages. The
Fig. 2.2.7 (a) illustrates the operation of TORA.
Consider, node-A that wants to transmit a packet to destination D. For that, node-A
initiates broadcasting Query packet. All the neighbor nodes (B, E) rebroadcast the
received packets if it is not the intended recipient. Node-C again rebroadcast the Query
packet and it can be received by node-D. Since node-D is the intended recipient, it does
not re-broadcast the Query packet further.
On receipt of Query packet, node-D replies with Update message to the sender node.
Update packet contains the information about distance from the destination. When a
node receives Update packet, it sets the distance higher than the existing value in the
packet. Thus direct links from the sender node-A to the destination node-D is created.
This links forms a DAG. After establishing a path to destination, data transfer will take
place.
If a node can collect more information about destination’s mobility, then the expected
region can be determined perfectly. This helps to route the packet efficiently with
minimum latency.
Request Region - The control packets used for determining a path can be propagated
in a region called request region. Usually, sender node itself may determine the request
region.
LAR1 Algorithm
Each node broadcasts route request packet to identify the path to destination. The
route request packet contains the information about the request region. The Fig. 2.2.8 (a)
shows expected and request regions.
The request region is specified as a rectangle area and the coordinates used for
specifying the rectangle is (x1, y1), (x2 + r, y1), (x1, y2 + r) and (x2 + r, y2 + r). Request region
contains source node and the expected region of destination node. When the sender node
presents within the expected region, then the size of request region may shrink to the size
of the expected region.
As explained earlier, if the intermediate nodes C, B and E are present within the
request region and receives route request packet from node-A, then the intermediate
nodes will rebroadcast the same packet. Otherwise, the nodes will drop the packet. In the
given example, node-I discards the packet since it is present out of the request zone.
When node-D receives route request packet from node-A, it will send route reply
packet to the sender node. This packet contains the current location of node-E and current
time.
LAR2 Algorithm
In LAR2, source node attaches the (x, y) position of destination in the route request
packet. It does not attaché the information about the expected region of the destination in
the route request packet explicitly. In addition to the position of destination, the sender
node also attaches the distance between source and destination in the route request
packet.
When the intermediate node receives route request packet, it calculates the distance
between the node-A and node-D which is shown in Fig. 2.2.8 (b).
If the calculated distance is smaller than the distance between node-A to destination
D+Δ (Δ is the locality error), then it forwards the received packet. Otherwise the packet
will be dropped at the node.
As shown in Fig. 2.2.8 (b), when node-C receives route request packet and calculates
the distance between itself and node-D, it identifies that the newly computed distance
value is smaller than the distance between node-A and node-D. So it decides to forward
the packet. But, node-B discards the packet since the newly computed distance value is
greater than the existing one. When node-D receives the route request packet, then it
sends route reply message to the sender node. After that, actual data transmission will be
started.
Route Establishment
The sender node broadcasts route request packet in order to discover a path between
sender node and the receiver. Each route request packet contains the path it has visited
and the beacon count of the node along the path.
When a destination node receives first route request packet from its neighbors, it waits
for some more time to receive multiple route request packets from other nodes. Finally,
when time expires, the destination node selects a path with stable links. When more than
one path contains stable links, then a path with shortest distance will be considered.
In above Fig. 2.2.9 node-A wants to transmit a packet to node-E. In the Fig. 2.2.9, solid
lines represent stable links and other links are unstable links. In ABR, in spite of receiving
two routes from node A (A-B-H-E, A-B-D-F-E), node-E selects second route even the
length of second path is longer than the first path. This happens because the second path
contains stable links.
Route Maintenance
If a link break occurs, then the previous intermediate node near the broken link will
discover a new route by broadcasting route repair packet or route error packet. This
process continued until repairing the route or establishing a new route from the source to
the destination nodes.
Route Establishment
When a node forwards a packet to the destination, it refers SST for identifying the
stable links. After identifying the stable links, the sender node broadcasts route request
packet.
When a neighour node receives route request packet, it forwards the packet if the
packet has been received only through strong link. Otherwise, the node will drop the
packet. On receipt of route request packet, the destination node sends route reply packet
to the sender node through the determined strong path. The operation of SSA protocol is
shown in Fig. 2.2.10 (a).
Consider that node-A wants to send a packet to node-H. As discussed in ABR, solid
lines represent strong links and the dotted lines represent weak links. Node-A broadcasts
route request packet that can be received by node-B and node-D. Since the path between
node-A and node-B is weak, node-B does not forward route request packet further. But
node-D will forward the packet to its neighbours. This process continues until node-H
receives route request packet. On receiving route request packet through the path A-D-E-
G-H, the node-H sends route reply message to node-A through the reverse path H-G-E-
D-A.
Route Maintenance
When any one of the link from the established path breaks and is identified by the end
nodes of the link, then the end nodes will send a Path Break Notification (PBN) packet to
the sender node. The route maintenance phase is shown in Fig. 2.2.10 (b).
If the link between node-E and node-G breaks, then the end nodes-E and node-G of the
link will send PBN packet to the sender node-A and the receiver node-H of the path
respectively. After receiving the PBN packet, the sender node initiates broadcasting route
request packet to establish a new path between nodes A and H.
Route Establishment
When a node wants to send a packet to the receiver, it first checks its routing table to
know the path details in order to identify the reachability of destination. If the routes are
not available, then the sender node broadcast a flow request packet. This packet includes
the ID of the sender, ID of the receiver and the sequence number. Each fresh transmission
will have highest sequence number than the previous transmission. The sequence number
is used to identify the freshness of the message.
On receiving flow request packet, every neighbour node forwards the packet if the
sequence number exists on the packet is higher than the old packet which had been
received by the node. Otherwise, the packet will be discarded.
Moreover, when a node receives a flow request packet, it attaches the ID of the node
and the LET value of the most recent link through which the packet has been traversed.
When a destination node receives a flow request packet with LET values of all links
through which the packet traversed, it can able to determine the RET value of newly
received route. If the newly computed value of RET is better than the old one which is
currently being used by destination, then the newly received path will be stored in the
table. This new route will be used for further communication. The operation of FORP is
shown in Fig. 2.2.11.
Consider that node-A sends a packet to node-F. Node A broadcasts flow request
packet and the intermediate nodes B and G forwards the packet. Finally, node-F receives
two flow request packets, A-B-D-F and A-G-E-F, from different paths. After receiving the
flow request packet, the destination node F will response with flow setup message to
sender node A.
Calculation of LET
Let the transmission range of two nodes A and G be denoted as TA and TG and the
velocity of node A and node G be VA and VG respectively. Now, LET of the wireless link
between node A and node G can be computed as,
– (pq + rs) + (p2 + r2)TX2 – (ps – qr)2
LETAG =
p2 + q2
where
p = VA cos TA – VG cos TG
q = XA – X G
r = VA sin TA – VG sin TG
s = YA – YG
Route Maintenance
Each destination can able to calculate RET of the path being used. Based on the RET
value, the node can able to find out at what time (critical time) the link break would
occur. Before the critical time exceeds, the destination node broadcast a flow-handoff
packet to the source node and the neighboring nodes which receive the flow-handoff
packet will forward the message as broadcasting flow request packet. Sender node may
receive many flow-handoff messages through different paths. Further, the source node
calculates RET values of all the paths and finds a better path to continue data
transmission.
Advantages
Requires less memory and processing power
Integrates reactive and proactive routing advantages.
Disadvantage
If the border nodes move away, then re-establishing a path takes long time
Route Establishment
The route establishment of CEDAR uses two phases namely,
Detection of core path
Detection of QoS achievable path over core path.
The path between source and destination core is known as core path. When a node
wants to transmit a packet, it starts broadcasting route request packet. All the
neighboring core nodes will receive the route request packet and will in turn forward the
same packet if the destination is not in its core member.
If the core node finds that intended destination is present in its core member, then the
core node sends a reply to the sender node.
Assume that node-A wants to communicate with node-G. As shown in Fig. 2.2.12, the
dominating nodes or core nodes are represented as double circles. In the given network
topology, node-C and node-E are the core nodes. When node-A broadcasts route request
packet and intimates the ID of source and destination information to the core node, the
core node-C receives the information. If the core node-C possesses the information about
the dominator node of node-G, it does not broadcast the route request packet. Otherwise,
node-C rebroadcasts the packet.
Once the core path is set, then the availability of bandwidth on the path will be
checked. If the required bandwidth is found, then the path is established.
Route Maintenance
Route maintenance phase is used to repair the route when a path is broken. When a
link fails, the end nodes of the link will intimate it to the source node. The source node
will reestablish the path between source and destination. Link failure may occur in three
places as discussed below.
Case 1 - Link break may occur near the destination node. In this case, the time taken to
intimate the link breakage to the source node will take long time. During this time, the
packets received by the end node from the source node will be dropped at end node.
Case 2 - Link break may occur near the source node. In this case, the time taken to
intimate the link breakage to the source node will take less time. During this time, the
packets received by the end node are less and hence the packet loss is highly reduced.
Case 3 - Link break may occur in the middle of the path. Then the time taken to
intimate the link breakage to the source node is considerably average.
When a link break occurs, the end node (after which the link break occurred) will
identify the link breakage and will send a notification of failure packet to the sender node.
The sender node begins to find a new path from it to the intended destination. The above
mentioned end node rejects every received packet until it finds a new path to the
destination. Meanwhile, when the source receives the notification message, it stops the
current data transmission and tries to find a new path to the destination. If the new route
is found by the sender or the particular end node, then a new path is established from the
source to the destination.
In the above given network topology, if the link break occurs between nodes C and E,
then node-C will intimate the link breakage to node-A. Node-A will re-establish the core
path between the source and destination.
The zone consists of all nodes within a certain number of n-hops, called the zone
radius (r), away from the node. If the node forms with the nodes 1-hop away or 2-hops
away, then the zone radius is r = 1 or r = 2 respectively. In the above Fig. 2.2.13, the zone
radius for node-A is shown.
Packet Transmission
When a node needs to route a packet, it first checks to see whether the destination
node is within its zone or not. If it is within the zone, then the sender node identifies the
path to reach the destination from its routing table and send the packet directly to the
destination. Else, the sender node has to initiate route discover phase to establish a path
from the source to destination. To achieve this, the sender node uses DSR reactive routing
protocol.
In order to reduce number of packets flooding on the network, in ZRP, the sender
node sends the route request node to the border nodes. This process is called border-
casting. When the border nodes receive the route request packet, they repeat the process
for their own zones to discover a path to the intended destination. Thus the path between
sender and receiver nodes is established. For example, in the given topology, if node-A
wants to send a packet to node-P, then node-A sends the request packet to node-C
(border node), which will in turn find a path to node-P. After establishing a path between
node-A and node-P, data transmission will be carried out.
Route Establishment
Every node maintains its zone information. The connectivity of nodes which are
present beyond the zone also maintained at each node. Using positional information, each
node determines its zone ID by mapping its node ID. ZHLS follows proactive routing
inside the zone and reactive routing outside the zone. Fig. 2.2.14 shows a network
topology with different zones.
Two types of Link State Packets (LSPs) are maintained. They are,
Node LSP
Zone LSP.
Node LSP carries a list of neighbors connected with it whereas zone LSP carries a list
of its connected zones. Each node propagates link state details to every other node
present within the zone in such a way each node maintains the node ID of all the nodes in
its zone and maintains node-level topology. The node LSPs contain the zone IDs of the
neighboring zones which is shown in Table 2.2.3 (a).
Source Node LSP
A B, C and zone A
C A, D and zone I
Each node can receive the link state information of other nodes present outside of the
zone through border nodes. Hence every node can able to know the connectivity with the
nodes beyond its zone. Every node generates zone link state packet and circulate this
packet to entire network through border nodes. Table 2.2.3 (b) shows the zone link state
packet.
Source Zone Zone LSP
A B
B A,C,E and I
C B
D -
E B
F -
G -
H -
I B
Packet Transmission
When a source node wants to transmit a packet to destination, it first checks whether
the destination is present in its zone or not. If the destination is present in its zone, then
intra-zone routing protocol is used. If the destination is present outside of the zone, then
the source node initiates location request packet and forwards to border nodes. The
border nodes which receive the message will check its routing table and determine
whether the destination belongs to its zone or not. If so, the border node sends location
response packet to the sender node. Else, it forwards the request packet.
Route Maintenance
In ZHLS, communication between the nodes will be carried out through border nodes.
So, border nodes are the key elements of ZHLS. If the border nodes move away, then the
established path will break. However, this route failure can be managed by other border
nodes with little delay.
Table 2.3.1 Advantages and disadvantages of various table driven routing protocols
ABR Fewer path breaks due to stable Route cache is not used.
links.
More power consumption due
to beacon broadcast.
Q.1 How table-driven routing protocols for ad hoc networks work ? (Refer section 2.3.1)
Q.2 Write down the difference between proactive and reactive routing. (Refer section 2.3)
Q.3 Discuss the various major issues in designing routing protocols for Ad hoc networks.
(Refer section 2.1)
Q.4 Explain in detail about the types of Ad hoc routing protocols. (Refer section 2.1)
Q.5 Discuss the steps involved for maintaining a routing table in DSDV. (Refer section 2.3)
Q.6 Write short note on wireless routing protocol. (Refer section 2.1)
Q.7 Explain in detail the various algorithms of reactive routing protocols. (Refer section 2.3)
Q.8 Write in detail the various algorithms of hybrid routing protocols. (Refer section 2.2.3)
Q.9 List out the advantages and disadvantages of various table driven routing protocols.
(Refer section 2.3.1)
Q.10 Discuss the advantages and disadvantages of various on-demand routing protocols.
(Refer section 2.3.2)
Syllabus
Challenges for Wireless Sensor Networks, Enabling Technologies for Wireless Sensor
Networks, WSN application examples, Single-Node Architecture - Hardware Components,
Energy Consumption of Sensor Nodes, Network Architecture - Sensor Network Scenarios,
Transceiver Design Considerations, Optimization Goals and Figures of Merit.
Contents
3.1 Wireless Sensor Networks - Introduction
3.2 Sensor Node Architecture
3.4 Types of Wireless Sensor Networks
3.5 Enabling Technologies for Wireless Sensor Networks
3.6 WSNs Applications
3.7 Sensor Networks - Design Challenges
3.8 Sensor Network Architecture
3.9 Sensor Network Scenarios
3.10 Optimization Goals and Figures of Merit
3.11 Transceiver Design Considerations in WSNs in a Physical Layer
3.12 Two Marks Questions with Answers [Part - A]
3.13 Long Answered Questions [Part - B]
(3 - 1)
Ad hoc and Wireless Sensor Networks 3-2 Wireless Sensor Networks - Introduction and Architectures
2. Each sensor node in wireless sensor networks is also called as mote. Sensor nodes
are deployed to monitor the environment or any objects for measuring the
physical parameters such as temperature, pressure, humidity, sound,
characteristics of objects and their motion.
3. Sensor is a device that is used to detect and monitor the changes occurring in
electrical or physical quantities and thereby produces an output in the form of
electrical or optical signal. That is, each sensor node converts the physical
parameter such as temperature, blood pressure, humidity and speed etc. into an
electrical signal.
has a temperature quantity above absolute zero, then it emits heat energy as
radiation. It is radiating the heat energy at infrared wavelengths. This radiation is
invisible to the human eye. However, that can be detected by PIR motion
detectors.
5. Ultrasonic Sensors - Ultrasonic sensor operates similar to sonar or radar devices.
The transducer used in ultrasonic sensor converts energy into ultrasound or
sound waves. The range of these sound waves is above to human hearing range
and is called an ultrasonic transducer. Ultrasonic sensors can be classified as
active and passive ultrasonic sensors that can be distinguished based on the
working principle of sensors.
6. Touch Sensors - Touch sensors are available in the form of switches. These
switches can be activated by the touch. There are different types of touch sensors
that are classified based on type of touch switch such as capacitance touch
switch, resistance touch switch, and piezo touch switch.
1. Sensing Unit - Sensors are used to measure the physical quantities like
temperature, pressure etc. from their environment. They are hardware devices;
each sensor node is used to produce a quantifiable response to a change in
temperature or pressure of the environment.
Sensors produce analog signals. An Analog-to-Digital Converter (ADC) is used
to convert the analog signal into digital signals. The digitized signal can be sent
to controllers for further processing. Some sensors may contain the required
electronic components to convert the raw signals into readings. In general, sensor
nodes are small in size and consume energy during operation.
2. Processing Unit - The micro - controller placed in the sensor is used to perform
specific tasks, processes data and controls the operation of other components in
the sensor node. Usage of memory in sensor node is purely application
dependent. External memory is used to store the collected information. Usually,
flash memories are used in sensor nodes due to their low cost and high storage
capacity.
3. Communication Unit - Sensor nodes use transceiver to communicate with other
nodes. The wireless communication media used in sensor networks are radio
frequency, optical communication and infrared.
4. Power Supply Unit - Sensor node consumes power for sensing, data gathering,
communicating and data processing. Energy required for data communication is
more when compare with other process. Changing the battery in sensor node can
be costly and inconvenient. So it is very important to ensure that the sensor node
has adequate energy for performing operations continuously.
2. Energy/Power Supply Subsystem - The life time of the sensor node depends
upon the battery life. Batteries placed in each sensor can have only limited
power. Since sensor nodes receive power from batteries, limited amount of
power can be used for processing. The amount of power being used by the sensor
can be monitored by power supply subsystem. Depending upon the operating
environment of sensor node, power can be turned on or off. The battery used in
sensor node has to be charged from the suitable energy source and hence make
the sensor node to operate for prolong period.
3. Communication Subsystem - Short range radios are used to enable
communication between sensor nodes and with other wired units. Each sensor
node can be in any one of the following mode,
1. Transmit 2. Receive
3. Idle 4. Sleep
Transmission and reception modes require high energy consumption. In order to
save energy, the mode of the sensor node can be changed to sleep mode when the
sensor is in idle state.
4. Sensing Subsystem - The sensing subsystem is responsible for sensing the
environment and exchanging information with each other sensor nodes.
Different sensors are used to sense the physical condition of the environment.
Some of the research challenges of mobile WSNs are deployment of nodes for forming
network, navigation, localization, energy consumption, maintenance, data process and
routing between nodes. Mobile WSNs are widely applied in the areas where it requires
environment monitoring, target tracking, search and rescue operations, emergency
situations and real-time monitoring of hazardous areas etc.
1. Military applications
Battlefield surveillance and monitoring
Remote sensing
2. Environmental applications
To monitor weather conditions
Detection of forest fire
Flood detection
Habitat exploration of animals
Monitor environmental changes in plants, oceans and other disaster areas.
3. Medical applications
Monitor medical devices
Patient diagnosis
Monitoring patient physiological data such as heart rate or blood pressure
Data collected from patient can be sent to automated monitoring systems
Identify allergies
Prevent wrong diagnosis.
4. Commercial applications
Used in ovens, refrigerators and vacuum cleaners
To control and monitor robots.
5. Traffic monitoring
To detect a vehicle moving through an intersection and estimate the speed and
direction of the vehicle
To classify and categorize the detected vehicle in order to identify whether the
detected vehicle is a car, van, long vehicle, containers, minivan etc.
Monitor the density of vehicles on city roads and on highways
Detect congested parts of city from time to time
Identify free parking areas
Air traffic control
The layer one nodes form layer two with the nodes which are one hop away from
layer one nodes and records it's IDs. The layer one nodes inform this to the BS of layer
two nodes which in turn will broadcast to all the nodes of the network. In this manner,
the layered architecture can be built by BS and sensor nodes in successive beacon rounds.
This periodic beaconing procedure helps to update the neighboring information and to
re-form the layered architecture if the nodes move in out of the coverage area.
Operation-2 MAC
For the data transmission, the Distributed TDMA Receiver Oriented Channel
(DTROC) assignment MAC protocol is used. The two operations of DTROC are as
follows,
1. Channel allocation : Channel allocation is the process of assigning reception
channel to every node. Channel scheduling means sharing of the reception
channel among the neighbours. DTROC uses suitable channel allocation
algorithms to avoid hidden and exposed terminal problems.
2. Channel scheduling : A separate receiving channel is assigned for each node by
the BS. Each node make transmission slot schedule and broadcast to its
neighbours thereby enabling collision free transmission and saves energy. When
the nodes are not involved in sending or reception operation, it can turn off.
UNPF-R
The modified UNPF protocol set is termed as UNPF-R. This makes the sensor nodes to
vary their communication range to improve network performance. The small
transmission range would make many network partitions whereas large coverage area
may reduce spatial reuse of frequencies.
The optimal communication range can be determined by a centralized control
algorithm called simulated annealing in which the BS calculates an objective function
periodically.
Calculation of Objective Function
For a transmission range R, the objective function can be calculated as,
d
f (R) =
n/N
where, N - The total number of sensor nodes in the system
n - The number of nodes in layer one
- The energy consumption per packet
d - The average packet delay
Selection of new transmission range R’
If the BS does not receive any packet from any sensor node for some time interval,
then the transmission range R can be increased by Δr, a predefined increment. Otherwise,
the transmission range is either increased or decreased by Δr. That is, it can be either
decreased with the probability,
0.5 (n/N)
or increased with the probability,
[1 – 0.5 – (n/N)]
Reevaluation of objective function
The objective function can be reevaluated by using new transmission range R.
If f(R) < f(R), then R the transmission range would be selected. Otherwise, R should be
modified to R with the probability,
Advantages of UNPF-R
It minimizes the energy × delay metric. This ensures that the transmission should
occur with minimum energy and delay.
Maximizes the number of nodes connecting BS.
1. Set-up phase
In set-up phase, each sensor node selects a random number between 0 and 1. The
threshold value of node 'n' can be denoted as T(n). The threshold T(n) can be calculated
as,
P
if n G
T(n) = 1 – P [r mod(1/P)]
Otherwise
0
where P - The desired percentage of cluster-heads
r - The current round in iteration
G - Set of nodes that has not been cluster-heads in the past 1/P
rounds.
If this random number is less than T(n), then the sensor node would be selected as a
cluster-head. After selecting cluster-head, this new cluster-head would advertise its
selection to all other sensor nodes. The sensor nodes which receive this advertisement
would send reply and becomes as cluster members. Moreover, the cluster-heads would
assign a TDMA schedule for all the members of its cluster.
2. Steady phase
During steady phase, data transmission would be carried out based on the assigned
TDMA schedule. The cluster-heads perform data aggregation and data fusion through
local computation and send to BS. Since BS receives only aggregated data, energy
conservation can be achieved. Later, cluster-heads would be selected using set-up phase.
the literature that a mobile sensor network is a network consisting of only mobile
nodes, and a hybrid sensor network is a network consisting of both stationary
nodes and mobile nodes. As mobile nodes can move to desired locations, it is not
unexpected that using mobile nodes can improve sensor network performance.
Such performance improvements are often at the cost of expensive mobile nodes
and more energy consumed for moving. In some cases, a sink can also be a
mobile node, and it moves around to collect sensing data. For example,
Fig. 3.9.2(d) illustrates a trajectory along which a mobile sink moves.
3. Single-Hop vs. Multi-Hop Networks
There are two basic communication paradigms between sensor nodes and sinks,
namely, single-hop communication and multi-hop communication. In a single-
hop sensor network, all sensor nodes transmit directly to the sink. Fig. 3.9.2 (a)
illustrates a single-hop sensor network where all stationary sensor nodes
transmit directly, via either wired or wireless communications, to the sink
outside the sensor field. Such a direct communication paradigm might be very
expensive, especially for a large-scale network. If wired communication is used,
the cost of wires might be much larger than that of sensor nodes. If wireless
communication is used, the long distance between a node and the sink requires
very high transmission power. Another option is to use mobile sinks which move
around in the sensor field to collect data via short-distance radio communication,
as illustrated by Fig. 3.9.2 (b). In such a case, a sensor node only transmits to the
sink when the sink moves close to itself, and due to the reduced transmission
distance, a considerable amount of transmission energy can be saved.
In a multi-hop sensor network, instead of transmitting to the sink directly, some sensor
nodes use a multi-hop path consisting of other nodes as relays to deliver their data to the
sink. Many routing algorithms, such as the Dijkstra shortest-path algorithm, can be used
to find an appropriate multi-hop path for each node. Fig. 3.9.2 (b) illustrates a flat multi-
hop sensor network where only three nodes closer to the sink transmit to the sink
directly, and others uses multi-hop communications. Fig. 3.9.2 (c) illustrates a hierarchical
multi-hop sensor network where clusters are formed, and some powerful nodes serve as
cluster heads and other nodes serve as cluster members. In a cluster, each cluster member
transmits to its cluster head via either single-hop or multi-hop transmission.
The choice of a single-hop or a multi-hop network is heavily dependent on the
application requirements. In general, a single-hop network is easy to maintain and
suitable for small-scale networks. Multi-hop networks, on the other hand, are often the
Fig. 3.9.2 Sensor network scenarios: (a) Single-hop, heterogenous, stationary network; (b) Multi-
hop, homogeneous, stationary network; (c) Multi-hop, heterogeneous, stationary network;
(d) Single-hop , homogeneous, stationary network with a mobile sink
event ? For example, not reporting a fire alarm to a surveillance station would be
a severe shortcoming. This probability can depend on/be traded off against the
overhead spent in setting up structures in the network that support the reporting
of such an event (e.g. routing tables) or against the run-time overhead (e.g.
sampling frequencies).
Event classification error
If events are not only to be detected but also to be classified, the error in
classification must be small.
Event detection delay
The delay between detecting an event and reporting it to any/all interested sinks
is required to be noted.
Missing reports
In applications that require periodic reporting, the probability of undelivered
reports should be small.
Approximation accuracy
For function approximation applications (e.g. approximating the temperature as
a function of location for a given area), what is the average/maximum absolute or
relative error with respect to the actual function ?
Tracking accuracy
Tracking applications must not miss an object to be tracked, the reported position
should be as close to the real position as possible, and the error should be small.
Energy per reported (unique) event - Similarly, what is the average energy spent to
report one event ? Since the same event is sometimes reported from various sources, it is
usual to normalize this metric to only the unique events (redundant information about an
already known event does not provide additional information).
Delay/energy trade-offs - Some applications have a notion of “urgent” events, which
can justify an increased energy investment for a speedy reporting of such events.
Network lifetime - The time for which the network is operational or, put another way,
the time during which it is able to fulfill its tasks (starting from a given amount of stored
energy). It is not quite clear, however, when this time ends. Possible definitions are as
follows,
Time to first node death - When does the first node in the network run out of energy
or fail and stop operating ?
Network half-life - When have 50 % of the nodes run out of energy and stopped
operating ? Any other fixed percentile is applicable as well.
Time to partition - When does the first partition of the network in two (or more)
disconnected parts occur? This can be as early as the death of the first node (if that was in
a pivotal position) or occur very late if the network topology is robust.
Time to loss of coverage - Usually, with redundant network deployment and sensors
that can observe a region instead of just the very spot where the node is located, each
point in the deployment region is observed by multiple sensor nodes. A possible figure of
merit is thus the time when for the first time any spot in the deployment region is no
longer covered by any node’s observations. If k redundant observations are necessary (for
tracking applications, for example), the corresponding definition of loss of coverage
would be the first time any spot in the deployment region is no longer covered by at least
k different sensor nodes.
Time to failure of first event notification - A network partition can be seen as
irrelevant if the unreachable part of the network does not want to report any events in the
first place. Hence, a possibly more application-specific interpretation of partition is the
inability to deliver an event. This can be due to an event not being noticed because the
responsible sensor is dead or because a partition between source and sink has occurred. It
should be noted that simulating network lifetimes can be a difficult statistical problem. So
longer these times are, the better does network perform.
All these metrics can of course only be evaluated under a clear set of assumptions
about the energy consumption characteristics of a given node, about the actual “load”
that the network has to deal with (e.g. when and where do events happen), and also
about the behavior of the radio channel.
3.10.3 Scalability
Scalability is ability to maintain performance characteristics irrespective of the size of
the network. With WSN potentially consisting of thousands of nodes, scalability is an
evidently indispensable requirement. Scalability is ill served by any construct that
requires globally consistent state, such as addresses or routing table entries that have to
be maintained. Hence, the need to restrict such information is enforced by and goes hand
in hand with the resource limitations of sensor nodes, especially with respect to memory.
The need for extreme scalability has direct consequences for the protocol design. Often, a
penalty in performance or complexity has to be paid for small networks. Architectures
and protocols should implement appropriate scalability support rather than trying to be
as scalable as possible.
Fig. 3.10.1 Two probability curves of a node exceeding a given lifetime - the dotted curve trades
off better minimal lifetime against reduced maximum lifetime
3.10.4 Robustness
Wireless sensor networks are expected to exhibit an appropriate robustness. They
should not fail just because a limited number of nodes run out of energy, or because their
environment changes and severs existing radio links between two nodes - If possible,
these failures have to be compensated for, for example, by finding other routes. A precise
evaluation of robustness is difficult in practice and depends mostly on failure models for
both nodes and communication links in the network.
architecture, the idle mode’s power consumption can be less or in the same range
as the receive power. To reduce average power consumption in a low-traffic
wireless sensor network, keeping the transceiver in idle mode all the time would
consume significant amounts of energy. Therefore, it is important to put the
transceiver into sleep state instead of just idling. It is also important to explicitly
include the received power into energy dissipation models, since the traditional
assumption that receive energy is negligible is no longer true.
5. However, there is the problem of the startup energy/startup time, which a
transceiver has to spend upon waking up from sleep mode, for example, to ramp
up phase-locked loops or voltage controlled oscillators. During this startup time,
no transmission or reception of data is possible. For example, the μAMPS-1
transceiver needs a startup time of 466 μs and a power dissipation of 58 mW.
Therefore, going into sleep mode is unfavorable when the next wakeup comes
fast.
6. It depends on the traffic patterns and the behavior of the MAC protocol to
schedule the transceiver operational state properly. If possible, not only a single
but multiple packets should be sent during a wakeup period, to distribute the
startup costs over more packets. Clearly, one can attack this problem also by
devising transmitter architectures with faster startup times.
7. A third key observation is the relative costs of communications versus
computation in a sensor node. Clearly, a comparison of these costs depends for
the communication part on the BER (Bit Error Rate) requirements, range,
transceiver type, and so forth, and for the computation part on the processor
type, the instruction mix, and so on. However, a range of energy consumptions is
given for Rockwell’s WIN nodes, UCLA’s WINS NG 2.0 nodes, and the
MEDUSA II nodes. For the WIN nodes, 1500 to 2700 instructions can be executed
per transmitted bit, for the MEDUSA II nodes this ratio ranges from 220 : 1 up to
2900 : 1, and for the WINS NG nodes, it is around 1400 : 1.
8. This clearly implies that computation is cheaper than communication in any
scenario.
2. To maximize the time a transceiver can spend in sleep mode, the transmit times
should be minimized. The higher the data rate offered by a transceiver /
modulation, the smaller the time needed to transmit a given amount of data and,
consequently, the smaller the energy consumption.
3. A second important observation is that the power consumption of a modulation
scheme depends much more on the symbol rate than on the data rate. For
example, power consumption measurements of an IEEE 802.11b Wireless Local
Area Network (WLAN) card showed that the power consumption depends on
the modulation scheme, with the faster Complementary Code Keying (CCK)
modes consuming more energy than DBPSK and DQPSK; however, the relative
differences are below 10 % and all these schemes have the same symbol rate. It
has also been found that for the μAMPS-1 nodes the power consumption is
insensitive to the data rate.
4. Obviously, the desire for “high” data rates at “low” symbol rates calls for m-ary
modulation schemes.
5. However, there are below trade-offs,
m-ary modulation requires more complex digital and analog circuitry than 2-ary
modulation, for example, to parallelize user bits into m-ary symbols.
Many m-ary modulation schemes require for increasing m an increased Eb/N0
ratio and consequently an increased radiated power to achieve the same target
BER; others become less and less bandwidth efficient. However, in wireless sensor
network applications with only low to moderate bandwidth requirements, a loss
in bandwidth efficiency can be more tolerable than an increased radiated power to
compensate Eb/N0 losses.
It is expected that in many wireless sensor network applications most packets will
be short, on the order of tens to hundreds of bits. For such packets, the startup
time easily dominates overall energy consumption, rendering any efforts in
reducing the transmission time by choosing m-ary modulation schemes irrelevant.
The optimal decision would have to properly balance the modulation scheme and
other measures to increase transmission robustness, since these also have energy costs :
With retransmissions, entire packets have to be transmitted again.
With FEC coding, more bits have to be sent and there is additional energy
consumption for coding and decoding. While coding energy can be neglected, and
the receiver needs significant energy for the decoding process. This is especially
cumbersome if the receiver is a power-constrained node.
The cost of increasing the radiated power depends on the efficiency of the power
amplifier, but the radiated power is often small compared to the overall power
dissipated by the transceiver.
from diversity. For 2.4 GHz, this corresponds to a spacing of between 5 and 6 cm
between the antennas, which is hard to achieve with smaller cases.
3. In addition, radio waves emitted from an antenna close to the ground - typical in
some applications – are faced with higher path-loss coefficients than the common
value α = 2 for free-space communication. Typical attenuation values in such
environments, which are also normally characterized by obstacles (buildings,
walls, and so forth), are about α = 4.
4. Moreover, depending on the application, antennas must not protrude from the
casing of a node, to avoid possible damage to it. These restrictions, in general,
limit the achievable quality and characteristics of an antenna for wireless sensor
nodes.
5. Nodes randomly scattered on the ground, for example, deployed from an
aircraft, will land in random orientations, with the antennas facing the ground or
being otherwise obstructed. This can lead to non-isotropic propagation of the
radio wave, with considerable differences in the strength of the emitted signal in
different directions. This effect can also be caused by the design of an antenna,
which often results in considerable differences in the spatial propagation
characteristics (so-called lobes of an antenna).
Contents
4.1 Medium Access Control Protocols for Wireless Sensor Networks
4.2 Self Organizing MAC for Sensor (SMACS) Networks
4.3 Eavesdrop and Register (EAR) Protocol
4.4 Hybrid TDMA/FDMA
4.5 Low Duty Cycle Protocols and Wakeup Concepts
4.6 The Mediation Device Protocol
4.7 Contention-based Protocols - CSMA-based MAC Protocols
4.8 Wireless Sensor Networks - Schedule‐based MAC Protocols
4.9 IEEE 802.15.4 and Zigbee
4.10 Wireless Sensor Networks - Data Aggregation Strategies
4.11 Data Relaying in WSN
4.12 Topology Control
4.13 Two Marks Questions with Answers [Part - A]
4.14 Long Answered Questions [Part - B]
(4 - 1)
Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4-2 Medium Access Control Protocols
The node who originated the invitation message may receive multiple responses from
different nodes. At a time, it accepts the response from one node from which it has
received the response first and hence establishing relationship with the neighbor nodes
and forms a link.
Static Nodes
The static sensor nodes are distributed randomly. The static nodes cannot able to
discover the location of other static nodes and initially enters into searching phase to
invoke other static nodes to enter into the sensor network. For doing this, the sensor node
uses polling signals. The static nodes operate on slotted TDMA frame format.
The radio channel can be changed to any one of the following mode :
Receiving mode
Transmitting mode
Idle mode.
EAR protocol uses four messages for establishing communication between mobile and
static sensor nodes that are listed below,
Broadcast invitation
Mobile invite
Mobile response
Mobile disconnect.
Broadcast Invitation - Static nodes send this message to invite other sensor nodes to
join in the network.
Mobile Invite - The mobile node sends mobile invite message as the response message
to the broadcast invitation message to request a connection.
Mobile Response - The stationary node accepts the mobile invite message for
establishing a connection or declines the message without accepting connection
establishment.
Mobile Disconnect - The mobile node sends a mobile disconnect message to inform
the stationary node about disconnection.
EAR protocol uses the following three phases,
1. Registration phase : In registration phase, the mobile sensor node collects
broadcast invitation message from static nodes and make an entry in the registry.
After receiving a new broadcast invitation message from a static sensor node, the
old entry will be replaced with the new entry in the registry.
2. Connection phase : The mobile sensor node looks up the registry whenever a
connection required by a sensor node. It selects best connection from the registry
based on the received signal strength. Once the connection is established between
mobile and static sensor nodes, a new connection cannot be established until the
existing connection fails. The mobile node sends a mobile invite message to
request a connection along with the set of possible channels for communication.
On receipt of the mobile invite message, the static node registers the mobile node
if the connection is possible. The static node will respond by sending mobile
response message with the details of selected channel. If the static node is not
willing to connect, then it will not respond for the mobile invite message.
3. Disconnection phase : The connection can be disconnected based on two reasons.
The first one may happen when the static node fails to send data or broadcast
invitation messages. The second reason is that if the signal to noise ratio falls
below the threshold level, then disconnection will occur. In both the cases, the
mobile sensor node initiates mobile disconnect message and send to static node to
inform the disconnection.
5. Duty cycle is measured as the ratio of the listening period length to the wake-up
period length which gives an indicator of how long a node spends in the listening
period.
6. A small duty cycle means that a node is asleep most of the time in order to avoid
idle listening and overhearing. However, a balanced duty cycle size must be
achieved in order to avoid higher latency and higher transient energy due to start-
up costs.
7. There are various low duty cycle protocols proposed for WSNs which differ in
aspects of synchronization, the number of channels required, transmitter- or
receiver-initiated operation.
8. The low duty cycle protocols can be categorized into two major classes, namely
synchronous and asynchronous schemes.
i) The concept of synchronization is related with data exchanges in WSNs. In
asynchronous schemes, there are two basic approaches, namely transmitter-
initiated and receiver-initiated. Using a transmitter-initiated approach, a
node sends frequent request packets (preamble, control or even data packet
themselves) until one of them “hits” the listening period of the destination
node. On the other hand, the receiver-initiated approach is applicable when a
node sends frequent packets (preamble, control, acknowledgment) to inform
the neighbouring nodes about the willingness of the node to receive packets.
The former approach puts the energy cost on the transmitter while the latter
moves the cost to the receiver.
ii) Another variation of low duty cycle protocols is a synchronous scheme where
all the nodes in a group or cluster have the same wake-up phase. Usually each
node sends frequent beacon frames to inform its neighbours about its wake-
up cycle schedule and other information such as pending packets to be
transmitted, etc. Thus a node schedules its transmission and reception time
from the information obtained from the beacon frames. In another approach, a
node becomes a group or cluster head and controls the data communications
while maintaining the synchronization between the nodes in the group or
cluster. The former approach is more applicable for a distributed or flat
topology while the latter is more applicable for a clustered or centralized
9. Following sections discuss both synchronous and asynchronous low duty cycle
protocols and compare both types of protocols in terms of four major design
requirements, namely energy efficiency, latency, scalability and reliability.
active all the time; this scenario is illustrated in Fig. 4.6.1. Because of its full duty
cycle, the mediation device can receive the query beacons from all nodes in its
vicinity and learn their wakeup periods.
7. Mediation device protocol advantages - First, it does not require any time
synchronization between the nodes, only the mediation device has to learn the
periods of the nodes. Second, the protocol is asymmetric in the sense that most of
the energy burden is shifted to the mediation device, which so far is assumed to
be power unconstrained. The other nodes can be in the sleep state most of the
time and have to spend energy only for the periodic beacons. Even when a
transmitter wants to synchronize with the receiver, it does not have to wait
actively for the query beacon, but can go back to sleep and wait for the mediation
device to do the synchronization work. This way very low duty cycles can be
supported.
8. Mediation device protocol drawbacks - The nodes transmit their query beacons
without checking for ongoing transmissions and, thus, the beacons of different
nodes may collide repeatedly when nodes have the same period and their
wakeup periods overlap. If the wakeup periods are properly randomized and the
node density is sufficiently low, this collision probability can be low too.
However, in case of higher node densities or unwanted synchronization between
the nodes, the number of collisions can be significant. A possible solution to this is
the following : When the MD registers collisions, it might start to emit a dedicated
reschedule control frame. All colliding nodes can hear this frame as long as the
MD repeats it often enough. Reception of this frame causes each node to
randomly pick a new period from a certain interval [a, b] indicated in the
reschedule frame. If the MD continues to perceive collisions, it can enlarge the
interval accordingly.
9. But the main drawbacks, are the assumptions that,
i) The mediation device is energy unconstrained, which does not conform to the
idea of a “simply thrown out” wireless sensor network.
ii) There are sufficient mediation devices to cover all nodes. The distributed
mediation device protocol deals with these problems in a probabilistic
manner. It lets nodes randomly wake up and serve as MD for a certain time
and afterward lets them go back to their regular periodic wakeup behavior.
The service time must be chosen to be at least as long as the maximum period
of all neighbors plus the length of a query beacon.
10. However, under these assumptions, it cannot be expected that a temporary MD
knows all its neighbors’ periods and wakeup times. If it is assumed that all nodes
have the same period, then it suffices for the temporary MD to hear an RTS from
the transmitter node A and a query beacon from receiving node B in order to
compute their time offsets and to instruct node B accordingly in the MD’s query
response. A problem with this approach is that nodes A and B may have two or
more MD devices in their vicinity, causing a collision of several query responses.
By properly randomizing the times where nodes decide to serve as MD, the
probability of this can be kept low.
4.7.3 D-MAC
This protocol is used in real-time data delivery. All the sensor nodes can wake up
simultaneously to receive data. Each receiving period is followed by the transmitting
period. During the transmission period, the node can forward the packets to base station
or to higher levels. Since few nodes are in active mode in a particular time slot, the
number of nodes contending for the channel may reduce. Hence there will be no RTS/CTS
packet exchange used for handshaking.
4.7.5 X-MAC
In X-MAC protocol, the sender node sends more number of short preambles until
receiving reply from the receiver. Once the receiver responses an acknowledgement
packet for any one of the preambles, then the sender node stops sending further preamble
packets. This scheme highly reduces energy at receiver and transmitter ends.
4.7.6 Wise-MAC
In this MAC protocol, each node senses the channel at different time but listens to the
medium at the same time. In the sender node, a wake up preamble is sent followed by
data packet. Hence the receiver can wake up within the sampling period and the data
arrived at the receiver side can be received by the receiver.
are transmitted on the control channel, while the data channel is reserved for data
packets.
3. Consider an idle node x to which a new packet destined to a neighboring node y
arrives.
First, x sends an RTS packet on the control channel without doing any carrier
sensing. This packet carries both x’s and y’s MAC addresses. If y receives this
packet, it answers with a CTS packet if y does not know of any ongoing
transmission in its vicinity. Upon receiving the CTS, x starts to transmit the packet
to y on the data channel. When y starts to receive the data, it sends out a busy-
tone packet on the control channel. If x fails to receive a CTS packet within some
time window, it enters the backoff mode, where a binary exponential backoff
scheme is used (that is, the backoff time is uniformly chosen from a time interval
that is doubled after each failure to receive a CTS).
Now, consider the nodes receiving x’s RTS packet on the control channel. There is
the intended receiver y and there are other nodes; let z be one of them. If z is
currently receiving a packet, it reacts by sending a busy-tone packet, which
overlaps with y’s CTS at node x and effectively destroys the CTS. Therefore, x
cannot start transmission and z’s packet reception is not disturbed. Since the
busy-tone packet is longer than the CTS, we can be sure that the CTS is really
destroyed. Now, consider the intended receiver y. If y knows about an ongoing
transmission in its vicinity, it suppresses its CTS, causing x to back off. Node y can
obtain this knowledge by either sensing the data channel or by checking whether
there was some noise on the control channel immediately after receiving the RTS.
This noise can be an RTS or CTS of another node colliding at y. In the other case, y
answers with a CTS packet and starts to send out a busy-tone packet as soon as
x’s transmission has started. Furthermore, y sends out busy-tone packets each
time it receives some noise or a valid packet on the control channel, to prevent its
neighborhood from any activities.
4. A node that receives an RTS packet while being in the backoff state starts its
packet reception procedure, that is, it checks the conditions for sending a CTS. A
node put its transceivers (control and data) into sleep mode any time a node
knows that it cannot transmit or receive packets because some other node in its
vicinity is already doing so. However, the decision to go into sleep mode raises an
important question : when to wake up again ? This decision is easy if a node x
knows about the length of an ongoing transmission, for example from
overhearing the RTS or CTS packets or the header of the data packets on the data
channel. However, often this length is unknown to x, for example, because these
packets are corrupted or a foreign data transmission cycle starts when x is just
sleeping. Additional procedures are needed to resolve this.
5. Suppose that x wakes up and finds the data channel busy. There are two cases to
distinguish - either x has no own packet to send or x wants to transmit. In the first
case, x desires to go back into sleep mode and to wake up exactly when the
ongoing transmission ends to be able to receive an immediately following packet.
Waking up at the earliest possible time has the advantage of avoiding unwanted
delays. However, since x may not have overheard the RTS, CTS, or data packet
header belonging to the ongoing transmission, it runs a probing protocol on the
control channel to inquire the length of the ongoing packet. This probing protocol
works similar to a binary search algorithm.
6. Let l be the maximal packet length in seconds. First, x sends a t probe(l/2, l)
packet, and any transmitter node who finishes in the time interval [l/2, l] answers
with a t probe response(t) packet, indicating the time t where its transmission
ends. If x manages to receive t probe response(t) packet, it knows exactly when
this single ongoing transmission ends and when to wake up the next time. If x
receives only noise in response, several t probe response(t) may have collided at x
and x starts to search in the subinterval [3l/4, l], again hoping for a single answer
only. If no answer arrives at all upon t probe(3l/4, l), x next checks the interval [l/2,
3l/4], and so on. In the other case, x wakes up during an ongoing transmission and
wants to transmit a packet.
Therefore, x has not only to take care of ongoing transmissions but also of
ongoing receptions in its vicinity. To find the time for the next wakeup, x runs the
described probing protocol for the set of transmitters, giving a time t when the
longest ongoing transmission ends.
7. In addition, x runs a similar probing protocol for the set of receivers in its
neighborhood, indicating the time r when the longest ongoing reception ends.
Finally, x schedules its wakeup for time min{r, t }. The rationale for this choice is:
If t < r, waking up at t might give another node y a chance to transmit a packet to
x without any additional delay. On the other hand, if r < t, there is some chance
that x can start its own transmission.
8. Raghavendra and Singh compare the power-saving performance of PAMAS with
overhearing avoidance against PAMAS without this feature. Analytical and
simulation results are presented for several network topologies, node densities,
and load scenarios. For the case of random networks, the power savings for low
load situations depend on the average node degree, that is, the average number of
neighbors that a node has. Clearly, the more neighbors a node x has, the more can
switch their transceivers off when x actually transmits. For low loads also, the
number of control packets is smaller than for high loads. This is particularly true
for the busy-tone packets.
9. PAMAS saves up to 60 % of energy for low loads and a high node degree, and
still between 20 and 30 % are reached for low node degrees under a low load. In
high load situations, between ≈10 and ≈ 40 % of energy savings can be achieved,
with higher savings for higher node degrees.
4. For large wireless networks such as WSNs, clustering may be utilized for a
simpler and less hopping request collection procedure purpose (but is not the
only available scheduling technique).
5. Cluster heads are the schedulers and nodes within a cluster send their request to
the cluster head. The cluster head schedules the transmissions on the basis of the
requests and distributes the time slot assignment to the cluster members.
6. Packets that are destined for the sink must either hop through the cluster heads
that form the second tier of nodes or transmitted directly to the sink by using
long‐range radio.
Fig. 4.8.1 Dynamic clusters of LEACH protocol. Nodes with same symbol belongs to same
clusters
2. The role of the cluster head is to create a TDMA schedule, distribute and maintain
this schedule with its cluster members. The cluster head aggregates data of its
members and transmits data to the sink.
3. The cluster head selection is done by each node independently based on the last
time the node served as a cluster head.
4. The non-cluster head choose their cluster head based on the received signal
strength. Since the cluster head node is switched on all the time, so it burns its
energy quickly and goes to die. This problem is solved by selecting the new
cluster head in next round. Fig. 4.8.2 shows a single round for LEACH protocol.
4.8.3.3 TRAMA
1. The Traffic-Adaptive Medium Access (TRAMA) protocol is introduced for
energy-efficient collision-free channel access that allows nodes to create on
demand schedule to access a single channel. It assumes that nodes are time
synchronized and time is divided into cycles and each cycle consists of random
access periods followed by a schedule access periods.
2. TRAMA consists of three components - the Neighbour Protocol(NP), the Schedule
Exchange Protocol (SEP), and the Adaptive Election Algorithm (AEA). The
Neighbour Protocol (NP) allows nodes to exchange two hops neighbor
information by using randomly selected small timeslot in the random access
phase.
3. By the Schedule Exchange Protocol (SEP) a node transmits its current schedule to
neighbor. It also allows to receive neighbours schedule by using random access
phase. By using this neighbours schedule information, nodes decide which slots
of scheduled access phase can be used. For this, each node calculates priority p for
its node identifier x for each timeslot t using a global hash function h :
p(x,t) = h(x©t); where (x©t) is the concatenation of x with current time t.
4. Each node computes its own priority. The slot for which x has the highest priority
value among all its two hops neighbors can be used by x to transmits its packets.
The last winning slots is always used for broadcasting x’s next schedule and x’s
neighbors should wakeup at this slot to receive x’s next schedule.
5. Possible conflicts arises when node D has the highest priority in B’s two-hop
neighborhood, and B knows it but on the other hand node A has the highest
priority in its two-hop neighborhood, so A think it can send (Fig. 4.8.4 shows the
cases). The above problem is solved by Adaptive Election Algorithm(AEA) and
also allow nodes to reuse their neighbor’s unused winning slots.
4.8.3.4 EMACS
1. The EYES MAC(EMAC) protocol is a TDMA based MAC protocol which
improves the energy efficiency in exchange of some increase in latency. Here, time
is divided into timeslot and each node allows to take control over a timeslot in a
frame to transmit its data without having contend for the medium.
2. Same timeslot can be used outside of the cell (directly connected nodes constitute
a cell). Each node in the network maintains a table called schedule table in which
it stores its cell’s schedule and also the schedules of its neighbors.
3. In EMAC, a timeslot is further divided into three sections : Communication
Request (CR), Traffic Control (TC) and Data section as shown Fig. 4.8.5.
4. In the CR section other nodes can ask for data or to notify the availability of data
for the timeslot controller node. Nodes that do not have a request during the
current slot owner, will keep their transceiver on during the entire duration of the
CR section. The owner of the slot always transmits its schedule for its data section
and broadcast the schedule table in the TC section. When a timeslot is not owned
by any node, all nodes will remain in sleep state during that timeslot. If a node is
not addressed in the TC section, not its request was approved, the node will
resume in the standby state during the entire duration of the data section. After
the TC section the transmission of the actual data packet follows either uplink or
downlink.
4.8.3.5 LMAC
1. Lightweight Medium Access Control Protocol (LMAC) is a TDMA based self
organizing (in terms of timeslot assignment and synchronization) MAC protocol
developed with the intension to minimize the number of transceiver switches and
to make the sleep interval adaptive to the amount of data traffic.
2. Each timeslot consists of a Control Message (CM) and Data Message (DM) period.
During the network setup phase, to be synchronized, the gateway nodes take the
initiative by controlling a timeslot. Using that timeslot the gateway nodes send a
CM message (CM includes: Sender ID, Current Slot Number, Occupied Slots,
Distance to Gateway, Collision in Slot, Destination ID, Data Size etc) to its one-
hop neighbor.
3. Then these neighbors synchronized their clocks with the gateway and pick a
random timeslot to control (only this timeslot can be used for sending by this
node but any other slots of its neighbors can be used for receiving), by a localized
scheduling algorithm by assuring that same timeslot will not be used between the
two hop neighbors for avoiding well known hidden terminal problem. This
process is continued by sending CM to its next neighbors until all the nodes of the
network get synchronized and occupy timeslot.
4. After the network setup the data collection from the sensor nodes to the gateway
nodes is efficiently done by using the distance to gateway field of the CM.
Fig. 4.8.6 shows the cases. Nodes keep track of their hop distance to the closest
gateway. This information is used for efficient routing to the gateway.
Fig. 4.8.6 Nodes keeping track of their hop distance to the closest gateway
4.8.3.6 AI-LMAC
1. An Adaptive, Information-Centric and Lightweight MAC(AI-LMAC) is a TDMA
based adaptive and information-aware version of LMAC protocol for WSN.
2. Unlike LMAC which allows a node to own only single timeslot, whatever the data
traffic will flow through that node, In AI-LMAC a node is allowed to own more
timeslot depending on the amount of data traffic that will flow through it.
3. Hence this protocol provides fairness in the sense that bandwidth is allocated to
the node depending on the data traffic it will encounter to flow.
4. AI-LMAC protocol maintains a parent child relationship with gateway. When a
query is injected in the network through a gateway it uses Data Distribution Table
(DDT) (every node maintains a DDT which records the data history for different
query) to predict the amount of data their children will generate based on the
current query and history.
5. If a parent node realizes that a subset of immediate children are going to transmit
large volume of data, it instructs the children for taking multiple slot (obviously
on free basis between two-hop neighbor) under the current condition. Then, it is
up to the child nodes to follow the advice as closely as possible.
6. AI-LMAC introduces two-dimensional fairness (Horizontal and Vertical) for
i) minimizing the overall latency in the network and ii) For reducing the message
buffering in the node and hence reduce network congestion. Fig. 4.8.7 shows the
cases.
i) Horizontal fairness divides bandwidth between siblings in accordance with
requirement.
ii) Vertical fairness ensures that siblings don’t get more bandwidth than their
parent.
4.8.3.7 MC-LMAC
1. A Multi-Channel MAC Protocol (MC-LMAC) for WSN are based on single
channel LMAC protocol with the objective to increase the throughput by
coordinating transmissions over multiple channels and hence increase the
bandwidth utilization.
2. Like LMAC, MC-LMAC also allows a node to take control over one timeslot per
frame, but here the difference is the timeslot can be selected from multiple
channel and the same timeslot can be selected over different channel between
two-hop neighbor by assuring that same timeslot/channel pair not to be used
within the two-hop neighborhood again by using localized scheduling algorithm.
3. In MC-LMAC the timeslot structure of LMAC is extended by adding a Common
Frequency (CF) period which is accessed based on scheduling and divided into
CF slots (the number of CF slot is equal to the number of channels and each slot is
indexed by a channel number). Fig. 4.8.8 shows the timeslot structure for MC-
LMAC.
4. A sender controlling the current timeslot addresses the destination during the CF
slot which is reserved for the channel number the sender controls. Receivers listen
to the whole CF period. If a receiver is addressed during a CF slot it switches its
transceiver with the senders associated frequency.
In Fig. 4.8.8, the numbers inside the circles represent the id’s of the nodes. Assume
that there are three frequencies F1, F2 and F3 and so, there are three CF slots.
Sender 1 address node 4 on F1, sender 2 address node 5 on F2, sender 3 address
node 6 on F3. In the Control Message (CM) and data section node 1 and 4 switch
their transceiver on F1, node 2 and 5 on F2, node 3 and 6 on F3 and starts
communicating at the same time on different frequency without interference
which is impossible for single channel.
4.8.3.8 DMAC
1. DMAC is an adaptive energy efficient low latency MAC protocol designed with
the objective of data gathering with less delay for fixed nodes in WSN. Most of the
active/sleep scheduled MAC protocols suffer from data forwarding interruption
problem (DFI) by sleep delay as all the nodes from source to sink on the multi-
hop path are not notified about the ongoing transmission.
2. Because of limited coverage area of a node, data forwarding process stops at the
node whose next hop toward the sink is out of the overhearing range, hence
results a significant latency.
3. DMAC protocol addresses this issue and reduces interruption problems by
allowing continuous packet forwarding. It also adaptively adjusts the duty cycle
depending on the traffic load in the network.
4. In DMAC an interval is divided among sending, receiving and sleep period.
Sending and receiving periods have the same length of µ. Depending on the
depth d from a node to the sink node, a node advances its wake up schedule dµ
from the sink schedule in data gathering tree.
5. A node is allowed to send immediately after the receiving packets flow
continuously from sensor nodes to the sink which reduces energy consumption
and latency. Fig. 4.8.9 shows DMAC activity in data gathering tree.
6. When a node has multiple packets to send, it needs to increase its and other hops’
duty cycle on the multi-hop path. It is done by using more data flag in the MAC
header and by data prediction process which allows next nodes to wake up one
receiving slot time earlier.
7. DMAC also utilizes More To Send (MTS) packet when a node can not send packet
for busy channel, a node send request MTS packet to its parent node in data
gathering tree for waking up before its normal wake time.
4.8.3.9 DE-MAC
1. Distributed Energy-aware MAC (DE-MAC) protocol for WSN is TDMA based
protocol designed with the objective to prolong network lifetime by treating
critical nodes (low power) differently in a distributed manner that allows low
power nodes to sleep more time than other nodes.
2. Initially, each node is assigned two timeslots for transmitting. If it has nothing to
transmit it can sleep.
3. Each node has also maintain a receive table, which is used by a node to know
which slots its neighbors will use to transmit their packets and other nodes should
listen during that slots.
4. Each node can be in any of the two phases -
i) Normal operation phase
ii) Voting phase : when a node’s current energy level falls below a threshold
value from the previous winners energy level, it initiates a local election
procedure in the voting phase to readjust their slots which is integrated with
the normal TDMA slot assignment, so, DE-MAC protocol do not suffer from
throughput loss.
5. The winners have twice the timeslots of the looser and it reduces the idle listening
time of the critical low power nodes. It can go to sleep mode if it has nothing to
send during its own slot. This saves energy and increases the lifetime of the
network.
5. Coordinator function
Manages a list of associated devices - Devices are required to explicitly associate
and disassociate with a coordinator using certain signaling packets.
Allocates short addresses to its devices - All IEEE 802.15.4 nodes have a 64-bit
device address. When a device associates with a coordinator, it may request
assignment of a 16-bit short address to be used later in all communications
between device and coordinator.
6. In the beaconed mode of IEEE 802.15.4, it transmits regularly frame beacon
packets announcing the PAN identifier, a list of outstanding frames, and other
parameters. It exchanges data packets with devices and with peer coordinators.
11. IEEE 802.15.4 MAC is in control of the access to the radio channel and employs the
services of CSMA-CA (Carrier Sense Multiple Access- Collision Avoidance) to
avoid packet collisions on the RF link.
(ii) MAC Layer - This layer is responsible for reliable transmission of data by
accessing different networks with the carrier sense multiple access collision
avoidance (CSMA). This also transmits the beacon frames for synchronizing
communication.
whereas the key value pair is used for getting attributes within the application
objects. ZDO provides an interface between application objects and APS layer in
Zigbee devices. It is responsible for detecting, initiating and binding other devices
to the network.
For transfer of data from coordinator to device, an indication is send with the
beacon message to the device. The device then receives this indication and sends
a data request message. The coordinator sends an acknowledgment of this data
request receipt and transfers the corresponding data.
In non-beacon networking, the coordinator does not transmit any beacon
message. Rather, each device transmits data using CSMA-CA method in the same
frequency channel. The device transmits the data as soon as the channel is clear.
For transfer of data from coordinator to device, the device first sends a data
request message to the coordinator and then the latter transmits the data message
with a null length payload, on availability of data. For no pending data, the
coordinator sends an acknowledgement indicating no data pending.
1. Zigbee two way data is transferred in two modes namely, non-beacon mode and
beacon mode.
2. In a beacon mode, the coordinators and routers continuously monitor active state
of incoming data hence more power is consumed. In this mode, the routers and
coordinators do not sleep because at any time any node can wake up and
communicate. However, it requires more power supply and its overall power
consumption is low because most of the devices are in an inactive state for over
long periods in the network.
3. In a beacon mode, when there is no data communication from end devices, then
the routers and coordinators enter into sleep state. Periodically this coordinator
wakes up and transmits the beacons to the routers in the network. These beacon
networks are work for time slots which means, they operate when the
communication needed results in lower duty cycles and longer battery usage.
These beacon and non-beacon modes of Zigbee can manage periodic (sensors
data), intermittent (Light switches) and repetitive data types.
4. Zigbee topologies
i) Zigbee supports several network topologies; however, the most commonly used
configurations are star, mesh and cluster tree topologies. Any topology consists of
one or more coordinator. In a star topology, the network consists of one
coordinator which is responsible for initiating and managing the devices over the
network. All other devices are called end devices that directly communicate with
coordinator. This is used in industries where all the end point devices are needed
to communicate with the central controller, and this topology is simple and easy
to deploy.
ii) In mesh and tree topologies, the Zigbee network is extended with several routers
where coordinator is responsible for staring them. These structures allow any
device to communicate with any other adjacent node for providing redundancy to
the data. If any node fails, the information is routed automatically to other device
by these topologies. As the redundancy is the main factor in industries, hence
mesh topology is mostly used. In a cluster-tree network, each cluster consists of a
coordinator with leaf nodes, and these coordinators are connected to parent
coordinator which initiates the entire network.
iii) Due to the advantages of Zigbee technology like low cost and low power
operating modes and its topologies, this short range communication technology is
best suited for several applications compared to other proprietary
communications, such as Bluetooth, Wi-Fi, etc.
ready for Zigbee 3.0. The Smart Energy profile is also compatible with Zigbee 3.0
at the functional level, but Smart Energy has additional security requirements that
are only addressed within the profile.
4. Zigbee’s Over-The-Air (OTA) upgrade feature for software updates during device
operation ensures that applications on devices already deployed in the field can
be seamlessly migrated to Zigbee 3.0. OTA upgrade is an optional functionality
that manufacturers are encouraged to support in their Zigbee products.
4.9.2.11 ZigBee Alliance and ZigBee Specification
1) ZigBee Alliance
1. The Zigbee Alliance works to simplify wireless product integration to help
product manufacturers introduce energy-efficient wireless control into their
products faster and more cost-effectively. Alliance members create standards that
offer reliable, secure, low-power and easy-to-use wireless communication, using
an open standards development process to guide their work. The alliance is
organized by committees, work groups, study groups, task forces and special
interest groups.
Zigbee is also used by vendors that provide connected lighting products for
homes and businesses. With Zigbee-based smart home products, consumers can
control LED figures, lightbulbs, remotes and switches in home and remotely to
improve energy management.
Utility companies can use Zigbee in their smart meters to monitor, control,
inform, and automate the delivery and use of energy and water. Smart meters
give the consumers the information -- and automation -- needed to reduce energy
use and save money.
Zigbee-based products also enhance the shopping experience for consumers by
enabling faster checkouts, in-store assistance and in-store item location. Zigbee
helps retailers operate more efficiently by ensuring items don't run out of stock
and supporting just-in-time inventory practices, as well as monitoring
temperatures, humidity, spills and so on.
Zigbee supports a number of devices, including intelligent shopping carts,
personal shopping assistants, electronic shelf labels and asset tracking tags.
scavenge for energy and exist entirely on the energy it finds. Replacing IR
technology would be reason enough alone to have the Zigbee technology since IR
provides some difficulty in use with large high definition televisions, has a
limited field of vision and line of sight restrictions, and it only allows for one way
communication.
2) Zigbee Disadvantages
1. It is so highly risky to be used for official private information.
2. Low transmission as well as low network stability, are some of Zigbee’s
disadvantages that takes it a step back as compared to others.
3. Replacement with Zigbee compliant appliances can be costly.
4. It does not have many end devices available yet.
5. It cannot be used as outdoor wireless communication system due to it has short
coverage limited.
6. Zigbee is vulnerable to various zigbee wireless mesh protocol.
7. It is not secure like Wi-Fi based secured system.
8. Its high maintenance cost, lack of total solution, and slow materialization.
immediately transmitting the received data to cluster head without storing in the buffer.
CPSD is widely used in the situation where the fresh messages are required and the
reception of data is required very urgent and any delay in receiving the data may lead to
failure or performance degradation of the system. CPSD requires adequate energy to keep
battery without dry.
simple collection or query-based one. For instance, the access point may arise a query to
receive temperature data. All the nodes respond to this query by sending temperature
detail of the environment. This scheme is widely used in the situation where the data is
required in on-demand basis.
3. Rumour routing
4. Sequential assignment routing
5. Directed diffusion.
4.11.2.1 Flooding
Flooding is the process of broadcasting or injecting the packets in the network. Every
node can broadcast its own information or the information received from other nodes. An
advantage of this technique is that it does not require any specific routing algorithm.
Some of the disadvantages of this technique are reception of duplicate messages, high
network overhead and minimized network lifetime due to repetitive transmission.
4.11.2.2 Gossiping
Gossiping is the process of sending a packet to the randomly selected neighbour node.
An advantage of this technique is that it leads to less network overhead due to forwarder
nodes. However, selection of neighbour node to forward the packet may take long time.
Since forwarder nodes forward the packet to a set of neighbours, there is no guarantee of
reception of message by all the nodes present in the network.
which had been received by the node. Directed diffusion improves data diffusion by
using the interest gradient of sensor node.
Each sensor node assigns one or more attribute to its data. Interest of a sensor node can
be represented using attribute value pairs. For each path, gradient is assigned. Positive
gradients allow data transmission along a particular path whereas negative gradient
prevents data transmission along a specific path. Huge amount of data can be sent
through higher gradient path. Dada diffusion allows each node to cache its data.
iii) Further, TC protocols for the homogeneous case can be subdivided into two
categories, namely practical and analytical, based on the approach undertaken. In
the analytical approach, mostly probabilistic, theoretical results are derived for
TC, whereas, in the practical approach, real-world algorithms are depicted which
may be put down to practice.
iv) In the non-homogenous case, nodes are allowed to choose different transmitting
ranges (provided they do not exceed the maximum range). Non-homogeneous TC
is classified into three categories (Fig. 4.12.1), namely centralized, distributed, and
hybrid, depending on the strategy adopted by the algorithms in evaluating the
optimum topology.
v) Most of the earlier protocols were either purely centralized or purely distributed.
In centralized TC algorithms, a network node is responsible for evaluating an
optimum network topology based on the locations of the other network nodes.
The location information along with the transmission range of the individual
nodes is used to form a link between a node pair. This information is either
exchanged between nodes and used to compute an “almost optimal” topology in
a fully distributed manner or used globally by a centralized authority to compute
a set of transmitting range assignments which optimizes a certain measure (this is
also known as the range assignment problem or variant of it). A centralized
approach, although able to achieve strong connectivity (k-connectivity for k
nodes), suffers from scalability problems. In contrast, a distributed approach,
although scalable, lacks strong connectivity guarantees. Hence, a hybrid of these
strategies is indeed essential to reap the benefits of both.
vi) The distributed algorithms are further categorized into three types as shown
Fig. 4.12.1, based on the type of information that is used to compute the topology.
In position-based approaches, exact node positions are known. In direction-based
approaches, it is assumed that nodes do not know their position, but they can
estimate the relative direction of each of their neighbors. Finally, in neighbor-
based techniques, nodes are assumed to know only the ID of the neighbors and
are able to order them according to some criterion (for example, distance, or link
quality).
vii) Besides classifying TC approaches based on the constraints put on the range
assignment (homogeneous or non-homogeneous), and on the type of information
which is available to the network nodes, it can also be distinguish the approaches,
proposed in the literature, based on the properties of the network topology
resulting from the application of TC techniques.
viii) Most of the approaches presented in the literature are concerned with building
and maintaining a connected network topology as network partitioning is highly
undesirable. More recently, some authors have considered the problem of
building a k-connected network topology (with k > 1), that is, a topology in which
there exists at least k distinct paths between any two network nodes.
ix) Guaranteeing k-connectivity of the communication graph is fundamental in all
those applications in which a certain degree of fault-tolerance is needed : since
there exists at least k paths between any two network nodes, network connectivity
is guaranteed in the presence of up to (k – 1) node failures.
Notes
Syllabus
Routing Protocols- Energy Efficient Routing
Contents
5.1 WSN Routing - Issues
5.2 Optimized Link State Routing Protocol
5.3 Localization
5.4 Energy Efficient Routing and Various Energy Efficient Routing Protocols
5.5 Two Marks Questions with Answers [Part - A]
5.6 Long Answered Questions [Part - B]
(5 - 1)
Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5-2 Routing and Energy Efficient Routing
10. Power constraints - Usually, the sensor nodes are not connected to any external
energy source. It contains only a limited amount of energy that can be used for
sensing, processing and communication. More power is consumed during multi-
hop communication. Thus, in order to use energy in an efficient way, several
number of energy efficient mechanisms are introduced by many researchers.
However, power constraint is also a challenging task in WSN.
11. Fault tolerance - If the sensor node may drain out the energy or might be failed,
then it is important that the WSN has to manage the faults such as link failure,
disconnection and network partition and also tolerate it without affecting the
performance of the entire network.
12. Sensor region - The sensing region of each sensor node may vary depends upon
the environment. The sensor nodes may be deployed on rocks, soil, under water,
on grass and in ground. Therefore, the sensing ability and sensing region of the
sensor node will be changed. Depending on the region, the radio communication
also varied and thereby leads to problems in WSNs.
13. Communication failure - If any intermediate node fails during communication,
then it leads to packet loss. Retransmission of packets may consume more energy.
Establishing an alternate path may take long time which in turn lead to long delay
in packet transmission.
the MPRs. The routing table maintained at each node may be updated periodically
whenever there is a change in network topology.
5.3 Localization
Localization system is a major issue of WSNs. The key responsibility of each sensor
node is to identify the changes in the particular environment or area. Certain applications
require the information received from sensor nodes with accurate positional information
of the event occurred. Sometimes, the sensor nodes may be deployed in inaccessible areas
like disaster relief areas and forests. In this case, determining the actual position of sensor
nodes may not produce a feasible solution. Therefore efficient localization systems need
to be adapted to provide positional information of the sensor nodes.
Also, the data aggregation strategies require the positional information of sensor
nodes. The collected data from various sensors would be useless if accurate information
of the location particulars of the sensor node is not available. Localization is an efficient
process by which the sensor nodes can determine their location. GPS is widely used to
find out the location of nodes. But it does not provide accurate positional information
always. Various classifications of localization techniques used in sensor network are
given in Fig. 5.3.1.
used for localization. Range-based methods use range measurements, while range-free
techniques only use the content of the messages.
RSS
In RSS, the distance between two nodes can be determined by measuring the received
signal at one end. This technique would require at least three reference nodes to
determine the position of a two dimensional location of a given node. RSS positioning
would depend on path loss model and channel characteristics.
AOA
AOA is defined as the angle between the propagation direction of an incident wave
and the reference direction. The reference direction is also known as orientation. The
orientation can be calculated in degrees in a clockwise direction from the North. When
the orientation pointing to the North, the AOA is called as absolute.Otherwise, this can be
relative. AOA measurements can be obtained by using an antenna array on each sensor
node. In a two dimensional space, the position would be the angle of the straight line
from the mobile node to two reference nodes. Installing and aligning the angle of arrays is
a difficult and costly process.
TOA
Time-of-arrival positioning technique is a time-based positioning technique. It
depends on the time of the arrival of the signal from the given node and one or more base
stations. The distance between a given node and a base station would be measured by
calculating one-way propagation delay under Line-of-Sight propagation conditions This
technique would not require complex hardware; the TOA data is available from timing
synchronization used at different base stations.
TDOA
In TDOA method, the location of a sensor node can be calculated by measuring the
signals arrival time difference between sensor node and reference node. This localization
technique provides accurate positional information. However, it requires extra hardware
and consumes more energy. The accuracy of TDOA measurements can be enhanced when
the distance between receivers increases.
Local techniques
For the local techniques, a sensor node which does not know its atua position would
collect the position information of its neighbour beacon nodes with known coordinate to
estimate its actual coordinate position. A centroid algorithm is commonly used to
estimate a sensor node’s position. In this, each sensor estimates its position as the centroid
of the locations of the neighbouring beacons. However, this is unfeasible for ad hoc
deployment.
Other method divides the environment into triangular regions between beacon nodes.
Each sensor node estimates its relative position with respect to the triangles, and
estimates its own location as the centre of gravity of the intersection of all the triangles in
which the node may deploy in. This method requires long-range beacon stations and
expensive high-power transmitters.
Hop-counting techniques
In hop-counting technique, each unknown sensor node requests its neighbour beacon
nodes to provide their estimated hop sizes. Then, each unknown node estimates the
distances to its neighbour beacon nodes based on the hop counts it has been received
from other neighbouring sensor nodes to them and the hop size of the closest beacon
node. Then, the unknown nodes can apply trilateration to estimate their position by the
estimated distances to three suitable neighbour beacon nodes.
node can be determined using GPS and send this information to every other nodes in the
network.
The time difference between the receptions of beacon signals from different nodes is
used to determine the location. Some localization techniques require the location of
beacon nodes. These techniques are called as Multi-Lateration (ML) techniques. Some ML
techniques are as follows,
1. Atomic ML
2. Iterative ML
3. Collaborative ML
1. Atomic ML - When a beacon node receives three beacon signals from different
sensor nodes, it can determine its location. This situation is shown in Fig. 5.3.2 (a).
As shown in figure, the unknown node receives beacon signal from three beacon
nodes and thereby able to determine its location.
2. Iterative ML - In this ML technique, each sensor node estimates its location and
sends beacon signal to other nodes thereby invoking other nodes to receive at least
three beacon signals from different nodes and making the node to estimate its
location. This scenario is shown in Fig. 5.3.1 (b).
The unknown node uses the beacon signals received from nodes D and E and also
from other unknown node to determine its location.
3. Collaborative ML - When a node cannot able to receive minimum three beacon
signals, they collaborate with other sensor nodes. This scenario is shown in
Fig. 5.3.2 (c).
Sensor nodes A and B collaborate with each other to determine its position.
The absolute coordinates can be obtained from relative coordinate system by applying
simple linear transformation and some reference nodes (beacon nodes).
5.4 Energy Efficient Routing and Various Energy Efficient Routing Protocols
Fig. 5.4.1 Various example routes for communication between nodes A and H, showing energy
costs per packet for each link and available battery capacity for each node
hops might include hops with large transmission power to cover large distances –
but be aware of distance-independent, constant offsets in the energy-consumption
model. Nonetheless, this cost metric can be easily included in standard routing
algorithms. It can lead to widely differing energy consumption on different nodes.
In the Fig. 5.4.1 the minimum energy route is NodeA- Node B- Node E- Node H,
requiring 3 units of energy. The minimum hop count route would be Node A- Node
D- Node H, requiring 6 units of energy.
(ii) Maximize network lifetime
A WSN’s task is not to transport data, but to observe (and possibly control). Hence,
energy-efficient transmission is at best a means to an end and the actual end should
be the optimization goal: the network should be able to fulfill its duty for as long as
possible. Which event to use to conclude the end of a network’s lifetime is,
however, not clear either. Several options exist like,
(i) Time until the first node fails.
(ii) Time until there is a spot that is not covered by the network (loss of coverage,
a useful metric only for redundantly deployed networks).
(iii) Time until network partition (when there are two nodes that can no longer
communicate with each other).
(iii) Routing considering available battery energy
While maximizing the network lifetime is clearly a useful goal, it is not immediately
obvious how to reach this goal using observable parameters of an actual network.
As the finite energy supply in nodes’ batteries is the limiting factor to network
lifetime, it stands to reason to use information about battery status in routing
decisions.
Some of the possibilities are :
(a) Maximum Total Available Battery Capacity - Choose that route where the sum of
the available battery capacity is maximized, without taking needless detours
(referred incorrectly as “maximum available power”).
Looking only at the intermediate nodes in Fig. 5.4.1, route Node A - Node B - Node
E - Node G - Node H has a total available capacity of 6 units, but that is only
because of the extra node G that is not really needed – such detours can of course
arbitrarily increase this metric. Hence, Node A - Node B - Node E - Node G - Node
H should be discarded as it contains Node A - Node B - Node E - Node H as a
proper subset. Eventually, route Node A - Node C - Node F - Node H is selected.
(b) Minimum Battery Cost Routing (MBCR) - Instead of looking directly at the sum of
available battery capacities along a given path, MBCR instead looks at the
“reluctance” of a node to route traffic. This reluctance increases as its battery is
drained; for example, reluctance or routing cost can be measured as the reciprocal
of the battery capacity. Then, the cost of a path is the sum of this reciprocals and the
rule is to pick that path with the smallest cost. Since the reciprocal function assigns
high costs to nodes with low battery capacity, this will automatically shift traffic
away from routes with nodes about to run out of energy. In the example of
Fig. 5.4.1, route Node A - Node C - Node F - Node H is assigned a cost of
1/1 + 1/4 = 1.25, but route Node A - Node D - Node H only has cost 1/3.
Consequently, this route is chosen, protecting node C from needless effort.
(c) Min–Max Battery Cost Routing (MMBCR) - This scheme follows a similar
intention, to protect nodes with low energy battery resources. Instead of using the
sum of reciprocal battery levels, simply the largest reciprocal level of all nodes
along a path is used as the cost for this path. Then, again the path with the smallest
cost is used. In this sense, the optimal path is chosen by minimizing over a
maximum. The same effect is achieved by using the smallest battery level along a
path and then maximizing over these path values. This is then a
maximum/minimum formulation of the problem. In the example of Fig. 5.4.1, route
Node A - Node D - Node H will be selected.
(d) Conditional Max–Min Battery Capacity Routing (CMMBCR) - Another option is
to put condition upon the actual battery power levels available. If there are routes
along which all nodes have a battery level exceeding a given threshold, then select
the route that requires the lowest energy per bit. If there is no such route, then pick
that route which maximizes the minimum battery level.
(e) Minimize variance in power levels - To ensure a long network lifetime, one
strategy is to use up all the batteries uniformly to avoid some nodes prematurely
running out of energy and disrupting the network. Hence, routes should be chosen
such that the variance in battery levels between different routes is reduced.
(f) Minimum Total Transmission Power Routing (MTPR) - Without actually
considering routing as such looked at the situation of several nodes transmitting
directly to their destination, mutually causing interference with each other. A given
transmission is successful if its SINR exceeds a given threshold. The goal is to find
an assignment of transmission power values for each transmitter (given the channel
attenuation metric) such that all transmissions are successful and that the sum of all
the first algorithm is to find a generalized description of the “costs” of a link. The
observation is that both the actual energy cost eij of a link from node i to j as well as
the initial and residual battery capacity Ei and Ei of node i should be taken into
account. Hence, a generalized link cost cij = eα ijEβ i /E ’ iγ is used, where α, β, and γ
are nonnegative weighting factors.
Setting some of these factors to 0 and computing the “lowest cost” paths results in
the routing strategies described above; it also allows to generalize these diverse
approaches into a single metric. The second algorithm is a flow redirection
algorithm. Both of them are distributed and base on locally available information.
The core result is that system lifetime can be extended up to 60% in the scenarios
investigated here in comparison to simple minimum energy routing when battery
capacity also is taken into account.
4. Maximizing time to first node outage by a max–min optimization
Li et al. approach the network lifetime maximization problem as a max–min
optimization problem. They propose two algorithms. One of them has to know the
battery power level of each node in the network and the other can work without
this information at only slightly reduced performance.
5. The max min zPmin approximation
This process starts out from the intuition to use paths that have a large residual
energy, that is, that path where the minimal remaining power in all nodes is the
largest. This heuristic, however, can result in arbitrarily bad performance.
Moreover, this approach does not take into account the total power consumption of
a given path, possibly giving preference to very expensive paths (in absolute terms).
Hence, a proper compromise must be found. The idea is to use a max–min path but
limit its maximum power consumption. This limit cannot be chosen in absolute
terms but is best defined as a ratio to the path with the smallest possible power
consumption. Thus, the path to be chosen should have at most a power
consumption of a factor z times the power consumption along the most efficient
path, Pmin; among the paths that fulfill these constraints, the max–min path with
respect to battery power will be selected as the actual path to be used. Evidently,
proper choosing of 1 < z < ∞ will determine the efficiency of this approximation. In
fact, z should adapt itself to the residual power levels in the network. This
adaptation can be based on estimates of the shortest remaining lifetime of all nodes
in the network, estimated over some period T. Parameter z will be additively
increased or decreased after each period and the sign of the change depends on
whether the estimated shortest lifetime has increased or decreased compared to the
previous period. The magnitude of the adaption is reduced over time.
This heuristic is shown to have good performance by both simulations and analysis.
6. The zone routing approximation
The disadvantage of max min zPmin is that knowledge of battery power levels is
required. The “zone routing” heuristic removes this need. This is done by
partitioning the network in geographical zones where nodes within the zones are
responsible for routing in the zone. Routing among zones is organized
hierarchically. The main point is that the resulting performance loss is relatively
small, showing that the approximative maximum lifetime routing can be
implemented on the basis of locally available information using location
information.
7. Maximizing number of messages
A slightly different optimization goal is to maximize the number of messages that
can be sent over a network before it runs out of energy. In practice, this can be more
important than maximizing the time until the first node runs out of energy,
depending on what can be assumed about the actual data sensing process and
energy consumption. Interestingly enough, they can prove a competitive ratio that
is logarithmic in the network size if admission control (the routing algorithm is
allowed to reject messages although there would be a path to carry the message) is
assumed. What is more, the constructed “CMAX” routing algorithm does not
depend in practice on admission control but performs well nonetheless (even when
using network lifetime as figure of merit, for which the algorithm is not actually
designed). The crucial insight for this property is the choice of the link weights.
Given an edge between nodes i and j with energy costs eij to transmit a message of
unit size, the weight wij is chosen as wij = eij (λαi − 1), where λ is a constant and αi is
the fraction of battery capacity that node i has already used up when the present
routing decision is to be made. Admission control is then formulated as
disregarding paths the total weight of which exceeds a given threshold. In practice,
this path weight threshold can be ignored. Using any standard algorithm, the
lowest cost path (based on these link weights) is then selected to transmit the
packet. The information needed for this heuristic and the maxmin zPmin heuristic are
identical. In fact, the same zone-based variant should apply to this heuristic as well.
An improvement over the maxmin zPmin heuristic is that only a single shortest path
computation is necessary. In short, it performs well with respect to maximum
It should be noted that both this and the previous scheme – and similarly all other
schemes that depend on battery capacity – have to recompute routing tables
relatively frequently to mirror the change in available capacity that puts additional
load on network devices.
The time difference between the receptions of beacon signals from different nodes
is used to determine the location. Some localization techniques require the
location of beacon nodes. These techniques are called as Multi-Lateration (ML)
techniques. Some ML techniques are as follows,
1. Atomic ML - When a beacon node receives three beacon signals from different
sensor nodes, it can determine its location.
2. Iterative ML - In this ML technique, each sensor node estimates its location and
sends beacon signal to other nodes thereby invoking other nodes to receive at
least three beacon signals from different nodes and making the node to estimate
its location.
3. Collaborative ML - When a node cannot able to receive minimum three beacon
signals, they collaborate with other sensor nodes.
Q.6 Define OLSR.
Ans. : The Optimized Link State Routing (OLSR) is one of the table-driven or proactive
routing protocols in which each node maintains all possible routes. It is an optimization
or improvement of Link State Protocols (LSP).
Q.7 Define MPR.
Ans. : Multipoint Relays (MPR). A MPR is a one-hop neighbor node and is chosen as a
forwarder node to forward packets. MPRs are used to optimize the LSPs and also to find
the shortest path to a destination.
Q.8 What are the two phases of OLSR protocol ?
Ans. : The two phases of OLSR protocol are,
Neighbour discovery
Topology dissemination.
Q.9 List the three types of control messages used in OLSR.
Ans. : The three types of control messages used in OLSR are,
Hello message
Topology Control (TC) message
Multiple Interface Declaration (MID)
Q.1 What are various issues faced in WSN routing ? (Refer section 5.1)
Q.2 Explain Optimized link state routing protocol. (Refer section 5.2)
Q.3 Discuss localization problem in WSN routing and explain how it is handled ? (Refer section 5.3)
Q.4 Explain range free methods for localization. (Refer section 5.3.2)
Q.5 Discuss sensor network localization. (Refer section 5.3.3)
Q.6 Discuss in detail about triangulation. (Refer section 5.3.3)
Notes
Contents
6.1 Transport Layer In Wireless Sensor Networks
6.2 QoS in WSN
6.3 Energy Efficient Design
6.4 Synchronization
6.5 Two Marks Questions with Answeres [Part - A]
6.6 Long Answered Questions [Part - B]
(6 - 1)
Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6-2 Transport Layer Challenges and Issues
estimate for every time-slot, based on the packets received during that slot. The
sensor nodes run an IEEE 802.11 MAC protocol and DSR as routing protocol.
Each node is able to buffer five packets.
The following points are noteworthy,
For all the nodes, the goodput decreases as the reporting rate increases.
Furthermore, the goodput decays rather quickly.
The larger the number of nodes, the stronger the decrease in goodput. Hence, for
a given reporting rate, increasing the number of nodes in the network/the node
density actually decreases goodput, wasting more energy. It is even shown that
on average individual sensors run out of energy more quickly as the node density
increases. Therefore : Increasing node density shortens node/network lifetime as long as
no additional mechanisms are devised.
5. Mechanisms for congestion detection and handling Congestion detection
(i) Sensor nodes can use different approaches to detect congestion; however, these
methods are all local in the sense that a node can only judge the situation in its
immediate neighborhood.
(ii) The detection methods proposed so far in the context of sensor networks rely
on two fundamental indicators: The occupancy of a nodes buffer and the
channel utilization.
(iii) The simplest method is to compare the instantaneous buffer occupancy against
some threshold value. If the threshold is exceeded, a congestion state is
diagnosed. However, when the threshold makes up for a large fraction of the
total buffer size, congestion states are detected (too) late.
(iv) An improved method, like, for example, used in ESRT (see Section 13.6.3), takes
the “growth trend” into account: The buffer occupation is sampled regularly
and congestion is diagnosed when the instantaneous buffer level is above some
threshold and additionally the buffer size has grown in the immediate past.
(v) An above-threshold occupancy level combined with negative growth is a sign
that congestion is resolved. Buffer occupancy alone is not a reliable congestion
indicator, specifically when packets can get lost already on the channel because
of collisions or hidden terminal situations and has no chance to actually reach a
buffer. Only the situations of a full buffer and an empty buffer are reasonable
indicators of (non)congestion.
(iv) The actual desired target rate depends on the accuracy requirements of the user
and the general trade-off is that relaxing these requirements tends to reduce the
frequency and duration of congestion states.
(II) Packet dropping
(i) When a forwarding node having full buffers receives a new packet, it clearly
must drop the new packet or an old one from the buffer. A node can make a
better-informed dropping decision when it has some information at hand about
the importance of the packet.
(ii) One option is to label each packet with an explicit priority value and to let the
forwarder drop the packet of lowest priority, either new or already buffered.
(III) In-network processing and aggregation
(i) Since a sensor network is deployed toward specific applications, forwarders
know the data they forward and can compress, drop, or aggregate it accordingly.
This is the option truly distinguishing sensor networks from other types of
networks. Clearly, other types of networks allow further mechanisms.
(ii) For example, in ATM networks, a combination of admission control, careful route
selection, and resource reservation in intermediate nodes is used to avoid
congestion in the first place. However, such a mechanism requires a reasonably
stable network, per-connection state in intermediate nodes, and significant
signaling and, in general, seems too heavy weight for wireless sensor networks.
Error Recovery
Performing end-to-end error recovery is not feasible in WSNs. PSFQ uses a key
concept called hop-by-hop error recovery. In this mechanism, all the intermediate sensor
nodes are taking the responsibility for error recovery. Data exchange is performed on a
hop-by-hop basis rather than performing end-to-end basis.
In WSNs, the lost or erroneous packet has to be retransmitted. Sometimes each hop
may receive multiple number of same packets. This consumes more energy. All the
erroneous packets have to be maintained in the receiver's queue until receiving error-free
packets.
Protocol Functions
PSFQ uses the following key functions :
Message relaying
Relay-initiated error recovery
Selective status reporting
Message relaying (pump operation) : Each sensor node inject the sensed data
into the network. These message can be received by the neighboring nodes and
can be buffered for relaying the packets to other nodes within the bounded time
limit. Pump operation works as follows. The pump operation slowly “pumps” or
injects data to the WSN. A sender node sends a packet to other sensor. After
receiving this packet, the sensor will check the data with its local data cache. If
the received packet's sequence number is same as cached packet, then it will
discard the duplicate packet. If this is a new message, PSFQ will buffer the packet
in packet cache.
Relay-initiated error recovery (fetch operation) : A sensor node which relays
(forwards) the packet will maintain the data in a data cache. If the node detects
any packet loss or the packets are received with unordered sequence numbers,
then the packet is retransmitted from the intermediate node. This is possible if
the lost data is already buffered at the intermediate node. So the sensor node
which detects the packet loss may initiate error recovery mechanism by sending
ACK and Negative Acknowledgement messages (NACK).
Selective status reporting (report operation) : Each sensor node observes the
status of the already sent packets in the network to know the error rate. Based on
the error rate of the previous transmissions, the sensor node takes decision for
further data transmission. If a report message cannot able to append more status
information, then new report message will be created.
ESRT Features
(i) Self configuration - ESRT protocol supports for dynamic topology formed by
WSN and achieves flexibility in self configuring the network when topology
changes.
(ii) Energy awareness - The minimum possible energy consumption can be achieved
by reducing reporting rates.
(iii) Congestion control - Several packet losses may occur due to congestion at the
sink node. A powerful and suitable congestion control mechanism is used to
reduce energy consumption particularly at the sink node.
(iv) Collective identification - In general, sink nodes show interest in collecting
information from other sensor nodes and will send collective information to the
required node or centre. This provides the implementation of event-to-sink
model and thereby reducing network overhead.
(v) Biased implementation - ESRT operates on sink nodes with minimum
functionalities and thereby reducing heavy load at sink nodes. This improves
reliability.
(vi) ESRT reliabilities
In ESRT, each sink node is expected to receive collective report from each sensor node.
The ESRT protocol offers two types of reliabilities,
Observed reliability
Required reliability
Observed Reliability (OR) - It is termed as the number of data packets that is
carried out from event to the sink node.
Required Reliability (RR) - It is termed as the number of data packets to be
effectively tracked for an event.
If the observed reliability is greater than the desired reliability, then the event is
considered to be reliably detected. Otherwise, the required steps have to be taken to attain
the desired reliability. If OR falls below the requirement, then the protocol must increase
the reporting frequency. Further, if the RR exceeds, then the reporting frequency must be
reduced. The information about the number of reporting frequencies of the event will be
broadcast by the sink node to all the other sensors.
(iv) CODA’s backpressure messages can also indicate a chosen node. This node is
allowed to continue its transmissions upon hearing a backpressure message;
all other nodes have to apply their backpressure policy.
(v) This method is open-loop because the node issuing the backpressure message
receives no direct feedback.
5. Closed-loop regulation mechanism
(i) A sink node might receive data from multiple sources. This may potentially
create a persistent hot spot close to the sink or in other regions of the network.
This situation requires a mechanism to reduce the packet generation rates of
the source nodes persistently.
(ii) Relying entirely on the previously discussed backpressure mechanism is not
sufficient - when nodes receive no backpressure messages anymore, they
continue to forward packets and to send at their regular rates, this way
quickly creating the next congestion state. Secondly, these backpressure
messages would have to travel several hops from the sink to the source
nodes, creating additional network load.
(iii) The closed-loop regulation mechanism is requested by the sources when their
packet generation rate exceeds a given fraction r of the locally available
channel capacity.
(iv) Specifically, the sources set a specific bit in their data packets, which triggers
the generation of acknowledgment packets in the sink.
(v) The rate of acknowledgment packets is application specific; the sink can, for
example, generate one acknowledgment per 100 data packets it receives from
the source. How the acknowledgments are disseminated to the source nodes
is not within the scope of CODA, but is requested from other protocols like
directed diffusion. This opens the possibility to restrict the acknowledgments
only to sources observing a certain phenomenon while other sources remain
unregulated.
(vi) A source requesting acknowledgments expects to receive a minimum number
of acknowledgements over a certain time period. If less acknowledgments are
received, the source slows down its own local packet generation according to
some policy.
6. Single packet versus block versus stream delivery - The cases of delivering only
a single packet on the one hand and of delivering a number or even an infinite
stream of packets on the other hand differ substantially in the protocol
mechanisms usable in either case. In the single packet delivery problem, a single
packet must be reliably transported between two nodes.
7. It may be argued that such a requirement will not occur in dense wireless sensor
networks where many nodes observe the same phenomenon and report highly
correlated data.
8. However, there are arguments against this claim. The first one is that not all
sensor networks will be dense. Secondly, data aggregation is an important
strategy in wireless sensor networks to condense many redundant or correlated
measurements into a small piece of data.
9. Aggregation drastically reduces the amount of data that must be transmitted to
distant sink nodes, but on the other hand, the reliability requirements for the
summary packet are much higher than for any of the individual sensor readings.
In the block delivery problem, a finite data block comprising multiple packets
must be delivered to a sensor or a set of sensors.
10. Some application examples for this are the retasking of a sensor network (i.e. the
distribution of new application code to a set of sensor nodes) or the injection of
user queries.
11. Finally, in the stream delivery problem, a theoretically unbounded number of
packets has to be transported between two nodes. An example for this is
periodic measurement reports.
12. Sink-to-sensors versus sensors-to-sink versus local sensor-to-sensor - It can be
assumed that most communications in sensor networks are not between arbitrary
peer nodes, but information flows either from sensor nodes toward a single or a
few sink/gateway nodes or in the opposite direction, from sinks to sensors. In the
latter case, the groups of sensors can be geographically specified (“all sensors in
the conference room”) or by other attributes (“all temperature sensors with less
than 50 % battery capacity”).
13. Other applications like, target tracking require reliable handover of target state
(e.g. estimated position, speed) between neighboring nodes close to the target’s
trajectory.
2. Redundant data - Sensor node may receive redundant data from other sensors.
This leads to wastage of bandwidth and energy. Data aggregation mechanisms
can be used to solve the redundant problems. However, the data aggregation
strategies must ensure that it improves QoS in WSN.
3. Dynamic network topology - A WSN can have thousands of distributed sensor
nodes. Due to mobility of sensor nodes, the topology of the network may get
changed frequently. Sensor nodes form self-organizing network to sense the
environment where it is deployed. Making the sensor node to adapt for
environmental changes is a challenging issue in WSN. When any of the node
fails, new sensor nodes has to be added to re-organize the network topology.
However, those deployment make sure that the entire network operation is not
affected.
4. Less reliable medium - Sensor nodes use radio waves to communicate with other
nodes. This radio waves are naturally less reliable. These wireless media
(wireless link) may be highly affected by the interference, fading and noise
factors.
5. Mixed traffic - In WSNs, some sensors are specifically deployed to measure
certain physical parameters such as temperature, humidity, location, and speed.
These sensors has to monitor the environment and send the report periodically to
other nodes. But, some other sensors may be deployed to detect critical events
such as monitoring unknown persons movement. So the operation of different
sensors with mixed traffic should not affect the QoS of the system.
6.2.3.1 Coverage
Coverage is a measure of how effectively network observes (encounter) or cover an
event. It depends upon the following parameters.
1. Range of sensor nodes
2. Sensitivity of sensor nodes
This diagram can be formed by drawing the perpendicular bisectors for each line
segment. This line segment can be made to join two sites.
A weighted graph can be created from Vertex and Edge set of sensor graph. The
weight of each edge represents the minimum distance from sensors Si. The maximum cost
path provides least coverage and can be determined from Voronoi diagram.
ii) Best-case coverage - It defines the coverage area that are best i.e. large.
Coverage problem
This coverage problem is used to find out the large coverage from location I to location
F. To solve this problem, a mathematical technique called Delaunay triangulation is used.
Delaunay triangulation technique
This can be determined from Voronoi diagram. The sites where the polygons share
common edges are connected together and is shown in Fig. 6.2.1 (b). The best path can be
set by connecting line segments of some of the sensor nodes. In Delaunay triangulation,
the cost of each edge is proportional to the length of line segments.
6.2.3.2 Exposure
It is termed as the expected ability of observing a target in the sensor region. The
sensing power of a node A at point b is defined as,
S(a,b) =
[d(a, b)]k
where λ and k are constants, d(A,b) is the distance at point b from node A. All-sensor field
intensity of group of sensors Si at point b is modeled as,
n
IA = S (Si, b)
i=1
The closest-sensor field intensity at b is,
IC(F, b) = S(Imin,b)
where Smin is the closest sensor to point b.
The exposure of a path b is a measure of the possibility that an object traveling along a
path b is detected by a set of sensors. It can be defined as an integral over all points on b of
the sensibility. The exposure function E along a path b(t) is,
db (t)
E[b(t), t1, t2] = t21 I A or C (F, b(t)) dt
t
dt
db (t)
where b(t) is the travel path of an event, is the elemental arc length and t1, t2 are the
dt
db (t)
time instances between that the path is traversed. The elemental arc length can be
dt
determined from Cartesian coordinates (x1(t), y1(t)) is,
dx1(t) dy1(t)
2 2
db (t) +
dt =
dt dt
Minimum exposure Path (MEP)
The minimum exposure path (MEP) problem in a given sensor area is, given a pair of
points x1 and y1 inside a sensor field, find a path between x1 and y1 of a minimum
exposure.
i) MEP in Unit Field
By having one sensor node at S(0,0) in a unit field, the MEP from (–1, –1) to (1,1) is
shown in Fig. 6.2.2 (a).
The polygon field minimum exposure path is shown in Fig. 6.2.2 (b).
3. Sensor nodes may go to sleep mode when there is no operation carried out by the
node and thereby saves energy. Sensors may behave as cluster-head or inter
cluster-head.
4. Clustering is a method of grouping neighbouring sensor nodes. Moreover,
clustering is used to improve the network lifetime. This is possible when some of
the members of a cluster may go to sleep mode due to no operation and thereby
saves energy.
5. Since each sensor node has limited energy resource, extending the WSN lifetime
and the coverage area are main challenges in WSNs. Dynamic Voltage Scaling
(DVS) is used in WSNs to reduce energy consumption.
6. Dynamic voltage scaling
The processor used in sensor node may have time-varying computational load.
Therefore, the power supplied to that unit can be measured to satisfy the instant
processing requirement of the sensor node. This is called as dynamic voltage
scaling. DVS can considerably reduce the energy consumption of the entire
network by setting the CPU speed to match the requirements of each operation.
7. Software
(i) The software used in sensor node must use energy aware mechanisms to ensure
less power consumption. Operating systems, application software and network
software used in sensor network make sure that the energy consumption is less
for each operation. Use of simple modulation schemes also consumes less
power and energy in WSNs.
(ii) Communication subsystem must ensure that the scheme used for packet
forwarding consumes less energy. Energy efficient algorithms used in node-
level operation ensure that it consumes less energy and thereby increasing life
time of the network. The various schemes used for traffic distribution,
monitoring the environment and topology management should work
efficiently to reduce energy consumption.
6.4 Synchronization
Synchronization is a key concept of WSN used to perform multi-hop wireless
communication. This concept is used to regularize the communication between the
sender and the receiver during packet transmission.
(iv) If the messages are received arbitrarily, then the synchronization becomes very
difficult.
Notes
Syllabus
Network Security Requirements, Issues and Challenges in Security Provisioning, Network Security
Attacks, Layer wise attacks in wireless sensor networks, possible solutions for jamming, tampering,
black hole attack, flooding attack. Key Distribution and Management, Secure Routing - SPINS,
reliability requirements in sensor networks.
Contents
7.1 Network Security Requirements and Related Aspects in Wireless Sensor Networks
7.2 Layer Wise Attacks in Wireless Sensor Networks and Solutions to Attacks
7.3 Key Management
7.4 Intrusion Detection
7.5 Software based Anti Hamper Technique
7.6 Secure routing Sensor Networks - Reliability Requirements and SPINS
7.7 Defense against Attacks on WSN Routing Protocols and SPIN Protocol
7.8 Secure Ad hoc Routing Protocols
7.9 Broadcast Authentication WSN Protocol - TESLA Protocol, Biba Protocol
7.10 Two Marks Questions with Answers [Part - A]
7.11 Long Answered Questions [Part - B]
(7 - 1)
Ad hoc and Wireless Sensor Networks 7-2 Sensor Network Security
the encryption and decryption functions, to store, manage and send the
encryption keys etc.
c. Limited processing capability - Sensor nodes processors are exceptionally
slow (up to few MHz) and they do not support some arithmetic and logic
operations. Hence, they cannot carry out very complex cryptographic
operations.
d. Limited storage capability - The memory offered for security is very low
(only a few kBs). This requires that any security method designed for sensor
networks should consume as less memory as possible.
4. Network constraints - Sensor networks having all the constraints of mobile ad
hoc networks such as untrustworthy network communication, collision related
problems and their lack of physical infrastructure.
a. Unreliable communication - Wireless communication is intrinsically
unreliable and can affect packets to be damaged or dropped. This
unreliability in communication poses additional threats to the nodes if
dropped packets are taken over by adversaries.
b. Collisions and latency - Sensor networks exploit a dense arrangement of
nodes potentially deploying hundreds or thousands of nodes in a sensitive
application. This causes the likelihood of collision and latency in packets.
However, distinct in traditional networks, the energy limitations of sensor
nodes make it not viable to resend packets in case of collision.
c. Limited bandwidth - Wireless links have small communication
bandwidth. The security schemes should utilize the limited bandwidth as
possible.
5. Physical limitations - Sensor networks are often installed in public and
potentially hostile environments, which make some of their components
extremely vulnerable to detain and destruction. To physically secure sensor
nodes with tamperproof objects increases the cost.
a. Unattended after deployment - The fact that sensor networks are deployed
in applications where they will be left unattended allows adversaries larger
access and independence to physically tamper with the nodes. Severe
weather conditions and natural disasters such as storms, floods, earth
quakes, and shrub fires can also hinder their functioning.
b. Remotely managed - Being remotely managed makes it quite difficult to
detect physical tampering with the sensor networks; other issues such as
replacing the batteries and redeploying cryptographic keys are also
impracticable to do remotely.
(2) Data integrity - With the assurance of confidentiality, an attacker could not get
the real content of information, but the recipient does not guarantee that the data
it receives is correct, because malicious intermediate nodes can intercept, tamper,
or disturb the information during the transmission. Through data integrity
identification, one can ensure that the data won’t change anymore during its
transference process.
(3) Data freshness - Data freshness view is to emphasize that each of the received
data is the latest from the sender, which makes it stop receiving repeated
information. The main purpose to ensure the freshness of the data is to prevent
replay attacks.
(4) Availability - Availability requires the sensor networks that can always provide
information access service to the legitimate users according to the preset. But the
attacker can make some or all of the sensor network paralyzed by forging and
interfering signal or other methods to destroy availability of the system, such as
DoS (Denial of Service) attacks.
(5) Robustness - Wireless sensor networks are highly dynamic and uncertain,
including changes in the network topology and the nodes disappearing or
joining. Therefore, the wireless sensor networks under a variety of security
attacks should have strong adaptability, and even if a particular attack succeeds,
the performance can make the impact minimized.
(6) Access control - Access control requires the ability to identify the users who
access wireless sensor networks to ensure the legitimacy. Access control
determines who can access the system, what system resources can be accessed,
and how to use these resources.
3. All this makes ad hoc networks exceptionally vulnerable to attacks and the
security issues become very complex. Therefore, security in ad hoc sensor
networks is a harder task than in traditional wired.
4. The wireless links in an ad hoc sensor network makes it susceptible to attacks
ranging from passive eavesdropping to active impersonation attack. Thus these
attacks violate integrity, availability, authentication and non-repudiation. Nodes
wandering freely in a hostile environment with relatively pitiable physical
protection cause good probability of being compromised.
5. Therefore, security solutions require considering malicious attacks not only from
outside but also from within the WSN.
6. Further, the trust relationships among individual nodes can vary, especially when
some of nodes are found to be compromised. To find high survivability of ad hoc
networks they need to have a distributed architecture with no central control,
which definitely increases vulnerability. Hence, security mechanism needs to be
dynamic, and should be passably scalable.
7. The particular characteristics of WSNs in excess of an improvement to any
adversary who intends to compromise security. For example, the sensor nodes
use radio-link as a communication medium which is in fact insecure.
8. Broadcast nature of communication medium makes Wireless Sensor Networks
more vulnerable to security attacks than wired networks. Conversely, provision
of security in WSNs is a challenging task since the resources in sensor nodes
devices are not enough for executing complex security protocols.
4. A bootstrapping protocol must not only allow a newly deployed sensor network
to initiate a secure infrastructure, but it must furthermore allow nodes deployed
at a later time to join the network securely. The difficulty of the bootstrapping
problem stems from the many limitations of sensor networks like limited
resource constraints.
type of data according to his access privileges. Access control is required in those
applications of WSNs, which collect a variety of data.
7. Availability ensures the survivability of sensor network to authorized parties
when needed, in spite of the presence of internal or external attacks.
8. Key distribution is used to provide security for wireless sensor networks, it
ensures that the communication should be encrypted and authenticated from
distributing the keys among sensors.
7.2 Layer Wise Attacks in Wireless Sensor Networks and Solutions to Attacks
WSNs are vulnerable to various types of attacks. These attacks can be broadly
categorized as follows :
1. Attacks on network availability attacks - On availability attacks are often
referred to as denial-of-service (DoS) attacks. DoS attacks may target any layer of
a sensor network.
2. Attacks on secrecy and authentication - Standard cryptographic techniques can
protect the secrecy and authenticity of communication channels from outsider
attacks such as eavesdropping, packet replay attacks, and modification or
spoofing of packets.
3. Stealthy attack against service integrity - In a stealthy attack, the goal of the
attacker is to make the network accept a false data value. For example, an
attacker compromises a sensor node and injects a false data value through that
sensor node. In these attacks, keeping the sensor network available for its
intended use is essential. DoS attacks against WSNs may permit real-world
damage to the health and safety of people. The DoS attack usually refers to an
adversary’s attempt to disrupt, subvert, or destroy a network. However, a DoS
attack can be any event that diminishes or eliminates a network’s capacity to
perform its expected functions.
spent a great deal of effort in identifying various types of such attacks, and devising
strategies to defend against them. Some important types of DoS attacks in WSNs are
discussed below.
such as ACK control messages. A possible result of such collisions is the costly
exponential back-off.
3. The adversary may simply violate the communication protocol and continuously
transmit messages in an attempt to generate collisions. Repeated collisions can
also be used by an attacker to cause resource exhaustion. For example, a naïve
link layer implementation may continuously attempt to retransmit the corrupted
packets.
4. Unless these retransmissions are detected early, the energy levels of the nodes
would be exhausted quickly. Unfairness is a weak form of DoS attack. An
attacker may cause unfairness by intermittently using the above link layer
attacks. In this case, the adversary causes degradation of real-time applications
running on other nodes by intermittently disrupting their frame transmissions.
7.2.1.3 Network Layer Attacks (Sybil, Wormhole, Black hole) and Solutions
The network layer of WSNs is vulnerable to the different types of attacks as described
below.
1. Spoofed routing information - The most direct attack against a routing protocol
is to target the routing information in the network. An attacker may spoof, alter,
or replay routing information to disrupt traffic in the network. These disruptions
include creation of routing loops, attracting or repelling network traffic from
selected nodes, extending or shortening source routes, generating fake error
messages, causing network partitioning, and increasing end-to-end latency.
2. Selective forwarding - In a multi-hop network like a WSN, for message
communication all the nodes need to forward messages accurately. An attacker
may compromise a node in such a way that it selectively forwards some
messages and drops others.
3. Sinkhole - In a sinkhole attack, an attacker makes a compromised node look
more attractive to its neighbours by forging the routing information. The result is
that the neighbour nodes choose the compromised node as the next-hop node to
route their data through. This type of attack makes selective forwarding very
simple as all traffic from a large area in the network would flow through the
compromised node.
4. Sybil attack - It is an attack where one node presents more than one identity in a
network. It was originally described as an attack intended to defeat the objective
of redundancy mechanisms in distributed data storage systems in peer-to-peer
networks. In addition to defeating distributed data storage systems, the Sybil
attack is also effective against routing algorithms, data aggregation, voting, fair
resource allocation, and foiling misbehavior detection. Regardless of the target
(voting, routing, aggregation), the Sybil algorithm functions similarly. All of the
techniques involve utilizing multiple identities. For instance, in a sensor network
voting scheme, the Sybil attack might utilize multiple identities to generate
additional “votes”. Similarly, to attack the routing protocol, the Sybil attack
would rely on a malicious node taking on the identity of multiple nodes, and
thus routing multiple paths through a single malicious node.
5. Wormhole - A wormhole is low latency link between two portions of a network
over which an attacker replays network messages. This link may be established
either by a single node forwarding messages between two adjacent but otherwise
non-neighboring nodes or by a pair of nodes in different parts of the network
communicating with each other. The latter case is closely related to sinkhole
attack as an attacking node near the base station can provide a one-hop link to
that base station via the other attacking node in a distant part of the network.
6. Black hole and Gray hole - In the black hole attack, a malicious node falsely
advertises good paths (e.g., the shortest path or the most stable path) to the
destination node during the path-finding process (in reactive routing protocols),
or in the route update messages (in proactive routing protocols). The intention of
the malicious node could be to hinder the path-finding process or to intercept all
data packets being sent to the destination node concerned. A more delicate form
of this attack is known as the gray hole attack, where the malicious node
intermittently drops data packets thereby making its detection more difficult.
7. HELLO flood - Most of the protocols that use HELLO packets make the naïve
assumption that receiving such a packet implies that the sender is within the
radio range of the receiver. An attacker may use a high-powered transmitter to
fool a large number of nodes and make them believe that they are within its
neighborhood. Subsequently, the attacker node falsely broadcasts a shorter route
to the base station, and all the nodes which received the HELLO packets, attempt
to transmit to the attacker node. However, these nodes are out of the radio range
of the attacker.
To prevent the DoS attack on network layer, there are methods like egress filtering,
Authentication, Monitoring, Redundancy, Probing and Packet leashing by using
geographic, temporal information and by verifying bidirectional links.
7.2.1.5 Application Layer Attacks (Network Programming, Path based) and Solutions
Application layer is responsible for specifying how the data are requested and
provided for both individual sensor nodes and interactions with the end user.
Application layer attacks are,
1. Attacks by sending large amount of stimuli - In this attack, Applications are
controlled by stimuli i.e. send alert for motion detection causes large amounts of
network traffic.
2. Network programming attack - In this attack, the nodes can be reprogrammed in
the field and the attacker attack by sending false program.
3. Path based DoS - In this attack the attacker forwards packets all the way to base
station and it uses network bandwidth, node energy.
Application layer attacks - Solutions
Periodic monitoring of sensor nodes is carried out majorly to tackle the application
layer attacks.
De-synchronization Authentication
increase, but it can guarantee that there is a shared key between the nodes
needed to exchange data and support a variety of network communication
modes.
4. Donggang et al. proposed a key distribution scheme based node group. The basic
idea of the program is to assume the system to generate a large key pool before
hand, then it is divided into several subkey pools, making sure that each node
deployment group has a corresponding subkey pool. Then the nodes of each
deployment group select some keys from the corresponding subkey pool
randomly. Due to the fact that the establishment of the secure channel between
nodes needs at least one shared key, so it requires there should be public key
between the corresponding subkey pools of neighborhood groups to ensure the
connectivity between nodes. Donggang et al. set up the repetition factor of the
same key between the corresponding subkey pools of adjacent groups. The
scheme is more safer, after the node is under attack, it has little impact on the
security of other nodes in the network, but the storage overhead of such key
management scheme is large; for the resource-constrained wireless sensor
networks it is a very serious problem.
5. Du and Guizani et al. suggested that many key management schemes which
based on symmetric key considered too much about network connectivity and
hope to find a method that any two nodes can get shared key while ignore the
communication of the two nodes. In the context of heterogeneous sensor
networks, they proposed a route-drive public key management scheme based
lightweight ECC, which only allocated communication key for neighbor node.
The performance simulation shows that, compared to the symmetric key
mechanism, this scheme significantly improved safety and also saved energy and
storage space compared to key management schemes of other asymmetric key
mechanisms.
7.3.3 Certification
Network security certification is another important part of the network. It includes
identity authentication and message authentication, and methods used are symmetric
encryption and asymmetric encryption method. This section summarizes research work
on the two modes of certification.
8. However, the pair-wise MACs are not compressed for transmission. If they were,
a node replaying the message would not be able to extract the pair-wise MACs
and a compressed MAC for the base station. When an intermediate node receives
a report, it verifies the MAC of its lower associate node. If it fails, the report is
eliminated.
9. Otherwise, it removes the MAC, generates a new MAC using its upper associate
node pair-wise key, and appends it to the report. However, the pair-wise MACs
are not compromised for transmission. If they were, a node relaying the message
would not be able to extract the pair-wise MACs of interest to it. Thus, a
legitimate report includes t + 1 pair-wise MACs and a compressed MAC for the
base station.
10. When an intermediate node receives a report, it verifies the MAC of its lower
associate node. If it fails, the report is eliminated.
11. Otherwise, it removes the MAC, generates a new MAC using its upper associate
node pair-wise key, and appends it to the report. IHOP ensures that the base
station can detect false data packets when no more than t nodes are
compromised.
i) Acquire (via analysis of the sensor memory) detailed knowledge of what the
sensor’s program is supposed to do and what the master secret is.
ii) Modify the program with a malicious code.
iii) Produce and deploy multiple copies of the manipulated sensor device in the
network. This is a serious problem, as sensor devices, once compromised,
can subvert the entire network, for example, blocking nodes within its
communication range from receiving and/or sending/relaying any
information.
4. Consequently, it is essential to make a sensor device tamper-proof.
5. Traditionally, the tamper-proofing of programs or a master secret relies on
tamper-resistant hardware. However, this hardware-based protection will likely
fail to provide acceptable security and efficiency because,
i) Strong tamper-resistance is too expensive to be implemented in resource-
limited sensor devices.
ii) The tamper-resistant hardware itself is not always absolutely safe due to
various tampering techniques such as reverse-engineering on chips,
microprobing, glitch and power analysis, and cipher instruction search
attacks.
6. Existing approaches to generating tamper-resistant programs without hardware
support can be classified as, code obfuscation that transforms the executable code
to make analysis/modification difficult, result checking that examines the validity
of intermediate results produced by the program, self-decrypting programs that
store the encrypted executables and decrypt them before execution, and self-
checking that embeds, in programs, codes for hash computation as well as correct
hash values to be invoked to verify the integrity of the program under execution.
7. However, for the following reasons, these approaches are unsuitable for sensor
networks where a program runs on a slow, less-capable CPU in each sensor
device. First, in the case of code obfuscation, it becomes easier to tamper with the
program code as the code size in low-cost sensor device s shrinks, let alone the
theoretical difficulty of obfuscation. Moreover, just making it difficult to tamper
with program code is not sufficient as it cannot protect against “determined”
attackers.
8. Second, techniques based on result-checking or self-decryption are too
“expensive” to be employed in resource-limited sensor devices because they
continuously incurs the overhead of verification or decryption, shortening the
sensor’s battery lifetime and degrading the network throughput.
9. Third, the security of self-decrypting programs can be easily broken unless the
decryption routines are protected from reverse-engineering, for example, by
means of hardware. Likewise, self-checking techniques become defenseless once
the hash computation code and/or the hash values have been identified/analyzed
by the adversary.
10. To defend the sensor network against the above-mentioned attacks, the following
security conditions should be met,
i) The program residing in a sensor is not modified (integrity) and, optionally,
ii) The sensor identifier (ID) is unique in a network (uniqueness).
11. The second condition is needed only if certain services rely on unique IDs for their
proper operation as the adversary may deploy cloned sensors to sabotage the
services.
12. However, these conditions are difficult to meet due mainly to the usually hostile
operational environment, as well as the very large size of sensor networks, under
which it is easy for an adversary to capture and compromise sensors. Therefore,
it needs an approach that creates a network of mutually trusted sensors, that is,
each sensor can trust that the rest of the network has not been tampered with.
13. To achieve this, it is required that each sensor register itself with a dedicated
server after verification of its program.
similarities, SPIN protocol can effectively reduce the amount of data transmitted and
energy consumption in the network through negotiation between nodes. However, SPIN
protocol needs to send inspection packet before sending the packet every time, thus
causing a large data transmission delay. In addition, SPIN data broadcast mechanism
cannot guarantee the reliability of data transmission.
Chalermek and Ramesh designed a directed diffusion routing protocol specifically for
wireless sensor networks, which was based on data-centric routing protocol model. The
protocol introduces a network “ladder” concept, combining with the local routing
protocol for wireless sensor networks communication. Directed diffusion process is
divided into query diffusion, data dissemination, and path reinforcement. Since the
establishment of directed diffusion routing requires a flood spread and causes big
expense of energy and time, the algorithm is suitable for the scenario, which has a large
number of queries but a short time.
Rumor routing that overcomes the problem of excessive spending from establishing
forwarding path thought flood spread method was proposed by David and Deborah.
Rumor routing basic idea is that time zone sensor node generates agency messages, and
agency messages spread outward diffusion along a random path, while the query
messages from the sink node also spread along a random path in the network. When the
transmission path of agency messages and query messages cross together, there is a full
path from a sink node to the event area. Compared with the directed diffusion routing,
rumor routing effectively reduces the routing established expense. However, because of
rumors that the routing path is generated randomly, the data transmission path is not
optimal path, and maybe even routing loops exist.
into account energy efficiency, easily lead to excessive use of certain nodes and shorten
the life cycle of the network.
Yu et al. from the UCLA University, USA, proposed GEAR (Geographic and Energy
Aware Routing) routing algorithm, which combines the directional diffusion routing and
GPSR routing methods, considers the node energy in the route, and thus solves the
problem of unbalanced energy consumption in GEAR. GEAR assumes that the position
information of the event area is known, and the nodes know their location information
and residual energy. In addition, the node via a simple Hello message exchange
mechanism will be able to know the location information and residual energy information
for all nodes. Routing mechanism based on these address locations and energy
information establish the optimal path from aggregation node to the event area to avoid
flooding, reducing the overhead of route established. However, due to the lack of
sufficient topology information, GEAR may reduce the routing efficiency when encounter
routing void in the routing process.
data transmission network energy consumption by adjusting the two thresholds. Each
round TEEN protocol consists of establishment phase and stable data transfer phase of
clusters. TEEN agreement by a reasonable set of hard and soft thresholds only transmits
the information of interest to users, which can effectively reduce traffic and the power
consumption of the system. Simulation studies show that TEEN protocol is more effective
than LEACH protocol. But like LEACH protocol, TEEN also will encounter similar Hello
flood attacks, selective forwarding attacks, witch attacks, and so on.
cancellation code. Only when one need to build a random path, passive confirmation can
analyze safety behavior of neighbors based on the monitor passive traffic, reduces the
routing header, has a good defense against common attacks, and thus guarantees the
safety of the route.
7.7 Defense against Attacks on WSN Routing Protocols and SPIN Protocol
the base station, the receiving node is assured that no adversary could have
altered the packet in transit. The node stores the packet in a buffer. At the time of
key disclosure, the base station broadcasts the verification key to all its receivers.
When a node receives the disclosed key, it can easily verify the correctness of the
key. If the key is correct, the node can now use it to authenticate the packet stored
in its buffer. Each MAC is a key from the key chain, generated by a public one-
way function F. To generate the one-way key chain, the sender chooses the last
key Kn from the chain, and repeatedly applies F to compute all other keys,
Ki = F(K i + 1).
6. SPINS limits the broadcasting capability to only the base station. If a node wants
to broadcast authenticated data, the node has to broadcast the data through the
base station. The data is first sent to the base station in an authenticated way. It is
then broadcasted by the base station.
7. To bootstrap a new receiver, μTESLA depends on a point-to-point authentication
mechanism in which a receiver sends a request message to the base station and
the base station replies with a message containing all the necessary parameters. It
may be noted that μTESLA requires the base station to unicast initial parameters
to individual sensor nodes, and thus incurs a long delay to boot up a large-scale
sensor network. Liu et al. propose a multi-level key chain scheme for broadcast
authentication to overcome this deficiency.
8. The basic idea of this protocol is to predetermine and broadcast the initial
parameters required by μTESLA instead of using unicast-based message
transmission. The simplest way is to pre-distribute the μTESLA parameters with
a master key during the initialization of the sensor nodes. As a result, all sensor
nodes have the key chain commitments and other necessary parameters once
they are initialized, and are ready to use μTESLA as long as the staring time has
passed.
9. Further there is concept of a multi-level key chain scheme, in which the higher key
chains are used to authenticate the commitments of the lower-level ones.
However, the multi-level key chain suffers from possible DoS attacks during
commitment distribution stage. Further, none of the μTESLA or multi-level key
chain schemes is scalable in terms of the number of senders. In a practical
broadcast authentication protocol has been proposed to support a potentially
large number of broadcast senders using μTESLA as a building block. μTESLA
provides broadcast authentication for base stations, but is not suitable for local
broadcast authentication. This is because μTESLA does not provide immediate
authentication.
10. For every received packet, a node has to wait for one μTESLA interval to receive
the MAC key used in computing the MAC for the packet. As a result, if μTESLA
is used for local broadcast authentication, a message traversing l hops will take at
least l μTESLA intervals to arrive at the destination.
11. In addition, a sensor node has to buffer all unverified packets. Both the latency
and the storage requirements limit the scheme for authenticating infrequent
messages broadcast by the base station.
12. To prevent DoS attacks, individual nodes are not allowed to broadcast to the
entire network. Only the base station is allowed to broadcast, and the base station
is authenticated using one-way hash function so as to prevent any possible
masquerading by a malicious node. Control information pertaining to routing is
authenticated by the base station in order to prevent injection of false routing
data.
(v) Low communication overhead - The counter state is kept at each endpoint
and need not be sent in each message. Inspired by the work on public key
cryptography, Du et al. have investigated the public key authentication problem.
The use of public key cryptography eases many problems in secure routing, for
example, authentication and integrity. However, before a node A uses the public
key from another node B, A must verify that the public key is actually B’s, that is,
A must authenticate B’s public key; otherwise, a man-in-the-middle attacks are
possible. In general networks, public key authentication involves a signature
verification on a certificate signed by a trusted third party Certificate Authority
(CA).
6. However, the signature verification operations are very expensive operations for
sensor nodes.
7. One particular challenge to secure routing in wireless sensor networks is that it is
very easy for a single node to disrupt the routing process by disrupting the route
discovery process.
3. In the beginning (or when the topology may have changed substantially because
of nodes’ mobility), the base station floods (limited flooding) a request message
to all the reachable sensor nodes in the network. After receiving a request
message for the first time, a sensor node x broadcasts in turn another request
message that includes a path from the base station to x and also the identity of x.
Whenever receiving duplicate request messages, it records the identity of the
sender as a neighbor, but stop re-broadcasting the duplicate request. The base
station authenticates the feedback messages received from sensor nodes.
4. After that, it constructs a topological picture of the network from the
authenticated neighborhood information, computes the forwarding tables for
each sensor node, and sends the tables respectively to nodes using a routing
update message. To address the influences of compromised nodes, INSENS
builds redundant multi-path routing tables containing disjoint paths. Therefore,
even if a single node or path is taken down by an intruder, secondary paths will
substitute.
5. The main idea of this approach is to add OWS (one-way sequences) field and the
MAC (Message Authentication Code) field (MACR and MACF), that support the
intrusion-tolerant properties of INSENS, into message format.
6. To begin with, the base station uses one-way sequences (OWS) proposed by
μTESLA protocol F to generate a sequence of numbers K0, K1... Kn, such that
Ki = F(Ki+1), where 0 < i < n and F satisfies the condition that it is computationally
infeasible to compute Ki+1 in a limited time by only knowing F and K Ki. Initially,
every node is pre-configured to know K0 and F. In the first Route Discovery
phase, the base station includes K1 in the request message that it broadcasts.
7. Similarly in general, the base station uses Ki in the ith Route Discovery phase.
After receiving a request message, a node verifies if the sequence number did
indeed originate from the base station by checking whether K0 = Fi (Ki).
8. A malicious node would be computationally impossible to guess the next OWS.
As a result, a compromised node cannot spoof the base station by generating new
OWS. On the other hand, a sensor node will save the most up-to-date or freshest
OWS fresh that it has just seen from the base station.
9. This fact resists an intruder to disrupt the network by using old OWS to flooding
old request messages. In fact, a malicious node is still possible to flood a modified
request message in using the current OWS from a valid request message that it
has just received from the base station. Such an attack is called as rushing attack.
However, nodes in the tree Fig. 7.8.1, that are closer to the base station than the
malicious node m, will receive the valid request message first. These nodes will
drop the intruder’s spurious request messages received later because, as
mentioned above, nodes do not rebroadcast duplicate request messages (contain
the same OWS). Even when neighboring nodes of m accept to forward the fake
request message created by m, they forward only once. DOS attack, thus, is no
longer the concerns.
Fig. 7.8.1 The damage inflicted by a malicious node m is confined to a localized portion of the
sensor network, that is, nodes downstream from m and downstream from neighbors of m
10. Nevertheless, an unsolved issue in primary INSENS is that attacker could pack a
fake path into its spurious request message or drop the request message instead
of forwarding it. Some nodes can be harmed (not getting a request message or
not being able to forward their feedback message to the base station in the second
round) but, as shown in Fig. 7.8.1, the damage is locally confined to the nodes
nearest to and downstream from the intruder. This conclusion seems to be logical
but remains intuitive and needs further evaluation to know whether such
damage can still seriously disrupt the network.
11. In addition to OWS, keyed MAC (Message Authentication Code) algorithm is
another factor that provides intrusion- tolerant properties for INSENS. Each
sensor node is initially configured with a separate secret key that is shared only
with the base station. When a node x receives a request message for the first time,
before forwarding it, x appends its identity to the path list, and then generates a
MAC of the complete new path with its key: MACRx = MAC
(size|path|OWS|type, keyx) where “|” denotes concatenation. The value of
MACR is also appended to the request message that is then forwarded
downstream. This MACR field will eventually be exploited by the base station to
verify the integrity of the path contained in the packet. Additionally, even if a
node is compromised, only its secret key will be revealed, so an intruder cannot
compromise the entire network.
12. In the second round (Route Discovery-Route Feedback), keyed MAC is applied
one more time to protect the integrity of feedback messages. List of neighbors
nbr_info and the path path_info to a node x are protected by the following keyed
MACFx,
MACFx = MAC (path info | nbr info | OWS | type, keyx).
13. In feedback messages, parent info field determines a child’s upstream neighbors
and takes part in forwarding the feedback message to the base station. Using
only identity Ip would be an obvious vulnerability because it does not require the
casual intruder to have either any knowledge of the local topology or of the
current state of the topology discovery process.
14. To address this concern, INSENS requires a child node to put its parent’s MACRp
that is included in the parent’s original request message into the parent_info
field. This MACRp is tightly linked with the current state of the OWS request-
feedback cycle, as well as to the path to the child node.
15. In other words, the MACRp plays a role as not only an addressing function but
also a security function. A casual attacker, that only knows node id, would be
unable to forward a spurious feedback message.
In other words, the MACRp plays a role as not only an addressing function but
also a security function. A casual attacker, that only knows node id, would be
unable to forward a spurious feedback message.
common network prefix) that does not use AODV as its routing protocol and
wants to be able to exchange information with an AOD V network, one of the
nodes of the subnet can be selected as their ‘network leader’. The network leader
is the only node of the subnet that sends, forwards and processes AODV routing
messages. In every RREP that the leader issues, it sets the prefix size of the
subnet. Optionally, a Route Reply Acknowledgment (RREP-ACK) message may
be sent by the originator of the RREQ to ac-knowledge the receipt of the RREP.
RREP-ACK message has no mutable information.
5. In addition to these routing messages, RouteError (RERR) messages are used to
notify the other nodes that certain nodes are not anymore reachable due to a link
breakage. When a node rebroadcasts a RERR, it only adds the unreachable
destinations to which the node might forward messages. Therefore, the mutable
information in a RERR are the list of unreachable destinations and the counter of
unreachable destinations included in the message.
Anyhow, it is predictable that, at each hop, the unreachable destination list may
not change or become a subset of the original one.
6. Security flaws of AODV
Since AOD V has no security mechanisms, malicious nodes can perform many
attacks just by not behaving according to the AODV rules. A malicious node M
can carry out the following attacks (among many others) against AODV.
i. Impersonate a node S by forging a RREQ with its address as the originator
address.
ii. When forwarding a RREQ generated by S to discover a route to D, reduce the
hop count field to increase the chances of being in the route path between
S and D so it can analyze the communication between them. A variant of this
is to increment the destination sequence number to make the other nodes
believe that this is a ‘fresher’ route.
iii. Impersonate a node D by forging a RREP with its address as a destination
address.
iv. Impersonate a node by forging a RREP that claims that the node is the
destination and, to increase the impact of the attack, claims to be a network
leader of the subnet SN with a big sequence number and send it to its
neighbours. In this way it will became (at least locally) a black hole for the
whole subnet SN.
v. Selectively, not forward certain RREQs and RREPs, not reply to certain RREPs
and not forward certain data messages. This kind of attack is especially hard
to even detect because transmission errors have the same effect.
vi. Forge a RERR message pretending it is the node S and send it to its neighbour
D. The RERR message has a very high destination sequence number dsn for
one of the unreachable destinations (U). This might cause D to update the
destination sequence number corresponding to U with the value dsn and,
therefore, future route discoveries performed by D to obtain a route to U will
fail (because U’s destination sequence number will be much smaller than the
one stored in D’s routing table).
vii. According to the current AODV draft, the originator of a RREQ can put a
much bigger destination sequence number than the real one. In addition,
sequence numbers wraparound when they reach the maximum value allowed
by the field size. This allows a very easy attack in where an attacker is able to
set the sequence number of a node to any desired value by just sending two
RREQ messages to the node.
an initial random value, called seed. The chain construction allows nodes to
verify the authenticity of the disclosed keys. Loosely time synchronized and
MAC (Message Authentication Code) generations are required. Revelation of
session keys by the base-station is delayed, thus allowing nodes to verify the key
validity.
5. Multilevel μTESLA is designed to reduce the need to reinitialize the network by
implementing multiple levels of key chains, in which high-level keys are used to
communicate root-keys (or commitments) for low-level chains, which are used in
turn for broadcast authentication as in standard μTESLA. Network lifetime is
extended. Significant computation and storage are required. Receivers can’t deal
with the received messages instantly and have to store them within one or
several time intervals. Considering the broadcasting of urgent messages like
alerts and alarms; the TESLA family has great shortcomings in dealing with such
matters. Furthermore, the delayed authentication can be subject to Denial-of-
Services (DoS) attacks.
6. Merkle tree utilization was introduced to overcome this shortage in bandwidth
and storage resources utilization. TIK was proposed to achieve immediate
authentication based on sensitive time synchronization between the sink and the
receiving nodes. However, this technique is not suitable for WSNs. Sensor nodes
have a limited battery life, which can make using asymmetric key techniques
impractical as they use much more energy for their mathematical calculations.
5. Confidentiality
Confidentiality ensures that data is only available to those authorized to obtain it.
6. Denial-of-service attack
The denial of service attack is an attempt to make a node resource unavailable to
its intended users.
7. Small challenge attack
This attack challenges the backward hashing with small values to respond with
the chain initial values.
8. Limitation for an N times authentications
Process re-initialization after N of authentications is necessary.
Each receiver also checks that the disclosed key is correct (using self-
authentication and previously released keys) and then checks the correctness of
the MAC of buffered packets that were sent in the time interval of the disclosed
key. If the MAC is correct, the receiver accepts the packet.
One-way chains have the property that if inter-mediate values of the one-way
chain are lost, they can be recomputed using later values. So, even if some
disclosed keys are lost, a receiver can recover the key chain and check the
correctness of packets. The sender distributes a stream of messages {Mi}, and the
sender sends each message Mi in a network packet Pi along with authentication
information. The broadcast channel may be lossy, but the sender does not
retransmit lost packets. Despite packet loss, each receiver needs to authenticate all
the messages it receives.
Sender Setup
(i) TESLA uses self-authenticating one-way chains. The sender divides the time into
uniform intervals of duration Tint. Time interval 0 will start at
timeT0,timeinterval 1 at timeT1=T0+Tint, etc. The sender assigns one key from
the one-way chain to each time interval in sequence. The one-way chain is used
in the reverse order of generation, so any value of a time interval can be used to
derive values of previous time intervals. The sender determines the length N of
the one-way chain K0,K1,...,KN, and this length limits the maximum transmission
duration before a new one-way chain must be created.
(ii) The sender picks a random value for KN. Using a pseudo-random function f, the
sender constructs the one-way function F:F(k) = fk(0). The remainder of the chain
is computed recursively using Ki= F(Ki+1).
(iii) Note that this gives Ki = FN−i(KN), so one can compute any value in the key chain
from KN even if it does not have intermediate values. Each key Ki will be active in
time interval i.
(iv) The time synchronization property that TESLA requires is that each receiver can
place an upper bound of the sender’s local time.
(v) The sender sends the key disclosure schedule by transmitting the following
information to the receivers over an authenticated channel (either via a digitally
signed broadcast message, or over unicast with each receiver),
Time interval schedule - Interval duration Tint, start time Ti and index
of interval i, length of one-way key chain. There is Key disclosure delay d
(number of intervals). A key commitment to the key chain Ki( i< j−d where j is the
current interval index).
(B) Broadcasting authenticated messages - Each key in the one-way key chain
corresponds to a time interval. Every time a sender broadcasts a message, it
appends a MAC to the message, using the key corresponding to the current time
interval. The key remains secret for the nextd−1 intervals, so messages sent in
interval j effectively disclose key Kj−d.
(C) Authentication at receiver - When a sender discloses a key, all parties
potentially have access to that key. An adversary can create a bogus message and
forge a MAC using the disclosed key. So as packets arrive, the receiver must
verify that their MACs are based on safe keys: a safe key is one that is only
known by the sender, and safe packets or safe messages have MACs computed
with safe keys. Receivers must discard any packet that is not safe, because it may
have been forged.
10. TESLA security considerations
The security of TESLA relies on the following assumptions,
The receiver’s clock is time synchronized up to a maximum error of ∆. (because of
clock drift, the receiver periodically resynchronizes its clock with the sender.)
The functions F, F′are secure PRFs, and the function F furthermore provides weak
collision resistance.
the authentication key is disclosed. This operation may create storage problems, and
encourages DoS types of attacks.
μTESLA has been expanded to Multi-level μTESLA by simplifying the key
distribution phase and introducing a new concept of a multi-level key chain generation
using pseudo-random functions that improves the protocol efficiency. Multi-level
μTESLA reduces the need to reinitialize the network (although re-initialization is still
required) by implementing multiple levels of key chains, in which high-level keys are
used to communicate root-keys (or commitments) for low-level chains which are used in
turn for broadcast authentication as in standard μTESLA.
The chains are further connected in that each root-key is derived from the
corresponding high-level chain using another pseudo-random function. Network lifetime
is extended many times over, but it is still limited. A problem would result if a receiver
dropped a related commitment distribution message initializing a new low-level chain; it
would be unable to verify any broadcast data received during this entire lifetime of the
chain itself. The data would still be verifiable eventually as the receiver could use any
later commitment distribution message to reconstruct all the lost high-level keys and the
corresponding chains. This would require significant computation and storage.
they last ‘l’ time intervals. The Salt key is used by the sender to create the SEALs
and is required for authentication of SEALs at the receiver. The SEALs are
generated recursively by applying a pseudo-random function F as follows: S<i;j>
= FS<i;j+1>(Kj+1); for (1 <= i <= t) and (1 <= j <= l). The use of the Salt key forces an
attacker to obtain the pre-image of the Salt chain as a pre-requisite to finding the
pre-images of the SEAL chains. Therefore an attacker cannot precompute the
SEALs for subsequent time periods without knowledge of the Salt key.
6. At the beginning of each active interval, the sender broadcasts the value of the
active Salt (Ki) to the receivers. The dotted box in above Fig. 7.9.1 shows an active
time interval with the associated Salt key and SEALs. To sign a message m
during the active interval i, the sender creates a hash of the message h = H(mjc),
which is used to seed a hash function Gh () used to produce a signature; where c
is a counter that is incremented when a signature could not be obtained.
7. The sender uses the hash function Gh() on the t SEALs and observes any k-way
collisions from distinct SEALs. That is, S<1;i> != S<2;i> != .. != S<k;i> such that
Gh(S<1;i>) = Gh(S<2;i>).. = Gh(S<k;i>). The k SEALs that result in a collision form
the signature and are then sent together with the message as (< S1; .. ; Sk > || m).
8. The receiver then authenticates the message if Gh(S1) = .. = Gh(Sk) and S1 != .. !=
(Sk).
During signature generation, it is possible that Gh() applied on all t SEALs fails to
produce at least k collisions, in which case a signature cannot be formed. The
counter c serves to get a different hash value h in the event that Gh() fails to
produce at least k collisions from all t SEALs. The receiver is assumed to know
the value k, the hash function H and hash function family G.
9. The security of the BiBa protocol relies on the fact that a potential attacker
knows fewer SEALs than the sender with which to forge a signature. Therefore
the sender only reveals the SEALs that are used in creating a signature. The
receiver is able to verify that an adversary has a smaller number of SEALs with
which to forge a false signature by relying on time synchronization. The BiBa
protocol requires loose synchronization between the sender and receiver. When a
receiver receives a signed message, it verifies that the sender has not yet revealed
r SEALs based on synchronization. If the sender and receivers have a maximum
synchronization error of ∂, the sender can only send at most (r = k) messages
within ∂ time without compromising the security, where r is the maximum
number of active SEALs an attacker is allowed to know and k is the number of
SEALs revealed in one message.
10. Protocol messages
Figure below shows the structure of the messages sent by the BiBa protocol. A
description of the structure of the protocol messages sent to facilitate
authentication using BiBa instances is given below. Reference is made to Fig. 7.9.2
to describe the different fields of the messages.
S1...SK - Part of the signature formed by the k SEALs that resulted in a collision. The
size depends on the value of k.
C - The counter that is incremented when a signature is not obtained, which is part
of the signature.
11. Fig. 7.9.3 shows the actions applied to application messages as they traverse
through the different layers. The reverse operation is performed at the receiver.
The application generates messages as described in the Title-24 specification. The
messages are then delivered to the System operator who encrypts them for
authentication purposes and sends them over the RDS network. The messages
are sent over the RDS network as type-11A groups.
Each RDS group can only carry 4 bytes of data, so the message is fragmented into
multiple RDS groups and sent over the network. The receiver reconstructs the messages
from the multiple RDS groups and sends it up the protocol stack to the security layer.
The security layer then authenticates the messages and present them to the application
layer if the authentication is successful.
corrupting and forwarding the packets in wrong routes. This may also lead to network
partitioning and communication of false sensor readings. In addition, if the attacker
gains physical access to the entire network, it is possible for him to copy the
cryptographic keys and use these keys for message communication from the replicated
node. The attacker can also place the replicated node in strategic locations in the
network so that he could easily manipulate a specific segment of the network, possibly
causing a network partitioning.
Q.8 What do you mean by symmetric and asymmetric key management ?
Ans. : Depending on the difference of cryptosystem, the wireless sensor network key
management can be divided into symmetric key management and asymmetric key
management. In symmetric key management, the encryption and decryption key of
the sensor node are the same, which is simple, and it has a small calculation and
storage amount. Comparing with the asymmetric key, the symmetric key has an
advantage in terms of computational complexity, but it is inadequate in the aspects of
key management and security. Asymmetric key management has been considered
unsuitable for wireless sensor networks, mainly due to its relatively high requirement
for computing, storage, and communication capabilities of nodes. But with the gradual
deepening of the relevant studies, some asymmetric encryption algorithms can now be
applied in wireless sensor networks.
Q.9 Explain distributed and hierarchical key management.
Ans. : Depending on the topology of network, the wireless sensor network key
management can be divided into distributed key management and hierarchical key
management. In distributed key management, the computation and communication
capabilities of sensor nodes are the same, and the key negotiation and update are
completed through the mutual cooperation between sensor nodes. In hierarchical key
management, network nodes are split into clusters, and each cluster is composed of
cluster head and ordinary sensor nodes. The ordinary sensor nodes complete key
distribution, consultation, and update through their cluster head. The characteristic of
distributed key management is that the neighbouring nodes collaborate to achieve key
negotiation. The feature of hierarchical key management is that the requirement of
computation and storage capacities of the common nodes is not too high, but once the
cluster head is captured by the attacker, it will threaten the security of the entire
network.
Q.10 What are various TESLA security considerations ?
Ans. : The security of TESLA relies on the following assumptions,
The receiver’s clock is time synchronized up to a maximum error of ∆. (because
of clock drift, the receiver periodically resynchronizes its clock with the
sender.)
The functions F, F′are secure PRFs, and the function F furthermore provides
weak collision resistance.
Q.11 On what factor does the security BiBa protocol relies ?
Ans. : The security of the BiBa protocol relies on the fact that a potential attacker knows
fewer SEALs (SElf Authenticating vaLues ) than the sender with which to forge a
signature. Therefore the sender only reveals the SEALs that are used in creating a
signature. The receiver is able to verify that an adversary has a smaller number of
SEALs with which to forge a false signature by relying on time synchronization. The
BiBa protocol requires loose synchronization between the sender and receiver. When a
receiver receives a signed message, it verifies that the sender has not yet revealed
r SEALs based on synchronization. If the sender and receivers have a maximum
synchronization error of ∂, the sender can only send at most (r = k) messages within ∂
time without compromising the security, where r is the maximum number of active
SEALs an attacker is allowed to know and k is the number of SEALs revealed in one
message.
Notes
Contents
8.1 Sensor Node Hardware
8.2 Motes and Berkeley Motes
8.3 Sensor Network Programming Challenges
8.4 Node-Level Software Platforms
8.5 WSN Simulators
8.6 WSN Programming and Programming Beyond Individual Node
8.7 State Centric Programming
8.8 Two Marks Questions with Answers [Part - A]
8.9 Long Answered Questions [Part - B]
(8 - 1)
Ad hoc and Wireless Sensor Networks 8-2 Sensor Network Platforms and Tools
2. Relay node - It is a midway node used to communicate with the adjacent node. It
is used to enhance the network reliability. A rely node is a special type of field
device that does not have process sensor or control equipment and as such does
not interface with the process itself. A distinctive rely node processor speed is
about 8 MHz, having 8 kB of RAM, 128 kB flash and preferably 916 MHz of radio
frequency.
3. Actor node - It is a high end node used to perform and construct a decision
depending upon the application requirements. Typically these nodes are resource
rich devices which are outfitted with high quality processing capabilities, greater
transmission powers and greater battery life. A distinctive actor node processor
capability is about 8 MHz, having 16 kB of RAM, 128 kB flash and preferably
916 MHz of radio frequency.
4. Cluster head - It is a high bandwidth sensing node used to perform data fusion
and data aggregation functions in WSN. Based on the system requirements and
applications, there will be more than one cluster head inside the cluster. A
distinctive cluster head processor is about 4 - 8 MHz, having 512 kB of RAM,
4 MB flash and preferably 2.4 GHz of radio frequency. This node assumed to be
highly reliable, secure and is trusted by all the nodes in the sensor network.
5. Gateway - Gateway is an interface between sensor networks and outside
networks. Compared with the sensor node and cluster head the gateway node is
most powerful in terms of program and data memory, the processor used,
transceiver range and the possibility of expansion through external memory. A
distinctive gateway processor speed is about 16 MHz, having 512 kB of RAM,
32 MB flash and preferably 2.4 GHz of radiofrequency.
6. Base station - It is an extraordinary type of nodes having high computational
energy and processing capability.
Clusters in WSN
Cluster is a collection of group of sensor nodes in that particular sensor field. There
may be more than one cluster in WSN. Based on the parameters like computation rate,
processing speed, storage, and communication range, sensor nodes are identified and
selected for WSN formation. Based on the node properties the sensor networks are
classified into two types, homogenous sensor networks and heterogeneous sensor
networks. In homogenous sensor networks, all sensor nodes have the same property in
terms of computation, communication, memory, energy level and reliability. In
heterogeneous sensor networks, the nodes are of different capabilities in terms of
computation, communication, memory, energy level and reliability. If all the sensor nodes
within the cluster are having the same properties (homogenous) it is referred as
Distributed WSN (DWSN). Otherwise if the sensor nodes have different
properties(heterogeneous) it is called as hierarchical WSN(HWSN). The distributed and
hierarchical WSN is shown in below Fig. 8.1.1.
Senor nodes in an open environment regularly sense the physical and environmental
changes and transmit the information to the centralized server called a gateway. The
computational rate and interaction of sensor nodes with the physical environment is
different for different nodes in the network. In real time, sensor nodes are more
constrained in its computational energy and storage resources.
The sensor nodes are intelligent to observe an extensive diversity of ambient
circumstances that includes flow, temperature, pressure, humidity, moisture, noise levels,
mechanical stress, speed, etc. Many new applications are being developed due to the new
concept of micro sensing and wireless networking for these smart sensing devices. Some
of the possible assorted applications of WSN ’s are temperature control, inventory
management, physiological monitoring, habitat monitoring, precision agriculture, forest
fire detection, nuclear, chemical, and biological attack detection, military, transportation,
disaster relief, and environmental monitoring.
1. The Sensing units are usually composed of two subunits - sensors and analog to
Digital Converters (ADCs). The analog signals produced by the sensors are
converted to digital signals by the ADC, and then fed into the processing unit.
2. The processing unit is generally associated with a small storage unit and it can
manage the procedures that make the sensor node collaborate with the other
nodes to carry out the assigned sensing tasks.
3. A transceiver unit connects the node to the network.
4. The power unit is one of the most important components of a sensor node. Power
units can be supported by a power scavenging unit such as solar cells. The other
subunits, of the node are application dependent.
In order for a WSN to operate properly, the sensor nodes require an operating system,
a routing protocol, and a simulator.
3. Using flash memory, the remote nodes acquire data on command from a base
station, or by an event sensed by one or more inputs to the node. Moreover, the
embedded firmware can be upgraded through the wireless network in the field.
4. The microprocessor has a number of functions as listed below,
Managing data collection from the sensors
Performing power management functions
Interfacing the sensor data to the physical radio layer
Managing the radio network protocol
5. A key aspect of any wireless sensing node is to minimize the power consumed by
the system. Usually, the radio subsystem requires the largest amount of power.
Therefore, data is sent over the radio network only when it is required.
6. An algorithm is to be loaded into the node to determine when to send data based
on the sensed event. Furthermore, it is important to minimize the power
consumed by the sensor itself. Therefore, the hardware should be designed to
allow the microprocessor to judiciously control power to the radio, sensor, and
sensor signal conditioner.
1. Fault tolerance - Each node in the network is prone to unanticipated failure. Fault
tolerance is the capability to maintain sensor network functionalities without any
break due to sensor node failures.
2. Mobility of nodes - In order to increase the communication efficiency, the node
scan move anywhere within the sensor field based on the type of applications.
3. Dynamic network topology - Connection between sensor nodes follows some
standard topology. The WSN should have the capability to work in the dynamic
topology.
4. Communication failures - If any node in the WSN fails to exchange data with
other nodes, it should be informed without delay to the base station or gateway
node.
5. Heterogeneity of nodes - The sensor nodes deployed in the WSN may be of
various types and need to work in a cooperative fashion.
6. Scalability - The number of sensor nodes in a sensor network can be in the order
of hundreds or even thousands. Hence, WSN designed for sensor networks is
supposed to be highly scalable.
7. Independency - The WSN should have the capability to work without any central
control point.
8. Programmability - The option for reprogramming or reconfiguring should be
available for the WSN to become adaptive for any dynamic changes in the
network.
9. Utilization of sensors - The sensors should be utilized in a way that produces the
maximum performance with less energy.
10. Impracticality of public key cryptosystems - The limited computation and power
resources of sensor nodes often make it undesirable to use public key algorithms.
11. Lack of a prior knowledge of post - deployment configuration - If a sensor
network is deployed via random distribution, the protocols will not be aware of
the communication status between each nodes after deployment
8.1.4 WSN Sensor Node Types based on their Working in the Network
As wireless sensor nodes are typically very small electronic devices, they can only be
equipped with a limited power source. Each sensor node has a certain area of coverage
for which it can reliably and accurately report the particular quantity that it is observing.
Several sources of power consumption in sensors are namely,
a) Signal sampling and conversion of physical signals to electrical ones.
b) Signal conditioning.
c) Analog-to-digital conversion.
There are three categories of sensor nodes as follows,
1. Active sensors - these sensors actively probe the environment. The hardware
platforms for these sensors are listed below.
i) Mica nodes - The Mica2 (MPR400) and MicaZ (MPR2400) nodes,
manufactured by Crossbow Technologies, are typical third-generation
wireless sensor nodes. They are compatible with the open-source TinyOS
embedded operating system which provides a component-based protocol
implemented in the nesC concurrent extension to the C language. The Mica2
and MicaZ feature an Atmel ATmega128L 8-bit processor running at 7 MHz.
The modular design allows external sensor boards to be attached to a main
processing and transceiver board, decoupling sensing and allowing
application flexibility via the integration of custom sensors to meet specific
scenario objectives. Power is supplied via either an external connector or
onboard mounting for two AA batteries, which typically provide a current
capacity of 2000 mAh, although lithium ion (Li-On) batteries can provide a
maximum of 2800 mAh. The Mica nodes, with attached battery connector, and
an associated base station with power and connectivity to a management
computer supplied over Universal Serial Bus (USB). The Chipcon CC1000
transceiver of the Mica2 operates on the 868/915 MHz band. Its data rate of
38.4 kbps provides for messaging applications, and the choice of simple and
robust modulation techniques, such as Frequency-Shift Keying (FSK) and
On-Off Keying (OOK), giving good error tolerance and imposing little in
terms of synchronization and channel estimation demands, with consequent
power efficiency. The Chipcon CC2420 radio transceiver of the MicaZ
operates on the 2.4 GHz Industrial, Scientific and Medical band, on which
users may operate licence-free in the UK. It is compliant with the
IEEE 802.15.4 standard, and operates at the increased data rate of 250 kbps,
with more complex modulation scheme of Direct Sequence Spread Spectrum
(DSSS) with Offset Quaternary Phase-Shift Keying (O-QPSK). The increased
data rate enables higher data rates from the end source, enabling continuous
reporting scenarios that encroach upon the field of ad-hoc networking.
ii) Jennic nodes - A more recent development in WSN technology is provided by
the Jennic nodes from NXP Semiconductor. The JN5148 nodes provide a
richer computing environment than the Mica nodes, with 32-bit RISC
processors and 128 kB of RAM and ROM. Specialist physical interfaces also
allow significantly more data to be sampled, with a digital audio interface
allowing audio sampling for phenomena detection. Peak data rates of up to
500 kbps and 667 kbps allow the potential for transmission of low-rate
multimedia data such as audio and (with hardware assistance) video. The
protocol environment employed is also focused upon enabling higher-layer
solutions, with no direct official support for the de-facto standard TinyOS
environment in favour of a custom JenNet suite. Accordingly, the nodes and
associated technologies are typically marketed at system integrator usage, for
example, industrial applications, rather than for direct research. The JenNet
protocols provide application integrators with custom higher layer
abstractions built upon Zigbee.
2. Passive sensor : These are self powered. Passive sensor nodes sense the
environment without manipulating it by active probing. In this case, the energy is
needed only to amplify their analog signals. There is no notion of “direction” in
measuring the environment.
3. Omni directional sensors : Omnidirectional sensors have no notion of direction
involved in their measurements.
4. Passive, narrow-beam sensors : These sensors are passive and they are concerned
about the direction when sensing the environment.
8.2 Motes and Berkeley Motes
8.2.1 Motes Concept
1. WSN is built by connecting a group of nodes together to perform the required
tasks. These nodes cooperate and automatically create a network among
themselves. One of the most common wireless sensor node, also commonly
known as mote.
2. Mote is computing concept. This concept is also called smart dust and wireless
sensing networks. At one point, just about every issue of Popular Science,
Discover and Wired today contains a blurb about some new application of the
mote idea. For example, the military plans to use them to gather information on
battlefields, and engineers plan to mix them into concrete and use them to
internally monitor the health of buildings and bridges.
3. There are thousands of different ways that motes might be used, and as people
get familiar with the concept they come up with even more. It is a completely new
paradigm for distributed sensing and it is opening up a fascinating new way to
look at computers.
4. The "mote" concept is a new way of thinking about computers, but the basic idea
is pretty simple,
1. The core of a mote is a small, low-cost, low-power computer.
2. The computer monitors one or more sensors. It is easy to imagine all sorts of
sensors, including sensors for temperature, light, sound, position,
acceleration, vibration, stress, weight, pressure, humidity, etc. Not all mote
applications require sensors, but sensing applications are very common.
3. The computer connects to the outside world with a radio link. The most
common radio links allow a mote to transmit at a distance of something like
10 to 200 feet (3 to 61 meters). Power consumption, size and cost are the
barriers to longer distances. Since a fundamental concept with motes is tiny
size (and associated tiny cost), small and low-power radios are normal.
5. Motes can either run off of batteries, or they can tap into the power grid in certain
applications. As motes shrink in size and power consumption, it is possible to
imagine solar power or even something exotic like vibration power to keep them
running. All of these parts are packaged together in the smallest container
possible. It is more common for motes today, including batteries and antenna, to
be the size of a stack of five or six quarters, or the size of a pack of cigarettes. The
battery is usually the biggest part of the package right now.
6. Typical applications of motes
i. One can embed motes in bridges when one pours the concrete. The mote
could have a sensor on it that can detect the salt concentration within the
concrete. Then once a month one can drive a truck over the bridge that sends
a powerful magnetic field into the bridge. The magnetic field would allow the
motes, which are burried within the concrete of the bridge, to power on and
transmit the salt concentration. Salt (perhaps from deicing or ocean spray)
weakens concrete and corrodes the steel rebar that strengthens the concrete.
Salt sensors would let bridge maintenance personnel gauge how much
damage salt is doing. Other possible sensors embedded into the concrete of a
bridge might detect vibration, stress, temperature swings, cracking, etc., all of
which would help maintenance personnel spot problems long before they
become critical.
ii. Sensors can be connected to a mote that can monitor the condition of
machinery such as temperature, number of revolutions, oil level, etc. and log
it in the mote's memory. Then, when a truck drives by, the mote could
transmit all the logged data. This would allow detailed maintenance records
to be kept on machinery (for example, in an oil field), without maintenance
personnel having to go measure all of those parameters themselves.
iii. Motes can be attached to the water meters or power meters in a
neighborhood. The motes would log power and water consumption for a
customer. When a truck drives by, the motes get a signal from the truck and
they send their data. This would allow a person to read all the meters in a
neighborhood very easily, simply by driving down the street.
4. Hardware Platform
- The processing unit
i. MCU (ATMEL 90LS8535), an 8-bit architecture with 16-bit addresses
ii. Provides 32 8-bit general registers and runs at 4 MHz and 3.0 V
iii. Has 8 kB flash as the program memory and 512 Bytes of SRAM as the data
memory
iv. MCU is designed such that the processor cannot write to instruction memory;
the prototype uses a coprocessor to perform this function
v. The processor integrates a set of timers and counters which can be configured
to generate interrupts at regular time intervals
vi. Three sleep modes : idle (shuts off the processor), power down (shuts off
everything, but the watchdog and asynchronous interrupt logic necessary to
wake up), power save (keep asynchronous timer on)
- The sensing units
i. contains two sub-components: photo sensor and temperature sensor.
ii. photo sensor represents an analog input device with simple control lines
which eliminate power drain through the photo resistor when not in use.
iii. temperature sensor (Analog Devices AD7418) represents a large class of
digital sensors which have internal A/D converters and interface over a
standard chip-to-chip protocol (the synchronous two-wire I2C protocol with
software on the micro-controller. synthesizing the I2C master over general I/O
pins. There is no explicit arbiter and bus negotiations are carried out by the
software on the micro-controller.
- The transceiver unit
i. Consist of an RF Monolithics 916.50 MHz transceiver (TR1000), antenna, and a
collection of discrete components to configure the physical layer
characteristics such as signal strength and sensitivity.
ii. Operates in an ON-OFF key mode at speeds up to 19.2 kbps.
iii. Control signals configure the radio to operate in either transmit, receive, or
power-off mode.
iv. The radio contains no buffering, so each bit must be serviced by the controller
on time.
v. The transmitted value is not latched by the radio, so the jitter at the radio
input is propagated into the transmission signal.
- The transceiver unit is an Energizer CR2450 lithium battery rated at 575 mAh.
– Each component declares the commands it uses and the events it signals.
– These declarations are used to compose the modular components in a per-
application configuration.
– The composition process creates layers of components where higher-level
components issue commands to lower-level components and lower-level
components signal events to the higher-level components.
i) Frames
– Fixed-size and statistically allocated which allows us to know memory
requirements of a component at a compile time - prevents overhead associated
with dynamic allocation.
ii) Commands
– Non-blocking requests made to lower level components.
– Typically, a command will deposit request parameters into its frame and
conditionally post a task for later execution.
– Can invoke lower commands, but it must not wait for long.
– Must provide feedback to its caller by returning status indicating whether it was
successful or not.
iii) Event handlers
– Invoked to deal with hardware events, either directly or indirectly.
– The lowest level components have handlers connected directly to hardware
interrupts which may be external interrupts, timer events, or counter events.
– An event handler can deposit information into its frame, post tasks, signal higher
level events or call lower level commands.
iv) Event handlers
– In order to avoid cycles in the command/event chain, commands cannot signal
events.
– Both signals and events are intended to perform a small, fixed amount of work,
which occurs within the context of their component’s state.
v) Tasks
– Perform the primary work.
– Atomic entities with respect to other tasks, run to completion and can be
preempted by events.
– Can call lower level commands, signal higher level events, and schedule other
tasks within a component.
6. As sensor nodes deeply embed into the physical world, a sensor network should
be able to respond to multiple concurrent stimuli at the speed of changes of the
physical phenomena of interest. There no single universal design methodology
for all applications.
7. Depending on the specific tasks of a sensor network and the way the sensor nodes
are organized, certain methodologies and platforms may be better choices than
others. For example, if the network is used for monitoring a small set of
phenomena and the sensor nodes are organized in a simple star topology, then a
client-server software model would be sufficient. If the network is used for
monitoring a large area from a single access point(i.e., the base station), and if
user queries can be decoupled into aggregations of sensor readings from a subset
of nodes, then a tree structure that is rooted at the base station is a better choice.
8. However, if the phenomena to be monitored are moving targets, as in the target
tracking, then neither the simple client-server model nor the tree organization is
optimal. More sophisticated design and methodologies and platforms are
required for efficient execution of overall network operations.
8.4.2.1 Architecture
1. The organization of an OS constitutes its structure. The architecture of an OS has
an impact on the size of the OS kernel as well as on the way it provides services to
the application programs. Some of the well known OS architectures are the
monolithic architecture, the micro-kernel architecture, the virtual machine
architecture and the layered architecture.
2. A monolithic architecture in fact does not have any structure. Services provided
by an OS are implemented separately and each service provides an interface for
other services.
3. A microkernel architecture is another architecture in which minimum
functionality is provided inside the kernel. Thus, the kernel size is significantly
reduced. Most of the OS functionality is provided via user-level servers like a file
server, a memory server, a time server, etc. If one server fails, the whole system
does not crash.
4. A virtual machine architecture has an idea to export virtual machines to user
programs, which resemble hardware. A virtual machine has all the needed
hardware features. The key advantage is its portability and a main disadvantage
is typically a poor system performance.
5. A layered OS architecture implements services in the form of layers that are
manageable, easy to understand, and reliable.
6. An OS for a Wireless Sensor Network should have an architecture that results in a
small kernel size, hence small memory footprint. The architecture must allow
extensions to the kernel if required.
8.4.2.3 Scheduling
1. The Central Processing Unit (CPU) scheduling determines the order in which
tasks are executed on a CPU. In traditional computer systems, the goal of a
scheduler is to minimize latency, to maximize throughput and resource
utilization, and to ensure fairness.
2. WSNs are being used in both real-time and non-real-time environments, therefore
a WSN OS must provide scheduling algorithms that can accommodate the
application requirements. Moreover, a suitable scheduling algorithm should be
memory and energy efficient.
8.4.3.1 TinyOS
Specially designed for sensor network, TinyOS is an open source, flexible, component
based, and application-specific operating system. TinyOS supports concurrent programs
with very low memory requirements. The OS has a footprint that fits in 400 bytes. The
TinyOS component library includes network protocols, distributed services, sensor
drivers, and data acquisition utility.
TinyOS Architecture
TinyOS falls under the monolithic architecture class which is depicted in Fig. 8.4.2
TinyOS uses the component model and, according to the requirements of an application,
different components are glued together with the scheduler to compose a static image
that runs on the mote. A component is an independent computational entity that exposes
one or more interfaces. Components have three computational abstractions: commands,
events, and tasks. Mechanisms for inter-component communication are commands and
5. For communication between the application threads and the kernel, TinyOS 2.1
provides message passing. When an application program makes a system call, it
does not directly execute the code. Rather it posts a message to the kernel thread
by posting a task.
6. Afterwards, the kernel thread preempts the running thread and executes the
system call. This mechanism ensures that only the kernel directly executes TinyOS
code. System calls like Create, Destroy, Pause, Resume and Join are provided by
the TOS threading library.
7. TOS threads dynamically allocate Thread Control Blocks (TCB) with space for a
fixed size stack that does not grow over time. TOS Threads context switches and
system calls introduce an overhead of less than 0.92 % as proven practically.
8. Earlier versions of TinyOS imposed atomicity by disabling the interrupts, i.e.,
telling the hardware to delay handing the external events until after the
application completed an atomic operation. This scheme works well on
uniprocessor systems.
9. Critical section can occur in the user level threads and the designer of the OS does
not want the user to disable the interrupts due to system performance and
usability issues. This problem is circumvented in TinyOS version 2.1. It provides
synchronization support with the help of condition variables and mutexes. These
synchronization primitives are implemented with the help of special hardware
instructions e.g., test & set instruction.
TinyOS Scheduling
1. Earlier versions of TinyOS supported a non-preemptive First-In-First-Out (FIFO)
scheduling algorithm. Therefore, those versions of TinyOS do not support real-
time application. The core of the TinyOS execution model are tasks that run to
completion in a FIFO manner.
2. Since TinyOS supports only non preemptive scheduling, task must obey run to
completion semantics. Tasks run to completion with respect to other task but they
are not atomic with respect to interrupt handlers, commands, and events they
invoke.
3. As TinyOS uses FIFO scheduling, disadvantages associated with FIFO scheduling
are also associated with the TinyOS scheduler. The wait time for a task depends
on the task’s arrival time. FIFO scheduling can be unfair to latter tasks especially
when short tasks are waiting behind longer ones.
8.4.3.2 Contiki
A light weight open source operating system Contiki is written in C for WSN sensor
nodes. Contiki is a highly portable OS and it is build around an event-driven kernel.
Contiki has preemptive multitasking that can be used at the individual process level. A
typical Contiki configuration consumes 2 kilobytes of RAM and 40 kilobytes of ROM. A
full Contiki installation includes features such as, multitasking kernel, preemptive
multithreading, proto-threads, TCP/IP networking, IPv6, a Graphical User Interface, a
web browser, a personal web server, a simple telnet client, a screensaver, and computing
in virtual network.
Contiki Architecture
1. The Contiki OS has the modular architecture as shown in Fig. 8.4.3. At the kernel
level it follows the event driven model, but it provides optional threading
facilities to individual processes.
2. The Contiki kernel comprises of a lightweight event scheduler that dispatches
events to running processes. Process execution is triggered by events dispatched
by the kernel to the processes or by a polling mechanism. The polling mechanism
is used to avoid race conditions. Any scheduled event will run to completion,
however, event handlers can use internal mechanisms for preemption.
3. Two kinds of events EW supported by Contiki OS - asynchronous events and
synchronous events. The difference between the two is that synchronous events
are dispatched immediately to the target process that causes it to be scheduled.
On the other hand asynchronous events are more like deferred procedure calls
that are en-queued and dispatched later to the target process.
4. The polling mechanism used in Contiki can be seen as high-priority events that
are scheduled in between each asynchronous event. When a poll is scheduled, all
processes that implement a poll handler are called in order of their priority.
5. All OS facilities e.g., senor data handling, communication, and device drivers are
provided in the form of services. Each service has its interface and
implementation. Applications using a particular service need to know the service
interface. Application is unaware of service implementation.
Contiki Scheduling
Contiki is an event-driven OS, therefore it does not employ any sophisticated
scheduling algorithm. Events are fired to the target application as they arrive. In case of
interrupts, interrupt handlers of an application run on priority basis.
3. Contiki does not provide any memory protection mechanism amongst various
applications.
(vi) Coffee uses wear leveling so as to spread sector erasures evenly to minimize the
risk of damaging some sectors much earlier than others. Coffee provides the
following APIs to the application programmers. Open(), read(), modify(), seek(),
append(),close().
2. Security support
Contiki does not provide support for secure communication.
3. Simulation support
Contiki provides sensor network simulations through cooja.
4. Language support
Cotiki supports application development in the C language.
5. Supported platforms
Contiki supports the following sensing platforms: Tmote , AVR series MCU.
6. Documentation support
Contiki documentation can be found on the Contiki home page at
http://www.sics.se/contiki.
8.4.3.3 MANTIS
A light weight and energy efficient operating system the MultimodAl system for
NeTworks of In-situ wireless Sensors (MANTIS) provides a new multithreaded operating
system for WSNs. It has a footprint of 500 bytes, which includes kernel, scheduler, and
network stack. The MANTIS Operating System (MOS) key feature is that it is portable
across multiple platforms that is one can test MOS applications on a PDA or a PC.
Afterwards, the application can be ported to the sensor node. MOS also supports remote
management of sensor nodes through dynamic programming. MOS is written in C and it
supports application development in C.
MANTIS Architecture
1. MOS follows the layered architectural design as depicted in Fig. 8.4.4. In a layered
architecture, services provided by an OS are implemented in layers. Each layer
acts as an enhanced virtual machine to the layers above.
2. Following are the different services implemented at each layer of MOS.
Kernel Scheduler, COMM, DEV, MANTIS System API, Network Stack, and Command
Server comprises MOS.
Layer 3 : Network Stack, Command Server, and User Level Threads
Layer 2 : MANTIS system API
Layer 1 : Kernel/Scheduler, Communication Layer (MAC and PHY), and Device
Drivers
Layer 0 : Hardware
3. The MOS kernel only handles the timer interrupt, and all other interrupts are
directly sent to associated device drivers. When a device driver receives an
interrupt, it posts a semaphore in order to activate a waiting thread, and event
that has caused the interrupt is handled by the thread.
2. Whenever a thread is created, stack space is allocated by the kernel from the heap.
The stack space is returned to the heap once the thread exits.
3. The thread table is the main data structure that is being managed by the MOS
kernel. In the thread table, there is a one entry per thread. MOS statically allocates
memory for the thread table, therefore there can only be fixed maximum number
of threads, on the other hand the overhead of the thread table is fixed.
4. The maximum number of threads can be adjusted at the compile time, by default
it is 12. The thread table entry comprises 10 bytes and it contains : current stack
pointer, stack boundary information (base pointer and size), pointer to thread
starting function, thread priority level, and pointer to next thread.
5. Once a thread is suspended, its context is saved on the stack. Since each thread
table entry comprises 10 bytes and by default 12 threads can be created, the
associated overhead in terms of memory is 120 bytes. By default each thread gets
a time slice of 10 ms and a context switch happens with the help of timer
interrupts. System calls and posting of a semaphore operation can also trigger a
context switch.
6. Multithreading support in MOS comes at the cost of context switching and stack
memory overhead. It has been observed that each context switch incurs
60 microseconds overhead. In comparison to this, the default time slice is much
larger that is, 10 ms, so the context switch overhead is less than 1 %. A second cost
is the stack memory allocation. The default thread stack in MOS is 128 bytes and
MICA2 motes have a 4 kB RAM. Since the MOS kernel occupies only 500 bytes,
considerable space is available to support multithreading.
7. MOS avoids race conditions by using binary mutex and counting semaphores. A
semaphore in MOS is a 5 byte structure and it is declared by an application as
needed. The semaphore structure contains a lock or count byte along with head
and tail pointers attached.
MANTIS Scheduling
1. MOS uses preemptive priority-based scheduling. MOS uses a UNIX-like
scheduler with multiple priority classes and it uses the round robin approach
within each priority class. The length of time slice is configurable, by default it is
set to 10 milliseconds (ms). The scheduler uses a timer interrupt for context
switches.
2. Context switches are also triggered by system calls and semaphore operations.
Energy efficiency is achieved by the MOS scheduler by switching the
microcontroller to sleep mode when application threads are idle.
3. The ready queue of the MOS scheduler has five priorities, ranging from high to
low : Kernel, Sleep, High, Normal, and Idle. The scheduler schedules the highest
priority task in the ready queue.
4. The task either runs to completion or gets preempted if its time slice expires. For
time slicing, the MOS scheduler uses a 16 bit timer. When there is no thread in the
ready queue, the system goes to sleep mode. If the system is suspended on I/O,
the system enters the moderate idle sleep mode. If the application threads have
called the sleep() system call, the system switches into a deep power save sleep
mode.
5. A separate queue maintains the ordered list of threads that have called sleep(),
and is ordered by sleep time from low to high. The sleep priority in the ready
queue enables newly awoken threads to have the highest priority, so that they can
be serviced first after they wake up.
6. The MOS kernel maintains ready list head and tail pointers for each priority level.
There are five priority levels and these pointers consume 20 bytes in total. These
two pointers helps in fast addition and deletion of threads from a ready queue,
hence improve performance in manipulating threads list. MOS also uses a current
thread pointer of 2 bytes, an interrupt status byte, and one byte of flags. The total
static overhead for scheduling is 144 bytes.
7. The MOS scheduler uses round robin scheduling within the each priority class.
This means threads of the highest priority class can cause lower priority class
threads to starve. MOS use priority scheduling that may support real-time task
better than the TinyOS or Contiki schedulers. So as to handle real time tasks it
requires real-time schedulers like Rate Monotonic and Earliest Deadline First.
1. Simulation support
MANTIS supports wireless sensor network simulation through AVRORA.
2. Language support
MANTIS supports application development in the C language.
3. Supported platforms
MANTIS supports the following sensing platforms - Mica2, MicaZ, and Telos .
4. Shell
An implementation of a Unix-like shell comes with MANTIS that runs on the sensor
node.
5. Documentation support
MANTIS documentation can be found on the MANTIS home page at
http://mantisos.org.
8.4.3.4 Nano-RK
Real time WSN operating system Nano-RK is a fixed preemptive multitasking OS.
Nano-RK has support for multi-hop networking, priority-based scheduling, timeliness
and it has ability to schedule. Nano-RK has extended WSN lifetime, application resource
usage limits, and small footprint. Nano-RK uses 2 kb of RAM and 18 kb of ROM. Nano-
RK provides support for CPU, sensors, and network bandwidth reservations. Nano-RK
supports hard and soft real-time applications by the means of different real-time
scheduling algorithms, e.g., rate monotonic scheduling and rate harmonized scheduling.
Nano-RK provides networking support through socket-like abstraction. Nano-RK
supports FireFly and MicaZ sensing platforms.
Nano-RK Architecture
1. Nano-RK follows the monolithic kernel architecture model. Due to its real-time
nature, the authors of Nano-RK emphasis the use of a static design time
framework that is task priorities, deadlines, period, and their reservations should
be assigned offline, so that admission control procedures can be applied
efficiently.
2. Due to static approach, one can determine whether the task deadlines can be met
in the overall system design or not. Application programmers can change
different parameters (deadline, period, CPU reservation, and network bandwidth
reservation) associated with the tasks to arrive at a configuration that meets the
overall objectives.
3. Nano-RK also provides APIs through which task parameters can be configured at
run-time, but its use is discouraged, especially when a task represents hard real-
time jobs. Fig. 8.4.5 depicts the Nano-RK architecture.
Nano-RK Scheduling
1. Nano-RK provides priority scheduling at two levels namely, priority scheduling
at the process level and priority scheduling at the network level. To support real-
time applications, Nano-RK uses a fully preemptive priority driven scheduling
algorithm that is at any given instance the highest priority task is scheduled by
the operating system.
2. A rate monotonic scheduling algorithm is used for real-time periodic tasks and
the priority of the task is set statically based upon the period of the job: the shorter
the period of the job, the higher is its priority. Since rate monotonic scheduling
algorithm statically assigns priorities to tasks, Nano-RK recommends to configure
task parameters offline.
1. Language support
Nano-RK supports application development in the C language.
2. Supported platforms
Nano-RK supports sensing platforms such as MicaZ and FireFly.
3. Documentation support
Nano-RK is well documented and home page at:http://www.nano-rk.org has the
documentation.
8.4.3.5 LiteOS
Similar to Unix, LiteOS is a operating system designed for WSNs at the University of
Illinois at Urbana-Champaign. It has support for Unix like paradigm such as thread-based
programming mode (although it provides support to register event handlers using
callbacks), a hierarchical file system, support for object-oriented programming in the form
of LiteC++, and a Unix-like shell. The footprint of LiteOS is small enough to run on MicaZ
nodes having an 8 MHz CPU, 128 bytes of program flash, and 4 Kbytes of RAM. LiteOS is
primarily composed of three components namely, LiteShell, LiteFS, and the Kernel.
LiteOS Architecture
documentation does not detail how this functions are internally implemented that
is whether they are disabling interrupts or using mutexes.
LiteOS Scheduling
1. LiteOS kernel supports dynamic memory allocation through the use of C-like
malloc and free functions. User applications can use these APIs to allocate and de-
allocate memory at run-time. Dynamic memory grows in the opposite direction of
the LiteOS stack. The dynamic memory is allocated from the unused area between
the end of the kernel variables and the start of the user application memory
blocks. This allows adjusting the size of dynamic memory as required by the
application.
2. The LiteOS kernel compiles separately from the application, therefore the address
space is not shared between the kernel and the application. Similarly, each user
application has its separate address space. Processes and Kernel memory safety is
enforced through separate address spaces.
Resource Sharing
LiteOS provides APIs for synchronization of thread when it wants to access resources
that are shared by multiple threads. The LiteOS documentation does not provide any
detail on how system resources are shared among multiple threads that are running
concurrently.
(i) LiteOS provides support for a hierarchical file system called LiteFS. LiteFS
provides support for both files and directories. LiteFS is partitioned in three
modules. It keeps open file descriptors, memory allocation bit vectors, and
information about flash memory layout in RAM.
(ii) A second module resides in EEPROM and this module contains information about
the hierarchical directory structure. Thirdly, it uses flash to store data. As in the
Unix file system, files in LiteOS represent different entities, such as data,
application binaries, and device drivers.
(iii) The latest version of LiteFS supports eight file handlers in RAM and each handler
consumes eight bytes. Therefore, at most eight files can be opened
simultaneously. Two bit vectors are used to keep track of the current allocations
in EEPROM and flash.
(iv) The bit vector corresponding to the EEPROM consumes eight bytes and the bit
vector corresponding to the data flash consumes 32 bytes. In total LiteFS requires
104 bytes inside the RAM.
(v) LiteFS mounts all single hop nodes to the file system just like mounting a USB
device. It is important to note that since all single hop neighbors are mounted on a
PC running some version of Linux OS, a user with access to the PC can copy or
delete files on these nodes.
(vi) The user can copy a new binary executable from the PC to a particular node and
then it can issue an exec command to instruct the node to start executing the file.
2. Simulation support
LiteOS supports wireless sensor networks simulations through AVRORA.
3. Language support
LiteOS supports application development in the LiteC++ language.
4. Supported platforms
LiteOS supports sensing platforms such as MicaZ and AVR series MCU.
5. Documentation support
LiteOS documentation is available on LiteOS home page at : http://www.liteos.net.
Programming Ovent driven, Protothreads and events Threads. Threads. Threads and
Model support for TOS events.
threads.
Scheduling FIFO. Events are fired as they Five priority classes and Rate Monotonic and rate Priority based
occur interrupts execute further priorities in each harmonized scheduling. round robin
based on priority priority class. scheduling.
Ad hoc and Wireless Sensor Networks
Memory Static memory Dynamic memory Dynamic memory Static memory Dynamic memory
Management and management with management and linking. no management supported management and no management and it
Protection memory process address space but use is discouraged, memory protection. provides memory
8 - 49
6. The Simulink tool provides a wide range of library and simulation model blocks
but does not provide an adequate physical connection with the hardware devices
used in a Cyber-Physical System (CPS), and it is not possible to simulate complex
systems like WBAN or IEEE1451 standard architecture.
7. The main simulators for WSNs are discussed below :
(1) Avrora. Avrora is an emulator and a code level simulator. It is used to
emulate the sensor hardware or to process the program code as it would be on
a real hardware device. Avrora is a command-line framework compatible
with MEMSIC Mica2 and MicaZ sensor platforms.
(2) TOSSIM. It is an emulator for WSNs running TinyOS. The simulation
environment permits creating a common topology which runs exactly the
same TinyOS applications.
(3) COOJA. COOJA Simulator, by Swedish Institute of Computer Science, is an
open-source simulator for the Contiki sensor node operating system. The
simulator operates at three abstraction levels, the code level, the topology
control level, and the environment and wireless medium level.
(4) Atarraya. Atarraya is a simulator for topology construction and topology
maintenance in WSNs .
8. The main co-simulators for WSNs are discussed below :
(1) WCPS. In an open-source simulation environment for wireless control
systems, namely, Wireless Cyber-Physical Simulator (WCPS), has been
proposed. This solution integrates Simulink and the TOSSIM wireless sensor
simulator. WCPS has been used to manage the physical systems and the
wireless sensor-actuator networks used for control. Unfortunately, TOSSIM
simulator supports only TinyOS Operating System and the MICAZ hardware
platform.
(2) NCSWT. The Networked Control Systems Wind Tunnel (NCSWT), a new
integrated modeling and simulation tool for the evaluation of networked
control systems. NCSWT integrates MATLAB/Simulink and ns-2 simulator
using the High Level Architecture for an accurate time synchronization and
data communication in heterogenous simulations.
(3) PiccSIM. It is a new Platform for Integrated Communications and Control
design, Simulation, Implementation and Modeling (PiccSIM) composed of
Simulink and ns-2. The communication between the two frameworks, for
sending and receiving sensor data, time synchronization, and node position,
is network-based with UDP packets.
(4) GISOO. A new virtual test bed for simulation of wireless cyber physical
systems that integrates two state-of-the art simulators, Simulink and COOJA,
namely, GISOO, has been developed by the Swedish KTH Royal Institute of
Technology. The main base is the cross-level simulator COOJA, that permits
to manage (i) the code level simulators which emulate the sensor hardware,
the process and, simultaneously, permit executing the program code directly
on a real device;(ii) the topology control level simulators which are used to
study topology construction mechanisms;(iii) the environment and wireless
medium level simulators which offer the opportunity to simulate physical
phenomena. In addition to the COOJA features, GISOO integrates the
Simulink advantages, thus allowing to extend the three levels with a new one
for the cyber physical modeling.
passive- that is, it does not impact the behavior of the environment-then the
environment can be simulated separately or can even be stored in data files
for sensor nodes to read in. If, in addition to sensing, the network also
performs actions that influence the behavior of the environment, then a more
tightly integrated simulation mechanism is required.
4. Statistics and visualization - The simulation results need to be collected for
analysis. Since the goal of a simulation is typically to derive global properties
from the execution of individual nodes, visualizing global behaviors is
extremely important. An ideal visualization tool should allow users to easily
observe on demand the spatial distribution and mobility of the nodes, the
connectivity among nodes, link qualities, end-to-end communication routes
and delays, phenomena and their spatio-temporal dynamics, sensor readings
on each node, sensor nodes states, and node lifetime parameters (e.g., battery
power).
3. A sensor network simulator simulates the behavior of a subset of the sensor nodes
with respect to time.
4. Depending on how the time is advanced in the simulation, there are two types
of execution models :
(i) Cycle-driven simulation - A Cycle-Driven (CD) simulation discretizes the
continuous notion of real time into (typically regularly spaced) ticks and
simulates the system behavior at these ticks. At each tick, the physical
phenomena are first simulated, and then all nodes are checked to see if they
have anything to sense, process, or communicate.
Sensing and computation are assumed to be finished before the next tick.
Sending a packet is also assumed to be completed by then. However, the
packet will not be available for the destination node until next tick. This split-
phase communication is a key mechanism to reduce cyclic dependencies that
may occur in cycle-driven simulations. Most CD simulators do not allow
interdependencies within a single tick.
(ii) Discrete-event simulation - Unlike cycle-driven simulators, a discrete-event
(DE) simulator assumes that the time is continuous and an event may occur at
any time. As event is 2-tuple with a value and a time stamp indicating when
the event is supposed to be handled.
Components in a DE simulation react to input events and produce output events. In
node-level simulators, a component can be a sensor node, and the events can be
communication packets; or a component can be software module within and the events
can be message passing among these nodes. Typically, components are causal, in the
sense that if an output event is computed from an input event, then the time stamp of the
output should not be earlier than that of the input event. Non-causal components require
the simulators to be able to roll back in time, and worse, they may not define a
deterministic behavior of a system.
A DE simulator typically requires a global event queue. All events passing between
nodes or modules are put in the event queue and sorted according to their chronological
order. At each iteration of the simulation, the simulator removes the first event (the one
with earliest time stamp) from the queue and triggers the component that reacts to that
event in terms of timing behavior, a DE simulator is more accurate than a CD simulator,
and as a consequence, DE simulators run slower.
The overhead of ordering all events and computation, in addition to the values and
time stamps of events, usually dominates the computation time. At an early stage of a
design when only the asymptotic behaviors rather than timing properties are of concern,
CD simulations usually require less complex components and give faster simulations.
This is partly because of the approximate timing behaviors, which make simulation
results less comparable from application to application, there is no general CD simulator
that fits all sensor network simulation tasks. Many of the simulators are developed for
particular applications and exploit application-specific assumptions to gain efficiency.
DE simulations are sometimes considered as good as actual implementations, because
of their continuous notion of time and discrete notion of events. There are several open-
source or commercial simulators available.
One class of these simulators comprises extensions of classical network simulators,
such as ns-2, J-Sim (previously known as JavaSim), and GloMoSim/ Qualnet. The focus of
these simulators is on network modeling, protocol stacks, and simulation performance.
Another class of simulators, sometimes called software-in-the-loop simulators,
incorporate the actual node software into the simulation. For this reason, they are
typically attached to particular hardware platforms and are less portable. Example
include TOSSIM for Berkeley motes and Em* for Linux-based nodes such as Sensoria
WINS NG platforms.
2. While the original ns-2 only supports logical addresses for each node, the
wireless/mobile extension of it introduces the notion of node locations and a
simple wireless channel model. This is not a trivial extension, since once the nodes
move, the simulator needs to check for each physical layer event whether the
destination node is within the communication range. For a large network, this
significantly slows down the simulation speed.
3. There are two widely known efforts to extend ns-2 for simulating sensor networks
namely, SensorSim form UCLA and the NRL sensor network extension from
the Navy Research Laboratory. SensorSim also supports hybrid simulation,
where some real sensor nodes, running real applications, can be executed together
with a simulation. The NRL sensor network extension provides a flexible way of
modeling physical phenomena in a discrete event simulator.
4. Physical phenomena are modeled as network nodes which communicate with real
nodes through physical layers. The main functionality of ns-2 is implemented in
C++, while the dynamics of the simulation (e.g., time-dependent application
characteristics) is controlled by Tcl scripts. Basic components in ns-2 are the layers
in the protocol stack. They implement the handlers interface, indicating that they
handle events. Events are communication packets that are passed between
consecutive layers within one node, or between the same layers across nodes.
5. The key advantage of ns-2 is its rich libraries of protocols for nearly all network
layers and for many routing mechanisms. These protocols are modeled in fair
detail, so that they closely resemble the actual protocol implementations.
Examples include the following,
• TCP - reno, tahoe, vegas, and SACK implementations.
• MAC - 802.3, 802.11, and TDMA.
• Ad hoc routing - Destination Sequenced Distance Vector (DSDV) Routing,
Dynamic Source Routing (DSR), Ad hoc On-Demand Distance Vector (AOPDV)
Routing, and Temporarily Ordered Routing Algorithm (TORA).
• Sensor network routing - Directed diffusion, Geographical Routing (GEAR) and
Geographical Adaptive Fidelity (GAF) routing
10. High-level programming models are further divided into two types namely,
“group-level abstraction” and “network-level abstraction.” Group-level
abstractions provide a set of programming primitives to handle a group of nodes
as a single entity.
11. These define APIs for intra-group communications and thus make it easier for the
programmers to describe collaborative algorithms. Network-level abstractions, or
equivalently “macro-programming”, share the approach with group-level
abstractions, but go further by treating the whole network as a single abstract
machine. The sensor database approach, which allows users to query sensor data
by declarative SQL-like languages, falls within this category.
Research Laboratory. SensorSim also supports hybrid simulation, where some real
sensor nodes, running real applications, can be executed together with a simulation.
The NRL sensor network extension provides a flexible way of modeling physical
phenomena in a discrete event simulator.
Q.6 Explain energy and main memory constraint for a sensor node.
Ans. : The main and most critical resources are energy (which is typically provided by a
battery) and very limited main memory that often allows storing only a few kilobytes.
The micro-controller used in a wireless sensor node operates at low frequency
compared to traditional contemporary processing units. These resource-constrained
sensors are an impressive example of a System on Chip (SoC). Dense deployment of
sensor nodes in the sensing field and distributed processing through multi-hop
communication among sensor nodes is required to achieve high quality and fault
tolerance in WSNs.
Q.7 How scheduling is handled in WSN OS ?
Ans. : The Central Processing Unit (CPU) scheduling determines the order in which tasks
are executed on a CPU. In traditional computer systems, the goal of a scheduler is to
minimize latency, to maximize throughput and resource utilization, and to ensure
fairness. WSNs are being used in both real-time and non-real-time environments,
therefore a WSN OS must provide scheduling algorithms that can accommodate the
application requirements. Moreover, a suitable scheduling algorithm should be
memory and energy efficient.
Q.8 Discuss LiteOS programming model.
Ans. : LiteOS is a multitasking OS and it supports multithreading. In LiteOS, processes
run applications as separate threads. Each thread has its own memory space to avoid
potential semantic errors that could occur during read and write in shared memory
space.
LiteOS supports event handling. Application programmers can register event
handlers using a callback facility provided by LiteOS.
To avoid potential race conditions, LiteOS provides atomic_start() and atomic_end()
functions. Whenever shared data among different threads is accessed or modified, it is
highly recommend to use these functions. The LiteOS documentation does not detail
how this functions are internally implemented that is whether they are disabling
interrupts or using mutexes.