You are on page 1of 360

SUBJECT CODE : EC8702

Strictly as per Revised Syllabus of


Anna University
Choice Based Credit System (CBCS)
Semester - VII (ECE)

Ad Hoc and Wireless


Sensor Networks

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

Semester - VII (ECE)

ã Copyright with Author


All publishing rights (printed and ebook version) reserved with Technical Publications. No part of this book
should be reproduced in any form, Electronic, Mechanical, Photocopy or any information storage and
retrieval system without prior permission in writing, from Technical Publications, Pune.

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

9789390450022 [1] (ii)


preface
The importance of Ad Hoc and Wireless Sensor Networks is well known in various
engineering fields. Overwhelming response to my books on various subjects inspired me to
write this book. The book is structured to cover the key aspects of the subject Ad Hoc and
Wireless Sensor Networks.
The book uses plain, lucid language to explain fundamentals of this subject. The book
provides logical method of explaining various complicated concepts and stepwise methods
to explain the important topics. Each chapter is well supported with necessary illustrations,
practical examples and solved problems. All the chapters in the book are arranged in a
proper sequence that permits each topic to build upon earlier studies. All care has been
taken to make students comfortable in understanding the basic concepts of the subject.
The book not only covers the entire scope of the subject but explains the philosophy of
the subject. This makes the understanding of this subject more clear and makes it more
interesting. The book will be very useful not only to the students but also to the subject
teachers. The students have to omit nothing and possibly have to cover nothing more.
I wish to express my profound thanks to all those who helped in making this book a
reality. Much needed moral support and encouragement is provided on numerous
occasions by my whole family. I wish to thank the Publisher and the entire team of
Technical Publications who have taken immense pain to get this book in time with quality
printing.
Any suggestion for the improvement of the book will be acknowledged and well
appreciated.

Author
Anamitra Deshmukh-Nimbalkar

(iii)
Dedicated To,

My Life Partner,

Shri. Annasaheb(Aakash) Nimbalkar,


Who in my life, redefined the meaning of
‘Companionship’, ‘Freedom’, ‘Respect’ and ‘Faith’ which
could bring up a identity of mine as ‘A Woman’.

(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)

UNIT II Sensor Networks - Introduction and Architectures


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. (Chapter - 3)

UNIT III WSN Networking Concepts and Protocols


MAC Protocols for Wireless Sensor Networks, Low Duty Cycle Protocols And Wakeup
Concepts - S-MAC, The Mediation Device Protocol, Contention based protocols - PAMAS,
Schedule based protocols - LEACH, IEEE 802.15.4 MAC protocol, Routing Protocols-
Energy Efficient Routing, Challenges and Issues in Transport layer protocol.
(Chapters - 4,5,6)

UNIT IV Sensor Network Security


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.
(Chapter - 7)

UNIT V Sensor Network Platforms and Tools


Sensor Node Hardware - Berkeley Motes, Programming Challenges, Node-level software
platforms - TinyOS, nesC, CONTIKIOS, Node-level Simulators - NS2 and its extension to
sensor networks, COOJA, TOSSIM, Programming beyond individual nodes - State centric
programming. (Chapter - 8)

(v)
Table of Contents
Unit - I
Chapter - 1 Wireless Networks and Ad hoc Networks (1 - 1) to (1 - 48)

1.1 Wireless Network .............................................................................................. 1 - 2


1.1.1 Introduction to Wireless Network....................................................................... 1 - 2
1.1.2 Types of Wireless Communication ...................................................................... 1 - 2
1.1.3 Wireless Network - Building Blocks ..................................................................... 1 - 7
1.1.4 Devices Connecting Procedure in to Wireless Network .................................... 1 - 10
1.1.5 Wireless Operating Modes - Infrastructure Mode and Ad hoc Mode .............. 1 - 10
1.1.6 Wireless Network - Classification ...................................................................... 1 - 12
1.1.7 Advantages and Disadvantages of Wireless Communication ........................... 1 - 13
1.1.8 Applications of Wireless Communication ......................................................... 1 - 14
1.1.9 Difference between Wired and Wireless Communication................................ 1 - 14
1.2 Wireless Ad hoc Network ................................................................................ 1 - 15
1.2.1 Ad hoc Network - Working ................................................................................ 1 - 16
1.2.2 Wireless Ad hoc Network Features ................................................................... 1 - 16
1.2.3 Ad hoc Network-Architecture, Operations ....................................................... 1 - 18
1.2.3.1 Ad hoc Network Architecture .............................................................................. 1 - 19

1.2.3.2 Communication ................................................................................................... 1 - 21

1.2.3.3 Ad hoc Network Operations ................................................................................ 1 - 21

1.2.3.4 Ad hoc Network - Routing ................................................................................... 1 - 21


1.2.4 Types of Wireless Ad hoc Networks .................................................................. 1 - 22
1.2.4.1 Mobile Ad hoc Network (MANET) ....................................................................... 1 - 23

1.2.4.2 Vehicular Ad hoc Network (VANET) .................................................................... 1 - 23


1.2.4.3 Smartphone Ad hoc Network (SPAN) .................................................................. 1 - 24

1.2.4.4 Wireless Mesh Network (WMN) ......................................................................... 1 - 25

1.2.4.5 Army Tactical MANET .......................................................................................... 1 - 25

1.2.4.6 Wireless Sensor Network .................................................................................... 1 - 26

(vi)
1.2.4.7 Disaster Rescue Ad hoc Network......................................................................... 1 - 27

1.2.4.8 Intelligent based Mobile Ad hoc Network (iMANET)........................................... 1 - 27


1.2.4.9 Flying Ad hoc Network (FANET)........................................................................... 1 - 28
1.2.5 Ad hoc Network - Commercial Applications...................................................... 1 - 29
1.2.6 Ad hoc Network Advantages and Disadvantages .............................................. 1 - 31
1.2.7 Issues and Challenges in Ad hoc Networks ....................................................... 1 - 32
1.2.8 Ad hoc Wireless and Cellular Network and their Comparative Analysis ........... 1 - 35
1.2.9 Design Issues of Ad hoc Wireless Network ....................................................... 1 - 37
1.2.10 Ad hoc Wireless Internet ................................................................................. 1 - 41
1.3 Two Marks Questions with Answers [Part - A] .......................................... 1 - 44
1.4 Long Answered Questions [Part - B].......................................................... 1 - 47

Chapter - 2 Routing in Ad hoc Networks (2 - 1) to (2 - 38)

2.1 Introduction to Routing ..................................................................................... 2 - 2


2.1.1 Routing Concept and Process .............................................................................. 2 - 2
2.1.2 Major Issues in Designing Routing Protocols for Ad hoc Networks .................... 2 - 2
2.1.3 Characteristics of an Ideal Routing Protocol for Ad hoc Wireless Networks ..... 2 - 5
2.2 Types of Ad hoc Routing Protocols ................................................................... 2 - 6
2.2.1 Proactive Routing Protocols (Table Driven Routing Protocols) ........................... 2 - 6
2.2.1.2 Destination Sequenced Distance Vector Routing .................................................. 2 - 7

2.2.1.2 Wireless Routing Protocol ..................................................................................... 2 - 9

2.2.1.3 Cluster-Head Gateway Switch Routing Protocol ................................................. 2 - 11

2.2.1.4 Fisheye State Routing .......................................................................................... 2 - 12


2.2.2 Reactive Routing Protocols ............................................................................... 2 - 13
2.2.2.1 Dynamic Source Routing (DSR) Protocol ............................................................. 2 - 14

2.2.2.2 Ad-hoc On-demand Distance Vector (AODV) Protocol ....................................... 2 - 16

2.2.2.3 Temporarily Ordered Routing Algorithm............................................................. 2 - 18


2.2.2.4 Location Aided Routing ....................................................................................... 2 - 19

2.2.2.5 Associativity-based Routing................................................................................. 2 - 22

2.2.2.6 Signal Stability-based Adaptive Routing Protocol ............................................... 2 - 23


2.2.2.7 Flow Oriented Routing Protocol .......................................................................... 2 - 25

(vii)
2.2.3 Hybrid Routing Protocols .................................................................................. 2 - 27
2.2.3.1 Core Extraction Distributed Ad-hoc Routing Protocol ......................................... 2 - 28

2.2.3.2 Zone Routing Protocol ......................................................................................... 2 - 30


2.2.3.3 Zone-based Hierarchical Link State Routing Protocol ......................................... 2 - 32

2.3 Advantages and Disadvantages of Ad hoc Wireless Routing Protocols .......... 2 - 34


2.3.1 Proactive (Table Driven) Routing Protocols ...................................................... 2 - 34
2.3.2 Reactive (On-Demand) Routing Protocols ........................................................ 2 - 35
2.3.3 Hybrid Routing Protocol .................................................................................... 2 - 36
2.4 Two Marks Questions with Answers [Part - A] .......................................... 2 - 37
2.5 Long Answered Questions [Part - B].......................................................... 2 - 38

Unit - II

Chapter - 3 Wireless Sensor Networks - Introduction and Architectures


(3 - 1) to (3 - 38)

3.1 Wireless Sensor Networks - Introduction ......................................................... 3 - 2


3.1.1 Wireless Sensor Networks - Fundamentals ......................................................... 3 - 2
3.1.2 Wireless Sensor Network - Characteristics ......................................................... 3 - 3
3.1.3 Wireless Sensor Network (WSN) vs. Ad hoc Network ......................................... 3 - 3
3.1.4 Subsystems of Sensor Node ................................................................................ 3 - 4
3.1.5 Sensor Nodes Functions ...................................................................................... 3 - 4
3.1.6 Issues Related to Sensor Nodes .......................................................................... 3 - 5
3.1.7 Types of Sensors in Sensor Wireless Networks ................................................... 3 - 5
3.2 Sensor Node Architecture ................................................................................. 3 - 6
3.2.1 Single Node Architecture .................................................................................... 3 - 6
3.2.2 Hardware Components of a Sensor Node ........................................................... 3 - 7
3.2.3 Software Subsystems of a Sensor Node .............................................................. 3 - 8
3.3 Advantages and Limitations of Sensor Networks ............................................. 3 - 9
3.3.1 The Advantages of WSN ...................................................................................... 3 - 9
3.3.2 Limitations of WSN ............................................................................................ 3 - 10
3.4 Types of Wireless Sensor Networks ................................................................ 3 - 10

(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.4 EMACS ................................................................................................................. 4 - 19

4.8.3.5 LMAC ................................................................................................................... 4 - 20


4.8.3.6 AI-LMAC ............................................................................................................... 4 - 21

4.8.3.7 MC-LMAC............................................................................................................. 4 - 23

4.8.3.8 DMAC .................................................................................................................. 4 - 24

4.8.3.9 DE-MAC ............................................................................................................... 4 - 25

(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

4.9.2.2 History of ZigBee Technology .............................................................................. 4 - 30

4.9.2.3 Zigbee Protocol Features ..................................................................................... 4 - 30

4.9.2.4 Zigbee System Structure ...................................................................................... 4 - 31


4.9.2.5 Zigbee Protocol Architecture............................................................................... 4 - 32

4.9.2.6 Data Transfer ....................................................................................................... 4 - 35


4.9.2.7 Communication using ZigBee .............................................................................. 4 - 35
4.9.2.8 Zigbee Operating Modes and Its Topologies ....................................................... 4 - 36

4.9.2.9 Applications of Zigbee Technology ...................................................................... 4 - 38


4.9.2.10 Zigbee Security .................................................................................................. 4 - 39

4.9.2.11 ZigBee Alliance and ZigBee Specification .......................................................... 4 - 40

4.9.2.12 Zigbee Users ...................................................................................................... 4 - 41

4.9.2.13 Zigbee Advantages and Disadvantages ............................................................. 4 - 42

4.10 Wireless Sensor Networks - Data Aggregation Strategies ............................ 4 - 43


4.10.1 Continuous Packet Sensing and Dissemination (CPSD) ................................... 4 - 44
4.10.2 Continuous Packet Collection and Dissemination (CPCD)............................... 4 - 44
4.10.3 Programmed Packet Collection and Dissemination (PPCD) ............................ 4 - 44
4.10.4 Programmed Packet Aggregation and Dissemination (PPAD) ........................ 4 - 44
4.10.5 Programmed Demand based Aggregation and Dissemination (PDAD)........... 4 - 45
4.10.6 Weighted Event and Demand based Data Aggregation (WEDDA) .................. 4 - 45
4.11 Data Relaying in WSN .................................................................................... 4 - 45
4.11.1 Data Diffusion .................................................................................................. 4 - 45
4.11.2 Data Relaying Algorithms ................................................................................ 4 - 46
4.11.2.1 Flooding ............................................................................................................. 4 - 46
4.11.2.2 Gossiping ........................................................................................................... 4 - 46
4.11.2.3 Rumour Routing ................................................................................................ 4 - 46

4.11.2.4 Sequential Assignment Routing......................................................................... 4 - 46

(xi)
4.11.2.5 Directed Diffusion.............................................................................................. 4 - 47

4.12 Topology Control ........................................................................................... 4 - 47


4.12.1 Topology Control Protocol Goals and Design.................................................. 4 - 47
4.12.2 The TC Protocol Formalization ........................................................................ 4 - 48
4.12.3 An Overview of TC Algorithms ........................................................................ 4 - 48
4.12.4 Problems Associated with Homogeneous and Non-Homogeneous TC .......... 4 - 51
4.13 Two Marks Questions with Answers [Part - A] ........................................ 4 - 51
4.14 Long Answered Questions [Part - B] ........................................................ 4 - 53

Chapter - 5 Wireless Sensor Networks-Routing and Energy Efficient


Routing (5 - 1) to (5 - 24)

5.1 WSN Routing - Issues......................................................................................... 5 - 2


5.2 Optimized Link State Routing Protocol ............................................................. 5 - 4
5.2.1 Basic Concepts..................................................................................................... 5 - 4
5.2.2 Neighbour Discovery ........................................................................................... 5 - 5
5.2.3 Topology Dissemination ...................................................................................... 5 - 5
5.2.4 Route Computation ............................................................................................. 5 - 6
5.3 Localization........................................................................................................ 5 - 6
5.3.1 Target/Source Localizations ................................................................................ 5 - 7
5.3.2 Node Self-Localization ......................................................................................... 5 - 7
5.3.2.1 Range-based Method ............................................................................................ 5 - 8
5.3.2.2 Range-free Method ............................................................................................... 5 - 9
5.3.3 Other Localization Mechanisms ........................................................................ 5 - 10
5.3.3.1 GPS based Localization ....................................................................................... 5 - 10

5.3.3.2 Indoor Localization .............................................................................................. 5 - 10

5.3.3.3 Sensor Network Localization ............................................................................... 5 - 10


5.3.3.4 Absolute Localization........................................................................................... 5 - 12

5.3.3.5 Relative Localization ............................................................................................ 5 - 13

5.3.3.6 Triangulation Localization ................................................................................... 5 - 13

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

Chapter - 6 Wireless Sensor Networks - Transport Layer Challenges


and Issues (6 - 1) to (6 - 26)

6.1 Transport Layer In Wireless Sensor Networks .................................................. 6 - 2


6.1.1 Transport Protocols Attributes............................................................................ 6 - 2
6.1.2 Transport Layer Challenges ................................................................................. 6 - 2
6.1.3 Congestion Control and Rate Control ................................................................. 6 - 3
6.1.4 Transport Layer Protocols in Wireless Sensor Network ...................................... 6 - 6
6.1.4.1 Pump Slowly, Fetch Quickly Protocol (PSFQ) ............................................... 6 - 6
6.1.4.2 Event-to-Sink Reliable Transport (ESRT) Protocol ........................................ 6 - 8
6.1.4.3 The CODA (COngestion Detection and Avoidance ) Congestion-Control
Framework .................................................................................................... 6 - 9
6.1.5 Reliability Requirements in Sensor Networks ................................................... 6 - 11
6.2 QoS in WSN ..................................................................................................... 6 - 14
6.2.1 QoS Parameters................................................................................................. 6 - 14
6.2.2 QoS Challenges .................................................................................................. 6 - 14
6.2.3 Quality of Sensor Network ................................................................................ 6 - 15
6.2.3.1 Coverage .................................................................................................... 6 - 15
6.2.3.2 Exposure..................................................................................................... 6 - 18
6.3 Energy Efficient Design .................................................................................... 6 - 21
6.4 Synchronization ............................................................................................... 6 - 22
6.4.1 Time Synchronization ........................................................................................ 6 - 23
6.4.2 Low Power Synchronization .............................................................................. 6 - 23
6.4.3 Global Synchronization...................................................................................... 6 - 23
6.4.4 Clock Synchronization ....................................................................................... 6 - 23
6.5 Two Marks Questions with Answered [Part - A] ....................................... 6 - 24
6.6 Long Answered Questions [Part - B] ........................................................ 6 - 25

(xiii)
Unit - IV

Chapter - 7 Sensor Network Security (7 - 1) to (7 - 54)

7.1 Network Security Requirements and Related Aspects in Wireless Sensor


Networks ........................................................................................................... 7 - 2
7.1.1 The Characteristics of Wireless Sensor Networks ............................................... 7 - 2
7.1.2 Issues, Challenges and Various Security Constraints of Sensor Networks .......... 7 - 3
7.1.3 Wireless Sensor Network - Security Requirements............................................. 7 - 5
7.1.4 Security Implementation Challenges in Wireless Sensor Networks.................... 7 - 6
7.1.5 Secure Communication in Sensor Networks ....................................................... 7 - 7
7.1.6 Security Goals and Services of Sensor Networks ................................................ 7 - 8
7.2 Layer Wise Attacks in Wireless Sensor Networks and Solutions to Attacks ..... 7 - 9
7.2.1 Denial of Service Attacks ..................................................................................... 7 - 9
7.2.1.1 Physical Layer Attacks (Jamming, Tampering) and Solutions .............................. 7 - 10
7.2.1.2 Link Layer Attacks (Collision, Exhaustion) and Solutions ..................................... 7 - 10

7.2.1.3 Network Layer Attacks (Sybil, Wormhole, Black hole) and Solutions.................. 7 - 11

7.2.1.4 Transport Layer Attacks (Flooding, De-Synchronization) and Solutions............. 7 – 14


7.2.1.5 Application Layer Attacks (Network Programming, Path based) and Solutions .. 7 - 14
7.2.2 Prevention Schemes for Various DoS Attacks in Sensor Network ................... 7 – 15
7.2.3 Attacks on Secrecy and Authentication ............................................................ 7 - 16
7.2.3.1 Node Replication Attack ...................................................................................... 7 - 16
7.2.3.2 Attacks on Privacy ............................................................................................... 7 - 16

7.3 Key Management ............................................................................................ 7 - 17


7.3.1 Key Management Schemes Classification ......................................................... 7 - 17
7.3.2 Typical Schemes of Key Management............................................................... 7 - 19
7.3.3 Certification ....................................................................................................... 7 - 20
7.3.3.1 Identity Authentication ....................................................................................... 7 - 21

7.3.3.2 Message Authentication..................................................................................... 7 - 21

7.4 Intrusion Detection ......................................................................................... 7 - 22


7.4.1 Intrusion Detection Concept ............................................................................. 7 - 22
7.4.2 Intrusion Detection in WSNs ............................................................................. 7 - 23
(xiv)
7.5 Software based Anti Hamper Technique ........................................................ 7 - 24
7.6 Secure Routing Sensor Networks - Reliability Requirements and SPINS ........ 7 - 26
7.6.1 Data-Centric Security Routing Protocol and SPIN Protocol ............................... 7 - 26
7.6.2 Location-based Secure Routing Protocol and GPSR, GEAR Protocols ............... 7 - 27
7.6.3 The Security Routing Protocol based on Hierarchical Structure
and LEACH, TEEN protocols ............................................................................... 7 - 28
7.6.4 The Security Routing Protocol based on Multipath Transmission
and SELF, MSR protocols ................................................................................... 7 - 29
7.7 Defense against Attacks on WSN Routing Protocols and SPIN Protocol......... 7 - 30
7.7.1 Defense against Attacks on Routing Protocols.................................................. 7 - 30
7.7.2 SPIN Protocol ..................................................................................................... 7 - 32
7.8 Secure Ad hoc Routing Protocols .................................................................... 7 - 34
7.8.1 INSENS- Intrusion-Tolerant Routing Protocol for Wireless SEnsor Networks ... 7 - 34
7.8.2 ARAN - Authenticated Routing for Ad hoc Networks ........................................ 7 - 37
7.8.3 AODV - AdHoc On-DemandVectorRouting(AODV)protocol .............................. 7 - 38
7.9 Broadcast Authentication WSN Protocol - TESLA Protocol, BiBa Protocol ..... 7 - 40
7.9.1 Broadcast Authentication WSN Protocol ......................................................... 7 - 40
7.9.2 Desirable Security Attributes for Authenticated Broadcast .............................. 7 - 41
7.9.3 TESLA Protocol................................................................................................... 7 - 42
7.9.4 TESLA Family Broadcast Authentication............................................................ 7 - 45
7.9.5 BiBa Signature Protocol .................................................................................... 7 - 46
7.10 Two Marks Questions with Answers [Part - A] ........................................ 7 - 50
7.11 Long Answered Questions [Part - B] ....................................................... 7 – 53

Unit - V

Chapter - 8 Sensor Network Platforms and Tools (8 - 1) to (8 - 60)

8.1 Sensor Node Hardware ..................................................................................... 8 - 2


8.1.1 The Components of WSN .................................................................................... 8 - 2
8.1.2 Hardware Components of Sensor Nodes and its Working ................................. 8 - 4
8.1.3 Characteristics of the Sensor Node for WSN Performance Evaluation ............... 8 - 7
8.1.4 WSN Sensor Node Types based on their Working in the Network ..................... 8 - 8
8.2 Motes and Berkeley Motes ............................................................................ 8 - 10
(xv)
8.2.1 Motes Concept .................................................................................................. 8 - 10
8.2.2 MICA (MPR300 CA - Motor Protection Relay300 CA) Mote .............................. 8 - 12
8.2.3 Berkeley Mote ................................................................................................... 8 - 14
8.3 Sensor Network Programming Challenges...................................................... 8 - 18
8.4 Node-Level Software Platforms ...................................................................... 8 - 19
8.4.1 Operating System and Wireless Sensor Network Operating System ................ 8 - 19
8.4.2 Major Concerns in WSN OS Design ................................................................... 8 - 21
8.4.2.1 Architecture ......................................................................................................... 8 - 21
8.4.2.2 Programming Model............................................................................................ 8 - 21
8.4.2.3 Scheduling ........................................................................................................... 8 - 21
8.4.2.4 Memory Management and Protection ................................................................ 8 - 22
8.4.2.5 Communication Protocol Support ....................................................................... 8 - 22
8.4.2.6 Resource Sharing ................................................................................................. 8 - 22
8.4.2.7 Support for Real-Time Applications..................................................................... 8 - 23
8.4.3 Wireless Sensor Network - Operating System Examples .................................. 8 - 23
8.4.3.1 TinyOS.................................................................................................................. 8 - 23
8.4.3.1.1 TinyOS Architecture.......................................................................................... 8 - 23
8.4.3.1.2 TinyOS Programming Model ............................................................................ 8 - 24
8.4.3.2 Contiki ................................................................................................................. 8 - 28
8.4.3.3 MANTIS ................................................................................................................ 8 - 33
8.4.3.4 Nano-RK ............................................................................................................... 8 - 38
8.4.3.5 LiteOS .................................................................................................................. 8 - 43
8.4.3.6 WSN Operating Systems - Comparative Analysis and Features Summary .......... 8 - 49

8.5 WSN Simulators ............................................................................................... 8 - 50


8.5.1 Introduction to Simulators and Various Simulators - COOJA, TOSSIM ............. 8 - 50
8.5.2 Node-Level Simulators ...................................................................................... 8 - 52
8.5.3 The ns-2 Simulator and its Sensor Network Extensions .................................... 8 - 54
8.6 WSN Programming and Programming Beyond Individual Node .................... 8 - 55
8.7 State Centric Programming ............................................................................. 8 - 57
8.8 Two Marks Questions with Answers [Part - A] .......................................... 8 - 57
8.9 Long Answered Questions [Part - B].......................................................... 8 - 60

(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.1 Wireless Network


 Wireless networks are computer networks that are not connected by cables of any
kind. The use of a wireless network enables enterprises to avoid the costly process
of introducing cables into buildings or as a connection between different
equipment locations.

1.1.1 Introduction to Wireless Network


 The term wireless communication was introduced in the 19th century and wireless
communication technology has developed over the subsequent years. It is one of
the most important mediums of transmission of information from one device to
other devices.
 In this technology, the information can be transmitted through the air without
requiring any cable or wires or other electronic conductors, by using
electromagnetic waves like IR, RF, satellite, etc. In the present days, the wireless
communication technology refers to a variety of wireless communication devices
and technologies ranging from smart phones to computers, tabs, laptops,
Bluetooth technology, printers.

1.1.2 Types of Wireless Communication


 In the present days, wireless communication system has become an essential part
of various types of wireless communication devices, that permits user to
communicate even from remote operated areas. There are many devices used for
wireless communication like mobiles, cordless telephones, Zigbee wireless
technology, GPS, Wi-Fi, satellite television and wireless computer parts. Current
wireless phones include 3 and 4G networks, Bluetooth and Wi-Fi technologies.
 The different types of wireless communication mainly include, IR wireless
communication, satellite communication, broadcast radio, Microwave radio,
Bluetooth, Zigbee etc.

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1-3 Wireless Networks and Ad hoc Networks

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1-4 Wireless Networks and Ad hoc Networks

 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

6. Cellular and Mobile Communication Systems


 The advancement of mobile networks is enumerated by generations. Many users
communicate across a single frequency band through mobile phones. Cellular and
cordless phones are two examples of devices which make use of wireless signals.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1-5 Wireless Networks and Ad hoc Networks

Typically, cell phones have a larger range of networks to provide a coverage.But,


Cordless phones have a limited range. Similar to GPS devices, some phones make
use of signals from satellites to communicate.

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1-6 Wireless Networks and Ad hoc Networks

 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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1-7 Wireless Networks and Ad hoc Networks

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.

1.1.3 Wireless Network - Building Blocks


1. Along with some services and other devices, the two main components of
wireless networks are wireless router or access point.
2. A high-speed broadband connection (that is DSL, cable, or fiber) internet
connection is necessary to connect any network to the Internet, there is need of.
3. A router is a network device that can connect one network to another,
determine what traffic can pass between them, and perform other functions on
a network, such as assigning IP addresses. In addition to the phones, tablets,
and laptops used in accessing a network, routers make up the hardware that
runs the network.
4. A wireless network adapter to connect other devices in the network. An older
laptop, television, or Blu-Ray player may not have built-in wireless support. In
these devices a wireless network adapter is required to connect to the wireless
network.
5. Role/Mode of Device in the wireless network
There are three major “modes” a Wi-Fi device can use. These modes define the role a
Wi-Fi device has in the network, and networks must be built out of combinations of
devices operating in these different modes. How the devices are configured depends on
the types of connections used between various parts of the network.
1. A wireless router or access point - Most wireless networks are made using
Access Points - devices that host and control the wireless connection for
laptops, tablets, or smart phones. If you use Wi-Fi in your home or office, it is
most likely through an Access Point. When a router is set up as an AP, it is said
to be in “Master” or “Infrastructure” mode.
An AP is sometimes a stand-alone device that bridges between a wireless and
wired (Ethernet) network, or is part of a router. APs can cover a range of areas
with a wireless signal, depending on the power of the device and the type of
antenna. There are also some APs that are weatherproof, designed to be
mounted outdoors.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1-8 Wireless Networks and Ad hoc Networks

An access point is similar to a person on stage, addressing an audience or


crowd - they are providing the information for everyone else. Those audience
members can ask questions of the person on the stage, and receive a response.
They are the hardware devices that Internet service providers use to connect
any Wi-Fi enabled device to their cable or xDSL Internet network. A wireless
router, also called a Wi-Fi router, combines the networking functions of a
wireless access point and a router. A router connects local networks to other
local networks or to the Internet. A wireless access point connects devices to
the network wirelessly, using radio frequencies in the 900 MHz and 2.4, 3.6, 5,
and 60 GHz frequency bands. The latest wireless routers are based on the IEEE
802.11ac Wave 2 standard, often shortened to Wave 2. A wireless router is
sometimes referred to as a WLAN (wireless local area network) device.
Computers, tablets, and other devices connect to a wireless network via a
wireless access point or wireless router. In Wi-Fi-based wireless networks, the
access point or router acts as an Ethernet switch. All devices connect to the
router, rather than directly with each other. Wireless router or access points
should be installed in a way that maximizes coverage as well as throughput.
The coverage provided is generally referred to as the coverage cell. Large areas
usually require more than one access point in order to have adequate coverage.
An access point can also be added to the existing wireless router to improve
coverage. Many DSL and cable modems today come equipped with integrated
wireless networking capabilities; these are called wireless modem routers.
2. Devices with wireless networking capabilities (wireless clients / Stations) -
Devices such as computers, tablets, and phones are common Clients on a
network. Some routers can operate as Clients as well, which allows them to act
like the wireless card in a computer, and connect to other Access Points. This
can bridge two Ethernet networks, or connect to more distant APs.
When a device is accessing a wireless hotspot, or the router in home or office,
the device is the client. This client mode is also known as “station mode” as
well.
A wireless client is similar to a person in the audience of a play or movie. They
are one of several or many people accessing information through the same
conduit - someone speaking.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1-9 Wireless Networks and Ad hoc Networks

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.

Fig. 1.1.1 A wireless network

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 10 Wireless Networks and Ad hoc Networks

1.1.4 Devices Connecting Procedure in to Wireless Network


A Wi-Fi-enabled device can connect to the network when it’s within the range of its
wireless router. If wireless security is enabled on the network, then there is a need to
enter password on each device to connect to wireless network. After that, the device will
be wirelessly connected to the router and there is no need to re-enter the password each
time).

Who connects to whom


1. Clients always need to connect to an access point, and mesh nodes all connect
to each other. It should also be noted that due to how Wi-Fi is designed, this
also prevents different roles from connecting to each other as well.
2. Access points cannot connect to each other wirelessly.
3. Clients cannot connect to each other wirelessly.
4. Clients cannot connect to Ad-hoc (Mesh) devices wirelessly.
5. Access points cannot connect to Ad-hoc (Mesh) devices wirelessly.

1.1.5 Wireless Operating Modes - Infrastructure Mode and Ad hoc Mode


The IEEE 802.11 standards specify two operating modes - Infrastructure mode and Ad
hoc mode (Infrastructure-less )
1. Infrastructure mode is used to connect computers with wireless network
adapters, also known as wireless clients, to an existing wired network with the
help from wireless router or access point.
In this mode each node is connected with other node through a fixed base
station. The fixed station is also known as Access Points (APs). An example for
infrastructure based network is cellular network in which base station or AP is
used as fixed equipment. Each network area is divided into cells and the base
station provides each cell with the network coverage which can be used for the
transmission of high quality voice, data and other types of messages.
2. Ad hoc mode is used to connect wireless clients directly together, without the
need for a wireless router or access point. An ad hoc network consists of up to
9 wireless clients, which send their data directly to each other.
In this mode Each node can communicate with each other without using any
fixed infrastructure. Mobile ad hoc networks and Vehicular Ad hoc Networks
(VANETs) are the examples of infrastructure less networks. In Ad hoc

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 11 Wireless Networks and Ad hoc Networks

networks, each node acts as a router to forward the information in a multi-hop


fashion.

Choice between Ad hoc and infrastructure mode


Deciding when to employ Ad-hoc versus infrastructure mode depends on the use. A
user who wants a wireless router to act as an access point should choose infrastructure
mode, but Ad-hoc mode might be a good option for a user setting up a temporary
wireless network between a small number of devices.

Comparative analysis of infrastructure network and Ad hoc network


Sr. Characteristics Infrastructure network Ad hoc network
No.
1. Communication Through an Access Point (AP), Directly between devices, in ad-hoc
APs act as a bridge to other mode, each node communicates
wireless/wired network. directly with other nodes, so no
access point control is needed.

2. Security More security options. WEP (Wired Equivalent Privacy) or


no security.

3. Range Determined by the range and Restricted to the range of


number of access points. individual devices on the network.

4. Speed Usually faster. Usually slower.

5. Complexity Designing is simple as most of As no central co-ordination exists,


the network functionality lies it needs to use decentralized MAC
within AP and client is just a (Medium Access Control) protocols
simple machine. such as CSMA(Carrier Sense
Multiple Access)/CA (Collision
Avoidance), with all nodes having
same functionality. This shoots up
the complexity and cost.

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 12 Wireless Networks and Ad hoc Networks

infrastructure WLANs to
provide wired network
applications and services.

9. Applications IEEE 802.11 & HIPERLAN2 are Bluetooth is a typical ad-hoc


based on infrastructure mode. network.

10. Figurative
depiction

Requirements for all devices

1 Unique IP Yes required. Yes required.


(Internet
Protocol)
address for
each device

2 Mode set to Infrastructure mode. Ad hoc mode.

3 Same SSID Yes, including the access point. Yes.


(Service Set
Identifier)

4 Same channel Yes, including the access point. Yes.

Table 1.1.1 Comparative analysis of infrastructure network and Ad hoc network

1.1.6 Wireless Network - Classification


Based on how many devices are being connected in the network and how much
physical area is covered by the network the wireless there are four main types of wireless
networks namely,
1. Wireless Local Area Network (LAN) - Links two or more devices using a
wireless distribution method, providing a connection through access points to
the wider Internet.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 13 Wireless Networks and Ad hoc Networks

2. Wireless Metropolitan Area Networks (MAN) - Connects several wireless


LANs.
3. Wireless Wide Area Network (WAN) - Covers large areas such as neighboring
towns and cities.
4. Wireless Personal Area Network (PAN) - Interconnects devices in a short
span, generally within a person’s reach.

1.1.7 Advantages and Disadvantages of Wireless Communication

Advantages of Wireless Communication


1. Any data or information can be transmitted faster and with a high speed.
2. Maintenance and installation is less expensive in wireless networks.
3. The internet can be accessed from anywhere wirelessly.
4. Wireless networks are self-configuring and easy to use.
5. Wireless networks are cost effective.
6. Wireless communication is a solution in certain areas where wired networks
are difficult to install (e.g. military areas, flooded areas, hazardous areas, long
distances etc.)
7. Customers can work and access Internet anywhere and at anytime without
carrying cables or wires wherever they go. This also helps to complete the
work anywhere on time and improves the feasibility.
8. Doctors, workers and other professionals working in remote areas can be in
touch with medical centers through wireless communication.
9. Urgent situation can be alerted through wireless communication. The affected
regions can be provided help and support with the help of these alerts through
wireless communication.

Disadvantages of Wireless Communication


The wireless network enables to use personal devices such as PDAs, cell phones etc
anywhere and at anytime. This has helped to improve in every field of life and in day to
day life; but this has led many threats as well. There are also some of the drawbacks
associated with the merits of wireless communication.
1. An unauthorized person can easily capture the wireless signals which spread
through the air hence more vulnerable to attack by unauthorized users. It is
very important to secure the wireless network so that the information cannot
be misused by unauthorized users.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 14 Wireless Networks and Ad hoc Networks

2. It requires strong security protocols to secure the wireless signals.


3. Wireless communication is influenced by physical obstructions, climate
conditions, noise interference etc.
4. Wireless network suffers from bandwidth availability as there is limited
amount of bandwidth.
5. Tracing and capturing the intruder node is difficult.
6. Wireless connection set up is slow purpose.
7. Wireless network is many a times unstable.
8. To get constant coverage in some buildings is difficult.
9. The speed of the wireless transmission is slower and less efficient.

1.1.8 Applications of Wireless Communication


Applications of wireless communication involve security systems, television remote
control, Wi-Fi, Cell phones, wireless power transfer, computer interface devices and
various wireless communication based projects.

1.1.9 Difference between Wired and Wireless Communication


Wired networks use cables or wires to transfer data between different communicating
devices. In general, wired networks use Ethernet cable to transfer data between
interconnected devices. On the other hand, the wireless devices use infrared or radio
frequency signals to exchange information and other resources between devices. The
difference between wired and wireless communication is summarized in below
Table 1.1.2.
Sr. No Parameters Wired Communication Wireless Communication
l. Connectivity Nodes are connected via Nodes are linked using
cables or wires. wireless links.

2. Data transmission Transmission of data Transmission of data occurs


occurs through cables. through radio waves.

3. Installation time Time to install network is Less time required to install


more. network.

4. Components Ethernet, cables, switches Wireless adapter and access


are available for data points are available for data
exchange. exchange.

5. Cost Cost of Ethernet, cables Cost of wireless adapter and


and switches are not access points are more.
expensive.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 15 Wireless Networks and Ad hoc Networks

6. Mobility Limited mobility. High mobility.

7. Topology Static topology. Dynamic topology.

8. Link stability Infrequent link breakage. Frequent link breakage.

9. Security Efficient security Poor security mechanisms are


mechanisms are available. available.

10. Interference Less High

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.

13. Bandwidth capacity High Low

14. Reliability High Low

Table 1.1.2 Difference between wired and wireless communication

1.2 Wireless Ad hoc Network


A wireless Ad-hoc network (WANET) is a type of local area network (LAN) that is
built spontaneously to enable two or more wireless devices to be connected to each other
without requiring a central device, such as a router or access point. When Wi-Fi networks
are in Ad-hoc mode, each device in the network forwards data to the others.

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 16 Wireless Networks and Ad hoc Networks

Fig. 1.2.1 Wireless Ad hoc network

1.2.1 Ad hoc Network - Working


Devices in the Ad-hoc network require a wireless network adapter, and they need to
support a hosted network. When setting up a wireless Ad-hoc network, each wireless
adapter must be configured for Ad-hoc mode instead of infrastructure mode. All wireless
adapters need to use the Same Service Set Identifier (SSID) and channel number.
Creating an Ad-hoc network for Windows 8 and 10 applications is more difficult than
it was for earlier Windows OSs. Networking experts offer pointers on how to tackle this
issue.

1.2.2 Wireless Ad hoc Network Features


1. Ad hoc networks adhere to dynamic topologies. Network topology which is
typically multi-hops, may change randomly and rapidly with time, it can form
unidirectional or bi-directional links. Expensive equipments are not necessary
to set up an on-the-fly ad hoc network. Nodes are free to move arbitrarily with
different speeds thus the network topology may change randomly and at

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 17 Wireless Networks and Ad hoc Networks

unpredictable time. The nodes in the MANET dynamically establish routing


among themselves as they travel around, establishing their own network.
2. Ad hoc networks suffer from bandwidth constrained and variable capacity
links. Wireless links usually have lower reliability, efficiency, stability and
capacity as compared to wired network. The throughput of wireless
communication is even less than a radio’s maximum transmission rate after
dealing with the constraints like multiple access, noise, interference conditions,
etc. The reliability, efficiency, stability and capacity of wireless links are often
inferior when compared with wired links. This shows the fluctuating link
bandwidth of wireless links.
3. Each node in ad hoc network has autonomous behavior. Each node can act as a
host and router, which shows its autonomous behavior. All nodes have
identical features with similar responsibilities and capabilities and hence it
forms a completely symmetric environment.
4. Nodal connectivity is intermittent that is not steady or it is irregular.
5. The terminals in the network are light-weight terminals. In maximum cases,
the nodes in ad hoc network are mobile with less CPU capability, low power
storage and small memory size.
6. Shared Physical Medium - The wireless communication medium is accessible
to any entity with the appropriate equipment and adequate resources.
Accordingly, access to the channel cannot be restricted.
7. In Ad hoc network the energy constrained operations can be critical in terms
of certain resource utilization. As some or all the nodes rely on batteries or
other exhaustible means for their energy. Mobile nodes are characterized with
less memory, power and light weight features.
8. Ad hoc networks offer limited security. Wireless network are more prone to
security threats. A centralized firewall is absent due to its distributed nature of
operation for security, routing and host configuration.
9. Less human intervention is required in Ad hoc network. They require
minimum human intervention to configure the network, therefore they are
dynamically autonomous in nature. Ad hoc network has mobile and
spontaneous behaviour which demands minimum human intervention to
configure the network.
10. There is no single point of failure in an Ad hoc network.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 18 Wireless Networks and Ad hoc Networks

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.

1.2.3 Ad hoc Network-Architecture, Operations


Ad hoc network is a decentralized network in which nodes are moving arbitrarily. It is
mainly used in the areas where costly network infrastructure cannot be deployed.
Ad hoc network does not have any central access point. Every node is connected to
another node physically.
It is a temporary network setup generally for emergency purposes.
In this architecture communication is done directly between the nodes.
This type of network provides great flexibility.
Also this type of network is fit for smaller coverage area.
Interference and noise easily hinder the communication between the nodes. However,
detecting an error is easy in Ad hoc network as compared to infrastructure network.
Also configuring and re installation is quite economical as well. These networks do not
need much maintenance.
This network is costly for a small coverage area. In this network the transmission of
information is not reliable as compared to infrastructure network. But they are very
useful for emergency purposes like during flood, earthquakes etc.
The transmission is not very secure but offers good speed and serves the requirement
for communication in need.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 19 Wireless Networks and Ad hoc Networks

A model of mobile ad hoc network is shown in below Fig. 1.2.2.

Fig. 1.2.2 Mobile Ad hoc network

1.2.3.1 Ad hoc Network Architecture

Ad hoc network is formed in emergency situations such as disasters, wars, flooded


areas by the mobile nodes such as laptops, mobile phones and desktop machines in the
air. Each ad hoc network node is allowed to move in any direction and can communicate
with its neighbours.

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.

The architecture of Ad-hoc Network is shown in below Fig. 1.2.3.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 20 Wireless Networks and Ad hoc Networks

Fig. 1.2.3 Ad hoc network architecture

The Ad hoc architecture comprises three categories,


1. Enabling technologies - These technologies are further classified into several
classes :
1. Body Area Network (BAN)
2. Personal Area Network (PAN)
3. Local Area Networks (LAN)
4. Metropolitan Area Network (MAN)
5. Wide Area Networks (WAN)
2. Networking - Due to the dynamic topology nature of the network, the routing
protocols which are designed for wired network are not suitable for ad hoc
scenario. So the routing protocols have to be re-designed to support for ad hoc
networks and to improve robustness and adaptability.
Enabling technologies are used to provide end-to-end reliable data delivery. In
ad hoc scenario, locating receiver node is difficult due to high mobility of
mobile nodes. Therefore, localization mechanisms are used to determine the
location of a mobile node. Localization is the process by which a mobile node
can determine its position with respect to other mobile nodes in the network.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 21 Wireless Networks and Ad hoc Networks

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.

1.2.3.3 Ad hoc Network Operations


As mentioned earlier, in ad hoc network each mobile node acts as router and takes
responsibility to perform the following operations,
 Cooperate and organize to self-configure the network.
 Exchanges its own information to its neighbours as beacon messages periodically.
 Receives beacons or other packets from neighbours.
 Discover forwarder nodes to forward packets to distant locations.
 Forward the received packet to a specified destination.
 Broadcast the packet to all other neighbours which are in its transmission range.
 Mobile node can join the network and can leave the network at any time.

1.2.3.4 Ad hoc Network - Routing


Routing is the process of finding path in a network to transmit a data packet from the
sender node to the intended receiver. Since each mobile node forms frequent dynamic
topology due to high mobility, routing is one of the big challenging issues in Ad hoc

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 22 Wireless Networks and Ad hoc Networks

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.

1.2.4 Types of Wireless Ad hoc Networks


Wireless Ad hoc networks are categorized into different classes depending upon the
nature of their applications.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 23 Wireless Networks and Ad hoc Networks

1.2.4.1 Mobile Ad hoc Network (MANET)


An Ad hoc network of mobile devices. This is a self configuring and self organizing
network of mobile devices.

Fig. 1.2.4 Mobile Ad hoc network (MANET)

1.2.4.2 Vehicular Ad hoc Network (VANET)

Used for communication between vehicles. Intelligent VANETs use artificial


intelligence and Ad hoc technologies to communicate what should happen during
accidents. This network is formed by communication between moving vehicles and other
roadside devices.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 24 Wireless Networks and Ad hoc Networks

Fig. 1.2.5 Vehicular Ad hoc network (VANET)


(Quick reference – RSU : Roadside Unit, Vehicle-to-Infrastructure (V2I) communication,
Vehicle-to-Vehicle (V2V) communication)
1.2.4.3 Smartphone Ad hoc Network (SPAN)
Wireless Ad hoc network created on smart phones via existing technologies like Wi-Fi
and Bluetooth. These are peer to peer networks formed by smart phones within range of
each other without requiring any cellular carriers, wireless access point etc.

Fig. 1.2.6 Smartphone Ad hoc network (SPAN)

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 25 Wireless Networks and Ad hoc Networks

1.2.4.4 Wireless Mesh Network (WMN)


A mesh network is an Ad hoc network where the various nodes are in communication
directly with each other to relay information throughout the total network. The devices
connected to this network form a wireless mesh and depending upon the mobility
pattern, nature of devices and inter device distance.

Fig. 1.2.7 Wireless Mesh Network (WMN)

1.2.4.5 Army Tactical MANET


Used in the army for "on-the-move" communication, a wireless tactical Ad hoc
network relies on range and instant operation to establish networks when needed.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 26 Wireless Networks and Ad hoc Networks

Fig. 1.2.8 Army tactical MANET


(Quick reference - Unmanned Aerial Vehicles (UAVs), LAN – Local Area Network)

1.2.4.6 Wireless Sensor Network


Wireless sensors are portable devices that capture specific information from
environment ranging from temperature, humidity, pressure readings to noise level, traffic
volume etc. These portable sensing devices can form an Ad hoc network to deliver
information to a home base without needing to connect directly to it. This network is
developed to collect the information on the fly.

Fig. 1.2.9 Wireless sensor network

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 27 Wireless Networks and Ad hoc Networks

1.2.4.7 Disaster Rescue Ad hoc Network


Ad hoc networks are important when disaster strikes and established communication
hardware isn't functioning properly.

Fig. 1.2.10 Disaster rescue Ad hoc network

1.2.4.8 Intelligent based Mobile Ad hoc Network (iMANET)


This is used in linking fixed nodes and mobile nodes via routing protocol which
automatically establishes connection in decentralized manner.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 28 Wireless Networks and Ad hoc Networks

Fig. 1.2.11 Intelligent based mobile Ad hoc network (iMANET)

1.2.4.9 Flying Ad hoc Network (FANET)


FANET is a special case of MANET. The topology of this network can change
frequently when compared to VANET. Here an Unmanned Aerial Vehicle (UAV) flies
autonomously without carrying any human help. It does this by simply connecting
directly to satellite or ground station to establish Ad hoc network. This type of wireless
networking architecture is called Flying Ad hoc Network (FANET).

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 29 Wireless Networks and Ad hoc Networks

Fig. 1.2.12 Flying Ad hoc network (FANET)

1.2.5 Ad hoc Network - Commercial Applications


With the increased number of lightweight devices as well as evolution in wireless
communication, the ad hoc networking technology is gaining effort with the increasing
number of widespread applications.
Ad hoc networking can be used anytime, anywhere with limited or no
communication infrastructure.
The Ad hoc network architecture can be used in real time business applications,
corporate companies to increase the productivity and profit.
Ad-hoc networks are used frequently in new types of wireless engineering. Wireless
Ad-hoc networks require minimal configuration and can be deployed quickly, which
makes them suitable for emergencies, such as natural disasters or military conflicts.
There are dynamic and adaptive routing protocols so that these networks can be
configured quickly.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 30 Wireless Networks and Ad hoc Networks

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 31 Wireless Networks and Ad hoc Networks

8. Commercial and Civilian Environment - With the emergence of Ad hoc


network E-commerce, e.g., electronic payments from anywhere (i.e., in taxi)
have been very efficient and fast. The business databases can be accessed as per
need from anywhere.
9. Educational Applications - Ad hoc network can be used in universities and
campus for setting up virtual classrooms or conference rooms and for data
sharing.
10. Entertainment - Ad hoc networks can be used in multi-player games. The
network can deploy robotic pets outdoor.

1.2.6 Ad hoc Network Advantages and Disadvantages


Ad hoc network advantages
1. There is separation from central network administration.
2. The self-configuring nodes are also routers.
3. It is adaptive in nature. There are self configuring and self healing nodes, does
not require human intervention.
4. It is very cheap to set up since there is no wiring of nodes.
5. Ad hoc networks are scalable in nature and incorporate the addition of more
nodes.
6. Mobility allows Ad hoc networks being created on the fly in any situation
where there are multiple wireless devices.
7. Ad hoc networks are flexible and can be temporarily setup at anytime, in any
place.
8. Ad hoc networks have lower startup costs due to decentralized administration.
9. The nodes in ad hoc network need not rely on any hardware and software. So,
it can be connected and communicated quickly.
10. Lack of infrastructure makes the network robust in network failure.
11. Ad hoc networks do not restrict access to channels.

Ad hoc network disadvantages


1. In Ad hoc network the resources are limited due to various constraints like
noise, interference conditions, etc.
2. Ad hoc networks do suffer from slow data rate.
3. Ad hoc networks lack the authorization facilities.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 32 Wireless Networks and Ad hoc Networks

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.

1.2.7 Issues and Challenges in Ad hoc Networks


1. Limited bandwidth - The limited radio band results in reduced data rate
compared to wireless networks. Hence, optimal usage of bandwidth is
necessary by keeping low overhead as possible. The wireless networks have a
limited bandwidth in comparison to the wired networks. Wireless link has
lower capacity as compare to infrastructure networks. The effect of fading,
multiple accesses, interference condition is very low in Ad hoc networks in
comparison to maximum radio transmission rate.
2. Variability in capacity links due to bandwidth constraint - Being a link of
wireless the nodes have tendency to continue with low capacity in comparison
to the hardwired.
3. Dynamic topology - In dynamic topology the nodes are free to move in any
direction. Topology of network changes rapidly and unpredictably by the time.
Due to this topology the bidirectional and unidirectional routing exists.
Challenging task is to transferring the packets between the nodes because the
topologies are changes continuously. Due to dynamic topology the nodes have
less trust between them. If some settlements are found between the nodes that
also makes trust level questionable.
4. Multicast routing - Another challenge of Ad hoc network is multicast.
Multicast stands for multiple communication between wireless devices. Ad hoc
networks are the multicast dynamic networks because the nodes randomly
change their positions. The nodes have multiple hopes instead of single hop
and they are complex. As the nature the multicast is not remains for longer
period so that the protocol has to maintain mobility which includes the leaving
and joining of nodes. The new device adds in the network need to know all the
other nodes. To facilitate automatic optimal route selection dynamic update is
necessary due to existence of node.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 33 Wireless Networks and Ad hoc Networks

5. High Routing (Routing overhead ) - In Ad hoc networks due to dynamic


topology some nodes changes their position which affects the routing table.
Due to the mobility of nodes within the Ad hoc network, stale (and not
available now) routes are generated in the routing table leading to routing
overhead.
6. Mobility - Due to the dynamic behavior and changes in the network topology
by the movement of the nodes, Ad hoc networks faces path breaks and it also
changes in the route frequently.
7. Problem of hidden terminal - The collision of the packets are held due to the
transmission of packets by those node which are not in the direct transmission
range of sender side but are in range of receiver side.
8. Packet loss due to transmission error - The vulnerable nature of wireless
networks often lead to frequent packet loss due to traffic collision caused by
hidden terminals, interference and frequent path breaks caused by mobility of
nodes. By increase in collisions , hidden terminals, interference, uni-directional
links and by the mobility of nodes frequent path breaks a higher packet loss
has been faced by ADHOC networks.
9. Frequent network partitions - The random movement of nodes often leads to
network partitions. This affects mostly the intermediate nodes.
10. Power-constrained and operation - This is considered as a major challenge for
the Ad hoc network. Most of the nodes rely on limited battery life. Some of the
power of the batteries is used for data transmission, data processing and for
routing packets to their destination. This is a critical issue in the design of an
Ad hoc network. In Ad hoc network all the nodes rely on the batteries or some
exhaustible source of energy. Conversion in the energy is the optimized criteria
and an important system design. Lean power consumption is also used for the
light weight mobile terminals. Conservation of power and power-aware
routing is another aspect which needs to be considered in Ad hoc network.
11. Diffusion hole problem - The excess energy consumption is faced by the
nodes which are present in the boundaries of the holes. If the bypass holes are
wish to omit then the packets are delivered along the holes boundaries. This
enlarges the hole due to consumption of very much of the nodes and its
boundaries.
12. Quality of service - In Ad hoc network the environment changes constantly so
that it provides different quality of service levels which are challengeable. The

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 34 Wireless Networks and Ad hoc Networks

random nature in the quality communication of Ad hoc it is difficult to serve


good guarantee of service of the device. To support multimedia services
adaptive quality of services can be implemented over traditional resources.
13. Inter-networking - Communication with fixed networks is also expected from
Ad hoc networks in many cases. The existence of routing protocols in both the
networks is quite challengeable for pleasant mobility management.
14. Security, security threats and reliability - New security challenges are raised
by Ad hoc networks due to wireless nature. In Ad hoc networks or wireless
networks the trust management between the nodes leads to numerous security
attacks. A nasty neighbor node, relaying the packets is also a security problem
along with other vulnerabilities. Different schemes are used for authentication
and key management in distributed operations.
Reliability problem is also a wireless link characteristic due to limited wireless
transmission. Due to the broadcast nature of wireless medium packets loss and
errors do occur in the transmissions. In comparison to the wired network the
wireless networks are more vulnerable to security threats.
There are various security threats in Ad hoc networks. Mobile nodes are
usually more vulnerable to attacks within the network as well as outside the
network.
External Threats - Performing communication in free space exposes Ad hoc networks
to attacks as anyone can join the network, and eavesdrop (being hidden and listening) or
inject messages. External attacks are accomplished by entities which are outside of the
network or by nodes which are not authorized. These attacks generally threaten the
lower layers that is physical and data link layer. As, in Ad hoc network the nodes inherit
the mobile nature it is intrinsically difficult to secure this layer. These threats can be
further classified in following categories based on their action,
(i) Passive Attacks - Passive eavesdropping is a technique where an unauthorized
node silently listens the network traffic, even the route updates. It gathers the
data and attempts to discover nodes information (for example, IP addresses,
location of nodes, etc.) by listening to routing traffic. Such information can be
used to threaten the network by interfering the topology, knowing the
geographical location of the nodes and identifying the heavily used nodes.
Passive attack signifies that the attacker does not send any message, but just
listens to the channel. A passive attack does not disrupt the operation of a
protocol, but only attempts to discover valuable information. Passive attack is

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 35 Wireless Networks and Ad hoc Networks

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 36 Wireless Networks and Ad hoc Networks

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.

Cellular networks and Ad-hoc networks


Following table compares cellular network versus Ad hoc network with respect to
various system parameters :
Sr. No. Parameters Cellular network Ad Hoc network

1. Network routing Centralized, all the traffic Distributed, No


goes through the base centralized system such
station as Base station needed

2. Infrastructure Infrastructure required No infrastructure


requirements required

3. Switching Type Circuit Switching Packet Switching

4. Number of Hops Single hop type Multiple hops

5. Topology Star Mesh

6. Application Designed and developed Designed to meet best


for voice traffic effort data traffic
requirements

7. Cost and time for Higher cost and takes more Lower cost and does not
installation time for deployment take more time for
deployment

8. Call drops Low call drops during Higher breaks in the


mobility due to seamless path during mobility
connectivity across region

9. Network maintenance Requires periodic Nodes are self


maintenance and hence it is organising and hence it
costly. is less costly.

10. Frequency re-use It utilizes same frequency Dynamic frequency re-


channels in the nearby cells use is employed using
with proper RF planning carrier sense mechanism.
and antenna placement.
This is known as static
frequency re-use.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 37 Wireless Networks and Ad hoc Networks

11. Bandwidth (BW) The allocation of BW is The allocation of BW is


mechanism guaranteed and easy. based on shared channel
using complex MAC
algorithms.

12. Time synchronization Easy time synchronization. Difficult to do time


synchronization

13. Technologies IS-95, IS-136, GSM, Mobile WLAN 802.11e


WiMAX, CDMA, LTE

Table 1.2.1 Difference between cellular networks and Ad-hoc networks in tabular form

1.2.9 Design Issues of Ad hoc Wireless Network


The various design issues of wireless ad hoc network are discussed below,
1. Medium access scheme
2. Routing
3. Multicasting
4. Transport layer protocol
5. Pricing scheme
6. Quality of service provisioning
7. Self-organization
8. Security
9. Addressing and service discovery
10. Energy management
11. Deployment considerations.
1. Medium access scheme - The major issues considered while designing a MAC
protocol for Ad hoc wireless network are as follows : Distributed operation,
synchronization, hidden terminals, exposed terminals, throughput, access
delay, fairness, real time traffic support, resource reservation, ability to
measure resource availability, capability for power control, adaptive rate
control and use of directional antennas.
2. Routing - It is the process of determining a route based on hop count, need of
power and life time of the link in order to exchange information from one node

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 38 Wireless Networks and Ad hoc Networks

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 39 Wireless Networks and Ad hoc Networks

6. QoS provisioning - It is the performance level of services which is offered by a


service provider. If there is a better coordination and cooperation between
service provider and the user, then high QoS can be achieved. Some of the QoS
parameters, QoS-aware routing and QoS frameworks are discussed below :
a. QoS parameters differ from application to application. For instance,
bandwidth and delay are the important key parameters of multimedia
applications. Identifying trusty nodes and routing the packets through
them are key parameters of defense applications. Multiple link disjoint
paths and availability are the key parameters of emergency and rescue
operations related applications. Energy conservation and battery life are
the major QoS parameters in sensor networks.
b. QoS aware routing protocol should possess QoS parameters for
determining routing path. The routing measures considered are network
throughput, packet delivery ratio, packet loss rate, delay, reliability, bit
error rate and bandwidth consumption.
c. QoS framework is a complete system that is used to provide the assured
services to the concerned user or application. The key component of QoS
framework is a QoS service model that defines the serving way of user
requirements. One of the design issues is whether to provide service in
per-session basis or per-class basis. The other key components are QoS
routing, QoS signaling, QoS MAC, connection admission control and
scheduling schemes.
7. Self-organization - The mobile nodes in ad hoc networks would self-configure
the network by itself. Self-organization includes neighbour discovery, topology
organization and reorganization. Beacon signals would be exchanged between
mobile nodes during neighbour discovery. For organizing topology, every
node gathers information from other nodes. During topology reorganization,
every node maintains the updated information. The topology of the network
would be changed due to high mobility, node failures and frequent network
partitioning.
8. Security - Security is a challenging one in Ad hoc wireless networks, especially
in military areas. The attacks in Ad hoc wireless network are broadly classified
into two types :
1. Passive attack
2. Active attack.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 40 Wireless Networks and Ad hoc Networks

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 41 Wireless Networks and Ad hoc Networks

1.2.10 Ad hoc Wireless Internet


The Ad hoc wireless Internet extends the services of the Internet to the end users in an
ad hoc wireless network environment. Important applications of the Ad hoc wireless
Internet are wireless mesh networks, provisioning of temporary Internet services to
meeting venues, sports venues, temporary military settlements, battlefields, and
broadband Internet services in rural regions. A Below figure depicts the Ad hoc wireless
Internet protocol stack and structure of network.
Extends the services of the internet to end users over an Ad hoc wireless networks.

Fig. 1.2.13 Ad hoc wireless internet protocol stack and structure of network

Major issues in ad hoc wireless internet


1. Gateways - Gateway nodes in the Ad hoc wireless Internet are the entry points
to the wired Internet. The major part of the service provisioning is
incorporated in the gateway nodes. Gateways are usually owned and operated
by a service provider. Gateways can perform the tasks like, keeping track of
the end users, bandwidth management, load balancing, traffic shaping, packet

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 42 Wireless Networks and Ad hoc Networks

filtering, bandwidth fairness, address discovery, service discovery, location


discovery and various such network crucial tasks.
2. Address mobility - The Ad hoc wireless Internet faces the challenge of address
mobility. This problem is worse here as the nodes operate over multiple
wireless hops. Mobile IP can provide temporary solution for this.

3. Routing - Routing is a major problem in the Ad hoc wireless Internet, due to


the dynamic topological changes, the presence of gateways, multi-hop
relaying, and the hybrid character of the network. The possible solution for this
is the use of a separate routing protocol for the wireless part of the Ad hoc
wireless Internet. Routing protocols that exploit the presence of gateway nodes
are more suitable here.

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.

6. Usage pricing/billing - Since Internet bandwidth is expensive, it becomes very


important to introduce pricing/billing strategies for the Ad hoc wireless
Internet. Gateway is the preferred choice for charging the traffic to and from
the Internet. It is very complex to calculate the Pricing for the local traffic
(traffic within the wireless part, that is, it originated and terminated within the
wireless part without passing through the gateway nodes), where it becomes
necessary to have a dedicated, secure, and lightweight pricing/billing
infrastructure installed at every node.

7. Security provision - The inherent broadcast nature of the wireless medium


attracts not just the mobility seekers but also potential hackers who love to

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 43 Wireless Networks and Ad hoc Networks

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.

9. Service, address, and location discovery - By service discovery in any network


it means the activity of discovering or identifying the entity which provides a
particular service or resource. In wired networks, service location protocols
exist to do the same, and similar systems need to be extended to operate in the
Ad hoc wireless Internet as well. Address discovery refers to the services such
as those provided by Address Resolution Protocol (ARP) or Domain Name
Service (DNS) operating within the wireless domain. Location discovery refers
to different activities such as detecting the location of a particular mobile node
in the network or detecting the geographical location of nodes. Location
discovery services can provide enhanced services such as routing of packets,
location-based services, and selective region-wide broadcasts.

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).

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 44 Wireless Networks and Ad hoc Networks

Fig. 1.2.14 Ad hoc wireless Internet implemented by a wireless mesh network

1.3 Two Marks Questions with Answers


Part - A
Q.1 What is an Ad hoc network ?
Ans. : An Ad hoc network is a multi hop, infrastructure less network which has no
centralized server to control the communication between the nodes and resources
cannot be reserved beforehand. It is used in battlefields and military applications.
Q.2 Why are Ad hoc networks needed ?
Ans. : Ad hoc networking is often needed where an infrastructure network cannot be
deployed and managed. The presence of dynamic and adaptive routing protocols
enables quick formation of Ad hoc networks and is suitable for emergency situations
like natural disasters, spontaneous meetings or military conflicts.
Q.3 List the characteristics and applications of MANETs.
Ans. : The characteristics of MANETs are,
1. Dynamic topologies
2. Bandwidth-constrained and variable capacity links.
3. Energy-constrained operation.
4. Limited physical security.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 45 Wireless Networks and Ad hoc Networks

The applications of MANET are,


1. Defense applications
2. Crisis-management applications
3. Telemedicine
4. Tele-geo processing applications
5. Virtual navigation
6. Education via the internet.
Q.4 Define MANET.
Ans. : MANET is defined as an autonomous system of nodes or Mobile Stations (also
serving as routers) connected by wireless links, the union that forms a communication
networks, modeled in the form of an arbitrarily communication graph.
Q.5 What are various operating modes in wireless networks ?
Ans. : Operating modes in wireless networks are infrastructure mode and Ad hoc
mode. The IEEE 802.11 standards specify two operating modes - infrastructure mode
and Ad hoc mode (Infrastructure-less )
1. Infrastructure mode is used to connect computers with wireless network
adapters, also known as wireless clients, to an existing wired network with
the help from wireless router or access point. In this mode each node is
connected with other node through a fixed base station. The fixed station is
also known as Access Points (APs). An example for infrastructure based
network is cellular network in which base station or AP is used as fixed
equipment. Each network area is divided into cells and the base station
provides each cell with the network coverage which can be used for the
transmission of high quality voice, data and other types of messages.
2. Ad hoc mode is used to connect wireless clients directly together, without the
need for a wireless router or access point. An Ad hoc network consists of up
to 9 wireless clients, which send their data directly to each other. In this
mode Each node can communicate with each other without using any fixed
infrastructure. Mobile Ad hoc networks and Vehicular Ad hoc Networks
(VANETs) are the examples of infrastructure less networks. In Ad hoc
networks, each node acts as a router to forward the information in a multi-
hop fashion.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 46 Wireless Networks and Ad hoc Networks

Q.6 What are VANETs ?


Ans. : Vehicular Ad hoc network (VANET) - Used for communication between vehicles.
Intelligent VANETs use artificial intelligence and ad hoc technologies to communicate
what should happen during accidents. This network is formed by communication
between moving vehicles and other roadside devices.
Q.7 What are passive attacks in the network ?
Ans. : Passive eavesdropping is a technique where an unauthorized node silently
listens the network traffic, even the route updates. It gathers the data and attempts to
discover nodes information (for example, IP addresses, location of nodes, etc.) by
listening to routing traffic. Such information can be used to threaten the network by
interfering the topology, knowing the geographical location of the nodes and
identifying the heavily used nodes. Passive attack signifies that the attacker does not
send any message, but just listens to the channel. A passive attack does not disrupt the
operation of a protocol, but only attempts to discover valuable information. Passive
attack is usually impossible to detect this attack, as it does not produce any new traffic
in the network.
Q.8 What is wireless network ?
Ans. : Wireless networks are computer networks that are not connected by cables of
any kind. The use of a wireless network enables enterprises to avoid the costly process
of introducing cables into buildings or as a connection between different equipment
locations.
Q.9 What is Wi-Fi network ?
Ans. : 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.
Q.10 What is Bluetooth technology ?
Ans. : 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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 47 Wireless Networks and Ad hoc Networks

1.4 Long Answered Questions


Part - B
Q.1 Explain in detail about cellular and Ad hoc wireless networks. (Refer section 1.2)
Q.2 What are various types of wireless communication ? (Refer section 1.1)
Q.3 Devices connecting procedure in to wireless network. (Refer section 1.1)
Q.4 Explain in detail about applications of Ad hoc wireless. (Refer section 1.2)
Q.5 Explain in detail about Issues in Ad hoc wireless networks. (Refer section 1.1)
Q.6 Explain the Ad hoc network architecture. (Refer section 1.2)
Q.7 List the advantages and disadvantages of wireless communication. (Refer section 1.1)
Q.8 Explain various wireless communication. (Refer section 1.1)
Q.9 What are the various components of wireless networks ? (Refer section 1.1)
Q.10 Classify wireless network and explain it. (Refer section 1.1)



TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 1 - 48 Wireless Networks and Ad hoc Networks

Notes

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


UNIT - I

2 Routing in Ad hoc Networks

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

2.1 Introduction to Routing


An ad hoc network is a collection of mobile nodes forming a network without the help
of any centralized administration. Usually, mobile hosts use wireless radio frequency
transceivers for communicating with other mobile nodes. Since mobile nodes are not
fixed and changes network topology from time to time, establishing a communication
path between two nodes is a big challenging one.

2.1.1 Routing Concept and Process


1. Routing is the process of establishing a path between the sender and receiver nodes
for transmitting the packet along the path. Different types of routing protocols are
widely used to discover a path between two nodes and take the responsibility of
routing the packet to the intended destination with minimized delay, efficient
bandwidth consumption and maximizing reliability.
2. Since two hosts wishing to exchange packets cannot be able to communicate
directly, some form of routing protocol is necessary to relay the packets between
nodes. When the destination is few hops away from the source node, multi-hop
communication need to be used for establishing path between the source and
destination.

2.1.2 Major Issues in Designing Routing Protocols for Ad hoc Networks


Routing protocols used in wired networks cannot be directly applied to ad hoc
wireless networks because of the following design constraints,
1. Node mobility
2. Bandwidth constrained
3. Error-prone shared broadcast radio channel
4. Hidden and exposed terminal problems
5. Resource / energy constrained
6. Security
7. Highly dynamic topology
8. No infrastructure for centralized administration
9. Establishing end-to-end path.
Therefore, the design of new routing protocol has to consider the design constraints of
ad hoc wireless networks to meet out the requirements of an efficient routing protocol.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2-3 Routing in Ad hoc Networks

Ad hoc wireless networks are dynamic in nature. So establishing end-to-end


connection is too difficult in ad hoc environment. There are many design challenges that
need to be considered while designing a new routing protocol in ad hoc wireless
networks. The major issues in designing a routing protocol in ad hoc networks are
explained in the following sections.

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.

3. Error-Prone Shared Broadcast Radio Channel


The capacity and link error probability of wireless link varies from time to time.
Collisions may occur at node because of hidden terminal problem and exposed terminal
problem. So the newly designed routing protocol has to take this as a serious issue and
must introduce specific algorithms to avoid collisions.

4. Hidden and Exposed Terminal Problems


Consider node-A and node-C are in the transmission range of node-B, but is hidden
from each other. If both the nodes try to communicate with node-B simultaneously,
collision may occur at node-B. This event cannot be identified by node-A and node-C.
This happens because node-A is hidden from node-C. So node-A is not aware of the
transmission between node-C and node-B, similarly, node-C is not aware of the
transmission between node-A and node-B. The typical solution for this situation is so
called “Hidden terminal” problem. This scheme uses two control messages - RTS and
CTS. When node-A wants to transmit a packet to node-B, it first sends RTS packet to
node-B. This packet can be heard by neighboring nodes and received by node-B. As the

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2-4 Routing in Ad hoc Networks

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.

7. Highly Dynamic Topology


Frequent changes in local topology and changes in the topology of parts of the
network with which the node does not have any traffic correspondence, are required be
considered appropriately.

8. No Infrastructure for Centralized Administration


In ad hoc network, due to dynamic nature there is no provision for centrally
positioned administration node. This puts additional load on protocol as it needs to
manage the overall administrative operations for each node individually.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2-5 Routing in Ad hoc Networks

9. Establishing end-to-end path


It is very critical job in ad hoc network to establish the end-to-end path because the
network topology is dynamic and the devices can come in and out of the network. The
routing protocol needs to consider the dynamic aspects of ad hoc network.

2.1.3 Characteristics of an Ideal Routing Protocol for Ad hoc Wireless


Networks
It can be understood that there are various issues in an ad hoc wireless network
environment therefore wired network routing protocols cannot be used in ad hoc wireless
networks. Hence ad hoc wireless networks require specialized routing protocols that
address the challenges described above.
A routing protocol for ad hoc wireless networks should have the following
characteristics,
1. It must be fully distributed, as centralized routing involves high control overhead
and hence is not scalable. Distributed routing is more fault tolerant than centralized
routing, which involves the risk of single point of failure.
2. It must be adaptive to frequent topology changes caused by the mobility of nodes.
3. Route computation and maintenance must involve a minimum number of nodes.
Each node in the network must have quick access to routes, that is, minimum
connection setup time is desired.
4. It must be localized, as global state maintenance involves a huge state propagation
control overhead.
5. Protocol should be loop-free and free from stale routes.
6. The number of packet collisions must be kept to a minimum by limiting the number
of broadcasts made by each node. The transmissions should be reliable to reduce
message loss and to prevent the occurrence of stale routes.
7. It must converge to optimal routes once the network topology becomes stable. The
convergence must be quick.
8. It must optimally use scarce resources such as bandwidth, computing power,
memory, and battery power.
9. Every node in the network should try to store information regarding the stable local
topology only. Frequent changes in local topology and changes in the topology of
parts of the network with which the node does not have any traffic correspondence,
should not affect the node in any ways, that is, changes in remote parts of the

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2-6 Routing in Ad hoc Networks

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.

2.2 Types of Ad hoc Routing Protocols


Ad hoc routing protocols can be broadly classified into three categories namely,
1. Proactive or table driven routing protocols
2. Reactive or on-demand routing protocols
3. Hybrid routing protocols.

2.2.1 Proactive Routing Protocols (Table Driven Routing Protocols)


1. Proactive routing protocols are also called as table-driven routing protocols in
which each node maintains a routing table.
2. Routing table contains up-to-date routing information of the entire network.
Whenever a node wants to send a packet to the receiver node, it looks up its own
routing table to find the routing path from itself to the intended receiver.
3. These routing tables have to be updated periodically to maintain the current stable
or available paths. This can be achieved by exchanging or broadcasting the periodic
beacon signals between the nodes.
4. Therefore, each node can have the knowledge about the complete network
topology. Hence each node can update its routing table based on the beacon signal
it has received from its neighbors.

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2-7 Routing in Ad hoc Networks

Various Proactive Routing Protocols


The various protocols which use the concept of proactive routing are as follows,
1. Destination sequenced distance-vector routing protocol
2. Wireless routing protocol
3. Cluster-head gateway switch routing protocol
4. Fisheye state routing.

2.2.1.2 Destination Sequenced Distance Vector Routing


Destination Sequenced Distance Vector (DSDV) routing protocol is one of the popular
proactive routing protocols of ad hoc network. In DSDV, each node keeps record of route
information in the form of routing table. Each table contains the following information :
 ID of destination node
 Details of next hop
 Metric
 Sequence number
 Time-to-live parameter.
Each route broadcast message includes the list of ID of destination node, number of
hops required to reach the destination node, next hop, recent sequence number and
metric parameter. Each node exchanges its updated routing table with each other.
Updates in the routing table can be sent to other nodes in two ways :
 Full dump update
 Incremental update.
In full dump update method, a node sends the whole routing table to the neighbors
and thereby increases network overhead. In incremental update method, only the recent
updated entries are sent. The incremental update method is more suitable when the
network is large and stable so that heavy traffic can be avoided.

Table Maintenance in DSDV


The steps followed for maintaining a routing table at each node is given below,
 Each node receives the route information with most recent sequence number from
other nodes and updates its table.
 The node looks at its routing table in order to determine the shortest path to reach
all the destinations.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2-8 Routing in Ad hoc 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.

Destination Next Hop Metrix Sequence No

B B 1 342

C C 1 168

D B 2 121

E C 2 24

Table 2.2.1 Routing table at node A

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.

Maintaining Metric Field


In ad hoc wireless network, all the nodes are moving and relocate its position from
time to time. When topology changes dynamically each node will broadcast a routing
table update packet to its neighbours. The procedure for updating metric field in the
routing table update packet is as follows,
• The routing table update packet starts with a metric of one.
• When the neighbour nodes receive this packet, it will increment this metric by one
and then re-broadcast the updated packet to its neighbours.
• This process will be repeated until all the nodes in the network receive the copy of
update message.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2-9 Routing in Ad hoc Networks

• 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.

Significance of Sequence Number


When a node broadcasts a routing table update packet, it has to increase the sequence
number by one. This is used to find out the updated route packet.
When a node receives an update packet from its neighbour node and if the sequence
number is equal to or greater than the sequence number of already received packet, then
the routing packet will be updated in the table. Else, the received packet will be assumed
as a stale or old packet and hence discarded.

2.2.1.2 Wireless Routing Protocol


Wireless Routing Protocol (WRP) is one of the proactive routing protocols in ad hoc
wireless networks.
When compare with DSDV, the WRP differs in table maintenance and the procedure
used in updating routing tables.
In order to maintain the accurate information in the routing table, in WRP, each node
maintains four tables. These tables are explained below,
1. Distance table
2. Routing table
3. Link cost table
4. Message re-transmission list.

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 10 Routing in Ad hoc Networks

4. Message Retransmission List (MRL)


This list contains the message to be transmitted in the route update packet. It also
maintains the details of the nodes from which it has to receive acknowledgement. So, this
table contains the sequence number of the update message to be transmitted, counter
value used for retransmission, list of updates sent in the update message and
acknowledgments received from other nodes.

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

Table 2.2.2 Routing table at node-A with destination node-E

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 11 Routing in Ad hoc Networks

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.

2.2.1.3 Cluster-Head Gateway Switch Routing Protocol


The Cluster-head Gateway Switch Routing (CGSR) protocol forms hierarchical
network topology rather than forming flat network topology. In CGSR, clusters are
formed in the network. Nodes present in the cluster are called as members of the cluster.
Each cluster contains a special node called cluster-head which controls its cluster. Each
cluster-head maintains the information of the members of that cluster.
CGSR uses Least Cluster Change (LCC) algorithm to select cluster-head. Clusters can
overlap with other clusters. Communication between the clusters can take place through
the common nodes (members of more than one cluster) exists in the overlapping area of
each cluster. The common nodes are called as gateways or border nodes. Data
transmission can be carried out through the cluster-heads of each cluster.
When a cluster-head enters in another cluster, it cannot act as cluster-head; it acts as
the member of new cluster. In CGSR, each node contains two tables namely,
 A cluster-member table
 A routing table.
Cluster-Member Table - This table maintains the cluster-head of each destination
node in the network.
Routing Table - This table contains routing information such as destination node, next
hop, metric and the sequence number.
Each table is updated periodically at every node. Before performing actual packet
transmission, each node has to receive a token from its cluster-head. This token includes
the information of destination cluster-head and the next hop node information taken from
the cluster-member table and the routing table of its cluster-head. The steps involved in
packet transmission using CGSR are given below,
 When a node wants to send a packet to the node belongs to same cluster, it
forwards the packet directly to the cluster-head.
 Cluster-head checks whether the destination node belongs to that cluster or not.
 If the destination node belongs to that cluster, then the cluster-head forwards the
packet to the destination node directly.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 12 Routing in Ad hoc Networks

 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.

Fig. 2.2.3 Network topology of CGSR

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.

2.2.1.4 Fisheye State Routing


Fisheye State Routing (FSR) is one of the table-driven routing protocols. In FSR, each
node broadcasts and exchanges the details of farthest node rather than broadcasting
neighbours information frequently in order to reduce the control overhead. FSR protocol
comprises three phases namely,
1. Neighbour Discovery
2. Information Dissemination
3. Route Computation.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 13 Routing in Ad hoc Networks

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.

2.2.2 Reactive Routing Protocols


1. Reactive routing protocols are also called as on-demand routing protocols. In this
type of routing protocols, each node determines the routing path whenever it is
ready for transmitting data to other node in the network.
2. Unlike proactive routing protocols, no node maintains routing table. Routing paths
are discovered only when required (on-demand).

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 14 Routing in Ad hoc Networks

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.

Various Reactive Routing Protocols


Reactive routing protocols are also called as on-demand routing protocols. The
protocols which use reactive routing concept are as follows,
1. Dynamic source routing protocol
2. Ad hoc on-demand routing protocol
3. Temporarily ordered routing algorithm
4. Location aided routing
5. Associativity-based routing
6. Signal stability-based routing protocol
7. Flow oriented routing protocol.

2.2.2.1 Dynamic Source Routing (DSR) Protocol


Dynamic Source Routing (DSR) protocol is one of the popular reactive routing
protocols that discover a route between the source and destination whenever required.
The operation of this protocol is based on source routing. The sender knows the complete
route to reach the destination. Each data packet carries the source route in the packet
header.
Since each packet carries the complete route information in the packet, the
intermediate nodes do not maintain routing information to route the packets to the
destination. Nodes which use reactive routing protocol does not maintain routing table.
Therefore, the number of message exchanges between nodes is very low and hence leads
to less network overhead.
So, the major advantage of this protocol is that the bandwidth usage is limited by
avoiding the periodic table updates. However, at the time of route discovery, the sender

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 15 Routing in Ad hoc Networks

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.

Route Discovery Phase


Route discovery phase is also known as route construction phase. This phase follows
the steps given below,
 The sender node broadcasts (floods) the Route Request (RREQ) packet in the
network if it does not have a route to the intended destination.
 The neighbouring nodes which receive the RREQ packet will attach its ID and
rebroadcast the RREQ packet. This process continues till any intermediate node
has the information about destination or until the destination node receives this
packet.
 One node may receive multiple numbers of RREQ packets. Then, the destination
node selects only one path with shortest distance.
 On receipt of RREQ messages, the actual destination will send a Route Reply
(RREP) message to the sender node through the selected path.
 After receiving the RREP packet, actual data transmission will be started between
the sender and the receiver nodes.
The route discovery phase of DSR protocol using RREQ packet is shown in below
Fig. 2.2.4,

Fig. 2.2.4 Route construction in DSR protocol

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 16 Routing in Ad hoc Networks

paths like A-B-E and A-C-D-H. Node F selects


shortest path and sends a reply message by
attaching complete path in the packet as shown
in below Fig. 2.2.5,
On receipt of reply message from node F,
node-A uses the path that is specified in the
packet for actual data transmission. Each node
maintains a routing catch. All the routes learned
Fig. 2.2.5 Route reply in DSR
by a node are recorded in a route cache of that
protocol
node. This route information can be used by the
node in future. This concept reduces the time required to discover a new route.

Route Maintenance Phase


In this phase, if any node finds that the path is broken, then a Route Error (RERR)
message will be forwarded to the sender node. So, the sender node again starts the route
construction phase by broadcasting RREQ packet to discover an alternate path in order to
reach the actual destination node.
Furthermore, if a node detects an error along the path of a packet transmission, then
the node forwards a route error packet to the sender. The route error packet contains the
IDs of the upstream and downstream nodes at both ends of the node in error. When a
route error packet is heard by neighbors, the link in error is removed from any route
caches.

2.2.2.2 Ad-hoc On-demand Distance Vector (AODV) Protocol


It is one of the reactive or on-demand routing protocols used widely in mobile ad hoc
networks. As DSR protocol, AODV protocol also operates on two phases namely, route
discovery and route maintenance mechanism. The major difference between DSR and
AODV protocols, in AODV, the source route will not carry the complete path. Each node
only knows its previous hop and next hop information of the established path.

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 17 Routing in Ad hoc Networks

 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).

Fig. 2.2.6 (a) Broadcasting RREQ packet in AODV protocol

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 18 Routing in Ad hoc Networks

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.

2.2.2.3 Temporarily Ordered Routing Algorithm


Temporarily Ordered Routing Algorithm (TORA) is one of the reactive routing
protocols and works based on 'link reversal' algorithm. The main motive of TORA is to
reduce the transmission of control messages in mobile environment. TORA performs the
following functions,
1. Route discovery
2. Route maintenance
3. Removing route if not valid.
Every node maintains local topology based on the information received from its
neighbors. In TORA, nodes have an ability to discover the network partitions.

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 19 Routing in Ad hoc Networks

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.

Route Maintenance and Removing Route


If any intermediate node identifies
that the path with destination is broken
or becomes invalid, then it changes its
distance value higher than the existing
one and again starts to broadcast Update
packet. In this case, DAG has to be
recomputed using link reversal
Fig. 2.2.7 (b) Route maintenance in TORA
algorithm. The neighbor node which
receives the update packet will reverse the path as shown in Fig. 2.2.7 (b).
Node-E broadcasts Update packet. On receiving this, node-A reverses the path
between E and A. Similarly, if the path between node-C and node-D breaks, then the link
(C-D) will be removed. This leads to separate the node-D from the network. Now nodes
A, E and C remain in a network and node-D is partitioned from the network. This will in
turn make changes in DAG. This representation also makes network partitions. Using
Clear message, the existing path in the partition with respect to destination is removed.

2.2.2.4 Location Aided Routing


Location Aided Routing (LAR) protocol uses Global Positioning System (GPS) for
identifying the positional information of a node in order to perform well-organized
routing. LAR exchanges control packets on two regions,
 Expected region
 Request region.
Expected Region - Based on the past mobility information of destination node, the
expected region is constructed. Therefore, the expected region is the region of the
destination node where it is assumed to be present. This zone can be determined based on
the available mobility information about the destination.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 20 Routing in Ad hoc Networks

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.

Transmission of Control Packets


Control packets can be flooded on the request region. If any node receives the control
packet in outside of the request region, then the packet will be discarded at the node. If
sender node does not find any forwarder node in the particular request region, then the
region of request zone (region) will be extended.
TORA uses two algorithms for taking decisions in forwarding and rejecting the
packets which had been received from other nodes. They are,
1. LAR1 2. LAR2
These two algorithms are discussed in detail below.

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.

Fig. 2.2.8 Expected and request regain in LAR1

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 21 Routing in Ad hoc Networks

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).

Fig. 2.2.8 (b) LAR2 algorithm

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 22 Routing in Ad hoc Networks

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.

2.2.2.5 Associativity-based Routing


Associativity - Based Routing (ABR) protocol is one of the on-demand routing
protocols. The route can be selected based on link stability (temporal stability). The
wireless links between nodes can be classified as,
• Stable link
• Unstable link.
Temporal stability refers the count of beacon signal a node receives from its neighbors.
Based on temporal stability, each neighbor can be classified as,
• Stable neighbour
• Unstable neighbor.
Each node maintains route cache to store the information about destination.

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.

Fig. 2.2.9 Operation of ABR protocol

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 23 Routing in Ad hoc Networks

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.

2.2.2.6 Signal Stability-based Adaptive Routing Protocol


Single Stability-based Adaptive (SSA) routing protocol uses the concept of beacon-
based on-demand routing. It uses the stability of signal for determining efficient and
stable routes. The signal strength of each beacon is measured and is classified as,
 Stable signal
 Unstable signal.
SSA protocol comprises two protocols,
 Forwarding Protocol (FP)
 Dynamic Routing Protocol (DRP).
Forwarding Protocol - FP routes the packets to the intended destination through
specific path.
Dynamic Routing Protocol - DRP communicates with other DRP processes to collect
information and maintain a routing table. Each routing table maintains two fields,
 Beacon count
 Signal strength of its neighbours.
Based on the received beacons from neighbor nodes, one node can classify the weak
and strong links. If a node receives more number of strong beacons from other nodes,
then the link is assumed as strong link. Other links are weak or unstable links. The
strength of the signal is maintained in a table called Signal Stability Table (SST).

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).

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 24 Routing in Ad hoc Networks

Fig. 2.2.10 (a) Operation of SSA protocol

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).

Fig. 2.2.10 (b) Route maintenance in SSA protocol

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 25 Routing in Ad hoc Networks

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.

2.2.2.7 Flow Oriented Routing Protocol


Flow Oriented Routing Protocol (FORP) is one of the reactive routing protocols. FORP
uses a prediction based mechanism called multi-hop handoff for providing solution to
path breaks in real-time packet flows. Unlike other on-demand routing protocols, FORP
operates based on prediction mechanism to prevent the link breaks. In order to prevent
link breaks, FORP uses the following information.
 Mobility of a node
 Location of a node.
Based on the above information, each node maintains the following details of the path.
 Link Expiry Time (LET)
 Route Expiry Time (RET).
Link Expiry Time - LET is the maximum lifetime of a link that can be determined by
every node. LET can be calculated based on the positional information of the node,
moving direction and its transmission range.
Route Expiry Time - The lowest LET of the wireless link of a path is assumed as RET.

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 26 Routing in Ad hoc Networks

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.

Fig. 2.2.11 Route establishment of FORP

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 27 Routing in Ad hoc Networks

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.

2.2.3 Hybrid Routing Protocols


1. Hybrid routing protocols combine the features of both proactive and reactive
routing protocols.
2. In this protocol, the network is divided into zones. Each node uses node ID and
zone ID during packet transmission.
3. Data transmission can be carried out to other zones using border nodes of a zone.

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

Hybrid Routing Protocols


Hybrid routing takes the advantages of both the proactive and reactive routing
protocols. In this routing protocol, nodes are grouped into zones.
Nodes which want to communicate within a particular region (zone) can act
proactively. In this case, each node maintains a routing table; whenever a node wants to
communicate within the region can looks at the routing table and find the path for the
intended recipient. Otherwise, each node uses reactive type of protocol for transmitting a
packet to the designated recipient. In this case, each node discovers a route using route
discovery mechanism.
Various routing protocols which use hybrid routing concept are as follows,
1. Core extraction distributed ad hoc routing protocol
2. Zone routing protocol

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 28 Routing in Ad hoc Networks

3. Zone-based hierarchical link state routing protocol

2.2.3.1 Core Extraction Distributed Ad-hoc Routing Protocol


Core Extraction Distributed Ad-hoc Routing (CEDAR) protocol is one of the hybrid
routing protocols. It takes the advantages of proactive and reactive routing. It is also
called as partitioning protocol. In CEDAR, each network has partitions where dominating
nodes or core nodes are available. Other nodes are called as core members. The core
nodes form a set called Dominating Set (DS). In DS, each node is at most one hop away
from core node. All the core nodes are interconnected via virtual links called tunnels. A
virtual link is a path between two core nodes of the network. CEDAR uses an algorithm
called core selection algorithm to select core nodes in the network.

Core Node Selection Procedure


The selection of core nodes is done by using distributed algorithm. Initially, during the
core extraction phase, a set of nodes is selected dynamically to form the core of the
network. Core nodes are taking responsibility to transmit packet over the network. In
order to perform routing efficiently, each core node collects the information of its
neighboring core nodes.

Core Broadcast Mechanism


Core broadcast mechanism is used to determine a route in order to transmit a packet.
Each core node exchanges its information with neighboring core nodes and hence
creating virtual link between them. This process leads to efficient routing. When a core
node moves away, a new core selection phase will be initiated.
Information regarding link state is propagated throughout the network using link state
propagation mechanism. The link state propagation mechanism uses two types of waves,
 Slow-moving increase-waves
 Fast-moving decrease-waves.
The increase-waves carry high bandwidth link information whereas decreasing-waves
carries reduction in the available total bandwidth.

Route Establishment
The route establishment of CEDAR uses two phases namely,
 Detection of core path
 Detection of QoS achievable path over core path.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 29 Routing in Ad hoc Networks

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.

Finding Core Path


The source core establishes a path with the destination core using shortest-highest-
bandwidth links. Fig. 2.2.12 shows the operation of CEDAR protocol.

Fig. 2.2.12 Operation of CEDAR protocol

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 30 Routing in Ad hoc Networks

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.

2.2.3.2 Zone Routing Protocol


Zone Routing Protocol (ZRP) is one of the hybrid routing protocols which uses the
advantages of both proactive and reactive routing protocols. In this protocol, each node
acts proactively within a n-hop neighborhood of each node in the network. The route
discovery phase of reactive routing protocol is used by every node when the destination
node is beyond the sender's zone. The nodes which are on the edges of the zone are called
border nodes. ZRP uses two protocols for packet transmission are discussed below,
 Intra-zone routing protocol
 Inter-zone routing protocol
Intra-zone routing protocol (IARP) is used when the nodes use proactive routing. The
Inter-zone Routing Protocol (IERP) can be used by the node when it uses reactive routing.
The zone can be n = 1 – hop neighborhood and n = 2 - hop neighborhood. Fig. 2.2.13
depicts the routing zone of node - A.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 31 Routing in Ad hoc Networks

Fig. 2.2.13 Zone radius with respect to node A

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 32 Routing in Ad hoc Networks

2.2.3.3 Zone-based Hierarchical Link State Routing Protocol


Zone-based Hierarchical Link State (ZHLS) routing protocol operates based on hybrid
routing protocol. This protocol uses the positional information of each node to create non-
overlapping zones. Network is divided into zones and unique ID is assigned to each
zone. Each node in the zone is identified using node ID. In order to route a packet, each
node uses node ID and zone ID. The positional information of each node is identified
based on its zone ID. The location or positional information of each node can be
determined using GPS.

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.

Fig. 2.2.14 Network topology with different zones for ZHLS

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 33 Routing in Ad hoc Networks

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

B A,D and zone E

C A, D and zone I

D B,C and zone C

Table 2.2.3 (a) Node LSP in zone B

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

Table 2.2.3 (b) Zone LSP

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 34 Routing in Ad hoc Networks

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.

2.3 Advantages and Disadvantages of Ad hoc Wireless Routing Protocols

2.3.1 Proactive (Table Driven) Routing Protocols


Name of the Protocol Advantages Disadvantages
DSDV Route establishment requires Periodic beaconing increases
less time. network overhead.

Not suitable for highly dynamic


environment.

Best path is maintained in the Inefficient due to periodic update


routing table. mechanism.

Exchange of routing table


consumes high bandwidth.

Each node has to maintain routing


table separately.

WRP Route establishment requires Multiple table maintenance


less time. requires larger memory.

Faster convergence. Requires high processing power.

Tables can be obtained with


fewer information.

CGSR Better bandwidth utilization is Length of each path is high.


possible.

Implementing priority Instability of links due to high


scheduling schemes are easier. mobility.

Table 2.3.1 Advantages and disadvantages of various table driven routing protocols

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 35 Routing in Ad hoc Networks

2.3.2 Reactive (On-Demand) Routing Protocols


Name of the Protocol Advantages Disadvantages
When there are no symmetric links, Failed link cannot be repaired.
then source will initiate route
discovery.

Periodic flooding is not required. Connection establishment is


DSR higher.

Reduces control overhead. Performance will be degraded


due to high mobility

Saves bandwidth. Routing overhead is heavy.

Most recent route is identified using Large network leads to


destination sequence number. maximizing delay in finding
path.
Periodic flooding is not required.

Least congested route is established Asymmetric links cannot be


AODV rather than finding shortest route. used.

Since source initiated protocol, In large networks, control


connection establishment takes little overhead may be heavy due to
delay. multiple route reply packets.

Less overhead in small networks.

Stable links are preferred. The established stable path may


be longer than the shortest path.

ABR Fewer path breaks due to stable Route cache is not used.
links.
More power consumption due
to beacon broadcast.

Uses stable routes. In case of link failure,


identifying a new path does not
follows link stability principle.

Link stability can be classified using Path establishment takes long


SSA beacon count. time.

More power consumption.

During path establishment,


shortest path may be omitted
due to longer stable path.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 36 Routing in Ad hoc Networks

Path break can be reduced by Requirement of time


calculating LET and RET. synchronization leads high
FORP control overhead.

Proactive routing performs well in Positional information of nodes


high dynamic topologies. depends on GPS.

Table 2.3.2 Advantages and disadvantages of various on-demand routing protocols

2.3.3 Hybrid Routing Protocol


Name of the Protocol Advantages Disadvantages
QoS and routing can be If core nodes move away,
performed effectively. performance will be highly
degraded.

Increase and decrease waves are Core node update mechanism


used in finding stable high- leads to high control overhead.
CEDAR
bandwidth and unstable low-
bandwidth information.

Communication through core


nodes provides reliable
communication.

Control overhead is highly If the destination is not in the


reduced due to proactive and zone, then the message cannot
reactive routing. be received by the destination
ZRP with less delay.
Border-casting takes less time to
transmit a packet.

Less bandwidth is consumed.

Requires less memory. High network overhead due to


zone-level topology.

Established path may be non-


ZHLS
optimal.
Robustness.
Requires geographical
information.

Table 2.3.3 Advantages and disadvantages of various hybrid routing protocols

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 37 Routing in Ad hoc Networks

2.4 Two Marks Questions with Answers


Part - A
Q.1 What do you mean by routing ?
Ans. : Routing is a process of establishing a path between the sender and receiver
nodes for transmitting the packet along the path.
Q.2 What are the design constraints of a routing protocol ?
Ans. : The design constraints of a routing protocol are,
 Node mobility
 Highly dynamic topology
 No infrastructure for centralized administration
 Bandwidth constrained
 Energy constrained
 Establishing end-to-end path.
Q.3 What are the types of ad hoc routing protocols ?
Ans. : Ad hoc routing protocols can be broadly classified into three categories :
 Proactive or table driven routing protocols
 Reactive or on-demand routing protocols
 Hybrid routing protocols.
Q.4 What do you mean by proactive routing protocols ?
Ans. : Proactive routing protocols are also called as table-driven routing protocols in
which each node maintains a routing table. Routing table contains up-to-date routing
information of the entire network.
Q.5 List the advantages and disadvantages of proactive routing protocols.
Ans. : Advantage
 Minimum time is required to find out a route for data transmission.
Disadvantages
 Due to the frequent change of network topology, the exchange of up-to-date
information has to be done periodically.
 Network overload is high.
 Bandwidth consumption is high in large networks.
 This type of protocol is not suited for large networks.
Q.6 Define reactive routing protocols.
Ans. : Reactive routing protocols are also called as on-demand routing protocols. In
this type of routing protocols, each node determines the routing path whenever it is
ready for transmitting data to other node in the network.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 2 - 38 Routing in Ad hoc Networks

Q.7 List the advantages and disadvantages of reactive routing protocols.


Ans. : Advantages
 Needs to broadcast less control messages for discovering route when required
 Network overhead is low
 Suitable for large networks
 Bandwidth wastage is low.
Disadvantage
 Time taken to discover a route is non-predictable.
Q.8 What is hybrid routing protocols ?
Ans. : Hybrid routing protocols combine the features of both proactive and reactive
routing protocols. In this protocol, the network is divided into zones.
Q.9 Define wireless routing protocol.
Ans. : Wireless Routing Protocol (WRP) is one of the proactive routing protocols in ad
hoc wireless networks.
Q.10 What is routing table ?
Ans. : 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.

2.5 Long Answered Questions


Part - B

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)


TECHNICAL PUBLICATIONS® - An up thrust for knowledge


UNIT - II

Wireless Sensor Networks-


3 Introduction and Architectures

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

3.1 Wireless Sensor Networks - Introduction


Wireless Sensor Networks (WSNs) are distributed networks which are formed by
small, lightweight wireless nodes. A Wireless sensor network can be defined as a network
of devices that can communicate the information gathered from a monitored field
through wireless links. The data is forwarded through multiple nodes, and with a
gateway, the data is connected to other networks like wireless Ethernet.

3.1.1 Wireless Sensor Networks - Fundamentals


1. WSN is a self-organizing network where set-up and configuring network can be
done automatically without requiring any human intervention. For data
transmission, each node has to form an ad hoc network among them. Sensor
nodes are small, powerful and inexpensive nodes. Like MANETs, WSN also
performs multi-hop communication. The coverage area of sensor node is limited
due to low energy and simple antenna. A major issue of WSN is to maximize the
life of the network. A typical wireless sensor network is depicted in Fig. 3.1.1.

Fig. 3.1.1 Wireless sensor network

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3-3 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.

3.1.2 Wireless Sensor Network - Characteristics


The characteristics of WSN are as follows,
1. The consumption of power limits for nodes with batteries
2. Capacity to handle with node failures
3. Some mobility of nodes and heterogeneity of nodes
4. Scalability to large scale of distribution
5. Capability to ensure strict environmental conditions
6. Simple to use
7. Cross-layer design.

3.1.3 Wireless Sensor Network (WSN) vs. Ad hoc Network


WSN can be considered as a special type of MANET. Differences between these two
networks (WSN and MANET) are given in below Table 3.1.1.
Parameters MANET WSN
Nodes Laptops, palmtops, PDAs, Sensor nodes
mobile devices etc

Size of node Little large Small

Power High Limited

Memory High Limited

Computational capacity High Limited

Complex computations Possible Impossible

Node density Tens of nodes over an area. Thousands of nodes over an


area.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3-4 Wireless Sensor Networks - Introduction and Architectures

Node reliability High Low

Node failure Low High

Communication Broadcast and point-to-point Broadcast communication.


communication.

Node identity Possess global identities No global identification.

Node movement Dynamic Static

Transmission range High Low

Bandwidth High Order of 10 kbps

Communication protocol Complex computation. Simpler

Information flow Disordered or chaotic. Well-structured.

Table 3.1.1 WSN Vs. MANET

3.1.4 Subsystems of Sensor Node


Each sensor node in the sensor network consists of three subsystems namely,
1. The sensor subsystem - This subsystem senses the environment.
2. The processing subsystem - This subsystem performs local computations on the
sensed data.
3. The communication subsystem - This is responsible for exchanging the processed
message with neighbouring sensor nodes.

3.1.5 Sensor Nodes Functions


Sensor nodes can perform following functions,
1. Wireless communication
2. Signal processing
3. Topology and connectivity management
4. Storage of data
5. Routing
6. Analyzing the received data
7. Digital encoding
8. Error correction
9. Scheduling
10. Self-assembling
11. Clustering.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3-5 Wireless Sensor Networks - Introduction and Architectures

3.1.6 Issues Related to Sensor Nodes


The various issues of sensor nodes are listed below,
1. Type of sensor
2. Energy/Power consumption
3. Environment in which sensor node is working
4. Computational capability
5. Sensing capability
6. Connectivity
7. Control of remote devices.

3.1.7 Types of Sensors in Sensor Wireless Networks


Sensors are broadly classified into two categories namely,
1. Active sensors : These sensors require power supply. LiDAR (Light detection
and ranging), photoconductive cell, radars and sonar are widely used high
energy active sensors.
2. Passive sensors : These sensors do not require power supply. It includes
radiometers, acoustic, strain humidity and temperature measuring devices.
Passive sensors are low-energy devices.
The most frequently used different types of sensors are listed below,
1. Temperature Sensors - Sensors which gives temperature quantity as an electrical
signal is called temperature sensor. Different types of temperature sensors used
for measuring temperature are contact type temperature sensors, non-contact
type temperature sensors. Based on the requirement and environment, different
types of sensors are used for measuring temperature in different applications.
2. Speed Sensors - Sensors that are used for detecting speed of an object (e.g.
vehicle speed) is called as speed sensor. Some of the examples for speed sensors
are vehicle’s wheel speed sensors, speedometers, LIDAR, ground speed radar, air
speed indicators and so on.
3. IR Sensors - These sensors emit and detect the infrared light using photo-chips
are called as IR sensors. In general, IR sensors are used for detecting obstacles of
robotic vehicles and thereby controlling the moving direction of the robotic
vehicle. IR sensors are also used in remote control technology.
4. PIR Sensors - PIR sensor or pyroelectric sensor is an electronic sensor which is
used for measuring the infrared light radiation emitted from objects. If an object

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3-6 Wireless Sensor Networks - Introduction and Architectures

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.

3.2 Sensor Node Architecture


A sensor node is a device that can be used in a sensor network for performing data
gathering, processing and communicating with other sensor nodes in the network. The
following section explains the architecture of a sensor node.

3.2.1 Single Node Architecture


The basic components of a sensor node are as follows :
1. A sensing unit 2. A processing unit
3. A communication unit 4. A power supply unit
The architecture of a sensor node is shown in Fig. 3.2.1.

Fig. 3.2.1 Architecture of a sensor node

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3-7 Wireless Sensor Networks - Introduction and Architectures

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.

3.2.2 Hardware Components of a Sensor Node


The four basic hardware subsystems of a sensor node are as follows,
1. Computing subsystem
2. Power supply subsystem
3. Communication subsystem
4. Sensing subsystem.
1. Computing Subsystem - Each sensor node consists of a microprocessor to
control the sensor. Microprocessor unit of every sensor node is responsible for
executing and managing communication protocols. This subsystem is also
responsible for data processing and manipulation, error correction and
encryption, digital modulation and demodulation.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3-8 Wireless Sensor Networks - Introduction and Architectures

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.

3.2.3 Software Subsystems of a Sensor Node


The software subsystems of sensor nodes are as follows,
1. Operating System (OS) microcode
2. Sensor drivers
3. Communication processor
4. Communication drivers
5. Data processing mini-apps.
1. Operating System Microcode - OS microcode is used by high-level modules of
node-resident software. This microcode protects the software from the machine
level functionality. Tiny OS is written in nesC which is an extension of C
language. It provides support for event-driven component based programming.
The events can be generated from any component and enables to perform specific
task.
2. Sensor Drivers - These drivers manage the key functions of transceivers which
are embedded in sensors. In general, sensors are plug-in type. Depending upon

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3-9 Wireless Sensor Networks - Introduction and Architectures

the operating environment of sensor nodes, the configuration and settings of


application must be installed into the sensor. Sensor drivers are mainly used to
protect application software from other drivers.
3. Communication Processors - The various operations like routing the packets,
buffering, forwarding packets, contention mechanisms using MAC protocols,
encryption and error correction are performed by communication processors.
4. Communication Drivers - These drivers are responsible for managing the
following operations,
i. Transmission through radio channels
ii. Synchronization
iii. Encoding and decoding
iv. Error correction and checking
v. Counting of bits
vi. Signal levels
vii. Modulation and demodulation.
5. Data Processing Mini-Apps - This software subsystem is responsible for
performing data processing at node level in a sensor network.

3.3 Advantages and Limitations of Sensor Networks

3.3.1 The Advantages of WSN


1. Network arrangements can be carried out without immovable infrastructure.
2. Apt for the non-reachable places like mountains, over the sea, rural areas and
deep forests.
3. Flexible if there is a casual situation when an additional workstation is required.
4. Execution pricing is inexpensive.
5. It avoids plenty of wiring.
6. It might provide accommodations for the new devices at any time.
7. It can be opened by using a centralized monitoring.
8. The nodes co-operate in communication, thereby leads to accurate sensing of
events.
9. Sensor nodes perform two important operations namely, Data dissemination and
Data gathering.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 10 Wireless Sensor Networks - Introduction and Architectures

3.3.2 Limitations of WSN


i. Sensor nodes cannot be protected from physical attacks
ii. Since many sensor nodes are sensing same event, the sensor network tends to
fault tolerant.
iii. Mobile sensors form a dynamic topology
iv. Possess very little storage capacity
v. Possess modest processing power
vi. Works in short communication range
vii. Have batteries with a finite life time
viii. Passive devices provide little energy.

3.4 Types of Wireless Sensor Networks


Wireless sensor networks can be deployed depending on the environment. This type
of network can be deployed under water, underground, on the land etc. The types of
WSN include,
1. Terrestrial WSNs
2. Underground WSNs
3. Underwater WSNs
4. Multimedia WSNs
5. Mobile WSNs.

3.4.1 Terrestrial WSN


Terrestrial WSNs consist of hundreds to thousands of wireless sensor nodes that are
deployed either in an Ad hoc or structured manner and are capable of communicating
with base stations effectively. It consists of hundreds to thousands of wireless sensor
nodes deployed either in unstructured (Ad hoc) or structured (Pre-planned) manner. In
an unstructured mode, the sensor nodes are randomly distributed within the target area
that is dropped from a fixed plane. In Ad hoc deployment, sensor nodes can be dropped
from a plane and randomly placed into the target area. In pre-planned deployment, grid
placement, optimal placement, 2-d and 3-d placement models are used.
The sensor nodes in this WSN have very limited battery power. However, the battery
can be equipped with solar cells as a secondary power source. Energy of sensor nodes can
be preserved by using multi-hop optimal routing, short transmission range, data
aggregation, reducing data redundancy and minimizing delay.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 11 Wireless Sensor Networks - Introduction and Architectures

Fig. 3.4.1 Terrestrial WSN

3.4.2 Underground WSNs


The underground WSNs consist of a number of sensor nodes that are hidden in the
ground to monitor underground conditions. The underground sensor nodes are mostly
used to detect and monitor underground situation. These sensor networks are more
expensive than terrestrial WSNs. Deployment of network, maintenance, equipment cost
and careful planning would require high cost.
Underground sensor nodes are expensive because it requires suitable components for
providing reliable communication through soil, rocks and other mineral contents.
Communication between underground sensor nodes is a big challenging one due to
signal losses and high levels of attenuation. These WSNs require additional sink nodes to
forward message from the sensor nodes to the base station. The sensor nodes deployed
into the ground and the nodes with limited battery power are very difficult to recharge.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 12 Wireless Sensor Networks - Introduction and Architectures

Fig. 3.4.2 Underground WSNs

3.4.3 Under Water WSNs


Under water WSNs consist of a number of sensor nodes and vehicles deployed under
water. Self-directed underwater vehicles are used for searching and gathering data from
these sensor nodes. Underwater sensor nodes are more expensive and are sparsely dense
networks. Sensor nodes would communicate among themselves using acoustic waves.
Major issues of underwater communication using acoustic waves are limited bandwidth,
long propagation delay, signal fading problem and sensor failures.

Fig. 3.4.3 Under Water WSNs

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 13 Wireless Sensor Networks - Introduction and Architectures

3.4.4 Multimedia WSNs


Multimedia wireless sensor networks used to enable tracking and monitoring
purposes. Information would be exchanged in the form of multimedia such as imaging,
video, and audio. The sensor nodes used in these networks consist of low cost sensor
nodes that are equipped with microphones and cameras. These nodes are interconnected
with each other over a wireless connection for data compression, data retrieval and
correlation.
The various challenges of multimedia sensor networks include high energy
consumption, high bandwidth requirements, quality of service, data processing and
compressing techniques.

Fig. 3.4.4 Multimedia WSNs

3.4.5 Mobile WSNs


Mobile wireless sensor networks consist of a collection of mobile sensor nodes and
have capability to compute, sense and communicate with physical environment. These
sensor nodes can move and can configure the network by itself. There are two key
differences between static and mobile sensor nodes. It is outlined below,
 Each mobile node can communicate with other sensor nodes if it is in the visibility
of other sensor nodes.
 In mobile WSN, data can be distributed using dynamic routing whereas in static
WSNs, data can be distributed using fixed routing mechanisms.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 14 Wireless Sensor Networks - Introduction and Architectures

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.

Fig. 3.4.5 Mobile WSN

3.5 Enabling Technologies for Wireless Sensor Networks


1. Building a wireless sensor networks has only become possible with some
fundamental advances in enabling technologies.
2. The first among these technologies is the miniaturization (small device setup) of
hardware. Smaller feature sizes in chips have driven down the power
consumption of the basic components of a sensor node to a level that the
constructions of WSNs can be contemplated.
3. Second technology that has made sensor network possible is the communication

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 15 Wireless Sensor Networks - Introduction and Architectures

equipments. Starting from microcontrollers and memory chips, the radio


modems responsible for wireless communication, have become much more
energy efficient and have reduced their size. Reduced chip size and improved
energy efficiency is accompanied by reduced cost, which is necessary to make
redundant deployment of nodes affordable.
3. Along with the processing and communication, the actual sensing equipment is
the third relevant technology that enables sensor networks. However, it is
difficult to generalize sensors because they come in various forms and huge
range depending upon their functionality. But it is the fact that their nature and
design has made the sensor networks possible.
4. These three basic parts of a sensor node have to be accompanied by power
supply. Depending on application, this requires high capacity batteries that last
for long times, that is, have only a negligible self-discharge rate, and that can
efficiently provide small amounts of current. Ideally, a sensor node also has a
device for energy scavenging, recharging the battery with energy gathered from
the environment - solar cells or vibration-based power generation are conceivable
options. In such case it requires the battery to be efficiently chargeable with small
amounts of current, which is not a standard ability. Both batteries and energy
scavenging are still objects of ongoing research.
5. The counter supporting part to the basic hardware technologies is software.
There should be the principal division of tasks and functionalities in a single
node - the architecture of the operating system or runtime environment. This
environment has to support simple re-tasking, cross-layer information exchange,
and modularity to allow for simple maintenance. There should be better
structure interfaces for application programmers.
6. To run the overall sensor network functionality there is need of appropriate
communication protocols.

3.6 WSNs Applications


Sensors nodes are deployed in the areas where constant monitoring, determine the
value of some parameters at a specified location and detection of specific events required.
The potential applications of sensor networks in various fields are discussed below,

1. Military applications
 Battlefield surveillance and monitoring
 Remote sensing

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 16 Wireless Sensor Networks - Introduction and Architectures

 Monitoring the movement of enemies


 Guidance systems of intelligent missiles
 Detection of attack by weapons of mass destruction
 Track an enemy tank
 Gather more information about the movement of enemy vehicle and explosions
 Detect and characterize chemical or nuclear explosive attacks.

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 17 Wireless Sensor Networks - Introduction and Architectures

6. Security related applications


 Providing security on parking areas, banks, shopping malls, houses and other
areas which needs alertness
 Detect children playing behind the parked vehicles
 Sensors are attached to taxi cabs in a large metropolitan area to study the traffic
conditions and plan routes effectively.
 Wireless surveillance sensor networks for providing security in a shopping mall,
parking garage or at some other facility.
 Sensor networks can increase alertness to potential terrorist threats.

3.7 Sensor Networks - Design Challenges


Due to the varied applications, sensor networks pose a number of unique technical
challenges due to the following factors.
1. Sensor nodes are randomly deployed and hence do not fit into any fixed
topology. Once deployed, they usually do not require any human intervention.
Hence the setup and maintenance of the network should be entirely autonomous.
2. Sensor networks are infrastructure less networks. Therefore all routing and
maintenance algorithms need to be distributed.
3. While designing the sensor node, cost is also an important factor to be
considered.
4. The sensor nodes are battery driven. But it is very difficult to change or recharge
batteries. Sensor nodes are usually deployed in remote places; it is designed
based on the applications to minimize the energy consumption so as to increase
the battery life.
5. In forest, sensor nodes would be throwing from aeroplane to deploy on ground.
In such a situation, it is the responsibility of sensor nodes to form network,
identify its connectivity and distribution.
6. The sensor nodes are not connected with any energy source from outside. There
is only a finite source of energy exists. So in order to make optimal use of energy,
communication should be minimized as much as possible.
7. Maintaining network life time for a prolong period is a major design issue in
WSNs. Thus the design of a good WSN needs to be energy efficient.
8. To identify the location of sensor nodes, location discovery protocols are used.
Location discovery protocols must provide accurate positional information.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 18 Wireless Sensor Networks - Introduction and Architectures

9. Performing secured operations using sensor network is very critical in the


military areas. Some of the security issues that have to be addressed are, secured
key exchange, key establishment, authentication, authorization, secure routing,
trust setup and prevention of physical attacks.

3.8 Sensor Network Architecture


A large number of sensors deployed on different areas would form a network to
communicate with each other. Each sensor has a wireless communication capability.
Therefore, a sensor node can gather information from other sensor nodes and can
disseminate the processed information to other sensor nodes which is in the network.
Two different types of sensor architectures are, layered architecture and clustered
architecture.

3.8.1 Layered Architecture and Unified Network Protocol Framework (UNPF)


A layered architecture consists of a single powerful Base Station (BS) and the layers of
sensor nodes around it. Layered architecture use military sensor based infrastructure with
in-building wireless backbone. In this scenario, the BS acts as a fixed access point to a
wired network. The small sensor nodes form a wireless backbone to provide wireless
communication in the sensor network. The users have hand-held devices to communicate
with BS via small nodes.
For the complete implementation of layered architecture, the sensor network uses
Unified Network Protocol Framework (UNPF).
Unified Network Protocol Framework (UNPF)
UNPF integrates three operations in its protocol structure
Operation-1 Network initialization and maintenance protocol operation
This protocol organizes the sensor node into different layers. The layered architecture
is shown in Fig. 3.8.1.
The Base Station (BS) can communicate with all nodes using one-hop communication
over the shared media. The BS broadcasts its identifier (ID) to the sensor nodes using
Code Division Multiple Access (CDMA) code and the sensor nodes which receive the ID
of BS will store it. As a response message, each sensor node sends it's ID at lowest power
level. This can be listened by BS at layer one because all the nodes are single hop distance
away from BS. Now, the BS broadcasts control message to all the layer one nodes with
their IDs. All sensor nodes send a beacon message again.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 19 Wireless Sensor Networks - Introduction and Architectures

Fig. 3.8.1 Layered architecture

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 20 Wireless Sensor Networks - Introduction and Architectures

Operation-3 Routing protocols - UNPF- R


The transmitted data of BS can be received (downlink) by nodes using direct broadcast
on the control channel. Data can be forwarded using multi-hop fashion from the sensor
nodes to BS. The nodes which forward a packet are considered based on the remaining
energy level of nodes, thereby achieving a higher sensor network lifetime.

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,

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 21 Wireless Sensor Networks - Introduction and Architectures

(f(R) – f(R)  (n/N))


e T

where, T - Temperature parameter, as in simulated annealing.

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.

3.8.2 Clustered Architecture and Low-Energy Adaptive


Clustering Hierarchy (LEACH)
Cluster architecture organizes the nodes in sensor network into clusters. Each cluster
contains a cluster-head. The nodes in each cluster would exchange message within the
cluster. Each cluster-head can communicate with the other cluster-heads which is present
in another cluster. Each cluster-head can also communicate with the BS which is an access
point and connected to a wired network. Figure-9 shows a model of clustered
architecture.

Fig. 3.8.2 Clustered architecture

Clustered architecture is normally used in sensor networks to achieve data fusion.


Clustering can be extended to various numbers of depths hierarchically. The data
collected by all the cluster members can be fused to cluster head and the resulting
information can be communicated to BS. The cluster formation and the election (that is
selection) of cluster-heads are fully autonomous and distributed process. This could be

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 22 Wireless Sensor Networks - Introduction and Architectures

achieved through network layer protocols such as Low-Energy Adaptive Clustering


Hierarchy (LEACH)

Low-Energy Adaptive Clustering Hierarchy (LEACH) Algorithm


LEACH is one of the clustering-based protocols that minimize energy dissipation in
sensor networks.

Selection of cluster-head using LEACH


LEACH algorithm initially selects sensor nodes as cluster-head randomly. Then,
periodic reelection would be performed to determine the actual cluster-head. So the
cluster-heads with high-energy dissipation in communicating with BS can spread over
the network. In each iteration, a cluster head would be selected. This is known as a round.
The operation of LEACH is divided into two phases,

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 23 Wireless Sensor Networks - Introduction and Architectures

3.9 Sensor Network Scenarios

3.9.1 Types of Sources and Sinks


1. A sensor network normally consists of a large number of sensor nodes and one or
more sinks. In a sensor network, a source is any entity in the network that can
provide information, that is, typically a sensor node; it could also be an actuator
node that provides feedback about an operation. Whereas, a sink in a sensor
network, is the entity where information is required.
2. Sensor nodes monitor physical phenomena and produce sensory data. A sink,
does not generate any data by itself but collects data from sensor nodes. A sink
can be regarded as a gateway between a sensor network and other networks, or
an interface between a sensor network and the people operating the sensor
network.
3. A sink is often assumed as resource abundant, without energy supply limit and
with advanced computation capability. Aside from data collection, a sink is also a
central controller which can execute network management algorithms and
instruct sensor nodes only the computation results.
Sensor networks may work in different architectural and operational scenarios,
depending on the sensor nodes’ and sinks’ capabilities and on the
communication paradigm used by the sensor nodes and sinks.
4. For example, some sensor nodes may have more advanced sensor unit,
microcontroller, or radio transceivers, which enable them to take more
responsibilities in the whole sensor network. Sensor nodes or sinks may also be
equipped with locomotives which enable them to move around the sensor field
for better performing tasks.
5. There are essentially three options for a sink -
i) It could belong to the sensor network as such and be just another
sensor/actuator node or it could be an entity outside this network.
ii) The second case, the sink could be an actual device, for example, a handheld
or PDA used to interact with the sensor network.
iii) It could also be merely a gateway to another larger network such as the
Internet, where the actual request for the information comes from some
node “far away” and only indirectly connected to such a sensor network.
These main types of sinks are illustrated in below Fig. 3.9.1 that depicts sources and
sinks in direct communication.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 24 Wireless Sensor Networks - Introduction and Architectures

Fig. 3.9.1 Sink types in sensor networks

3.9.2 Sensor Network Scenarios


1. Homogeneous vs. Heterogenous Networks
In a homogeneous sensor network, all sensor nodes have the same sensing,
processing, communication, and other capabilities (excluding the initial power
supply). Fig. 3.9.2 (b) and (d) illustrate two homogeneous networks. In a
heterogeneous sensor network, sensor nodes have different capabilities. For
example, a node may have a stronger sensor unit and can cover a larger area.
Fig. 3.9.2 (a) and (c) present two examples of heterogeneous networks. Two
nodes that have different amount of initial power supplies but with identical all
the other capabilities are usually not considered as two heterogenous nodes. A
homogeneous network can be considered as just many copies of a sensor node in
different geographical locations, and due to such characteristics, many theoretical
analyses are carried out for homogeneous networks. On the other hand, it is
generally recognized that the performance of a homogeneous network can be
greatly improved by adding some more advanced sensor nodes or some mobile
sensor nodes.
For example, in Fig. 3.9.2 (c) some advanced sensor nodes serve as cluster heads
to form clusters.
2. Stationary vs. Mobile Networks
In a stationary sensor network, all sensor nodes are fixed and cannot move
around after they have been deployed. A mobile sensor node is equipped with a
locomotive unit and can move around after deployment. In general, a mobile
node is more expensive than its stationary compeer. It is usually considered in

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 25 Wireless Sensor Networks - Introduction and Architectures

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 26 Wireless Sensor Networks - Introduction and Architectures

practical choices for large-scale networks with hundreds or thousands of nodes. It is


worth noting that, unlike the traditional store-and-forward networks, in network data
processing is allowed and even encouraged in sensor networks. In the store-and-forward
networks, an intermediate relay node does not attempt to modify received data but just
retransmit the data to other nodes. However, the idea of in-network data processing is to
allow a node to process its received data packets, analyzing the packets’ content and even
aggregating them to a new packet yet with reduced volume. Multi-hop networks,
obviously, are the better choice for in-network processing.

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 27 Wireless Sensor Networks - Introduction and Architectures

3.9.3 Mobility and Types of Mobility


1. In the sensor network scenarios discussed above, all participants were stationary.
But one of the main virtues of wireless communication is its ability to support
mobile participants. In wireless sensor networks, mobility can appear in three
main forms namely, node mobility, sink mobility, event mobility.
2. Node mobility The wireless sensor nodes themselves can be mobile. The meaning
of such mobility is highly application dependent. In examples like environmental
control, node mobility should not happen; in livestock surveillance (sensor nodes
attached to cattle, for example), it is the common rule. In the face of node
mobility, the network has to reorganize itself frequently enough to be able to
function correctly. It is clear that there are trade-offs between the frequency and
speed of node movement on the one hand and the energy required to maintain a
desired level of functionality in the network on the other hand.
3. Sink mobility The information sinks can be mobile (Fig. 3.9.3). While this can be a
special case of node mobility, the important aspect is the mobility of an
information sink that is not part of the sensor network, for example, a human
user requested information via a PDA while walking in an intelligent building. In
a simple case, such a requester can interact with the WSN at one point and
complete its interactions before moving on. In many cases, consecutive
interactions can be treated as separate, unrelated requests. Whether the requester
is allowed interactions with any node or only with specific nodes is a design
choice for the appropriate protocol layers. A mobile requester is particularly
interesting, however, if the requested data is not locally available but must be
retrieved from some remote part of the network. Hence, while the requester
would likely communicate only with nodes in its vicinity, it might have moved to
some other place. The network, possibly with the assistance of the mobile
requester, must make provisions that the requested data actually follows and
reaches the requester despite its movements.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 28 Wireless Sensor Networks - Introduction and Architectures

Fig. 3.9.3 Sink mobility

4. Event mobility In applications like event detection and in particular in tracking


applications, the cause of the events or the objects to be tracked can be mobile. In
such scenarios, it is (usually) important that the observed event is covered by a
sufficient number of sensors at all time. Hence, sensors will wake up around the
object, engaged in higher activity to observe the present object, and then go back
to sleep. As the event source moves through the network, it is accompanied by an
area of activity within the network - this has been called the frisbee model,
introduced in reference (which also describes algorithms for handling the
“wakeup wavefront”). This notion is described by Fig. 3.9.4, where the task is to
detect a moving elephant and to observe it as it moves around. Nodes that do not
actively detect anything are intended to switch to lower sleep states unless they
are required to convey information from the zone of activity to some remote sink
(not shown in Fig. 3.9.4).
5. Communication protocols for WSNs will have to render appropriate support for
these forms of mobility. In particular, event mobility is quite uncommon,
compared to previous forms of mobile or wireless networks.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 29 Wireless Sensor Networks - Introduction and Architectures

Fig. 3.9.4 Event mobility

3.10 Optimization Goals and Figures of Merit


For all these sensor network scenarios and application types, different forms of
networking solutions can be found. While a general answer appears impossible
considering the large variety of possible applications, a few aspects are fairly evident that
are discussed below.

3.10.1 Quality of Service


WSNs differ from other conventional communication networks mainly in the type of
service they offer. These networks essentially only move bits from one place to another.
Possibly, additional requirements about the offered Quality of Service (QoS) are made,
especially in the context of multimedia applications. Such QoS can be regarded as a low-
level, networking-device-observable attribute – bandwidth, delay, jitter, packet loss rate –
or as a high-level, user-observable, so-called subjective attribute like the perceived quality
of a voice communication or a video transmission.
Similar to traditional networks, high-level QoS attributes in WSN highly depend on
the application. Some generic possibilities are,
1. Event detection/reporting probability
What is the probability that an event that actually occurred is not detected or,
more precisely, not reported to an information sink that is interested in such an

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 30 Wireless Sensor Networks - Introduction and Architectures

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.

3.10.2 Energy Efficiency


Energy is a precious resource in wireless sensor networks and that energy efficiency
should therefore make an evident optimization goal. It is clear that with an arbitrary
amount of energy, most of the QoS metrics defined above can be increased almost at will
(approximation and tracking accuracy are notable exceptions as they also depend on the
density of the network). The term “energy efficiency” is, in fact, rather an umbrella term
for many different aspects of a system, which should be carefully distinguished to form
actual, measurable figures of merit. The most commonly considered aspects are :
Energy per correctly received bit - How much energy, counting all sources of energy
consumption at all possible intermediate hops, is spent on average to transport one bit of
information (payload) from the source to the destination? This is often a useful metric for
periodic monitoring applications.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 31 Wireless Sensor Networks - Introduction and Architectures

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”

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 32 Wireless Sensor Networks - Introduction and Architectures

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 33 Wireless Sensor Networks - Introduction and Architectures

3.11 Transceiver Design Considerations in WSNs in a Physical Layer

3.11.1 Issues in Physical Layer Design in Wireless Sensor Networks


Some of the most crucial points influencing Physical layer design in wireless sensor
networks are,
 There should be low power consumption.
 Due to low power consumption it is expected to have small transmit power and
thus a small transmission range.
 As a further consequence of low power consumption low duty cycle. Most
hardware should be switched off or operated in a low-power standby mode most
of the time.
 Comparably low data rates, on the order of tens to hundreds kilobits per second,
required.
 Low implementation complexity and costs.
 Low degree of mobility.
 A small form factor for the overall node.

3.11.2 Energy Usage Profile and the Power Consumption in a Transceiver


1. The choice of a small transmit power leads to an energy consumption profile
different from other wireless devices like cell phones. The radiated energy is
small, typically on the order of 0 dBm (corresponding to 1 mW).
2. On the other hand, the overall transceiver (RF front end and baseband part)
consumes much more energy than is actually radiated; Wang et al. estimate that a
transceiver working at frequencies beyond 1 GHz takes 10 to 100 mW of power to
radiate 1 mW.
3. Similar numbers are given for 2.4-GHz CMOS transceivers,
i) For a radiated power of 0 dBm, the transmitter uses actually 32 mW, whereas
the receiver uses even more, 38 mW.
ii) For the Mica motes, 21 mW are consumed in transmit mode and 15 mW in
receive mode. 4. These numbers coincide well with the observation that many
practical transmitter designs have efficiencies below 10 % at low radiated
power.
4. A second key observation is that for small transmit powers the transmit and
receive modes consume more or less the same power; it is even possible that
reception requires more power than transmission; depending on the transceiver

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 34 Wireless Sensor Networks - Introduction and Architectures

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.

3.11.3 Choice of Modulation Scheme for the Transceiver


1. A crucial point is the choice of modulation scheme. Several factors have to be
balanced here, the required and desirable data rate and symbol rate, the
implementation complexity, the relationship between radiated power and target
BER, and the expected channel characteristics.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 35 Wireless Sensor Networks - Introduction and Architectures

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 36 Wireless Sensor Networks - Introduction and Architectures

 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.

3.11.4 Dynamic Modulation Scaling


1. Even if it is possible to determine the optimal scheme for a given combination of
BER target, range, packet sizes and so forth, such an optimum is only valid for
short time; as soon as one of the constraints changes, the optimum can change,
too. In addition, other constraints like delay or the desire to achieve high
throughput can dictate to choose higher modulation schemes.
2. Therefore, it is interesting to consider methods to adapt the modulation scheme
to the current situation. Such an approach, called dynamic modulation scaling.
3. In particular, for the case of m-ary QAM and a target BER of 10− 5, a model has
been developed that uses the symbol rate B and the number of levels per symbol
m as parameters. This model expresses the energy required per bit and also the
achieved delay per bit (the inverse of the data rate), taking into account that
higher modulation levels need higher radiated energy. Extra startup costs are not
considered. Clearly, the bit delay decreases for increasing B and m.
4. The energy per bit depends much more on m than on B. In fact, for the particular
parameters chosen, it is shown that both energy per bit and delay per bit are
minimized for the maximum symbol rate. With modulation scaling, a packet is
equipped with a delay constraint, from which directly a minimal required data
rate can be derived.
5. Since the symbol rate is kept fixed, the approach is to choose the smallest m that
satisfies the required data rate and which thus minimizes the required energy per
bit. Such delay constraints can be assigned either explicitly or implicitly.

3.11.5 Antenna Considerations


1. The desired small form factor of the overall sensor nodes restricts the size and the
number of antennas. If the antenna is much smaller than the carrier’s
wavelength, it is hard to achieve good antenna efficiency, that is, with ill-sized
antennas one must spend more transmit energy to obtain the same radiated
energy.
2. Secondly, with small sensor node cases, it will be hard to place two antennas
with suitable distance to achieve receive diversity. The antennas should be
spaced apart at least 40 - 50 % of the wavelength used to achieve good effects

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 37 Wireless Sensor Networks - Introduction and Architectures

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).

3.12 Two Marks Questions with Answers


Part - A
Q.1 What are the types of wireless networks ?
Ans. : The wireless networks can be broadly classified into two types :
 Infrastructure based network
 Infrastructure less network.
Q.2 Define security issue.
Ans. : Security is a challenging one in Ad hoc wireless networks, especially in military
areas. The attacks in Ad hoc wireless network is broadly classified into two types :
 Passive attack
 Active attack.
Q.3 Define a Wireless Sensor Network (WSN).
Ans. : Wireless Sensor Networks (WSNs) are distributed networks which are formed
by small, lightweight wireless nodes. Each sensor node is also called as mote.
Q.4 What are the types of wireless sensor networks ?

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 3 - 38 Wireless Sensor Networks - Introduction and Architectures

Ans. : The types of WSNs are listed below,


 Terrestrial WSNs
 Underground WSNs
 Underwater WSNs
 Multimedia WSNs
 Mobile WSNs.
Q 5 Explain subsystems of sensor node.
Ans. : Each sensor node in the sensor network consists of three subsystems namely,
1. The sensor subsystem - This subsystem senses the environment.
2. The processing subsystem - This subsystem performs local computations on
the sensed data.
3. The communication subsystem - This is responsible for exchanging the
processed message with neighbouring sensor nodes.
Q.6 List some design challenges posed by sensor networks.
Ans. :

1. Fault-tolerant communication 2. Low latency


3. Scalability 4. Transmission media
5. Speed 6. Energy
7. Storage capacity 8. Coverage problems

3.13 Long Answered Questions


Part - B
Q.1 Discuss the different types of wireless sensor networks. (Refer section 3.1.7)
Q.2 List out the various applications of sensor networks. (Refer section 3.6)
Q.3 Outline the design challenges in mobile Ad hoc networks and wireless sensor networks.
(Refer section 3.1)
Q.4 What are the issues related to sensor nodes ? (Refer section 3.1)
Q.5 Write a note on sensor node architecture. (Refer section 3.2)
Q.6 What are the optimization goals in wireless sensor network ? (Refer section 3.10)
Q.7 Explain transceiver design issues considered in physical layer. (Refer section 3.10)
Q.8 List various scenarios in wireless sensor networks. (Refer section 3.1)



TECHNICAL PUBLICATIONS® - An up thrust for knowledge


UNIT - III

4 Wireless Sensor Networks -


Medium Access Control
Protocols
Syllabus
MAC Protocols for Wireless Sensor Networks, Low Duty Cycle Protocols and Wakeup
Concepts - S-MAC, The Mediation Device Protocol, Contention based protocols - PAMAS,
Schedule based protocols - LEACH, IEEE 802.15.4 MAC protocol.

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

4.1 Medium Access Control Protocols for Wireless Sensor Networks


The MAC protocols are responsible for ensuring fair allocation of communication
media.
Some of the popular MAC protocols used in wireless sensor network are listed below :
1. Self-organizing MAC for sensor networks
2. Eavesdrop and register MAC protocol
3. Hybrid TDMA/FDMA
4. Low Duty Cycle protocols and wakeup concept
5. CSMA-based MAC protocols (Contention Based Protocol)
6. Schedule-Based MAC protocols
7. IEEE 802.15.4 Zigbee.

4.2 Self Organizing MAC for Sensor (SMACS) Networks


Self organizing Medium Access Control for Sensor (SMACS) networks is a distributed
protocol. This protocol forms a flat topology. SMACS invokes sensor nodes to find out its
neighbours. The major functionalities of these protocols are given below :
 Network initialization
 Link layer organization
 Neighbour discovery
 Channel assignment.
Communication path can be established between two nodes by having pair of time
slots for transmission and reception at a fixed frequency. Each communication link can
work on different frequency. A channel is assigned to each link. The time slot can be
randomly selected by the nodes during the time of link establishment. There will be no
interference between nodes due to the availability of large bandwidth. Power can be
saved by turning off the transceiver in idle slots. After establishing a link between nodes,
the transceiver of the node can be turned on when transmission takes place. Otherwise, it
will be powered off.
Neighbour discovery - Each node can wake up at random time. After wake up, the
node keeps on listening to the channel to transmit the invitation message. If the node
finds that none of the other nodes are transmitting invitation message, then it will start to
send the invitation message on the channel at fixed frequency. The neighbour nodes
which hear the invitation message will respond to the sender of the invitation message.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4-3 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.

4.3 Eavesdrop and Register (EAR) Protocol


EAR protocol provides connection between sensor nodes under mobile and static
conditions. The mobile nodes can be used with the statistically deployed sensor nodes to
establish connections.

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.

Mobile Sensor Nodes


The mobile sensor nodes monitor the channel to find the searching messages in order
to invoke EAR protocol. The mobile sensor nodes are used to continuously monitor the
static nodes and originate handshaking schemes when required. The mobile sensor nodes
are mainly used to eavesdrop on the control signals. The neighbors information also
maintained by mobile sensor nodes. The mobile sensor nodes have control over
connections. The established connection may disconnect when the mobile sensor nodes
move away.

Operation of EAR Protocol


The mobile sensor nodes maintain a registry to keep a record of its neighboring nodes.
The radio channel can also be controlled by mobile sensor nodes. The information about
neighboring nodes can be obtained from the pilot signals received from static nodes.
Based on the information available in the registry, the mobile sensor nodes form
connection with static nodes. The static nodes will receive information from mobile
sensor nodes and provide response accordingly.

The radio channel can be changed to any one of the following mode :
 Receiving mode
 Transmitting mode
 Idle mode.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4-4 Medium Access Control Protocols

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4-5 Medium Access Control Protocols

mobile sensor node initiates mobile disconnect message and send to static node to
inform the disconnection.

4.4 Hybrid TDMA/FDMA


 The hybrid TDMA/FDMA is a centralized scheme in which each sensor node is
assumed that it can able to communicate with nearby fixed station. This
combined scheme is used to overcome the interference problems occurs when
transmitting the data between sensor nodes and between cluster head to another
cluster head. This scheme uses optimum number of channels and the power
consumption depends on the ratio of power consumption of transmitter to
receiver.
 FDMA is offered when the receiver consumes more power and the power will not
be spent for time synchronization. FDMA scheme is used when there is a
communication between cluster head to another cluster head. Fixed frequency
channel is assigned to each cluster head in such a way that no two neighboring
nodes have same frequency.
 The TDMA hybrid scheme is used to allot time slot to the sensor nodes for
performing communication and is preferred when the transmitter consumes more
power. In TDMA scheme, the transmitter can be powered off when it is idle and
the receiver use up power for time synchronization. Each cluster uses four time
slots and each sensor node can use a single slot to communicate with the cluster
head. Slot assignment can be done in random manner.

4.5 Low Duty Cycle Protocols and Wakeup Concepts


1. The central idea of low duty cycle protocols is to reduce the time a node is idle or
spends overhearing an unnecessary activity by putting the node in the sleep state.
2. The most ideal condition of low duty cycle protocols is when a node is a sleep
most of the time and wakes up only when to transmit or receive packets.
3. The concept of a low duty cycle is represented as a periodic wake-up scheme. A
node wakes up periodically to transmit or receive packets from other nodes.
Usually after a node wakes up, it listens to the channel for any activity before
transmitting or receiving packets.
4. If no packet is to be transmitted or received, the node returns to the sleep state. A
whole cycle consisting of a sleep period and a listening period is called a sleep or
wake-up period and is depicted in Fig. 4.5.1.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4-6 Medium Access Control Protocols

Fig. 4.5.1 A periodic wake up cycle

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4-7 Medium Access Control Protocols

topology. However, in both approaches, tight time synchronization requires


frequent resynchronization with neighbouring nodes consuming a significant
amount of energy.

Fig. 4.5.2 A synchronous periodic wake-up scheme

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.

4.6 The Mediation Device Protocol


1. The mediation device protocol is compatible with the peer-to-peer
communication mode of the IEEE 802.15.4 low-rate WPAN standard. It allows
each node in a WSN to go into sleep mode periodically and to wake up only for
short times to receive packets from neighbor nodes.
2. There is no global time reference, each node has its own sleeping schedule, and
does not take care of its neighbors sleep schedules.
3. Upon each periodic wakeup, a node transmits a short query beacon, indicating its
node address and its willingness to accept packets from other nodes. The node
stays awake for some short time following the query beacon, to open up a
window for incoming packets. If no packet is received during this window, the
node goes back into sleep mode.
4. When a node wants to transmit a packet to a neighbor, it has to synchronize with
it. One option would be to have the sender actively waiting for query beacon, but
this wastes considerable energy for synchronization purposes only.
5. The dynamic synchronization approach achieves this synchronization without
requiring the transmitter to be awake permanently to detect the destinations
query beacon. To achieve this, a Mediation Device (MD) is used. The case where
the mediation device is not energy constrained is discussed below and can be

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4-8 Medium Access Control Protocols

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.

Fig. 4.6.1 Mediation device protocol with unconstrained mediators

6. Suppose that node A wants to transmit a packet to node B. Node A announces


this to the mediation device by sending periodically Request to Send (RTS)
packets, which the MD captures. Node A sends its RTS packets instead of its
query beacons and thus they have the same period. Again, there is a short answer
window after the RTS packets, where A listens for answers. After the MD has
received A’s RTS packet, it waits for B’s next query beacon. The MD answers this
with a query response packet, indicating A’s address and a timing offset, which
lets B know when to send the answering Clear to Send (CTS) to A such that the
CTS packet hits the short answer window after A’s next RTS packet. Therefore, B
has learned A’s period. After A has received the CTS packet, it can send its data
packet and wait for B’s immediate acknowledgment. After the transaction has
finished, A restores its periodic wakeup cycle and starts to emit query beacons
again. Node B also restores its own periodic cycle and thus decouples from A’s
period.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4-9 Medium Access Control Protocols

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 10 Medium Access Control Protocols

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 Contention-based Protocols - CSMA-based MAC Protocols


In CSMA-based MAC protocols, the sensor nodes use constant period to contend for
channels; but the back-off wait time can be random in order to eliminate repetitive
collisions. An Adaptive Transmission Rate Control (ARC) is used to balance the traffic
between sensor nodes using linear increase and multiplicative decrease method for
initiating traffic in a node.
These protocols are contention-based protocols which are mainly used to improve
energy efficiency. Some of the CSMA-based MAC protocols used in WSN are as follows,
1. S-MAC
2. T-MAC
3. D-MAC
4. B-MAC
5. X-MAC
6. Wise-MAC

4.7.1 Sensor-MAC (S-MAC)


S-MAC protocol is a contention based protocol that regulates sleep period of sensor
nodes in order to enhance the lifetime of sensor network. S-MAC uses static sleep
scheduling for saving energy. The time is divided into frames and each frame is divided
into active and sleep periods. The active period is again divided into time
synchronization and actual data transmission period. In active period, the transmitter and
receiver is powered on and is powered off during sleep mode.

4.7.2 Timeout-MAC (T-MAC)


It is a contention-based MAC protocol and uses dynamic based sleep schedule. Based
on the network load, the active mode is adjusted dynamically. The node can invoke sleep
mode when the network load is finished. Before data transmission, RTS/CTS packet
exchanges will be used for handshaking.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 11 Medium Access Control Protocols

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.4 Berkley-Media Access Control (B-MAC)


This protocol uses sampling (listening the channel) the shared medium at fixed
intervals. Every node listens to the channel at fixed intervals to check whether it is idle or
not. If the node finds that the channel is free, then it waits for a back-off time period and
sends a preamble with data packet. When the receiver finds that there is a preamble on
the channel, then it waits for the completion of preamble followed by receiving data
packet. After receiving the data packet, the node may go to sleep mode.

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.

4.7.7 PAMAS (Power Aware Multiaccess with Signaling)


1. The PAMAS protocol (Power Aware Multiaccess with Signaling) was presented
by Raghavendra and Singh is originally designed for ad hoc networks. It provides
a detailed overhearing avoidance mechanism while it does not consider the idle
listening problem. The protocol combines the busy-tone solution and RTS/CTS
handshake similar to the MACA protocol (MACA uses no final acknowledgment
packet).
2. A distinctive feature of PAMAS is that it uses two channels namely a data
channel and a control channel. All the signaling packets (RTS, CTS, busy tones)

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 12 Medium Access Control Protocols

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 13 Medium Access Control Protocols

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 14 Medium Access Control Protocols

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.8 Wireless Sensor Networks - Schedule‐based MAC Protocols

4.8.1 Schedule-based MAC Protocol - Challenges


1. Although Schedule-based MAC protocols can avoid collisions, overhearing and
idle listening problems.
2. During network setup and topology changes, the maintenance of scheduling
involves traffic signaling which causes protocol overhead.
3. A strict time synchronization between the neighboring nodes is required which
involves some extra traffic signaling, and due to clock drift of oscillators and
mobility of nodes, resynchronization is required.
4. Schedule adaptation becomes difficult with the change of network traffic load.
5. The nodes require significant amount of memory to keep its and its neighbors
schedule.
6. Distributed assignment of conflict free TDMA schedules is difficult.

4.8.2 Schedule-based MAC Protocol - Features


1. In this class of MAC protocols, message delay and bandwidth are readily
guaranteed because of the requirement of accurate time synchronization among
neighborhood nodes.
2. A dedicated time slot is allocated to each node for message transmission, and the
node that owns the slot has the sole access rights on the medium during this time
interval.
3. A scheduler is elected which collects all time slot allocation requests and
distributes the final schedule back to the transmitters and receivers. Nodes that
are not participating in the transmissions can go to the sleep mode until the next
round of schedule distribution.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 15 Medium Access Control Protocols

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.

4.8.3 Various Schedule-based MAC Protocols for WSNs

4.8.3.1 LEACH (Low Energy Adaptive Clustering Hierarchy)


1. LEACH (Low Energy Adaptive Clustering Hierarchy) is a TDMA based protocol
designed for dense sensor network. LEACH partitions the sensor nodes into
clusters with a dedicated cluster head in each cluster. Below Fig. 4.8.1 shows
various cases.

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 16 Medium Access Control Protocols

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.

Fig. 4.8.2 Organization of LEACH rounds


5. In LEACH, each round consists of a setup phase and a steady-state phase. During
the setup phase, first nodes elect themselves as a cluster head based on last
serving. After that, in advertisement phase, cluster head nodes inform their
neighbors with an advertisement packet. 6. The non-cluster head nodes picks the
packet with strongest received signal and inform the cluster head node to join in
the cluster during the cluster setup phase. Now, the cluster head node knows all
its member nodes and creates
6. TDMA schedules with a randomly chosen CDMA code (for avoiding inter-cluster
interference) for its members and then broadcast the schedule. Now the member
nodes know their owned timeslot during which it has to be switched on.
7. At a time the optimum percentage of cluster head among all the nodes of the
network is about 5 %.
4.8.3.2 SMACS
1. The Self-Organizing Medium Access Control for Sensor Networks (SMACS)
protocol combines the detection of neighboring nodes and assignment of TDMA
schedules.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 17 Medium Access Control Protocols

2. To set up exclusive links or channels to the nodes, SMACS depends on the


following assumptions :
i) Each node can tune its transceiver to an arbitrary channel among many
available channels.
ii)All nodes divides its time locally into fixed-length super frames where super
frames are subdivided into timeslots(but need not necessarily have the same
phase as the neighbors super frames) and this requires time synchronization.
3. Most of the nodes are stationary, such link or channel assignment is valid for long
time.
In SMACS a link is directional, for bidirectional operation two such links are
required.
4. In SMACS neighbor discovery and link setup consist of four different cases which
are shown in Fig. 4.8.3.

Fig. 4.8.3 SMACS link setup for two lonesome nodes

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 18 Medium Access Control Protocols

Case 1 : Node X, Y both so far unconnected


 Node X sends invitation message.
 Node Y answers, telling X is unconnected to any other node.
 Node X tells Y to pick slot/frequency for the link.
 Node Y sends back the link specification.

Case 2 : X has some neighbors, Y do not have any


 Node X will construct link specification and instruct Y to use it (since Y is
unattached).

Case 3 : X no neighbors, Y has some neighbours


 Y picks link specification.

Case 4 : Both nodes already have links


 Nodes exchange their schedules and pick free slots/frequencies in mutual
agreement.
 Message exchanges are protected by randomized back off.
5. After link setup the nodes wake up periodically (once per super frame) in the
respective receiver time slots. The receiver is tuned to the corresponding channel.

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 19 Medium Access Control Protocols

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.

Fig. 4.8.4 TRAMA - conflict situation

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 20 Medium Access Control Protocols

Fig. 4.8.5 EMAC time slot structure

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 21 Medium Access Control Protocols

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 22 Medium Access Control Protocols

(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.

Fig. 4.8.7 Two-dimensional fairness in AILMAC

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 23 Medium Access Control Protocols

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.

Fig. 4.8.8 MC-LMAC timeslot structure and coordination scheme

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 24 Medium Access Control Protocols

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.

Fig. 4.8.9 DMAC in a data gathering tree

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 25 Medium Access Control Protocols

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 26 Medium Access Control Protocols

4.8.4 Comparison of Schedule based WSN-MAC Protocols


Sr. No. Protocol Advantages Disadvantages
1. LEACH 1. Localized coordination and 1. It assumes all the nodes in the
control for cluster setup and network are homogeneous
operation enable scalability and energy constrained. that
and robustness for dynamic is begin with same energy -
network changes. but this assumption may not
2. Local compression to reduce be realistic.
global communication. 2. LEACH may encounter
3. Randomized rotation of the problem for large geographic
high-energy cluster-head areas, because a cluster head
among the various sensors may not have enough energy
leads to prolong the network to reach the sink.
lifetime.
2. SMACS 1. Can adapt to topology changes 1. If the super frame length is
by repetition of neighbor small then a times lot for
discovery process. sending packets of a node
2. Allows a mobile node to may not enough, on the
maintain connections to other hand if its large then
stationary nodes. results high delay.
2. High dense low traffic load
networks results quite often
unnecessary nodes wake up.
3. For mobile nodes channel
assignment is critical.
3. TRAMA 1. Automatically adapt 1. Computational complexity is
scheduling to traffic load. high.
2. If a slot is not used by any 2. Assume adequate
node, can be used by other synchronization among
node. nodes.
3. Nodes wake up only when 3. It fails to address the issue of
they have data to send or fairness.
receive.
4. It offers high channel
utilization.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 27 Medium Access Control Protocols

4. EMACS 1. This protocol allow nodes to 1. The protocol is not designed


determine their own schedule to provide high bandwidth
based on the requirements utilization.
imposed by the service which 2. Nodes consume energy due
increase power utilization. to idle listening in the CR
2. This protocol offers scalability section.
by dynamic configuration.
3. It also provides support for
routing by providing some
routing topology.
4. By grouping the sending and
receiving, this protocol tries to
minimize the number of
transceiver transition and
reduces power consumption.
5. LMAC 1. Self organization of timeslot 1. It sufferers from higher source
assignment and to sink delay.
synchronization even when 2. Lower bandwidth utilization.
nodes are mobile reduces the 3. Low throughput.
protocol overhead.
2. Reduces the number of
transceiver state switches to
decrease the energy
consumption and hence to
increase the network lifetime.
6. AI-LMAC 1. It offers 2-dimensional fairness 1. This protocol is application
by giving priority to a node, dependent.
which is directly proportional 2. All nodes need extra memory
to the amount of data a node for data management
expected to transmit to service framework.
an incoming query by using
DDT.
2. It can adapts its operation
depending on the
requirements of the
application, which results low
latency.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 28 Medium Access Control Protocols

7. MC-LMAC 1. Provide high throughput. Multiple channels are


2. Ensures an energy efficient required. Nodes to be
operation. equipped with multi channel
3. High bandwidth utilization. supported transceiver.
4. Low computational complexity.

8. DMAC 1. Decreasing end to end delay 1. Does not provide reliability


using data gathering and for end to end data delivery,
prediction techniques. so it can not be applied for
2. Increasing throughput when real time application without
traffic is high. improvement.
3. Solving data forwarding 2. It does not take fairness into
interruption problem. account.

9. DE-MAC 1. Packet loss due to collision is 1. All nodes have to listen to


absent because two nodes do all transmitted packets
not transmit in the same slot. sending by other nodes,
2. Slots are preassigned to each which results overhearing
node, so no extra control problem.
overhead packets are required
for contention.

4.9 IEEE 802.15.4 and Zigbee

4.9.1 Protocols in IEEE 802.15.4 Family


1. The Institute of Electrical and Electronics Engineers (IEEE) finalized the IEEE
802.15.4 standard in October 2003.
2. The standard covers the physical layer and the MAC layer of a low-rate Wireless
Personal Area Network (WPAN).
3. The targeted applications for IEEE 802.15.4 are in the area of wireless sensor
networks, home automation, home security, etc.
4. 802.15.4 Node Types
The standard distinguishes on the MAC layer two types of nodes namely,
 Full Function Device (FFD) - It can operate in three different roles namely, it can
be a PAN coordinator (PAN = Personal Area Network), a simple coordinator or a
device.
 Reduced Function Device (RFD) - It can operate only as a device.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 29 Medium Access Control Protocols

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.

4.9.2 Zigbee Technology

4.9.2.1 Zigbee Fundamental


 Zigbee is a wireless technology developed as an open global standard to address
the unique needs of low-cost, low-power wireless IoT networks. The Zigbee
standard operates on the IEEE 802.15.4 physical radio specification and operates
in unlicensed bands including 2.4 GHz, 900 MHz and 868 MHz.
 ZigBee is a IEEE 802.15.4 based, low power, low data rate supporting wireless
networking standard, which is basically used for two-way communication
between sensors and control system. It is a short-range communication standard
like Bluetooth and Wi-Fi, covering range of 10 to 100 meters. The difference being
while Bluetooth and Wi-Fi are high data rate communications standard
supporting transfer of complex structure like media, software
 ZigBee devices are low powered and they can communicate data over long
distances by transmitting data to intermediate devices to reach more distant ones.
There is no main transmitter, but rather, a series, or “mesh” of transmitters.
 ZigBee Technology supports transfer of simple data like that from sensors. It
supports low data rate of about 250 kbps. The operating frequencies are 868 MHz,
902 to 928 MHz and 2.4 GHz. ZigBee Technology is used mainly for applications
requiring low power, low cost, low data rate and long battery life.
 ZigBee is not IEEE 802.15.4 and IEEE 802.15.4 is not ZigBee. ZigBee is a standards-
based network protocol supported solely by the ZigBee Alliance that uses the
transport services of the IEEE 802.15.4 network specification and adds more
functionalities (full peer-to -peer/mesh networks, application services, etc).

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 30 Medium Access Control Protocols

4.9.2.2 History of ZigBee Technology


 ZigBee standard was developed by ZigBee Alliance including many major
companies like Philips, Mitsubishi Electric, Epson, Atmel, Texas Instruments, etc.
This Alliance was formed in 2002 as a non-profit organization.
 ZigBee-it sounds like a new toy or Disney character, but it is actually a technology
that is helping to, once again, reshape wireless networking. ZigBee is a protocol
known as the IEEE 802.15.4 Standard. By operating over Radio Frequency (RF)
bands, ZigBee is a wireless technology ideal for applications transmitting lower
amounts of data and dealing with low-power issues.
 Zigbee name is derived from the zig-zag motion dance (A waggle dance) of the
honey bees. The ZigBee Alliance explains the origin of the name as: “The
technique that honey bees use to communicate new-found food sources to other
members of the colony is referred to as the ZigBee Principle. Using this silent, but
powerful communication system, whereby the bee dances in a zig-zag pattern, he
is able to share information, such as the location, distance and direction of a
newly discovered food source to its fellow colony members. Instinctively
implementing the ZigBee Principle, bees around the world industriously sustain
productive hives and foster future generations of colony members.”

4.9.2.3 Zigbee Protocol Features


1. It supports for multiple network topologies such as point-to-point, point-to-
multipoint and mesh networks.
2. Its low duty cycle - provides long battery life.
3. It has low latency.
4. It uses Direct Sequence Spread Spectrum (DSSS).
5. It can have up to 65,000 nodes per network.
6. It has 128-bit AES encryption for secure data connections.
7. It is collision avoidance, provides retries and has acknowledgements.
8. The IEEE 802.15.4 MAC sublayer is in control of what is happening on the radio
link.
9. Acknowledgment, retransmission, flow control, and network synchronization
tasks are managed by the IEEE 802.15.4 MAC sublayer.
10. The specification is a packet-based radio protocol intended for low-cost, battery-
operated devices. The protocol allows devices to communicate in a variety of
network topologies and can have battery life lasting several years.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 31 Medium Access Control Protocols

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.

4.9.2.4 Zigbee System Structure


1) Zigbee system structure consists of three different types of devices such as Zigbee
coordinator, router and end device.
2) Every Zigbee network must consist of at least one coordinator which acts as a root
and bridge of the network. The coordinator is responsible for handling and
storing the information while performing receiving and transmitting data
operations.
3) Zigbee routers act as intermediary devices that permit data to pass to and fro
through them to other devices.
4) End devices have limited functionality to communicate with the parent nodes
such that the battery power is saved as shown in the Fig. 4.9.1.
5) The number of routers, coordinators and end devices depends on the type of
network such as star, tree and mesh networks.

Fig. 4.9.1 Zigbee system structure

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 32 Medium Access Control Protocols

4.9.2.5 Zigbee Protocol Architecture


 Zigbee protocol architecture consists of a stack of various layers where IEEE
802.15.4 is defined by physical and MAC layers while this protocol is completed
by accumulating Zigbee’s own network and application layers.

Fig. 4.9.2 Zigbee protocol architecture

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 33 Medium Access Control Protocols

Fig. 4.9.3 Zigbee stack architecture


1 Zigbee Lower Layers - Physical and MAC Layer
(i) Physical Layer - This layer does modulation and demodulation operations up on
transmitting and receiving signals respectively. This layer’s frequency, date rate
and number of channels are given below.

Fig. 4.9.4 Zigbee physical layer specifications

(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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 34 Medium Access Control Protocols

2 Zigbee Upper Layers


1. Above the physical and MAC layers defined by 802.15.4, the ZigBee standard
itself defines the upper layers of the system. This includes many aspects including
the messaging, the configurations that can be used, along with security aspects
and the application profile layers.
2. There are three different network topologies that are supported by ZigBee,
namely the star, mesh and cluster tree or hybrid networks. Each has its own
advantages and can be used to advantage in different situations.
3. The star network is commonly used, having the advantage of simplicity. As the
name suggests it is formed in a star configuration with outlying nodes
communicating with a central node.
4. Mesh or peer to peer networks enable high degrees of reliability to be obtained.
They consist of a variety of nodes placed as needed, and nodes within range being
able to communicate with each other to form a mesh. Messages may be routed
across the network using the different stations as relays. There is usually a choice
of routes that can be used and this makes the network very robust. If interference
is present on one section of a network, then another can be used instead.
5. Finally there is what is known as a cluster tree network. This is essentially a
combination of star and mesh topologies.
6. Both 802.15.4 and ZigBee have been optimized to ensure that low power
consumption is a key feature. Although nodes with sensors of control
mechanisms towards the centre of a network are more likely to have mains
power, many towards the extreme may not. The low power design has enabled
battery life to be typically measured in years, enabling the network not to require
constant maintenance.
7. Network Layer - This layer takes care of all network related operations such as
network setup, end device connection and disconnection to network, routing,
device configurations, etc.
8. Application Support Sub-Layer - This layer enables the services necessary for
Zigbee device object and application objects to interface with the network layers
for data managing services. This layer is responsible for matching two devices
according to their services and needs.
9. Application Framework - It provides two types of data services as key value pair
and generic message services. Generic message is a developer defined structure,

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 35 Medium Access Control Protocols

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.

4.9.2.6 Data Transfer


1. The data is transferred in packets. These have a maximum size of 128 bytes,
allowing for a maximum payload of 104 bytes. Although this may appear low
when compared to other systems, the applications in which 802.15.4 and ZigBee
are likely to be used should not require very high data rates.
2. The standard supports 64 bit IEEE addresses as well as 16 bit short addresses. The
64 bit addresses uniquely identify every device in the same way that devices have
a unique IP address. Once a network is set up, the short addresses can be used
and this enables over 65000 nodes to be supported.
3. It also has an optional super frame structure with a method for time
synchronization. In addition to this it is recognized that some messages need to be
given a high priority. To achieve this, a guaranteed time slot mechanism has been
incorporated into the specification. This enables these high priority messages to be
sent across the network as swiftly as possible.

4.9.2.7 Communication using ZigBee


 Transfer of data can be between a coordinator and device or Peer to Peer. Data
transfer between coordinator and device can be done using two methods - beacon
enabled and non beacon enabled.
 In beacon enabled networking, contention free channel access method is used.
Here the coordinator allocates a particular time slot to each device, known as
Guaranteed Time Slot (GTS). Here all the devices in the network need to be
synchronized. This is ensured by sending a Beacon signal from the coordinator to
each device (node), such that each device synchronizes its clock. However, this
may end up reducing the battery life of devices when not in any other task than
synchronizing their clock.
 Once the device is synchronized, it can transmit data to the coordinator using
Carrier Sense Multiple Access with Collision Avoidance (CSMA-CA) method,
wherein type of occupying signal is determined, or during the GTS allocation
period. On sending a request, the Coordinator sends back the acknowledgement.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 36 Medium Access Control Protocols

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.

4.9.2.8 Zigbee Operating Modes and Its Topologies

Fig. 4.9.5 Zigbee communication operation

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 37 Medium Access Control Protocols

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

Fig. 4.9.6 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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 38 Medium Access Control Protocols

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.

4.9.2.9 Applications of Zigbee Technology


 Zigbee enables broad-based deployment of wireless networks with low-cost, low-
power solutions. It provides the ability to run for years on inexpensive batteries
for a host of monitoring and control applications.
 Smart energy/smart grid, AMR (Automatic Meter Reading), lighting controls,
building automation systems, tank monitoring, HVAC control, medical devices
and fleet applications are just some of the many spaces where Zigbee technology
is making significant advancements.

Fig. 4.9.7 Zigbee technology applications

i) Industrial automation : In manufacturing and production industries, a


communication link continually monitors various parameters and critical

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 39 Medium Access Control Protocols

equipments. Hence Zigbee considerably reduce this communication cost as well


as optimizes the control process for greater reliability.
ii) Home automation : Zigbee is perfectly suited for controlling home appliances
remotely as a lighting system control, appliance control, heating and cooling
system control, safety equipment operations and control, surveillance, and so on.
iii) Smart metering : Zigbee remote operations in smart metering include energy
consumption response, pricing support, security over power theft, etc.
iv) Smart Grid monitoring : Zigbee operations in this smart grid involve remote
temperature monitoring, fault locating, reactive power management, and so on.
v) Healthcare automation : A popular example of healthcare automation is remote
health monitoring. A person wears a ZigBee device with a body parameter
measuring sensor which collects the health information. This information is
transmitting on the ZigBee network to the Internet Protocol (IP) network and then
to the Healthcare personnel (the physician or the nurse), who would then
prescribe proper medication based on the received information.

4.9.2.10 Zigbee Security


1. Zigbee 3.0 provides enhanced network security. There are two methods of
security that give rise to two types of network namely,
 Centralized security : This method employs a coordinator/trust center that forms
the network and manages the allocation of network and link security keys to
joining nodes.
 Distributed security : This method has no coordinator/trust center and is formed
by a router. Any Zigbee router node can subsequently provide the network key to
joining nodes.
Nodes adopt whichever security method is used by the network they join.
2. Zigbee 3.0 supports the increasing scale and complexity of wireless networks, and
copes with large local networks of greater than 250 nodes. Zigbee also handles the
dynamic behavior of these networks (with nodes appearing, disappearing and re-
appearing in the network) and allows orphaned nodes, which result from the loss
of a parent, to re-join the network via a different parent. The self-healing nature of
Zigbee Mesh networks also allows nodes to drop out of the network without any
disruption to internal routing.
3. The backward compatibility of Zigbee 3.0 means that applications already
developed under the Zigbee Light Link 1.0 or Home Automation 1.2 profile are

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 40 Medium Access Control Protocols

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.

Fig. 4.9.8 Zigbee alliance

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 41 Medium Access Control Protocols

 As Zigbee is an open standard it is developed and maintained by an industry


alliance called the Zigbee Alliance. This was initially set up in 2002 and since then
its membership has grown considerably as the adoption of the standard has
increased.
The Zigbee Alliance has three levels of membership :
 Adopter : The Adopter Zigbee Alliance members are allowed access to completed
Zigbee specifications and standards
 Participant : Participant members have voting rights, play a role in Zigbee
development, and have early access to specifications and standards for product
development.
 Promoter : The Promoter membership of the Zigbee Alliance provides automatic
voting rights in all work groups, final approval rights on all standards and a seat
on the Alliance Board of Directors.
 A further advantage of Zigbee Alliance membership is the benefits of the global
marketing efforts of the Alliance which actively promotes use of Zigbee
standards.
2) ZigBee Specification
 As of this writing, there are three Zigbee specifications: Zigbee PRO, Zigbee
RF4CE and Zigbee IP.
 Zigbee PRO aims to provide the foundation for IoT with features to support low-
cost, highly reliable networks for device-to-device communication. Zigbee PRO
also offers Green Power, a new feature that supports energy harvesting or self-
powered devices that don't require batteries or AC power supply.
 Zigbee RF4CE is designed for simple, two-way device-to-device control
applications that don't need the full-featured mesh networking functionalities
offered by the Zigbee specification.
 Zigbee IP optimizes the standard for IPv6-based full wireless mesh networks,
offering internet connections to control low-power, low-cost devices.

4.9.2.12 Zigbee Users


 Zigbee is used by a variety of cable and telecommunication companies in their
set-top boxes, satellite transceivers and home gateways to provide home
monitoring and energy management products to their customers.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 42 Medium Access Control Protocols

 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.

4.9.2.13 Zigbee Advantages and Disadvantages


1) Zigbee Advantages
1. The zigbee has flexible network structure.
2. It has a very long battery life.
3. It is low power consumption.
4. It is easy to install.
5. It can be easily implemented.
6. It supports large number of nodes i.e. 6500 nodes approximately.
7. It has a very low cost.
8. It is more reliable and self healing.
9. Setting up the network is very simple and easy.
10. Its network is very scalable.
11. It is less complex than Bluetooth
12. A consumer has complete authority to add or remove devices as user sees fit.
13. Since devices use Zigbee RF protocol, the all old IR devices are replaced. This
means that frequent battery replacement on remote controls and other devices is
not longer an issue since Zigbee compliant products only use one lithium battery
that lasts the lifetime of the device. There are also other devices that actually

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 43 Medium Access Control Protocols

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.

4.10 Wireless Sensor Networks - Data Aggregation Strategies


Sensor nodes are resource constrained and possess limited battery. So, to avoid the
usage of more resources and battery power, data sensed by sensor nodes must be
aggregated and disseminated to other nodes. Data aggregation is the process of collecting
data from different sensor nodes and combining it together by applying aggregate
functions is known as data aggregation. Aggregation strategies are used to enhance the
network lifetime. The various aggregation strategies used in WSN are as follows,
1. Continuous Packet Sensing and Dissemination
2. Continuous Packet Collection and Dissemination
3. Programmed Packet Collection and Dissemination
4. Programmed Packet Aggregation and Dissemination
5. Programmed Demand Based Aggregation and Dissemination
6. Weighted Event and Demand Based Data Aggregation

4.10.1 Continuous Packet Sensing and Dissemination (CPSD)


Since CPSD does not perform actual aggregation, it is also called as zero aggregation
scheme. In this method, each node senses the data at fixed sensing intervals and the node

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 44 Medium Access Control Protocols

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.

4.10.2 Continuous Packet Collection and Dissemination (CPCD)


In CPCD, each node uses buffer to store the collected and sensed data. Buffer is a
hardware unit and the storage area is allocated by the software used in sensor node. Each
node has to wait until the buffer gets filled by data. The sensor node keeps on sensing
data and tries to fill the buffer. Once the buffer is filled, the sensor node will start to
disseminate data to other nodes. In CPCD, each data dissemination takes long interval
since every node has to wait till the buffer is filled up. This scheme highly reduces
network overhead and consumption of power.

4.10.3 Programmed Packet Collection and Dissemination (PPCD)


In PPCD, each sensor node senses the environment and collects data to store in the
buffer. The sensor node will not disseminate the data immediately to other nodes.
Instead, the node sets a dissemination time interval and waits until the time expires. If the
dissemination interval time expires, then the sensor node will start to disseminate the
buffered data to other nodes. If buffer overflow occurs before the dissemination interval,
then the old packet will be replaced by the newly arrived data. So, increasing the
dissemination time will highly reduce the regularity of packet transmission on the
network. This scheme can be used in the situation where the data to be transmitted is not
a critical one.

4.10.4 Programmed Packet Aggregation and Dissemination (PPAD)


In this scheme, each node senses the data and apply the required aggregate functions
such as AVG, MIN, and MAX, STDDEV etc. on the sensed data. Each sensor node stores
only the aggregated data rather than storing the sensed data. Finally, the buffer contains
only one aggregated data and thereby saving memory.

4.10.5 Programmed Demand based Aggregation and Dissemination (PDAD)


In this scheme, each node senses the data and aggregates it. This aggregated data can
be disseminated to the access point whenever required. So this process is carried out on-
demand basis and data gathering is done by the access point. This data gathering may be

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 45 Medium Access Control Protocols

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.

4.10.6 Weighted Event and Demand based Data Aggregation (WEDDA)


This aggregation strategy is useful in the places where the sensed data is meeting a
prefixed threshold value. In this scheme all the sensed data will not be stored in the
buffer. Instead, only the data that goes below or above the fixed threshold is maintained.
Such data will be disseminated to the cluster head. The cluster head collects the data from
other nodes and set a weighted value depending upon the distance of the sensor node to
cluster head. Based on the weighted value (e.g. if the value is above 60 %), the cluster
head propagates the collected data to the access point.

4.11 Data Relaying in WSN


Data dissemination is the process of routing queries or data through sensor nodes to
intended recipient in sensor network. The sensor nodes gather data from different nodes
and forward it to the fixed station or to other nodes for further processing.

Event and Sink Node


The information collected from sensor nodes are to be reported to some other node is
called as an event. A node which collects events is called as sink node.

4.11.1 Data Diffusion


Data diffusion uses two step process,
1. Interest propagation
2. Data propagation.
Every sensor node broadcasts its interest (for example, Temperature) to other nodes
and the nodes which receive interest can maintain it in the interest cache. Data
propagation includes transmitting data from one node to other node by using shortest
paths.

4.11.2 Data Relaying Algorithms


The various algorithms used for data diffusion are given below,
1. Flooding
2. Gossiping

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 46 Medium Access Control Protocols

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.

4.11.2.3 Rumour Routing


This is an agent based routing algorithm. Packets in the form of agents or ants are
disseminated among nodes to find out shortest path to events. Agents can also perform
path optimization.

4.11.2.4 Sequential Assignment Routing


Sequential Assignment Routing (SAR) selects a path with high energy sources. This
algorithm generates more number of trees. The root of each tree is the one-hop neighbour
of a sink node. Each tree can grow from the sink node. This algorithm removes the nodes
which has high delay and low throughput. Some nodes may attach with more than one
tree.

4.11.2.5 Directed Diffusion


In directed diffusion, sensor nodes generate request or queries and pass it to other
sensor nodes. The sensor nodes which receive this request will send a reply for the query

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 47 Medium Access Control Protocols

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.

4.12 Topology Control

4.12.1 Topology Control Protocol Goals and Design


1. The primary goal of topology control is to design power-efficient algorithms that
maintain network connectivity and optimize performance metrics, such as
network lifetime and throughput by adjusting transmit and reception powers.
2. Batteries are the primary source of energy for wireless sensor devices, and hence,
a common thread restraining the true potential of WSNs is the limitation in
energy supply. Consequently, energy aware system design has become an
important tool in addressing this issue. In other words, a common approach to
tackle the sensor network longevity problem is to develop energy-efficient
algorithms and mechanisms that optimize the use of the battery power, while
maintaining the necessary level of network connectivity.
3. The topology control network optimization algorithms have many uses for the
designing and implementation of WSNs.
4. They can be used for :
i) Efficient sensor network deployment.
ii) Determination of sensor density and transmit power for the nodes.
iii) Determination of the best transmission range.
iv) Facilitation of control message dissemination in an efficient way.
v) Better modeling for energy-aware broadcasting and multicasting.
5. Topology Control (TC) is essentially a method in which a node can carefully select
a set of neighbors to establish logical data links and dynamically adjust
transmitting power for different links. In the protocol stack, TC methods are
placed in the power management plane and implemented at the network layer.

4.12.2 The TC Protocol Formalization


i) Each node u ∈ N has a power function p, where p(d) gives the minimum power

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 48 Medium Access Control Protocols

needed to establish a communication link to a node v ∈ N at distance d away from


u. Assume that the maximum transmission power P is the same for every node,
and the maximum distance for any two nodes to communicate directly is R, i.e.,
p(R) = P.
ii) If every node transmits with power P, then graph GR = (V, E) is induced, where
E = {(u,v)|d(u,v) < R; u,v ∈ N } (where d(u,v) is the Euclidean distance between u
and v).
iii) It is undesirable to have nodes transmitting with maximum power for two
reasons. First, since the power required to transmit between nodes increases as
the nth power of the distance between them, it may require less power for a node
u to relay messages through a series of intermediate nodes to v than to transmit
directly to v. Second, the greater the power with which a node transmits, the
greater is the likelihood of the transmission interfering with other transmissions.
iv) The goal in performing TC is to find a sub-graph G of GR such
that,
 G consists of all the nodes in GR but has fewer edges.
 If u and v are connected in GR, they are still connected in G.
 A node u can transmit to all its neighbors in G using less power than is
required to transmit to all its neighbors in GR.

4.12.3 An Overview of TC Algorithms


i) There are various approaches to the TC problem and can be broadly classified
into two categories, namely, stationary and mobile networks depending on which
kind of network they are suitable for. Mobile networks pose a more complicated
scenario wherein the nodes may change their positions with time.
ii) However, for each category of the networks, TC protocols may follow either the
homogeneous or non-homogeneous approach. In the former case, which is the
simpler (and easier to analyze) type of TC, nodes are assumed to use the same
transmitting range, and the TC problem reduces to the one of determining the
minimum value of r (known as Critical Transmitting Range (CTR)) such that a
certain network-wide property is satisfied.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 49 Medium Access Control Protocols

Fig. 4.12.1 Topology protocol classification

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 50 Medium Access Control Protocols

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 51 Medium Access Control Protocols

4.12.4 Problems Associated with Homogeneous and Non-Homogeneous TC


(A) Homogeneous TC
i) When the range assignment is homogeneous, the message overhead is not an
issue since the nodes’ transmitting range is set at the design stage, and it cannot
be changed dynamically.
ii) However, the node distribution generated by the mobility model could be an
issue. For instance, it is known that the random waypoint model generates a node
spatial distribution which is independent of the initial node positions and in
which nodes are concentrated in the center of the deployment region.
iii) This phenomenon, which is known as the border effect, is due to the fact that, in
the random waypoint model, a node chooses a uniformly distributed destination
point rather than a uniformly distributed angle. Therefore, nodes located at the
border of the region are very likely to cross the center of the region on their way
to the next waypoint.
iv) The intensity of the border effect mainly depends on the pause time tpause. In
fact, a longer pause time tends to increase the percentage of nodes that are resting
at any given time. Since the starting and destination points of a movement are
chosen uniformly in [0, l]*d, a relatively long pause time generates a more
uniform node distribution. Consequently, the results concerning the CTR in
stationary WSNs (which are based on the uniformity assumption) cannot be
directly used.
(B) Non-homogeneous TC
i) For non-homogenous cases, mobility introduces further problems because now
the most important effect of node mobility is the message overhead generated to
update every node’s transmitting power.
ii) The amount of overhead depends on how frequently the network reconfiguration
protocol is run to restore the desired network topology. In turn, this depends on
several factors such as the mobility pattern and the properties of the topology
generated by the protocol.

4.13 Two Marks Questions with Answers


Part - A

Q.1 List various MAC protocols used in wireless sensor network.


Ans. : Various MAC protocols used in wireless sensor network are as follows,
1. Self-organizing MAC for sensor networks

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 52 Medium Access Control Protocols

2. Eavesdrop and register MAC protocol


3. Hybrid TDMA/FDMA
4. Low Duty Cycle protocols and wakeup concept
5. CSMA-based MAC protocols (Contention Based Protocol)
6. Schedule-Based MAC protocols
7. IEEE 802.15.4 Zigbee.
Q.2 Contention-based protocols - CSMA-Based MAC protocols
Ans. : Some of the CSMA-based MAC protocols used in WSN are as follows,
1. S-MAC 2. T-MAC
3. D-MAC 4. B-MAC
5. X-MAC 6. Wise-MAC
Q.3 Explain X-MAC protocol.
Ans. : 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.
Q.4 List various Zigbee advantages.
Ans. : Various advantages of Zigbee technology are,
1. The zigbee has flexible network structure.
2. It has a very long battery life.
3. It is low power consumption.
4. It is easy to install.
5. It can be easily implemented.
6. It supports large number of nodes i.e. 6500 nodes approximately.
7. It has a very low cost.
8. It is more reliable and self healing.
9. Setting up the network is very simple and easy.
10. Its network is very scalable.
11. It is less complex than Bluetooth
12. A consumer has complete authority to add or remove devices as user sees fit.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 53 Medium Access Control Protocols

Q.5 Explain Flooding data relying algorithm.


Ans. : 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.14 Long Answered Questions


Part - B

Q.1 Discuss Hybrid TDMA/FDMA. (Refer section 4.4)


Q.2 What are challenges in schedule-based MAC protocol. (Refer section 4.8)
Q.3 Explain SMACS. (Refer section 4.8.3)
Q.4 Write a note on Zigbee technology. (Refer section 4.9.2)
Q.5 What are various data aggregation strategies wireless sensor networks ?
(Refer section 4.9)
Q.6 Discuss topology control. (Refer section 4.12)



TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 4 - 54 Medium Access Control Protocols

Notes

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


UNIT - III

5 Wireless Sensor Networks - Routing


and Energy Efficient Routing

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

5.1 WSN Routing - Issues


Routing is a challenging one in WSN. Since WSN has more number of small sensor
nodes, it is not feasible to assign global identification for the sensor nodes. So, IP-
addressing based routing protocols will not help in WSNs. Furthermore, since each
sensor node is constrained in resources, power and memory storage, it requires efficient
resource allocation and management schemes. The major issues and challenges of WSN
routing are as follows,
1. Energy constraint
2. Scalability
3. Transmission media
4. Frequent occurrence of failure
5. Hardware constraint
6. Environment
7. Ad hoc deployment
8. Quality of service
9. Topology maintenance
10. Power constraints
11. Fault tolerance
12. Sensor region
13. Constraints for sensor nodes
14. Communication failure
1. Energy constraint - The sensors are powered from batteries and it is not feasible to
replace or recharge the batteries. If battery failure occurs, then the network lifetime
may be reduced. This situation highly affects the performance of the system. Hence
the design of the routing protocol must take this issue into consideration to improve
the performance of the system.
2. Scalability - WSN requires more number of sensor nodes to form large network. So,
to cover the large network, multi-hop communication is used between nodes. When
the communication goes to a longer distance, it may lead to minimize network
lifetime. Hence scalability is a significant factor that guarantees that the
performance of the network should not degrade as the network size increases.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5-3 Routing and Energy Efficient Routing

3. Transmission media - Multi-hop communication can be carried out using wireless


links. This radio links are highly affected by interference, fading and noise etc.
These wireless links can be radio, infrared or optical media. The choice of
transmission media to certain areas of WSN makes more difficult.
4. Frequent occurrence of node failure - The communication between sensor nodes in
WSN may be affected by hardware failures, software faults and environmental
changes. This leads to frequent link failure on the established path. So the failures in
communication link make some sensor nodes to disconnect or partition from the
network.
5. Hardware constraint - In order to keep the sensor node very smaller size, the
hardware units used in sensor node has limited resources. For example, processor,
memory units are limited resources. Moreover, the network lifetime depends on the
lifetime of the hardware resources of sensor node.
6. Environment - Sensor nodes operate on different environment like under the ocean,
forest areas, under water, in vehicles etc and designed accordingly. Therefore, the
wireless sensor nodes must support to work on different environment. Sometimes
the sensor nodes deployed in a place (e.g. forest) where human involvement may
not be always possible. In this situation, the sensor nodes has to coordinate and
form a network autonomously by adapting the environment.
7. Ad hoc deployment - Most sensor nodes are deployed in regions where human
intervention is less. For example, in forest areas, the sensor nodes have to be tossed
from an aero plane. So, it is the responsibility of the nodes to form a self-organizing
network.
8. Quality of Service (QoS) - In WSN, maintaining QoS is a challenging one due to
high packet loss and frequent node failures. Since the resources used in WSN are
highly constrained, achieving system throughput is very difficult. Further, when the
communication between nodes uses multiple nodes, maintaining connection for a
prolong period is not feasible. Long multi-hop communication increases
transmission delay in end to end packet delivery. This situation is not suitable for
transmitting time constrained or sensitive packets.
9. Topology maintenance - If sensor node fails, then the topology may be frequently
changed in WSNs. The deployment of additional nodes replace the failure nodes
which may lead to frequent topology changes. The node connectivity has to support
for new sensor nodes. So topology management is a challenging issue in WSNs.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5-4 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.

5.2 Optimized Link State Routing Protocol


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). The basic concepts and the operation of
OLSR routing protocol is explained in the following sections.

5.2.1 Basic Concepts


In OLSR, the neighbour’s information are periodically exchanged as link state
information. The control packet overhead can be reduced using Multipoint Relays (MPR).
A MPR is a one-hop neighbour node and is chosen as a forwarder node to forward
packets. MPRs are used to optimize the LSPs and also used to find the shortest path to a
destination. Each node maintains MPRs in a set called MPR set. Furthermore, each node
also maintains a MPR Selectors set. A MPR Selector set is the set of neighbours nodes that
have selected the node as a MPR.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5-5 Routing and Energy Efficient Routing

OLSR protocol works in two phases namely,


1. Neighbour discovery
2. Topology dissemination

5.2.2 Neighbour Discovery


OLSR uses three types of control messages that are namely,
1. Hello message
2. Topology Control (TC)message
3. Multiple Interface Declaration (MID)
A hello message is exchanged periodically with each other nodes. Each hello message
contains information about its neighbours, the MPR Selector set, and neighbour interface
address. After receiving hello message from every neighbour node, a node can select
MPRs from 1-hop neighbours. Each node maintains three tables namely,
1. Neighbour table
2. Topology table
3. Routing table
Consider the neighbour discovery phase. Suppose there are two nodes I and J present
in the network; both have not been established a path between each other so far. Assume
that, node I first broadcasts an empty hello message. When J receives this message, it
registers in its routing table that the link to I is asymmetric (no bidirectional link between
nodes). Then J broadcasts a hello message by stating that node I as an asymmetric
neighbour to node J. On receipt of this hello message, node I registers the link to node J as
symmetric. Node I will in turn broadcasts a hello message by stating that node J as a
symmetric neighbour, and node J registers node I as a symmetric neighbour. The
information received from hello message is stored in neighbour table.

5.2.3 Topology Dissemination


Each node broadcasts TC messages including information about MPR Selector list and
the network topology using multipoint relaying mechanism. The node which receives TC
message will maintain topological information in topology table. After receiving a packet,
each node checks MPR Selector set in the packet to see whether the sender has chosen the
node as a MPR or not. If so, the packet will be forwarded by the node (MPR), else the
packet is discarded at the node. A MID message is used for informing that a node is
operating OLSR on more than one neighbour interface. The MID message is broadcast by

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5-6 Routing and Energy Efficient Routing

the MPRs. The routing table maintained at each node may be updated periodically
whenever there is a change in network topology.

5.2.4 Route Computation


Before packet transmission, route has to be established between the sender and the
receiver nodes. The Dijkstra's shortest path algorithm is used for finding route between
nodes. The route calculation procedure can be initiated when a change is found in either
of the following: the link set, the neighbour set, the two-hop neighbour set, the topology
set, or the MPRset.
Routing table can be computed from neighbour table and topology table. The shortest
path is maintained in the routing table. When a node wants to communicate with other
node, it first checks the routing table to identify route between sender and the receiver
nodes. Once it found route, then handshaking procedure will be carried out using
RTS/CTS mechanism. After that, actual data transmission will be taken place.

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5-7 Routing and Energy Efficient Routing

Fig. 5.3.1 Classifications of localization techniques

The description of various localization techniques are as follows,

5.3.1 Target/Source Localizations


Target/source localization technique can be used in indoor and outdoor applications
such as vehicle or aircraft tracking. In underwater environment, the localization
techniques can be used to locate the large sea animals and ships. Energy based and Time
Difference Of Arrival (TDOA) and Angle-of-Arrival (AOA) are the popular techniques
used in WSN. Of these, energy based localization techniques requires low hardware
configuration. Source localization can be further classified into: energy decay model-
based localization and model independent localization algorithms. In decay method, the
received signal strength can be calculated based on the gain factor of the sensor, signal
energy, distance between the sender and receiver sensors and Gaussian noise.

5.3.2 Node Self-Localization


Self-localization techniques can collectively determine a sensor node’s position relative
to each other node using distance. The node self localization can be further classified into
two types: Range-based method and range-free method. They differ in the information

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5-8 Routing and Energy Efficient Routing

used for localization. Range-based methods use range measurements, while range-free
techniques only use the content of the messages.

5.3.2.1 Range-based Method


Range-based approaches measure the proximity (in terms of hop-count or estimated
distance) to a few landmarks sensor node with known locations. The methods used to
estimate the location of sensor nodes are Time of Arrival (TOA), Time Difference of
Arrival (TDOA), Angle of Arrival (AOA) and Received Signal Strength (RSS).

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5-9 Routing and Energy Efficient Routing

and consumes more energy. The accuracy of TDOA measurements can be enhanced when
the distance between receivers increases.

5.3.2.2 Range-free Method


Range-free localization requires no measurement on distance or angle among nodes. It
can be further divided into two categories: Local techniques and Hop-counting
techniques.

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.

Pattern matching techniques


This technique can also be termed as map-based or finger print algorithm. In this
technique, the received signals at selected areas are stored in an offline database. This
database is called as radio map. This pattern matching algorithm works by matching the
current received signal features to the pre-stored values on the database.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5 - 10 Routing and Energy Efficient Routing

5.3.3 Other Localization Mechanisms


Some of the other localization mechanisms used in WSN are,
 GPS based localization
 Indoor localization
 Sensor network localization
 Absolute localization
 Relative localization
 Triangulation localization

5.3.3.1 GPS based Localization


WSN localization techniques are used to measure the locations of the sensors which
are deployed in different places. The estimation of position of a sensor node will initially
start with the available a priori knowledge of positions of a few sensors present in the
network and depend on the other measurements such as distance, time difference of
arrival, angle of arrival and connectivity. The location of the sensors can be determined
using a Global Positioning System (GPS).
In the GPS-based localization method, each sensor is equipped with a GPS receiver. A
GPS receiver is capable of receiving information from satellites and would need to access
at least three satellites for estimating 2D position and at least four satellites for
determining 3D position. The position can be estimated based on Time Of Arrival (TOA)
of signal from satellite and trilateration technology and the position is specified in the
form of latitude, longitude and altitude.

5.3.3.2 Indoor Localization


Indoor localization techniques use fixed stations for discovering the location of sensor
nodes. Fixed stations are placed in the area where the location discovery is required. The
distributed sensor nodes receive beacon signals periodically from the fixed station. Each
sensor node estimates its location based on the received beacon signal strength, angle of
arrival and time difference between different beacon signals. Simple triangulation method
is used to compute the location of a sensor node.

5.3.3.3 Sensor Network Localization


This localization method does not depend on the presence of fixed stations. Each
sensor node estimates its location by acting itself as beacon node. The location of a sensor

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5 - 11 Routing and Energy Efficient Routing

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).

Fig. 5.3.2 (a) Atomic ML

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).

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5 - 12 Routing and Energy Efficient Routing

Fig. 5.3.2 (b) Iterative ML

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).

Fig. 5.3.2 (c) Collaborative ML

Sensor nodes A and B collaborate with each other to determine its position.

5.3.3.4 Absolute Localization


Absolute localization is one of the GPS-based localizations. In general, GPS-based
localization requires that the sensor nodes must be equipped with GPS receiver. In
absolute localization method, the sensor nodes equipped with GPS receiver are used as
reference nodes. An absolute coordinate system will be defined by these reference nodes.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5 - 13 Routing and Energy Efficient Routing

The absolute coordinates can be obtained from relative coordinate system by applying
simple linear transformation and some reference nodes (beacon nodes).

5.3.3.5 Relative Localization


The indirect approach of localization is termed as relative localization. Since the
location of sensor nodes can be determined based on the relative position of other sensor
nodes, this localization method is called as indirect approach. The relative localization is
used to find out the distance between nodes. Its distance is relative to some reference
nodes also called as beacon nodes. In relative localization, a relative coordinate system
has to be defined by using some reference nodes. The positions of sensors are determined
using inter-sensor measurements such as distance, time difference of arrival, angle of
arrival and connectivity that are relative to other sensors.
In this method, there are some sensor nodes equipped with GPS receivers. Now these
nodes are capable of calculating its position and these positional information will be
broadcast to other nodes (which may not have GPS receiver) as beacon signals. The
sensor nodes which receive this information will compute its location with respect to the
positional information which had been received through beacon message.

5.3.3.6 Triangulation Localization


Triangulation is a widely used approach in wireless sensor network for computing
position of sensor nodes. This method uses information regarding angles. This method is
similar to Trilateration. The triangulation method includes gathering Angle of Arrival
(AoA) measurements at the sensor node from at least three fixed sources. Based on the
AoA references, simple geometric relationships and properties are used in order to
determine the location of the sensor node. The angle-of-arrival is the angle between a
radio signal's propagation direction and some reference direction (e.g. north).
Trigonometric laws, law of sines and cosines are used to estimate node positions.
AoA measurement is a common method for determining the direction of propagation
of a radio-frequency wave occurrence on an antenna array. One approach to obtain AoA
measurements is to use an antenna array on each sensor node. AoA determines the
direction of radio wave propagation by measuring the Time Difference Of Arrival
(TDOA) at each sensor node.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5 - 14 Routing and Energy Efficient Routing

5.4 Energy Efficient Routing and Various Energy Efficient Routing Protocols

5.4.1 Energy Efficient Routing


1. For energy efficient routing Dijkstra’s shortest path algorithm is modified to obtain
routes with minimal total transmission power. What qualifies as a good cost metric
in general depends on the precise intention of energy-efficient unicast routing.
In fact, there are various aspects how energy or power efficiency can be conceived
of in a routing context.
Below Fig. 5.4.1 shows an example scenario for a communication between nodes A
and H including link energy costs and available battery capacity per node.

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

2. Various factors considered for energy efficient routing


(i) Minimize energy per packet (or per bit)
It is required to look at the total energy required to transport a packet over a
multihop path from source to destination (including all overheads). The goal is then
to minimize, for each packet, this total amount of energy by selecting a good route.
Minimizing the hop count will typically not achieve this goal as routes with few

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5 - 15 Routing and Energy Efficient Routing

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5 - 16 Routing and Energy Efficient Routing

(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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5 - 17 Routing and Energy Efficient Routing

power values is minimized. MTPR is of course also applicable to multihop


networks.
3. A direct performance comparison between these concepts is difficult as they are
trying to fulfill different objectives. Also while these objectives are fairly easy to
formulate, it is not trivial to implement them in a distributed protocol that
judiciously balances the overhead necessary to collect routing information with the
performance gained by clever routing choices.

5.4.2 Energy Efficient Unicast Protocols Approaches and Examples


1. Attracting routes by redirecting
As proposed by Gomez et al. the idea is that nodes can overhear packet exchanges
between other nodes. If, in these packets, information about the energy required to
communicate between two adjacent nodes X and Z is included, a third node Y can
decide whether it can offer a more energy-efficient route by breaking the direct
communication X-Z into a two-hop communication X–Y–Z. If so, Y can “attract”
this route by sending route redirect messages to X, Z, or both. The advantage of this
scheme is that its administrative overhead regarding explicit message exchanges is
small. The need to overhear traffic is, however, not quite as appealing and makes
this scheme unsuitable for sensor networks.
2. Distance vector routing on top of topology control
The relay regions concept lends itself to a formulation of an energy-efficient routing
problem. A Bellmann–Ford–type algorithm is used to find paths with minimal
power consumption in the enclosure graph.
3. Maximizing time to first node outage as a flow problem
Change and Tassiulas attempt to maximize the time until the first node runs out of
energy. To do so, they use a centralized, flow-based modeling approach. Given is a
directed graph to represent the network annotated with the initial battery capacity
of each node and, for each link, the energy costs to transmit a fixed-size packet.
Moreover, the rates of data flows coming from certain nodes in the network, and
their destination nodes are known. The goal is to find assignments of flows to
forwarding nodes such the time until the first node runs out of energy is
maximized. This problem can be formulated as a linear programming problem with
certain conditions on flow conservation. As the forwarding energy differs at each
node, the normal maximum flow algorithms are actually not applicable to solve this
problem. Therefore, two approximation algorithms are proposed. The core idea of

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5 - 18 Routing and Energy Efficient Routing

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 Ei 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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5 - 19 Routing and Energy Efficient Routing

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5 - 20 Routing and Energy Efficient Routing

number of messages and, with respect to network lifetime, outperforms even


specialized algorithms like the maxmin zPmin heuristic.

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.

8. Bounding the difference between routing protocols

The previous sections have discussed several possible approaches to energy-


efficient unicast routing. It seems like the choice of the routing has a considerable
impact on the chosen energy efficiency metric. Alonso et al. tries for better solutions.
They consider a class of networks where a all nodes transmit with identical power
and all nodes continuously have data to deliver to a base station (possibly over
multiple hops). Apart from these assumptions, their results apply to a wide range of
real networks, irrespective, for example, of the concrete topology; data aggregation
is not considered. The key question is the energy consumption of nodes during the
data exchange, not the overhead of the routing protocol.
To approach this problem, the graph is partitioned into “spheres” Si that include all
the nodes that are reachable from the base station in at most i hops. The interesting
case is then networks where “most” nodes are more than a single hop away from
the base station (otherwise, the network is not particularly interesting anyway).
Then, all traffic has to go through the nodes of sphere S1, and because there are
relatively few of these nodes, they limit the lifetime of the network. For such
networks, the authors show that no routing will have an energy efficiency worse
than a factor of 2|S1| − 1 than the best possible one – and |S1| is a small constant
compared to the network size. Put the other way around, unless the number of
direct neighbors of the base station is large, the possible impact of routing is limited.
For example, for a base station with four neighbors, even the worst possible routing
protocol will only reduce the energy efficiency of data delivery by a factor of seven
compared to the optimal routing.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5 - 21 Routing and Energy Efficient Routing

5.5 Two Marks Questions with Answers


Part - A

Q.1 What is energy constrain issue faced in WSN ?


Ans. : In WSN the sensors are powered from batteries and it is not feasible to replace or
recharge the batteries. If battery failure occurs, then the network lifetime may be reduced.
This situation highly affects the performance of the system. Hence the design of the
routing protocol must take this issue into consideration to improve the performance of
the system.
Q.2 What is the expected quality of service in WSN ?
Ans. : In WSN, maintaining QoS is a challenging one due to high packet loss and frequent
node failures. Since the resources used in WSN are highly constrained, achieving system
throughput is very difficult. Further, when the communication between nodes uses
multiple nodes, maintaining connection for a prolong period is not feasible. Long multi-
hop communication increases transmission delay in end to end packet delivery. This
situation is not suitable for transmitting time constrained or sensitive packets.
Q.3 What do you mean by Topology Dissemination in routing ?
Ans. : In optimized link state routing protocol each node broadcasts Topology Control
(TC) messages including information about MPR Selector list and the network topology
using multipoint relaying mechanism. The node which receives TC message will maintain
topological information in topology table. After receiving a packet, each node checks
MPR Selector set in the packet to see whether the sender has chosen the node as a MPR or
not. If so, the packet will be forwarded by the node (MPR), else the packet is discarded at
the node. A MID message is used for informing that a node is operating OLSR on more
than one neighbour interface. The MID message is broadcast by the MPRs. The routing
table maintained at each node may be updated periodically whenever there is a change in
network topology.
Q.4 Explain time-of-arrival positioning technique for self-localization.
Ans. :

 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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5 - 22 Routing and Energy Efficient Routing

5. What is Multi-Lateration technique ?


Ans. :

 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)

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5 - 23 Routing and Energy Efficient Routing

Q.10 Define Throughput and Delay.


Ans. : Throughput refers the number of data transmitted within a given period of time.
The higher throughput of the network promotes the performance of the system.
Packet transmission delay is the elapsed time between sending the packet from the
source node to the time it is received by the receiver.

5.6 Long Answered Questions


Part - B

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)



TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 5 - 24 Routing and Energy Efficient Routing

Notes

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


UNIT - III

6 Wireless Sensor Networks -


Transport Layer Challenges
and Issues
Syllabus
Challenges and issues in transport layer protocol.

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

6.1 Transport Layer In Wireless Sensor Networks


Each transport layer protocol has to provide end-to-end reliable packet delivery. It is
also responsible for managing network congestion issues of WSNs. The Transmission
Control Protocol (TCP) developed for ad hoc networks are not well suited for WSNs. It
has to be adapted to the WSN and has to be made to suit for change of environment.

6.1.1 Transport Protocols Attributes


Common Transport Layer Protocol Attributes are as follows,
1. Reliable data transport - This task requires the ability to detect and repair losses
of packets in a multi-hop wireless network.
2. Flow control - The receiver of a data stream might temporarily be unable to
process incoming packets because of lack of memory or processor power. Flow
control has so far not been a research issue in sensor networks.
3. Congestion control - Congestion occurs when more packets are created than the
network can carry and the network starts to drop packets. Dropping packets is a
waste of energy and counteracts any efforts to achieve reliability or information
accuracy. Congestion-control schemes try either to avoid this situation or to react
to it in a reasonable manner. One important way to avoid congestion is to control
the rate at which sensor nodes generate packets.
4. Network abstraction - The transport layer offers a programming interface to
applications, shielding the latter from the many complexities and vagaries of data
transport. Since there is yet no standard transport protocol in sensor networks,
there is no consensus on such an interface.

6.1.2 Transport Layer Challenges


The major challenges of transport layer protocols used in WSNs are as follows,
1. Providing reliable data delivery
2. Configuring sensor node to suit for the specific application
3. High packet loss due to poor link condition
4. Rapid change of network topology
5. Multipath routing
6. Frequent path break in end-to-end connectivity due to node failure
7. End-to-end error recovery

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6-3 Transport Layer Challenges and Issues

6.1.3 Congestion Control and Rate Control


1. Congestion occurs when over a prolonged period of time more packets are
generated than the network (as a whole or locally) can actually carry. Usually,
nodes have some buffer space available, which can handle transient overloads.
Any packet in excess of the available buffer space is dropped, wasting all the
energy spent on this packet so far.
2. Clearly, the larger this buffer space is, the more overload can be carried and
packet dropping occurs later. On the other hand, longer queues impose longer
end-to-end delays and the protocols need longer time to react on congestion
states.
3. Congestion situations in sensor networks
(i) In sensor networks, there are some typical situations that are amenable to
congestion. Consider, for example, applications where sensors are quiet most
of the time but start periodic packet generation upon some external event.
When many sensors recognize this event simultaneously, a traffic hot spot
around the event location is created.
(ii) On the other hand, when the network has a structure in which many sensors
report to a few sink nodes, the area around the sinks can become a hot spot
even if the traffic around the single event locations is bearable.
(iii) Clearly, in such hot spots, we have not only packet drops due to buffer
overflows, but in case CSMA-type protocols or ALOHA-type MAC protocols
are used, we also have an increased collision rate and longer access delays,
costing energy at the MAC layer and causing locally generated packets to
pile up.
4. Implications of congestion in sensor networks
Considered a scenario where a varying number of nodes are randomly deployed
over an 800 × 800 m2 area. A physical phenomenon moves through this area
toward a randomly chosen destination at a randomly chosen speed between 1
and 2 meters per second. Each node has a sensing range of 200 m and measures
its distance to the phenomenon. The accuracy of these measurements is within
5 % of the sensed distance. As soon as a sensor detects the phenomenon, it starts
to transmit packets at a given reporting period. When the phenomenon moves
out of the sensing range the sensor stops. The sensors report their readings to a
sink node. The sink node works with slotted time and produces a position

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6-4 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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6-5 Transport Layer Challenges and Issues

(vi) Consequently, the CODA framework (explained in section 6.1.4.3) uses a


second congestion indicator, namely channel sampling. The goal of channel
sampling is to obtain an estimate of the current channel utilization U.
(vii) This estimate is in turn used as congestion indication. However, the
relationship between the utilization and the congestion level depends on the
MAC protocol: For example, with TDMA the channel can be almost saturated
without harming throughput, while CSMA variants have a certain maximum
channel utilization Umax < 1 beyond which the rate of collisions increases and
the goodput actually decreases. Congestion is diagnosed when the channel
utilization is within some neighborhood of Umax.
(viii) The channel sampling algorithm is triggered when the node’s packet queue
becomes nonempty. This is the moment where the node wants to start packet
transmission and when the question of whether the channel is congested or not
becomes relevant. The time after starting the sampling operation is subdivided
into sampling epochs, with the duration of one epoch spanning multiple
packets. Within an epoch, the channel is periodically sampled, say N times.
(ix) Between the sampling instants, the node can switch off its transceiver to
conserve energy. When in epoch n a number M out of N samples indicate a
busy channel, this epoch’s utilization is n = M/N. The estimates for K
consecutive epochs can be combined, for example, with exponential weighting.
The weighting factor and the number K can be used to tune the estimator.
9. Congestion handling
There are always two ways to deal with the congestion namely to avoid it or to
handle it if it occurs. Some of the mechanisms are discussed below.
(I) Rate control
(i) The rate by which sensor nodes transmit their own sensor readings can be
controlled. Alternatively, when this rate is fixed for certain applications, the
number of nodes generating at this rate can be controlled. This control can be
executed in an end-to-end fashion or locally.
(ii) In the end-to-end case, the ultimate receiver, for example, a sink node, causes
the transmitting nodes to reduce their rate. The sink uses some feedback
mechanism like, for example, acknowledgments or dedicated signaling
packets.
(iii) In the local case, a node A might be signaled by its next-hop forwarder B that
B’s buffers are full. Node A can reduce its rate or propagate the overflow signal
further backward.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6-6 Transport Layer Challenges and Issues

(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.

6.1.4 Transport Layer Protocols in Wireless Sensor Network


A WSN transport layer protocols such as Pump Slowly, Fetch Quickly (PSFQ) and
Event-to-Sink Reliable Transport (ESRT) protocol have been designed to provide simple,
reliable and guaranteed data delivery.

6.1.4.1 Pump Slowly, Fetch Quickly Protocol (PSFQ)


In PSFQ, the sensor which sends data to other sensors must ensure that the
transmission is taken place slowly i.e. pump data slowly. This process is called 'pump
slowly'. This approach avoids high packet loss rate. If a sensor node identifies packet
loss, then the sensor node should recover (fetch) the missing packets. This process is
called "fetch quickly'. This quick recovery process will minimize the lost recovery cost.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6-7 Transport Layer Challenges and Issues

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6-8 Transport Layer Challenges and Issues

further data transmission. If a report message cannot able to append more status
information, then new report message will be created.

6.1.4.2 Event-to-Sink Reliable Transport (ESRT) Protocol


ESRT protocol provides a solution for transport layer issues. It provides reliable event
detection and congestion resolution with minimum energy consumption. This protocol
offers event-to-sink reliability rather than providing end-to-end reliability. This can be
achieved when data about the event is carried out reliably to the sink node.

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6-9 Transport Layer Challenges and Issues

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.

6.1.4.3 The CODA (COngestion Detection and Avoidance ) Congestion-Control Framework


1. The COngestion Detection and Avoidance (CODA) approach described by Wan et
al. combines a congestion-detection mechanism with two congestion-control
mechanisms working on different timescales. These mechanisms are targeted
toward different congestion scenarios.
2. An open-loop hop-by-hop backpressure mechanism aims to resolve transient
congestion situations like, for example, hot spots around the sensor nodes first
observing an external event.
3. Secondly, the acknowledgment-based closed-loop mechanism addresses
resolution of persistent congestion states through the use of acknowledgments
and a self-clocking mechanism.
4. Open-loop hop-by-hop backpressure mechanism
(i) When a node detects a congestion situation, it regularly broadcasts
backpressure messages as long as the congestion situation persists.
Additionally, it invokes some application-dependent policy to deal with the
congestion situation - The node might decide to drop some of the packets it is
supposed to forward, it can reduce the rate of its own measurement reports,
or it can simply stop forwarding for a while and continue later on.
(ii) A node B receiving a backpressure message from another node A also has
several options. For example, B can also start to drop packets or reduce its
rate, since A is not willing to accept packets anyway. Node B can also decide
to forward the backpressure message further toward the data source.23 If
node B is itself congested, it can increment a counter in the backpressure
message before forwarding it.
(iii) As soon as the message reaches a non-congested node, the size of the
congested area can be roughly inferred from the counter value. This can be
used on longer timescales as a hint for routing protocols to avoid the whole
area.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 10 Transport Layer Challenges and Issues

(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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 11 Transport Layer Challenges and Issues

(vii) A regulating effect can be achieved in several ways discussed below,


 The sink can decrease its acknowledgment rate or even stop sending
acknowledgments when it diagnoses its own neighborhood as busy or if the
desired minimum number of packets needed to achieve a certain information
accuracy is not reached because of congestion losses.
 The sink issues acknowledgments at their nominal rate and trusts that these get
lost in the hot spots, slowing down the sources “beyond” these hot spots.
The sources stop to request further regulation as soon as their generation rate drops
below the threshold value r.
6. Reliable data transport
The problem of reliable data transport over wireless multihop networks like wireless
sensor networks is not an easy one. There are three main sources of packet losses namely,
(i) The wireless channel can introduce (lots of) transmission errors, the packets of
different nodes can collide, or nodes can lose packets because of other failures.
(ii) Packets can be dropped in the network because of congestion, that is, overload of
intermediate nodes.
(iii) The receiver might drop packets because they arrive too quickly.

6.1.5 Reliability Requirements in Sensor Networks


1. What are the requirements for reliable data transport in wireless sensor
networks ? A first glance toward this question can be gained by comparing
sensor networks with other networks.
2. In traditional networks like the Internet, the transport protocols (TCP, UDP) and
the underlying network layer protocols have essentially no clue which kind of
data they transport.
3. In fact, a key design requirement for these protocols is data transparency. Such a
protocol must strive to deliver every single bit to the receiver(s), since nothing is
known about the relative importance of the different data bits. On the other
hand, sensor networks are not designed with the goal of transporting multiple
independent data streams.
4. Sensor networks are data-centric and rely on in-network processing. The
reliability requirements are pretty much application specific and the protocols
can take advantage of this; they know the data they carry.
5. Several data transport tasks for wireless sensor networks have been discussed in
the theory of networking. These can be roughly classified into the following
orthogonal axes,

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 12 Transport Layer Challenges and Issues

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 13 Transport Layer Challenges and Issues

14. Guaranteed versus stochastic delivery - In the case of guaranteed delivery, it is


expected that all transmitted packets reach the destination; anything else is
considered a failure. For example, when a block of application code is distributed
to a set of sensors, losing any packet renders the code block useless. In general,
guaranteed delivery is challenging and costly in terms of energy and bandwidth
expenditure, specifically over links with sometimes high error rates like wireless
ones. Furthermore, many applications can live with some losses, provided that
there are not too many of them. The concept of stochastic delivery guarantees
allows a limited amount of losses. There are several ways to specify stochastic
guarantees. For example, one might specify that for periodic data delivery within
every k subsequent packets at least m packets must reach the destination; any
number below m is considered a failure.
15. Such a specification has similarities to the concept of (m, k)-firm deadlines. It is
applicable when subsequent sensor readings are highly correlated, for example,
because a slowly varying physical process is monitored. A similar specification
requires that at least m out of k sensors detecting an event must deliver a packet
to the sink or to a local cluster head for proper detection/aggregation. A third
approach to deal with stochastic guarantees is to specify a delivery probability
simply as the long-term fraction of arriving packets.
16. In general, the higher the desired delivery probability, the higher are the energy
costs needed to achieve this. As the reliability requirements are application
dependent, several works have focused on developing transport protocols for
“single points” or “small point sets” in the “space” spanned by the previous
three axes.
17. Generally applicable transport protocols that are lightweight enough to run on
constrained sensor nodes seem not to have appeared yet. Even in the Internet
world, there is no single protocol. TCP is used for unicast applications, whereas
for reliable multicast, other protocols like, for example, Scalable Reliable
Multicast (SRM) have been developed.
18. However, even for more specialized protocols, it is a design challenge to achieve
a small footprint in terms of code size, size of runtime data, and computational
complexity.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 14 Transport Layer Challenges and Issues

6.2 QoS in WSN


QoS is a measure of quality of service that the network provides to the end user or
application. QoS parameters in terms of reliability of end-to-end connection, timeliness of
packet delivery, robustness, availability of sensor nodes, and security are used to measure
the QoS performance parameters such as throughput, bandwidth, delay, jitter, delivery
ratio and packet loss rate.

6.2.1 QoS Parameters


The fundamental QoS parameters used in WSN are as follows,
1. Throughput - Throughput refers the number of data transmitted within a given
period of time. The higher throughput of the network improves the performance
of the system. Effective utilization of resources in WSN will highly improve the
network throughput.
2. Delay - Packet transmission delay is the elapsed time between sending the packet
from the source node to the time it is received by the receiver. This elapsed time
includes queuing delay, scheduling delay, propagation delay etc. Delay sensitive
applications must ensure that the packets are received with minimum delay.
3. Jitter - Jitter is defined as variations in delay of received packets at the receiver. It
is mainly caused by the queuing delay variations in consecutive packet
transmissions.
4. Packet loss rate - It is referred as the percentage of packets lost during packet
transmission. This may happen due to congestion, disconnection of path and
mobility of nodes. High packet loss degrades the performance of the system and
also induces the sender node to perform retransmission frequently. The
retransmission process highly increases delay in packet transmission.

6.2.2 QoS Challenges


The various QoS challenges faced in WSN are as follows,
1. Resource constraints - Sensor nodes are equipped with limited memory,
processing unit and limited power supply. Since the transmission power is
limited in sensor nodes, the available bandwidth of the wireless channel and the
transmission range are also limited. The network lifetime depends on the
resources used in WSN. The well suited energy efficient mechanisms will extend
the network lifetime. Therefore, it is very essential to use the available resources
such as bandwidth, power etc. of WSN in an efficient way.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 15 Transport Layer Challenges and Issues

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 Quality of Sensor Network


Quality measurement of a sensor network comprises two factors namely, Coverage
and Exposure.

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 16 Transport Layer Challenges and Issues

3. Location of sensor nodes


4. Density of nodes on the particular area
There are two types of coverage namely,
1. Worst-case coverage
2. Best-case coverage
Exposure path - A path along the best coverage area is called maximum support path
or maximum exposure path.
i) Worst-case coverage - It defines the less coverage area that are breach.
Coverage Problem
Consider a region A in which a set of sensor nodes (S) are deployed. S can be
{ S1, S2, …, Sn} and the coordinate of each sensor node Si is { Sx, yi} are assumed to be
known using localization techniques.
Let us assume that an intruder is traversing from location I to location F on the
region A. Here the problem is to identify the maximal breach path PB from location I to
location F. A mathematical technique is used to solve the problem (coverage problem) is
the Voronoi diagram.
Algorithm to find maximal breach path
Algorithm used to find the maximal breach path PB is given below.
5. Generate the Voronoi diagram
6. Create a weighted graph
7. Using Breadth-First Search (BFS), find out the maximum cost path from
location I to location F.

Generating Voronoi Diagram


Voronoi diagram can be generated from the vertex set V and the edge set E of sensor
graph. The Voronoi diagram comprises a set of convex polygons. All points inside the
polygon are closer to the set enclosed by the polygon.
A sample Voronoi diagram and a breach path from location I to location F is shown in
Fig. 6.2.1 (a).

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 17 Transport Layer Challenges and Issues

This diagram can be formed by drawing the perpendicular bisectors for each line
segment. This line segment can be made to join two sites.

Fig. 6.2.1 (a) Voronoi diagram

Creating weighted graph

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 18 Transport Layer Challenges and Issues

Fig. 6.2.1 (b) Delaunay triangulation

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 19 Transport Layer Challenges and Issues

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).

Fig. 6.2.2 (a) Unit field minimum exposure path

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 20 Transport Layer Challenges and Issues

ii ) MEP in Polygon Field


The MEP between two vertices vi and vj in a polygon field with single sensor can be
determined as follows,
 There is a polygon field with vertices v1,v2, ..., vn.
 The edge (vi, vi +1) is tangent to the engraved circle at ui.
 Then, MEP contains line segments from vi to uj and have carved circle from ui to
uj. Again, there is a line segment from ui to vj.

The polygon field minimum exposure path is shown in Fig. 6.2.2 (b).

Fig. 6.2.2 (b) Polygon Field Minimum Exposure Path

iii) Generic MEP


Assume that the sensor nodes are randomly placed in the sensor field. The sensor
network is shaped with grid points. Generic minimum exposure path is shown in
Fig. 2 (c).
Each side of the square is divided into m equal parts to create n  n grid of order m. In
order to create a grid, all the vertices in the square are connected. The exposure function E
is used to compute edge weight of each edge in the grid and MEP, the shortest path is
determined by using Dijkstra's algorithm.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 21 Transport Layer Challenges and Issues

Fig. 6.2.2 (c) Generic minimum exposure path

6.3 Energy Efficient Design


1. Sensor nodes are smaller in size and have sensing, processing and computing
capabilities. All these operations consumes reasonable amount of energy. Each
sensor node is energy and resource constrained node. Since the batteries enabled
in sensors are not changeable, losing the energy will slowly make the sensor node
to fail.
2. The network lifetime depends on the resources used in WSNs. Energy
optimization mechanisms are used to enhance the network lifetime. The basic
Dynamic Power Management (DPM) techniques can be used to turn off the
components of sensor nodes when no operation is carried out.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 22 Transport Layer Challenges and Issues

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 23 Transport Layer Challenges and Issues

6.4.1 Time Synchronization


Time synchronization is essential to receive the messages in a specific order. Most of
the time synchronization algorithms use the information received from GPS. It supports
for arranging the messages and events to be reported in some order.
GPS requires the wireless sensor node to communicate with satellites in order to
synchronize the messages. So it requires each sensor node to equip with GPS receiver.
WSN consists of inexpensive small sensor nodes. A GPS receiver on each sensor node
would be expensive. The time accuracy of GPS would depend on the number of satellites
the receiver can communicate at a given time. This may vary from time to time and will in
turn vary time accuracy. Furthermore, GPS enabled devices depend on line-of-sight
communication to the satellite which is not always feasible in WSNs due to the random
and inaccessible deployment of sensor nodes.

6.4.2 Low Power Synchronization


In this scheme, every sensor node broadcasts a synchronization pulse when an event is
observed.

6.4.3 Global Synchronization


In global synchronization, each node exchanges control signals with each other. Sensor
nodes select one node as a leader using distributed election protocol. The leader will send
beacon signals periodically to all the other nodes. A constant global time period is
followed throughout the network. This type of synchronization is very hard to
implement.

6.4.4 Clock Synchronization


(i) Each sensor node is enabled with local clocks. These local clocks operate on
unsynchronized mode. Local clocks have to be synchronized at sensor nodes
whenever synchronization needed.
(ii) Local time stamps of two sensor nodes have to be synchronized. This
synchronization uses master slave protocol. One sensor node acts as master and
the other node works as slave node. The slave node read the clock time stamp of
the master node and try to synchronize accordingly.
(iii) Clock synchronization between any two nodes is generally achieved by
exchanging messages. Each node estimates the time of other node's clock. Once
the time difference between the clocks of the nodes is computed, the clock time
can be adjusted at sensor nodes.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 24 Transport Layer Challenges and Issues

(iv) If the messages are received arbitrarily, then the synchronization becomes very
difficult.

6.5 Two Marks Questions with Answers


Part - A
Q.1 What is congestion control in transport layer ?
Ans. : Congestion occurs when more packets are created than the network can carry
and the network starts to drop packets. Dropping packets is a waste of energy and
counteracts any efforts to achieve reliability or information accuracy. Congestion-
control schemes try either to avoid this situation or to react to it in a reasonable
manner. One important way to avoid congestion is to control the rate at which sensor
nodes generate packets.
Q.2 What is packet loss rate ?
Ans. : Packet loss rate is referred as the percentage of packets lost during packet
transmission. This may happen due to congestion, disconnection of path and mobility
of nodes. High packet loss degrades the performance of the system and also induces
the sender node to perform retransmission frequently. The retransmission process
highly increases delay in packet transmission.
Q.3 Explain resource constraints in WSN.
Ans. : Sensor nodes are equipped with limited memory, processing unit and limited
power supply. Since the transmission power is limited in sensor nodes, the available
bandwidth of the wireless channel and the transmission range are also limited. The
network lifetime depends on the resources used in WSN. The well suited energy
efficient mechanisms will extend the network lifetime. Therefore, it is very essential to
use the available resources such as bandwidth, power etc. of WSN in an efficient way.
Q.4 Define coverage in WSN.
Ans. : 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
3. Location of sensor nodes
4. Density of nodes on the particular area

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 25 Transport Layer Challenges and Issues

Q.5 Define dynamic voltage scaling.


Ans. : 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). DVS can considerably reduce the energy consumption of the entire network by
setting the CPU speed to match the requirements of each operation.

6.6 Long Answered Questions


Part - B
Q.1 Discuss transport layer challenges in WSNs. (Refer section 6.1)
Q.2 Explain congestion control mechanism in WSNs. (Refer section 6.1)
Q.3 Write a note on Pump Slowly, Fetch Quickly Protocol (PSFQ). (Refer section 6.1.4)
Q.4 What are the features of Event-to-Sink Reliable Transport (ESRT) Protocol ?
(Refer section 6.1.4)
Q.5 Explain energy efficient design for sensor nodes in WSN. (Refer section 6.3)



TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Wireless Sensor Networks -
Ad hoc and Wireless Sensor Networks 6 - 26 Transport Layer Challenges and Issues

Notes

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


UNIT - IV

7 Sensor Network Security

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

Quick and huge developments in wireless communication, sensor technology, and


embedded computing technology have promoted the emergence and development of
Wireless Sensor Networks (WSN). Wireless sensor networks consist of a large number of
cheap micro sensor nodes deployed in the monitoring area, which is a multi-hop
self-organizing network system formed by wireless communication method, whose
purpose is to sense, collect, and process cooperatively the information sensed by sensors
in the network distributed area and then forward the results to its users.

7.1 Network Security Requirements and Related Aspects in Wireless


Sensor Networks

7.1.1 The Characteristics of Wireless Sensor Networks


(i) No central node -Wireless sensor network has no absolutely central node, and all
nodes are in equal status. Not only is it the gatherers of information but also the
forwarders for other nodes transfer information. Network nodes coordinate
behavior with each other through a distributed algorithm.
(ii) Self-organization - A wireless sensor network requires every sensor node to be
independent and flexible enough to be self-organizing and self-healing according
to different situations. There is no fixed infrastructure available for the purpose of
network management in a sensor network. This inherent feature brings a great
challenge to wireless sensor network security as well. If self-organization is
lacking in a sensor network, the damage resulting from an attack or even the
hazardous environment may be devastating.
(iii) Large-scale - A wireless sensor network usually consists of thousands of tiny
sensors, not primarily depending on the ability to upgrade individual devices but
to improve the reliability and stability of the system depending on large-scale and
redundancy of embedded devices to work together.
(iv) Volatility of network topology - In wireless ad hoc network, various factors such
as node mobility and decrease of the remaining power of the power control box in
the sensor nodes can lead to network topology changes and make the network
topology constantly change which is not regular and unpredictable.
(v) Multihop routing - Wireless sensor networks use multihop routing mechanism.
Due to the limits of transmitting power and the communication coverage radius,
when communicating with other nodes out of the coverage, the node needs the
intermediate nodes to forward.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7-3 Sensor Network Security

(vi) Data-centric networks - As nodes are randomly deployed, the relationship


between the network and node number is entirely dynamic, showing up that
there is no necessary connection between the node number and the node position.
User directly reports the events of interest to the networks; then the networks
report the information accessed in a specified time to the user. Therefore, the
wireless sensor network is a data-centric network.

7.1.2 Issues, Challenges and Various Security Constraints of Sensor Networks


1. Wireless sensor networks have distinctive constraints as compared to traditional
networks making the implementation of existing security measures not
practicable. In broader terms, these constraints are the upshot of limitations
regarding the sensor node’s memory, energy, and transmission and processing
power as well as due to the ad hoc and wireless channel. These constraints,
which make the design of security measures more complicated.
2. These constraints construct it impossible to employ the existing strong but
complex security solutions to the WSNs. In order to design competent and useful
security mechanisms for WSNs, it is essential to understand the constraints in
WSN. It has been categorized into node constraints and network constraints and
is discussed below.
3. Node constraints - Security solutions need high computation, memory storage
and energy resources which create an extra challenge when working with tiny
sensor nodes. The principal challenge of security in WSNs is maximizing security
while minimizing resource consumption. The resources in this perspective
include energy (battery power), processing (CPU cycles), storage (memory) and
the communication bandwidth.
a. Limited memory - Typical sensor nodes are tiny devices which come with
very limited memory and storage capacity. Berkeley’s MICA2 possess
4-8 MHz, 4 kB of RAM, 128 kB flash and ideally 916 MHz of radio
frequency. This means any security solution designed for sensor networks
should be lesser in code.
b. Limited energy - Energy is another vital factor to consider when designing
security procedures for sensor nodes. Given the sensor network topology
which makes accessing them after deployment unfeasible, it is very
important to restrict the energy consumption and thereby widen the battery
life. However, adding security measures to sensor networks necessarily has
a considerable impact on its energy consumption, for example, to carry out

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7-4 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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7-5 Sensor Network Security

c. Unattended operations - The sensor networks are generally deployed in an


environment accessible to adversary. The operations of sensor networks in
unattended environment provide an adversary with a greater access to the
sensor nodes than the typical PCs situated in a secure place. A security
scheme should still defend against possible attacks, even if a small number
of sensor nodes are compromised.
d. Nature of deployment - The topology of the sensor network is not known
earlier to the deployment. Hence, the security schemes cannot help from the
knowledge of neighboring nodes. A security scheme should prolong to
provide services even in the presence of nodes failure.
6. Energy consumption - The factors which consume energy for their operations,
a. Sensing energy consumption depends on the hardware and the application.
b. An A/D Converter for sensor consumes only 3.1 μW, in 31 pJ/8-bit of energy at l
Volt supply.
The computing unit related with a wireless sensor is a microcontroller/processor
with memory which can control and function the sensing, computing and
communication unit.
The energy consumption of this unit has principally two parts - switching energy
and leakage energy. The dynamically changing workload without degrading
performance thus saving energy. Leakage energy is the energy consumed when
no computation work is made.
Sleeping - To conserve the energy, sensors can be put into sleep-wake up cycles.
When a sensor is in sleep slate, it off some units to conserve energy. There are
different types of sleep modes.

7.1.3 Wireless Sensor Network - Security Requirements


According the characteristics, the wireless sensor networks differ from the traditional
wireless networks, facing more demands especially in terms of security. In order to resist
different kinds of security attacks and threats and to ensure the confidentiality of the
tasks performed, the reliability of data generated, the correctness of data fusion, and the
security of data transmission, the security requirements are mainly in the following areas.
(1) Data confidentiality - Data confidentiality is an important network security need
requiring that all sensitive information in the storage and transmission process
must ensure its confidentiality. Divulging the content of the information to any
unauthorized user is not allowed.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7-6 Sensor Network Security

(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.

7.1.4 Security Implementation Challenges in Wireless Sensor Networks


1. Security in wireless sensor networks is a crucial component for basic network
functions similar to packet forwarding and routing. There is no predetermined
infrastructure in ad hoc sensor networks and as the name indicates they are
formed on the fly.
2. The devices connect to each other in their own communication range through
wireless links. Individual devices behave as routers when relaying messages to
other devices. The topology of an ad hoc sensor network is not fixed. It changes
every time when these mobile stations move in and out of every other’s
transmission range.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7-7 Sensor Network Security

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.

7.1.5 Secure Communication in Sensor Networks


1. Sensor networks may be deployed in unfriendly environments, especially in
military applications. In such situations, the sensors may be captured, and the
data/control packets might be intercepted and/or modified. So, security services
such as authentication and encryption are necessary to maintain the network
operations.
2. Yet, due to the resource constraints, some of the security mechanisms are not
feasible in sensor networks.
3. In sensor network security, an essential challenge is the design of protocols to
bootstrap the establishment of a secure communications infrastructure from a
collection of sensor nodes that been pre-initialized with some secret information
but have had no earlier direct contact with each other. This problem is referred to
as the bootstrapping problem.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7-8 Sensor Network Security

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.

7.1.6 Security Goals and Services of Sensor Networks


The goal of security services in WSNs is to protect information (confidentiality,
authentication, integrity, access control, and freshness) and resources (availability) from
attacks and mischief in the presence of a resourceful adversary.
1. Authentication enables every message sender in the sensor networks, including
the base station, sensor nodes and outer users, to prove its identity, that is, the
legitimacy of the source of a message to the receiver. It allows the receiver of the
message to ensure that received messages are in actuality originated from the
claimed source.
2. Message integrity verifies the authenticity of the received message contents. It
must be implemented so that the contents of received message have not been
modified in transit by an adversary.
3. Verification empowers every sensor node in the network to confirm the
legitimacy of the received message. It is important that authentication does not
imply verification in WS Network environment. A legitimate message sender
might send an authenticated message to the sensor nodes; on the other hand, the
sensor nodes may not have access to authentication information of the message
sender or may not be able of performing efficiently the computation that is
required to verify authentication information.
4. Freshness ensures that a received message is new and a recent one. Freshness can
mean both data freshness and key freshness.
5. Confidentiality prevents unauthorized entity or adversaries from accessing the
data being sent to the authorized one. The confidentiality objective is essential in
WSNs environment to protect data traveling between the sensor nodes, between
the sensor nodes and the base station, and also between the sensor nodes and the
outside entity from disclosure. A confidential message should not disclose its
contents to an eavesdropper.
6. Access control ensures that only the authorized sensor is involved in providing
information to network services and merely an authorized user obtains a certain

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7-9 Sensor Network Security

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.

7.2.1 Denial of Service Attacks


Wood et al. have defined a DoS attack as an event that diminishes or attempts to
reduce a network’s capacity to perform its expected function. There are several standard
techniques existing in the literature to cope with some of the more common denial of
service attacks, although in a broader sense, development of a generic defense mechanism
against DoS attacks is still an open problem. Moreover, most of the defense mechanisms
require high computational overhead and hence not suitable for resource-constrained
WSNs. Since DoS attacks in WSNs can sometimes prove very costly, researchers have

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 10 Sensor Network Security

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.

7.2.1.1 Physical Layer Attacks (Jamming, Tampering) and Solutions


The physical layer is responsible for frequency selection, carrier frequency generation,
signal detection, modulation, and data encryption. As with any radio-based medium
there exists the possibility of jamming in WSNs.
There are two broad categories of attack on WSNs in the physical layer namely,
(i) Jamming and (ii) Tampering.
(i) Jamming - It is a type of attack which interferes with the radio frequencies that
the nodes use in a WSN for communication. A jamming source may be powerful
enough to disrupt the entire network. Even with less powerful jamming sources,
an adversary can potentially disrupt communication in the entire network by
strategically distributing the jamming sources.
An intermittent jamming may also prove detrimental .
(ii) Tampering - Sensor networks typically operate in outdoor environments. Due to
unattended and distributed nature, the nodes in a WSN are highly susceptible to
physical attacks. The physical attacks may cause irreversible damage to the
nodes. The adversary can extract cryptographic keys from the captured node,
tamper with its circuitry, modify the program codes or even replace it with a
malicious sensor. It has been shown that sensor nodes such as MICA2 motes can
be compromised in less than one minute time.
Physical layer attacks - Solutions
Jamming and tampering attacks can be prevented by using methods like spread lower
duty cycle, spectrum, priority messages, region mapping, Tamper proofing, mode change
and node hiding.

7.2.1.2 Link Layer Attacks (Collision, Exhaustion) and Solutions


1. The link layer is responsible for multiplexing of data-streams, data frame
detection, medium access control, and error control. Attacks at this layer include
purposefully created collisions, resource exhaustion, and unfairness in allocation.
2. A collision occurs when two nodes attempt to transmit on the same frequency
simultaneously. When packets collide, they are discarded and need to be
retransmitted. An adversary may strategically cause collisions in specific packets

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 11 Sensor Network Security

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.

Link layer attacks - Solutions


Link layer attacks can be prevented by using error detection code, rate limitation and
by dividing the packets into small frames.

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 12 Sensor Network Security

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 13 Sensor Network Security

8. Byzantine attack - In this attack, a compromised node or a set of compromised


nodes works in collusion and carries out attacks such as creating routing loops,
forwarding packets in non-optimal routes, and selectively dropping packets.
Byzantine attacks are very difficult to detect, since under such attacks the
networks usually do not exhibit any abnormal behavior.
9. Information disclosure - A compromised node may leak confidential or
important information to unauthorized nodes in a network. Such information
may include information regarding the network topology, geographic location of
nodes, or optimal routes to authorized nodes in the network.
10. Resource-depletion attack - In this type of attack, a malicious node tries to
deplete resources of other nodes in a network. The typical resources that are
targeted are namely, battery power, bandwidth, and computational power. The
attacks could be in the form of unnecessary requests for routes, very frequent
generation of beacon packets, or forwarding of stale packets to other nodes.
11. Acknowledgment spoofing - Some routing algorithms for WSNs require
transmission of acknowledgment packets. An attacking node may overhear
packet transmissions from its neighbouring nodes and spoof the
acknowledgments thereby providing false information to the nodes. In this way,
the attacker is able to disseminate wrong information in the network about the
status of the nodes, since some acknowledgment may arrive from nodes which
are not alive in reality.
12. In addition to above categories of attacks, there are various types of possible
attacks on the routing protocols in WSNs. Most of the routing protocols in WSNs
are vulnerable to attacks such as, routing table overflow, routing table
poisoning, packet replication, route cache poisoning, rushing attacks etc.

Network Layer Attacks - Solutions

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 14 Sensor Network Security

7.2.1.4 Transport Layer Attacks (Flooding, De-Synchronization) and Solutions


The attacks that can be launched on the transport layer in a WSN are flooding attack
and de-synchronization attack.
1. Flooding - Whenever a protocol is required to maintain state at either end of a
connection, it becomes vulnerable to memory exhaustion through flooding. An
attacker may repeatedly make new connection request until the resources
required by each connection are exhausted or reach a maximum limit. In either
case, further legitimate requests will be ignored.
2. De-synchronization - De-synchronization refers to the disruption of an existing
connection. An attacker may, for example, repeatedly spoof messages to an end
host causing the host to request the retransmission of missed frames. If timed
correctly, an attacker may degrade or even prevent the ability of the end hosts to
successfully exchange data causing them instead to waste energy attempting to
recover from errors which never really exist.
Transport Layer Attacks - Solutions
Transport layer DoS attacks like flooding and de-synchronization can be prevented by
using client puzzles and authentication schemes.

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 15 Sensor Network Security

7.2.2 Prevention Schemes for Various DoS Attacks in Sensor Network


Wireless communications are endangered to denial-of-service (DoS) attacks.
Organizations can take various actions to mitigate the risk of these involuntary DoS
attacks. Careful site contemplate can recognize locations where communication from
other devices exist; the results of these contemplation should be used while taking
decision where to locate the wireless access points. Regular periodic surveys of wireless
networking actions and performance can identify problems; suitable remedial activities
may include eviction of the humiliating devices or measures to increase strength of and
coverage within the problem area.
Layer Attacks Defense (Solutions)
1. Physical Jamming Spread-spectrum, priority messages,
lower duty cycle, region mapping,
mode change

2. Link Collision Error-correcting code

Exhaustion Rate limitation

Unfairness Small frames

3. Network Spoofed routing information Egress filtering, authentication,


monitoring and Selective forwarding

Sinkhole Redundancy probing

Sybil Authentication, monitoring,


redundancy

Wormhole Authentication, probing

HELLO Flood Authentication, packet leashes by


using geographic and temporal info

Acknowledgment flooding Authentication,verify the bi-


directional link authentication

4. Transport Flooding Client puzzles

De-synchronization Authentication

5. Application Sending Large amount of data Authentication and Periodic


monitoring of sensor nodes
Network programming attack
Path based DoS

Table 7.2.1 Attacks on various layers of a WSN and their countermeasures

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 16 Sensor Network Security

7.2.3 Attacks on Secrecy and Authentication


There are different types of attacks under this category as discussed below.

7.2.3.1 Node Replication Attack


In a node replication attack, an attacker attempts to add a node to an existing WSN by
replication (that is copying) the node identifier of an already existing node in the network.
A node replicated and joined in the network in this manner can potentially cause severe
disruption in message communication in the WSN by 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.

7.2.3.2 Attacks on Privacy


Since WSNs are capable of automatic data collection through efficient and strategic
deployment of sensors, these networks are also vulnerable to potential abuse of these vast
data sources. Privacy preservation of sensitive data in a WSN is particularly difficult
challenge. Moreover, an adversary may gather seemingly innocuous data to derive
sensitive information if he knows how to aggregate data collected from multiple sensor
nodes. This is in analogy to the panda hunter problem, where the hunter can accurately
estimate the location of the panda by systematically monitoring the traffic.
The privacy preservation in WSNs is even more challenging since these networks
make large volumes of information easily available through remote access mechanisms.
Since the adversary need not be physically present to carry out the surveillance, the
information gathering process can be done anonymously with a very low risk. In
addition, remote access allows a single adversary to monitor multiple sites
simultaneously.
Following are some of the common attacks on sensor data privacy.
1. Eavesdropping and passive monitoring - This is most common and easiest form
of attack on data privacy. If the messages are not protected by cryptographic
mechanisms, the adversary could easily understand the contents. Packets
containing control information in a WSN convey more information than
accessible through the location server, Eavesdropping on these messages prove
more effective for an adversary.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 17 Sensor Network Security

2. Traffic analysis - In order to make an effective attack on privacy, eavesdropping


should be combined with a traffic analysis. Through an effective analysis of
traffic, an adversary can identify some sensor nodes with special roles and
activities in a WSN. For example, a sudden increase in message communication
between certain nodes signifies that those nodes have some specific activities and
events to monitor. There are two types of attacks studied in this category, that
can identify the base station in a WSN without even underrating the contents of
the packets being analyzed in traffic analysis.
3. Camouflage - An adversary may compromise a sensor node in a WSN and later
on use that node to masquerade a normal node in the network. This camouflaged
node then may advertise false routing information and attract packets from other
nodes for further forwarding. After the packets start arriving at the compromised
node, it starts forwarding them to strategic nodes where privacy analysis on the
packets may be carried out systematically. It may be noted from the above
discussion that WSNs are vulnerable to a number of attacks at all layers of the
TCP/IP protocol stack. However there may be other types of attacks possible
which are not yet identified. Securing a WSN against all these attacks may be a
quite challenging task.

7.3 Key Management


Due to the characteristics of the wireless sensor networks, many popular and mature
key management schemes in traditional wireless networks cannot be directly applied to
wireless sensor networks. In the security solutions for wireless sensor networks,
encryption technology is the basis for a number of security technologies, by encrypting
wireless sensor networks that can meet the needs of certification, confidentiality,
nonrepudiation, integrity, and so on. For encryption technology, key management is the
key issue to be resolved.

7.3.1 Key Management Schemes Classification


In recent years, various key management schemes have been proposed. There can be a
variety of categories for these schemes according to the characteristics of them. According
to the cryptosystem they used, they can be divided into symmetric and asymmetric key
management schemes. According to key distribution methods of the node, they can be
split into random key management schemes and deterministic key management schemes.
According to the network topology, they can be divided into distributed key management
schemes and hierarchical key management scheme and various others scheme.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 18 Sensor Network Security

(1) Symmetric and asymmetric key management - 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.
(2) Random and deterministic key management - According to the difference of the
method in which nodes obtain the key, the key management in wireless sensor
network can be split into random key management and deterministic key
management. In the random key management, sensor nodes get their keys from
the key pool or multiple keys space by random sampling. In deterministic key
management, sensor nodes calculate the determination probability to get their
keys. The advantages of random key management are a relatively simple way to
get the key and the flexible deployment, and its disadvantage is that there may
exist part of useless key information in the sensor nodes. The advantages of
deterministic key management are that it can obtain more accurate key and the
session key can be established directly between any two sensor nodes. Its
disadvantage is that flexibility of deployment decreases and computational
overhead of key negotiation becomes large.
(3) Distributed and hierarchical key management - 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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 19 Sensor Network Security

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.

7.3.2 Typical Schemes of Key Management


1. Eschenauer and Gligor (E-G Scheme) first proposed a key management scheme
for distributed sensor networks. The basic idea of the program is that a large key
pool with the key and key identifier are generated first, each node could select
different keys from the key pools randomly; such randomly pre-assigned manner
made any two nodes have a certain probability of existing shared key. If there are
shared keys between two adjacent nodes, then select one randomly as the paired
key of the two sides to establish a secure channel. Otherwise, the entered node
establishes a key path of the two sides through other neighbouring nodes that
exists shared key after several jumps. The advantages of E-G scheme are mainly
reducing the key storage pressure of each node and suitable for large-scale WSN
key management. But there are also disadvantages of this program, and its
security communication is uncertainly because the establishment of shared key is
based on probability.
2. On the basis of E-G scheme, Chan et al. proposed a composite random key pre-
distribution scheme. The specific implementation process of -composite random
key pre-distribution scheme is basically similar to E-G scheme, except that the
E-G program just selects a public key as the main shared key between two nodes,
while the -composite scheme requires that two adjacent nodes can establish the
main shared key after the deployment only when there is at least shared key
between them. Compared with the E-G scheme, the -composite program
improves the capacity of resisting capture attacks of nodes but increases the
overlap degree of shared key between the nodes and limits the scalability of the
network.
3. Zhu et al. thought that any single key mechanism could not achieve the security
needs of wireless sensor networks, so they proposed a LEAP protocol based on
multiple key mechanisms to establish secure communications. The protocol
maintained four keys in each node - a globally key shared with the base station, a
group key shared with all nodes within the network, a paired key shared with
neighbouring nodes, and a cluster head key shared with the cluster head.
Compared with the random key pre-distribution protocol, the nodes’
computation loads and storage space requirements for the LEAP protocol will

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 20 Sensor Network Security

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 21 Sensor Network Security

7.3.3.1 Identity Authentication


Wireless sensor nodes are deployed to work after the domain, on the one hand, to
ensure that users have the legal status to join the network, and, on the other hand to
effectively prevent unauthorized users from joining, so the wireless sensor network
authentication mechanism must be used to determine the user’s identity legitimacy. By
using legitimate authentication of neighbouring nodes or nodes and base stations,
wireless sensor network provides secure access mechanism, when all nodes access the
self-organizing network. There are currently certified questions symmetric encryption
algorithm based authentication methods and authentication methods based on
asymmetric encryption algorithms.
(1) Authentication based symmetric encryption algorithm - In wireless sensor
networks, due to the limited energy of nodes, the nodes of computing power and
communication bandwidth, computational overhead of symmetric cryptosystem
is much smaller than the asymmetric cryptosystem. Considered from the
perspective of resource conservation, the symmetric cryptosystem is the most
suitable characteristics for wireless sensor networks.
(2) Authentication based asymmetric encryption algorithm - Although symmetric
cryptosystem has an advantage in the calculation of authentication, it has no
strong asymmetric cryptography in terms of safety, and after the elliptic curve
cryptosystem proposed, many studies show that even if there is a defect that the
amount of computation and storage load are too large, asymmetric keys are still
available for wireless sensor networks, asymmetric keys can still be used for
wireless sensor networks. Here are some typical asymmetric cryptography
schemes.

7.3.3.2 Message Authentication


Message authentication means to confirm the message received from sender statement.
Message authentication can be achieved by symmetric encryption and digital signature
technology. At present, there are mainly two types of message authentication; one is
point-to-point message authentication and the other is broadcast authentication. In a
point-to-point message authentication, most of ID authentication methods can be to
achieve. In wireless sensor networks, in order to save resources, broadcast is a common
method of transmission. Currently, TESLA protocol is the most classic broadcast
authentication protocol, and a lot of research work is commenced on the TESLA protocol.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 22 Sensor Network Security

7.4 Intrusion Detection

7.4.1 Intrusion Detection Concept


1. The security mechanisms implemented in secure routing protocols and secure
data aggregation protocols are configured beforehand to prevent an attacker
from breaking the security of the network.
2. However, these security mechanisms alone cannot ensure security of a WSN.
Since it is possible for an attacker to compromise a sensor node, it is easy for him
to inject false data into a WSN.
3. Authentication and data encryption are not enough for ensuring data security.
4. Another approach to protect WSNs involves mechanisms for detecting and
reacting to intrusions. An Intrusion Detection System (IDS) monitors a host or
network for suspicious activity patterns outside normal and expected behavior.
5. It is based on the assumption that there exists a noticeable difference in the
behavior of an intruder and legitimate user in the network such that an IDS can
match it with pre-programmed or possible learned rules. Based on the analysis
model used for analyzing the audit data to detect intrusions, intrusion detection
systems are usually classified into two types namely,
(i) Rule-based intrusion detection systems
(ii) Anomaly-based intrusion detection systems.
6. Rule-based intrusion detection systems are used to detect known patterns of
intrusions. The anomaly-based systems are used to detect new or unknown
intrusions. Rule-based IDS has a low false-alarm rate compared to an anomaly-
based system, and an anomaly-based IDS has a high intrusion detection rate in
comparison to a rule-based system. Distributed IDSs have higher detection
efficiency.
7. However, WSNs are generally application-specific and lack basic information on
topology, normal usage, expected communication patterns, etc. It is impractical
to pre-install some fixed patterns in sensors before they are deployed. Moreover,
due to constraints in sensors, to learn and detect these parameters after
deployment is both time and energy consuming. Thus, existing intrusion
detection schemes in ad hoc networks may not be adapted to WSNs.
8. Thus, cooperation among sensors, especially neighbouring nodes, is necessary to
decide the validity of a report. The following subsection discusses some existing
mechanisms of intrusion detection for WSNs.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 23 Sensor Network Security

7.4.2 Intrusion Detection in WSNs


1. Brutch et al. presented three different architectures for intrusion detection. The
first is a stand-alone architecture. In this case, each node functions as an
independent intrusion detection system and is responsible for detecting attacks
directed towards it.
2. The nodes do not exchange and intrusion data and no cooperative detection
mechanisms are deployed. The second architecture is a distributed and
cooperative architecture. In this architecture, an intrusion detection agent is
deployed on each node. While the local agents are responsible for detecting local
attacks on the nodes, they also cooperate among themselves by exchanging
intrusion related data to detect global intrusion attempts. The third architecture
proposed is a hierarchical architecture. This is suitable for a multi-layered WSN,
where the network is divided into clusters with the cluster-head node being
responsible for routing within a cluster. The multi-layered networks are
primarily used for event correlation.
3. Zhu et al. proposed an Interleaved Hop-by-Hop authentication (IHOP) scheme.
IHOP guarantees that the base station will detect any injected false data packets
when no more than a certain number t of nodes are compromised.
4. The sensor network is organized in a cluster-based hierarchy. Each cluster-head
builds a route to the base station and each intermediate node has an upper
associate node and a lower associate node that is t + 1 hops away.
5. IHOP uses a number of shared keys namely, (i) Every node shares a master key
with the base station, (ii) Each node knows its one-hop neighbors and has
established a pair-wise key with each of them, (iii) A node can establish a pair-
wise key with another node that is multiple hops away if needed.
6. Further, IHOP also assumes that the base station has a mechanism to authenticate
broadcast messages, e.g., TESLA. A cluster-head collects information from its
members and sends a report to the base station only when at least t + 1 sensors
observer the same result. Meanwhile a cluster-head also collects the MACs from
detecting nodes.
7. Each detecting node sends two MACs to the cluster-head: a MAC using the key
shared with the base station, referred to as the individual MAC, and a MAC
using the key shared with its upper associate nodes, referred to as the pair-wise
MAC. The cluster-head then compresses the t + 1 individual MACs by XORing
them to reduce the size of the report.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 24 Sensor Network Security

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.

7.5 Software based Anti Hamper Technique


1. Tampering - another DOS attack in physical layer is tampering. By physical
access an attacker can extract sensitive information such as cryptographic keys or
other data on the node. A compromised node creates, which the attacker controls
by altering or replacing node. Vulnerability of this attack is logical. One defence
to this attack involves tamper-proofing the node’s physical package.
2. A sensor network is usually built with a large number of small devices, each of
which has limited battery energy, memory, computation, and communication
capacities. Such sensor networks can be used for various critical applications
such as the safeguarding of and early warning systems for the physical
infrastructure that includes buildings, transportation systems, water supply
systems, waste treatment systems, power generation and transmission, and
communication systems.
3. Despite the critical role in their intended applications, sensor networks are
vulnerable to various security attacks, especially because they are deployed in a
hostile and/or harsh environment. In such an environment, a captured sensor
may be reverse-engineered, modified, and abused by the adversary. That is, the
adversary can,

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 25 Sensor Network Security

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 26 Sensor Network Security

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.

7.6 Secure Routing Sensor Networks - Reliability Requirements and SPINS


Routing algorithm is the basis of information transmission and convergence in the
wireless sensor networks. As multihop networks, wireless sensor networks have especial
characteristics, especially in the aspect of security routing and the need for in-depth
research. At present, domestic and foreign scholars have proposed a variety of wireless
sensor network routing protocols.

7.6.1 Data-Centric Security Routing Protocol and SPIN Protocol


As the wireless sensor networks are data-centric networks, the data-centric routing
protocol has been designed for wireless sensor networks. The protocol takes into account
the problem of data redundancy and obtains the fused data through collaboration
between the nodes, thus improving data transmission efficiency and saves network
energy.
Joanna and Wendi et al. proposed SPIN protocol which is a data-centric adaptive
routing protocol. In wireless sensor networks, since nodes sensing data have certain

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 27 Sensor Network Security

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.

7.6.2 Location-based Secure Routing Protocol and GPSR, GEAR Protocols


Most location-based routing protocols assumed that each node in the network knows
own location information, and location nodes can exchange information with their
neighbors, so that nodes can use location information to make routing choice without the
need to save the routing table, and the typical protocols are GPSR and GEAR.
GPSR (Greedy Perimeter Stateless Routing) routing algorithm is the method by
directly using geographic information to establish the routing path. GPSR algorithm uses
a greedy routing strategy, and each node only needs to know the destination node of the
packet and the location information of the next hop of the candidate node, which can
make the right choices to send packet without the need for other network topology
information, greatly reducing the consumption of maintaining network information;
moreover, it has better fault tolerance and scalability, but the agreement does not take

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 28 Sensor Network Security

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.

7.6.3 The Security Routing Protocol based on Hierarchical Structure


and LEACH, TEEN Protocols
Sensor nodes are divided into multiple clusters in the hierarchical routing protocol;
each cluster has a cluster head node that can not only control communication between
nodes within a cluster, but also gather and fuse data of the cluster area. Then each cluster
head node will send the fused data to the gateway node, which can reduce the traffic and
maintain node power consumption. Typical routing protocols are LEACH and TEEN.
A research group of Professor Wendi Rabiner et al. from Massachusetts Institute of
Technology proposed that LEACH (low energy adaptive clustering hierarchy) protocol is
a classic clustering class routing protocol. Each round LEACH algorithm consists of
establishment phase and data transmission phase of a cluster head. The algorithm allows
nodes in the network balanced energy consumption and prolongs the network life cycle.
But LEACH does not guarantee the position and amount of cluster heads in system,
which makes the elected cluster heads distributed unevenly.
TEEN was proposed on the basis of LEACH. The basic idea is that a cluster head is
selected randomly periodically and equiprobably, and the other noncluster head nodes
based on the nearest principle joined in appropriate cluster to form the virtual cluster and
make energy of the whole network load evenly distributed to each sensor node, which
can reduce network energy consumption and extend the network life cycle. In the process
of establishing the cluster, the cluster head node broadcasts hard threshold and soft
threshold to the other nodes, which can strike a reasonable balance between accuracy and

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 29 Sensor Network Security

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.

7.6.4 The Security Routing Protocol based on Multipath Transmission


and SELF, MSR Protocols
Multipath routing can effectively improve the success rate of data messages
submission and balance node energy consumption to prolong the survival time of the
node, while multipath routing is an effective prevention method against selective
forwarding attacks.
Ouadjaout et al. proposed a new multipath routing SMRP and, on this basis, designed
the SELF. In SELF, the control nodes in wireless sensor network send a key update
command every one given slot. When the normal nodes receive the key update
command, they will update their keys and report update result to the control nodes in
their own cluster. The control nodes regard the normal nodes which have not updated
their own keys in time as captive nodes and send making-invalid broadcast in the cluster.
As a result, SELF can prevent the enemy from pretending to be a legal node by making
use of the keys of captured sensor nodes.
Aiming at the problem of the traditional anonymous routing protocols being single
path, Zhang et al. proposed a multipath protocol MPRASRP and it can effectively prevent
attackers from obtaining the identity of the source node and the destination node, thereby
preventing attackers from further tracking the information processing among two nodes.
The method to guarantee node anonymity is that the identity of the source node and the
destination node are encrypted by the destination node public key, and only the
destination node can decrypt the packet. The protocol can effectively prevent the
middleman attack and even under harsh environmental conditions is also very effective,
but the protocol does not prevent replay attacks.
The basic idea of the MSR protocol is that, firstly, the original pieces of information are
divided into subdata packets by removing code; then the subdata packets are sent out via
the multiple paths. Finally, these pieces of information are combined by destination node.
The agreement includes a random multipath enhanced, passive confirmation and

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 30 Sensor Network Security

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

7.7.1 Defense against Attacks on Routing Protocols


1. Many routing protocols have been proposed for WSNs. These protocols can be
divided into three broad categories according to the network structure namely,
(i) Flat structure-based routing
(ii) Hierarchical structure-based routing
(iii) Location-based routing
2. In flat-based routing, all nodes are typically assigned equal roles or functionality.
In hierarchical-based routing, nodes play different roles in the network. In
location-based routing, sensor node positions are used to route data in the
network. One common location-based routing protocol is the Greedy Perimeter
Stateless Routing (GPSR). It allows nodes to send packets to a region rather than
a particular node. All these routing protocols are vulnerable to various types of
attacks such as selective forwarding, sinkhole attack etc.
3. The goal of a secure routing protocol for a WSN is to ensure the integrity,
authentication, and availability of messages. Most of the existing secure routing
algorithms for WSNs are based on symmetric key cryptography, which is based
on public key cryptography. μTESLA (the “micro” version of the Timed,
Efficient, Streaming, Loss-tolerant Authentication protocol) and its extensions
have been proposed to provide broadcast authentication for sensor networks.
μTESLA is broadcast authentication protocol which was proposed by Perrig et al.
for the security protocols for sensor networks (SPINS) protocol. μTESLA
introduces asymmetry through a delayed disclosure of symmetric keys resulting
in an efficient broadcast authentication scheme. For its operation, it requires the
base station and the sensor nodes to be loosely synchronized. In addition, each
node must know an upper bound on the maximum synchronization error.
4. To send an authenticated packet, the base station simply computes a MAC on the
packet with a key that is secret at that point of time. When a node gets a packet, it
can verify that the corresponding MAC key was not yet disclosed by the base
station. Because a receiving node is assured that the MAC key is known only to

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 31 Sensor Network Security

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).

Fig. 7.7.1 Illustration of time-released key chain for source authentication

5. The receiver node is loosely time synchronized and knows K0 in an authenticated


way. Packets P1 and P2 sent in interval 1 contain a MAC with a key K1. Packet P3
has a MAC using key K2 , If P4, P5, and P6 are all lost, as well as the packet that
disclosed the key K1, the receiver cannot authenticate P1, P2, and P3. In interval
4, the base station broadcasts the key K2, which the nodes authenticate by
verifying K0 = F(F(K2)), and hence know also K1 = F(K2), so they can authenticate
packets P1, P2 with K1, and P3 with K1.

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 32 Sensor Network Security

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.

7.7.2 SPIN Protocol


1. SPINS is a suite of security protocols optimized for sensor networks. SPINS
includes two building blocks –
(i) Secure Network Encryption Protocol (SNEP)

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 33 Sensor Network Security

(ii) Micro version of timed efficient streaming loss-tolerant authentication


protocol (μTESLA)
1. SNEP provides data confidentiality, two-party data authentication, and data
freshness for peer-to-peer communication (node to base station). μTESLA
provides authenticated broadcast.
2. SPINS assumes that each node is pre-distributed with a master key K which is
shared with the base station at its time of creation. All the other keys, including a
key Kencr for encryption, a key Kmac for MAC generation, and a key Krand for
random number generation are derived from the master key using a string one-
way function.
3. SPINS uses RC5 protocol for confidentiality. If A wants to send a message to base
station B, the complete message A sends to B is:
A _ B : D<KencrC>, MAC(Kmac, C | D) <KencrC>
In the above expression, D is the transmitted data and C is a shared counter
between the sender and the receiver for the block cipher in counter mode. The
counter C is incremented after each message is sent and received by the sender
and the receiver respectively.
4. SNEP also provides a counter exchange protocol to synchronize the counter value
in both sides.
5. SNEP provides the flowing properties,
(i) Semantic security - The counter value is incremented after each message and
thus the same message is encrypted differently each time.
(ii) Data authentication - A receiver can be assured that the message originated
from the claimed sender if the MAC verification produces positive results.
(iii) Replay protection - The counter value in the MAC prevents replaying old
messages by an adversary.
(iv) Weak freshness - SPINS identifies two types of freshness. Weak freshness
provides partial message ordering and carries no delay information. Strong
freshness provides a total order on a request-response pair and allows delay
estimation. IN SNEP, the counter maintains a message ordering in the receiver
side and yields weak freshness. SNEP guarantees weak freshness only, since
there is no guarantee to node A that a message was created by node B in response
to an event in node A.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 34 Sensor Network Security

(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.

7.8 Secure Ad hoc Routing Protocols


Intrusion tolerance is the capability to continue to function properly with minimal
degradation of performance, despite intrusions or malicious attacks. A great deal of work
has been done to address the sensor network security problems recently so that the WSNs
can tolerate and/or prevent intrusions.

7.8.1 INSENS- in Trusion - Tolerant Routing Protocol for


Wireless SEnsor Networks
1. INSENS could be subdivided into two phases namely,
(i) Route discovery phase
(ii) Data forwarding phase
2. The goal of the Route Discovery phase is to collect topology knowledge and to
construct appropriate forwarding tables at every node. Whilst, the second phase
simply enables forwarding of data from each sensor node to the base station and
vice versa. It is worth mentioning that every communication between nodes is
one-way forwarded (unicast) via base station. The Route Discovery phase is
composed of three rounds namely, Route Request, Route Feedback, and
Computing and Propagating Multi-path Routing Tables.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 35 Sensor Network Security

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 36 Sensor Network Security

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 37 Sensor Network Security

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.

7.8.2 ARAN - Authenticated Routing for Ad hoc Networks


ARAN makes use of cryptographic certificates to offer routing security. Such
certificates are already seen as the deployment as part of one-hop 802.11 networks. 802.11
VPN is deployed and certificates are carried by nodes. ARAN consists of a preliminary

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 38 Sensor Network Security

certification process followed by a route instantiation process that guarantees end-to-end


authentication. The protocol is simple compared to most non-secured ad hoc routing
protocols.
Route discovery in ARAN is accomplished by a broadcast route discovery message
from a source node which is replied to unicast by the destination node, such that the
routing messages are authenticated at each hop from source to destination, as well as on
the reverse path from the destination to the source.

7.8.3 AODV - Ad Hoc On-Demand Vector Routing (AODV) Protocol


1. AdHoc On-DemandVectorRouting (AODV)protocol is a reactive routing protocol
for ad hoc and mobile net-works that maintains routes only between nodes
which need to communicate. The routing messages do not contain in-formation
about the whole route path, but only about the source and the destination.
2. Therefore, routing messages do not have an increasing size. It uses destination
sequence numbers to specify how fresh a route is (in relation to another), which
is used to grant loop freedom. Whenever a node needs to send a packet to a
destination for which it has no ‘fresh enough’ route (that is, a valid route entry
for the destination whose associated sequence number is at least as great as the
ones contained in any RREQ that the node has received for that destination) it
broadcasts a route request (RREQ) message to its neighbors.
3. Each node that receives the broadcast sets up a reverse route towards the
originator of the RREQ (unless it has a ‘fresher’ one).When the intended
destination (or an intermediate node that has a ‘fresh enough’ route to the
destination) receives the RREQ, it replies by sending a Route Reply (RREP). It is
important to note that the only mutable information in a RREQ and in a RREP is
the hop count (which is being monotonically increased at each hop).
4. The RREP travels back to the originator of the RREQ (this time as a unicast). At
each intermediate node, a route to the destination is set (again, unless the node
has a ‘fresher’ route than the one specified in the RREP). In the case that the
RREQ is replied to by an intermediate node (and if the RREQ had set this option),
the intermediate node also sends a RREP to the destination.
5. In this way, it can be granted that the route path is being set up bi-directionally. In
the case that anode receives a new route (by a RREQ or by a RREP) and the node
already has a route ‘as fresh’ as the received one, the shortest one will be
updated. If there is a subnet (a collection of nodes that are identified by a

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 39 Sensor Network Security

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 40 Sensor Network Security

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.

7.9 Broadcast Authentication WSN Protocol - TESLA Protocol, Biba Protocol

7.9.1 Broadcast Authentication WSN Protocol


1. Achieving broadcast security is a must for wireless sensor networks. Hence it is
necessary for the base station to broadcast commands and data to sensor nodes.
2. Without secure communication, sensors may be involved in incorrect operations
and can’t meet the network requirements. The current security solutions for
wired and wireless networks cannot be utilized for a wireless sensor network
because of the energy, memory and computation restrictions of the latter. These
limitations make the design and operation completely dissimilar to those of
regular wireless networks.
3. Broadcast authentication based on asymmetric key cryptography cannot deal with
the limited resource constrains. Symmetric key cryptography and hash functions
are cheaper in their computational requirements and are more widely utilized in
sensor networks.
4. WSNs’ broadcast authentication was first covered by TESLA, and μTESLA that
provides the asymmetric cryptographic property of authenticated broadcast
through delayed disclosing (time-varying) of symmetric keys. The base-station
installs a key chain by repeatedly applying a One Way Hash Function (OWHF) to

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 41 Sensor Network Security

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.

7.9.2 Desirable Security Attributes for Authenticated Broadcast


1. Data integrity
Data integrity ensures that data has not been altered by unauthorized entities.
2. Data origin authentication
Data origin authentication guarantees the origin of data. It is a fundamental step
in achieving entity authentication in protocols as well as establishing keys. It can
be said that data origin authentication implies data integrity. So it is not possible
to achieve data integrity without data origin authentication.
3. Freshness
Packets that have been captured and replayed at a later time should be ignored
by the sensor nodes.
4. Delay tolerance
No time synchronization should be required in the system for data verification.
Each packet must be verifiable without having to wait for additional data.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 42 Sensor Network Security

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.

7.9.3 TESLA Protocol


1. TESLA (Timed Efficient Stream Loss-tolerant Authentication) broadcast
authentication protocol, an efficient protocol with low communication and
computation overhead, which scales to large numbers of receivers, and tolerates
packet loss. TESLA is based on loose time synchronization between the sender
and the receivers.
2. Despite using purely symmetric cryptographic functions (MAC functions),
TESLA achieves asymmetric properties.
3. The main idea of TESLA is that the sender attaches to each packet a MAC
computed with a key k known only to itself. The receiver buffers the received
packet without being able to authenticate it. A short while later, the sender
discloses k and the receiver is able to authenticate the packet. Consequently, a
single MAC per packet suffices to provide broadcast authentication, provided
that the receiver has synchronized its clock with the sender ahead of time.
4. TESLA requires that the receivers are loosely time synchronized with the sender.
5. TESLA also needs an efficient mechanism to authenticate keys at the receiver.
6. In TESLA, the elements of the one-way chain are keys, so the chain is called as a
one-way key chain. Furthermore, any key of the one-way key chain commits to
all following keys, so such a key is called ad a one-way key chain commitment, or
simply key chain commitment.
7. Time Synchronization in TESLA - Time Synchronization in TESLA does not
need the strong time synchronization properties that sophisticated time
synchronization protocols provide, but only requires loose time synchronization,
and that the receiver knows an upper bound on the sender’s local time.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 43 Sensor Network Security

8. A viable broadcast authentication protocol has the following requirements,


 Low computation overhead for generation and verification of authentication
information.
 Low communication overhead.
 Limited buffering required for the sender and the receiver, hence timely
authentication for each individual packet.
 Robustness to packet loss.
 Scales to a large number of receivers.
The TESLA protocol meets all these requirements with low cost and it has the
following special requirements,
 The sender and the receivers must be at least loosely time-synchronized.
 Either the receiver or the sender must buffer some messages.
 Despite the buffering, TESLA has a low authentication delay. In typical
configurations, the authentication delay is on the order of one round-trip delay
between the sender and receiver.
9. TESALA protocol process
(A)The sender
 The sender splits up the time into time intervals of uniform duration. Next, the
sender forms a one-way chain of self-authenticating values, and assigns the values
sequentially to the time intervals (one key per time interval). The one-way chain is
used in the re-verse order of generation, so any value of a time interval can be
used to derive values of previous time intervals. The sender defines a disclosure
time for one-way chain values, usually on the order of a few time intervals. The
sender publishes the value after the disclosure time.
 The sender attaches a MAC to each packet. The MAC is computed over the
contents of the packet. For each packet, the sender determines the time interval
and uses the corresponding value from the one-way chain as a cryptographic key
to compute the MAC. Along with the packet, the sender also sends the most
recent one-way chain value that it can disclose.
 Each receiver that receives the packet per-forms the following operation. It knows
the schedule for disclosing keys and, since the clocks are loosely synchronized,
can check that the key used to compute the MAC is still secret by determining that
the sender could not have yet reached the time interval for disclosing it. If the
MAC key is still secret, then the receiver buffers the packet.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 44 Sensor Network Security

 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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 45 Sensor Network Security

(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.

7.9.4 TESLA Family Broadcast Authentication


Timed Efficient Stream Loss-tolerant Authentication (TESLA) is a multicast stream
authentication protocol. Keys used to authenticate the i-th message is disclosed along
with (i + 1)-th message. μTESLA provides authentication for data broadcasts, and requires
that base station and sensor nodes be loosely time synchronized.
According to Lamport’s scheme, a base station (BS) randomly selects the last key kn,
the chain seed, and applies a one-way public function h(·) to generate the rest of keys : k0,
k1,..., kn–1 as ki = h(ki+1). Given ki, every sensor node can generate the sequence k0, k1, ...,
kn−1.
However, given ki, no one can generate ki+1. At i-th time slot, BS sends an
authenticated message MACki (message). Sensor nodes store the message till the
verification key in the (i + 1)-th time slot is disclosed. Sensor nodes verify disclosed key
ki+1 by using key ki as ki = h(ki +1). In μTESLA, nodes are required to store a message until

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 46 Sensor Network Security

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.

7.9.5 Biba Signature Protocol


1. BiBa stands for Bins and Balls signature in which a collision of balls under a hash
function in bins forms the signature. BiBa exploits the birthday paradox such that
the signer has many balls to throw into the bins which results in a high
probability to find a signature, but an adversary has few balls so it has a low
probability to forge a signature.
2. The BiBa protocol is a general solution that can be applied to sign broadcast data
based on one-way functions without trapdoors. The BiBa signature scheme is
efficient, robust to packet loss and scales well to a large number of receivers.
3. However, the public keys used in the BiBa protocol are large and the time to
generate the signatures is long.
4. The small signature sizes make the BiBa protocol a good candidate for the system
which is to be deployed over a bandwidth constrained network. Moreover, small
signature verification overhead allows the end devices to be simple and cheap.
5. The sender divides time into periods of equal duration. The sender then creates t
chains of SElf Authenticating vaLues (SEALs), S<1;i>; :::S<t;i>, and a Salt chain, Ki,
associated with time interval i. The SEAL and Salt chains are of length ‘l’, hence

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 47 Sensor Network Security

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.

Fig. 7.9.1 The BiBa broadcast protocol dynamics

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).

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 48 Sensor Network Security

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.

Fig. 7.9.2 Structure of BiBa messages

TYPE - Describes the type of data that is carried in the message.


0 - Application messages are carried in the KEY field
1 - Short-term BiBa instance commitment key is carried in the KEY field
2 - A salt key is carried in the KEY field
3 - Long-term BiBa commitment key. This option is not used if the long-term BiBa
instance commitment is done off-line.
KEY - The Data that is being sent in the message which is signed. Depending on the
value of the TYPE field it can either be a message sent by the application or Salt
key to be signed by the short-term BiBa instance, or short-term BiBa commitment
key.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 49 Sensor Network Security

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.

Fig. 7.9.3 Operations on the application messages

12. Setting the BiBa Parameters


The parameters of the security layer are based on approximated application data
rate. A BiBa instance with 1024 SEAL chains (t = 1024), using 4-way collisions
(k = 4) can be used to sign 25 messages ( v = ty /k ), with y = 0 : 10 ; where y is the
fraction of SEALs that can be revealed to an adversary without compromising the

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 50 Sensor Network Security

security of the protocol (typically y = 10 % ). An adversary is only allowed to


learn r SEALs from one active period; where r = ty. Each signature reveals k
SEALs to the adversary, hence only ( v = ty /k ) messages can be signed within a
single time interval. An adversary who knows r SEALs needs to make 235
computations to forge a valid signature of a BiBa instance with the above
parameters. If it is assumed that the application sends an average of 20 event
messages every day, a single time interval for the short-term BiBa instance is
sufficient to authenticate an entire day's messages. Consequently, a short-term
BiBa instance with SEAL chain lengths of 50 (l = 50), can be used for 50 days
before it expires. If the long-term BiBa instance is designed with the same
parameters as the short-term instances (that is t = 1024, k = 4, y = 10 % ), then it
can be used to commit 25 short-term BiBa instances in a single time interval. A
single time interval for the long-term BiBa instance can then be made to last up to
1250 days (3.4 years). The entire long-term BiBa instancae will then last 171 years.

7.10 Two Marks Questions with Answers


Part - A
Q.1 What is self organizing nature of WSN ?
Ans. : A wireless sensor network requires every sensor node to be independent and
flexible enough to be self-organizing and self-healing according to different situations.
There is no fixed infrastructure available for the purpose of network management in a
sensor network. This inherent feature brings a great challenge to wireless sensor
network security as well. If self-organization is lacking in a sensor network, the
damage resulting from an attack or even the hazardous environment may be
devastating.
Q.2 Define data confidentiality.
Ans. : Data confidentiality is an important network security need requiring that all
sensitive information in the storage and transmission process must ensure its
confidentiality. Divulging the content of the information to any unauthorized user is
not allowed.
Q.3 What is authentication ?
Ans. : Authentication enables every message sender in the sensor networks, including
the base station, sensor nodes and outer users, to prove its identity, that is, the
legitimacy of the source of a message to the receiver. It allows the receiver of the
message to ensure that received messages are in actuality originated from the claimed
source.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 51 Sensor Network Security

Q.4 Explain Denial of service attack.


Ans. : DoS attack is an event that diminishes or attempts to reduce a network’s capacity
to perform its expected function. There are several standard techniques existing in the
literature to cope with some of the more common denial of service attacks, although in
a broader sense, development of a generic defense mechanism against DoS attacks is
still an open problem. Moreover, most of the defense mechanisms require high
computational overhead and hence not suitable for resource-constrained WSNs. Since
DoS attacks in WSNs can sometimes prove very costly, researchers have spent a great
deal of effort in identifying various types of such attacks, and devising strategies to
defend against them.
Q.5 What is Sybil attack ?
Ans. : Sybil 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.
Q.6 Explain HELLO flood attack.
Ans. : 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.
Q.7 What is node replication attack ?
Ans. : In a node replication attack, an attacker attempts to add a node to an existing
WSN by replication (that is copying) the node identifier of an already existing node in
the network. A node replicated and joined in the network in this manner can
potentially cause severe disruption in message communication in the WSN by

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 52 Sensor Network Security

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.)

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 53 Sensor Network Security

 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.

7.11 Long Answered Questions


Part - B
Q.1 What are various security goals in WSNs ? (Refer section 7.1)
Q.2 Discuss various security attacks in WSNs ? (Refer section 7.2)
Q.3 Write a note on various network layer attacks in WSNs. (Refer section 7.2.1)
Q.4 Discuss various transport layer attacks in WSNs. (Refer section 7.2.1)
Q.5 Explain various attacks on privacy. (Refer section 7.2.3)
Q.6 Explain any one scheme of key management. (Refer section 7.3.2)
Q.7 What is intrusion detection ? (Refer section 7.4)
Q.8 Explain software based anti hamper techniques. (Refer section 7.5)
Q.9 What are various prevention schemes for DoS attacks in sensor networks ?
(Refer section 7.2.2)
Q.10 Explain defense against WSN routing protocol. (Refer section 7.7)
Q.11 Write a note on SPIN protocol. (Refer section 7.6)
Q.12 Discuss features of ARAN protocol. (Refer section 7.8)
Q.13 Write a note on TESLA protocol. (Refer section 7.9)
Q.14 Explain structure of BiBa protocol message. (Refer section 7.9)



TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 7 - 54 Sensor Network Security

Notes

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


UNIT - V

8 Sensor Network Platforms


and Tools
Syllabus
Sensor Node Hardware - Berkeley Motes, Programming Challenges, Node-level software
platforms - TinyOS, nesC, CONTIKIOS, Node-level Simulators - NS2 and its extension to
sensor networks, COOJA, TOSSIM, Programming beyond individual nodes - State centric
programming.

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

8.1 Sensor Node Hardware


WSNs are generally composed of a large number of nodes which operate in a specific
configuration. Typically, the sensor nodes are autonomous and spatially distributed and
cooperate to monitor and to gather environmental conditions. Data processing can be
done either in a centralized/decentralized mode or by sending data to a sink which sends
them to other networks (e.g., through a gateway). Project, design, prototyping, and
utilization of a WSN include a wide range of application-specific constraints.
Though the WSNs are application dependent, it is possible to classify them in relation
to common features namely,
1) Self-organization capabilities.
2) Short-range communication and/or star/multihop routing.
3) Centralized or decentralized cooperation of sensor nodes.
4) Capability to modify topology in runtime.
5) Constrains in energy consumption, transmission range, memory, computing
power, and security.

8.1.1 The Components of WSN


The components of WSN system are sensor node, rely node, actor node, cluster head,
gateway and base station. Sensor networks are clustered with gateway, relay node, actor
node and cluster head, and every other node within the communication range.
1. Sensor node - Capable of executing data processing, data gathering and
communicating with additional associated nodes in the network. A distinctive
sensor node capability is about 4 - 8 MHz, having 4 kB of RAM, 128 kB flash and
preferably 916 MHz of radio frequency. Attractive functionality of sensor nodes
in a WSN includes effortlessness installation, fault indication, energy level
diagnosis, highly reliable, easy coordination with other nodes in the network,
control protocols and simple network interfaces with other smart devices. In
WSN, based on the sensing range and environment, the sensor nodes are
classified into four groups, namely specialized sensing node, generic sensing
node, high bandwidth sensing node and gateway node. The radio bandwidth for
the sensor nodes are < 50 kbps, < 100 kbps, ≈ 500 kbps and > 500 kbps respectively.
On board processing, computational rate and communication ranges differ from
node to node in WSN. Particularly for some dedicated application sensor nodes
with different capabilities are used. For example, smart specialized sensing nodes
are preferred for special purpose devices, intelligent generic sensing node
preferred for generic functions. For interconnectivity functions high end smart
bandwidth sensing node and gateway nodes are preferred.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8-3 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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8-4 Sensor Network Platforms and Tools

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.

Fig. 8.1.1 WSN Models

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.

8.1.2 Hardware Components of Sensor Nodes and its Working


A sensor node is made up of four basic components namely sensing unit, processing
unit, transceiver unit and a power unit which is shown in below Fig. 8.1.2. It also has
application dependent additional components such as a location finding system, a power
generator and a mobilizer.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8-5 Sensor Network Platforms and Tools

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.

Fig. 8.1.2 Components of sensor node

Working of sensor node


1. A functional block diagram of a versatile wireless sensing node is depicted in
Fig. 8.1.3. Modular design approach provides a flexible and versatile platform to
address the needs of a wide variety of applications.
2. For example, depending on the sensors to be deployed, the signal conditioning
block can be re-programmed or replaced. This allows for a wide variety of
different sensors to be used with the wireless sensing node. Similarly, the radio
link may be swapped out as required for a given applications’ wireless range
requirement and the need for bidirectional communications.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8-6 Sensor Network Platforms and Tools

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.

Fig. 8.1.3 Functional block diagram of sensor node

Sensor node hardware design choices


Sensor node hardware can be grouped into three categories, each of which entails a
different trade-offs in the design choices.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8-7 Sensor Network Platforms and Tools

 Augmented general-purpose computers - Examples include low-power PCs,


embedded PCs (e.g. PC104), custom-designed PCs, (e.g. Sensoria WINS NG
nodes), and various Personal Digital Assistants (PDA). These nodes typically run
–off-the-shelf operating systems such as WinCE, Linux, or real-time operating
systems and use standard wireless communication protocols such as IEEE 802.11,
Bluetooth, Zigbee etc. Because of their relatively higher processing capability,
they can accommodate wide variety of sensors, ranging from simple microphones
to more sophisticated video cameras.
 Dedicated embedded sensor nodes - Examples include the Berkeley mote
family,the UCLA Medusa family, Ember nodes and MIT µ AMP. These platforms
typically use commercial off-the-shelf (COTS) chip sets with emphasis on small
form factor, low power processing and communication, and simple sensor
interfaces. Because of their COTS CPU, these platforms typically support at least
one programming language, such as C. However, in order to keep the program
foot print small to accommodate their small memory size, programmers of these
platforms are given full access to hardware but rarely any operating system
support. A classical example is the TinyOS platform and its companion
programming language, nesC.
 System on-Chip (SoC) nodes - Examples of SoC hardware include smart dust, the
BWRC pico-radio node, and the PASTA node. Designers of these platforms try to
push the hardware limits by fundamentally rethinking the hardware architecture
trade-offs for a sensor node at the chip design level. The goal is to find new ways
of integrating CMOS, MEMS, and RF technologies to build extremely low power
and small footprint sensor nodes that still provide certain sensing, computation,
and communication capabilities. Among these hardware platforms, the Berkeley
motes, due to their small form factor, open source software development, and
commercial availability, have gained wide popularity in the sensor network
research.

8.1.3 Characteristics of the Sensor Node for WSN Performance Evaluation


The metrics that are used to evaluate the performance of a WSN are network coverage,
node coverage, efficiency in terms of system lifetime, effortless deployment, data
accuracy, system response time, fault tolerance, scalability, network throughput, sample
rate, security, the cost of the network and network architecture used. The individual
sensor node in the WSN is evaluated using flexibility, robustness, computation,
communication, security, synchronization, node size and cost. These metrics are
discussed in detail below.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8-8 Sensor Network Platforms and Tools

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8-9 Sensor Network Platforms and Tools

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 10 Sensor Network Platforms and Tools

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,

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 11 Sensor Network Platforms and Tools

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.

Fig. 8.2.1 Mote - Components

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 12 Sensor Network Platforms and Tools

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.

8.2.2 MICA (MPR300 CA - Motor Protection Relay300 CA) Mote


1. MICA mote is a commercially available product that has been used widely by
researchers and developers. It has all of the typical features of a mote and
therefore can help to understand what this technology makes possible today.
MICA motes are available to the general public through a company called
Crossbow. These motes come in two form factors :
 Rectangular, measuring 2.25  1.25 by 0.25 inches (5.7  3.18  64 centimeters),
it is sized to fit on top of two AA batteries that provide it with power.
 Circular, measuring 1.0 by 0.25 inches (2.5  64 centimeters), it is sized to fit
on top of a 3 volt button cell battery.
2. The MICA mote uses an Atmel ATmega 128L processor running at 4 megahertz.
The 128L is an 8-bit microcontroller that has 128 kilobytes of onboard flash
memory to store the mote's program. This CPU is about as powerful as the 8088
CPU found in the original IBM PC (circa 1982). The big difference is that the
ATmega consumes only 8 milliamps when it is running, and only 15 microamps
in sleep mode.
3. This low power consumption allows a MICA mote to run for more than a year
with two AA batteries. A typical AA battery can produce about 1,000 milliamp-
hours. At 8 milliamps, the ATmega would operate for about 120 hours if it
operated constantly. However, the programmer will typically write his/her code
so that the CPU is asleep much of the time, allowing it to extend battery life
considerably. For example, the mote might sleep for 10 seconds, wake up and
check status for a few microseconds, and then go back to sleep.
4. MICA motes come with 512 kilobytes of flash memory to hold data. They also
have a 10-bit A/D converter so that sensor data can be digitized. Separate sensors

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 13 Sensor Network Platforms and Tools

on a daughter card can connect to the mote. Sensors available include


temperature, acceleration, light, sound and magnetic.

Fig. 8.2.2 MICA Mote - Components


5. The final component of a MICA mote is the radio. It has a range of several
hundred feet and can transmit approximately 40,000 bits per second. When it is
off, the radio consumes less than one microamp. When receiving data, it
consumes 10 milliamps. When transmitting, it consumes 25 milliamps.
Conserving radio power is key to long battery life.
6. All of these hardware components together create a MICA mote. A programmer
writes software to control the mote and make it perform a certain way. Software
on MICA motes is built on an operating system TinyOS. TinyOS is helpful
because it deals with the radio and power management systems and makes it
much easier to write software for the mote.
7. It is important to look at the energy consumption of various components on a
MICA mote. A radio transmission bears the maximum power consumption.
However, each radio packet (e.g., 30 bytes) only takes 4 ms to send, while
listening to incoming packets turns the radio receiver ON all the time. The energy
that can send one packet only supports the radio receiver for about 27 ms.
Another observation is that there are huge differences among the power
consumption levels in the active mode, the idle mode, and the suspend mode of
the MCU. It is thus worthwhile from an energy-saving point of view to suspend
the MCU and the RF receiver as long as possible.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 14 Sensor Network Platforms and Tools

8.2.3 Berkeley Mote


1. The Berkeley motes are a family of embedded sensor nodes sharing roughly the
same architecture as that of MICA.
2. Motes are tiny, self-contained, battery powered computers with radio links, which
enable them to communicate and exchange data with one another, and to self-
organize into ad hoc networks

Fig. 8.2.3 Berkeley Mote

3. Berkeley mote consists of


i. Micro-controller with internal flash program memory
ii. Data SRAM
iii. Data EEPROM
iv. A set of actuator and sensor devices, including LEDs
v. A low-power transceiver
vi. An analog photo-sensor
vii. A digital temperature sensor
viii.A serial port
ix. A small coprocessor unit

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 15 Sensor Network Platforms and Tools

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 16 Sensor Network Platforms and Tools

- The other auxiliary components include,


(a) The coprocessor
i. Represents a synchronous bit-level device with byte-level support.
ii. MCU (AT09LS2343, with 2 kB instruction memory, 128 bytes of SRAM and
EEPROM) that uses I/O pins connected to an SPI controller where SPI is a
synchronous serial data link, providing high speed full-duplex connections
(up to 1 Mbit) between peripherals.
iii. The sensor can be reprogrammed by transferring data from the network into
the coprocessor’s 256 kB EEPROM (24LC256).
iv. Can be used as a gateway to extra storage by the main processor.
(b) The serial port
i. Represents a synchronous bit-level device with byte-level controller support.
ii. Uses I/O pins that are connected to an internal UART controller.
iii. In transmit mode, the UART takes a byte of data and shifts it out serially at a
specified interval.
iv. In receive mode, it samples the input pin for a transition and shifts in bits at a
specified interval from the edge.
v. Interrupts are triggered in the processor to signal completion of the events.
(c) Three LEDs
i. Represent outputs connected through general I/O ports; they may be used to
display digital values or status.
5. Software platform
– Based on Tiny Micro-Threading Operating System (TinyOS) which is designed for
resource-constrained MEMS sensors.
– TinyOS adopts an event model so that high levels of concurrency can be handled
in a small amount of space.
– A stack-based threaded approach would require that stack space be reserved for
each execution context.
– A complete system configuration consists of a tiny scheduler and a graph of
components.
– A component has four interrelated parts,
i. A set of command handlers
ii. A set of event handlers
iii. An encapsulated fixed-size frame
iv. Bundle of simple tasks
– Tasks, commands and event handlers execute in the context of the frame and
operate on its state.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 17 Sensor Network Platforms and Tools

– 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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 18 Sensor Network Platforms and Tools

– Run-to-completion semantics make it possible to allocate a single stack that is


assigned to the currently executing task which is essential in memory constrained
systems.
– Allows to simulate concurrency within each component, since tasks execute
asynchronously with respect to the events.
– Must never block or spin wait, otherwise, they will prevent progress in other
components.
vi) Task scheduler
– Utilizes a bounded size scheduling data structure to schedule various tasks base
on FIFO, priority-based or deadline-based policy which is dependent on the
requirements of the application.

8.3 Sensor Network Programming Challenges


1. Traditional programming technologies rely on operating systems to provide
abstraction for processing, I/O, networking, and user interaction hardware. When
applying such a model to programming networked embedded systems, such as
sensor networks, the application programmers need to explicitly deal with
message passing, event synchronization, interrupt handling, and sensor reading.
2. Therefore, an application is typically implemented as a Finite State Machine
(FSM) that covers all extreme cases such as unreliable communication channels,
long delays, irregular arrival of messages, simultaneous events etc.
3. For resource-constrained embedded systems with real-time requirements, several
mechanisms are used in embedded operating systems to reduce code size,
improve response time, and reduce energy consumption. Microkernel
technologies modularize the operating system so that only the necessary parts are
deployed with the application. Real-time scheduling allocates resources to more
urgent tasks so that they can be finished early.
4. Event-driven execution allows the system to fall into low-power sleep mode when
no interesting events need to be processed. At the extreme, embedded operating
systems tend to expose more hardware controls to the programmers, who now
have to directly face device drivers and scheduling algorithms, and optimize code
at the assembly level. Although these techniques may work well for small, stand-
alone embedded systems, they do not scale up for the programming of sensor
networks for two reasons.
5. Sensor networks are large-scale distributed systems, where global properties are
derivable from program execution in a massive number of distributed nodes.
Distributed algorithms themselves are hard to implement, especially when
infrastructure support is limited due to the ad hoc formation of the system and
constrained power, memory, and bandwidth resources.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 19 Sensor Network Platforms and Tools

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 Node-Level Software Platforms


Most design methodologies for sensor network software are node-centric, where
programmers think in terms of how a node should behave in the environment. A node-
level platform can be node-centric operating system, which provides hardware and
networking abstractions of a sensor node to programmers, or it can be a language
platform, which provides a library of components to programmers. A typical operating
system abstracts the hardware platform by providing a set of services for applications,
including file management, memory allocation, task scheduling, peripheral device
drivers, and networking. For embedded systems, due to their highly specialized
applications and limited resources, their operating systems make different trade-offs
when providing these services. For example, if there is no file management requirement,
then a file system is obviously not needed. If there is no dynamic memory allocation, then
memory management can be simplified. If prioritization among tasks is critical, then a
more elaborate priority scheduling mechanism may be added.

8.4.1 Operating System and Wireless Sensor Network Operating System


Huge progressive development in Micro-Electro Mechanical System (MEMS)-based
sensor technology has given rise to the idea of miniaturized and cheap sensor nodes,
capable of communicating wirelessly, sensing and performing computations.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 20 Sensor Network Platforms and Tools

A wireless sensor node is composed of a micro-controller, transceiver, timer, memory


and analog to digital converter as shown in the below Fig. 8.4.1.

Fig. 8.4.1 Typical sensor node architecture

Sensor nodes are deployed to monitor a multitude of natural and man-made


phenomena, that is, habitant monitoring, wildlife monitoring, patient monitoring,
industrial process monitoring and control, battle field surveillance, traffic control, and
home automation, to name but a few.
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.
The OS acts as a resource manager for complex systems. In a typical system these
resources include processors, memories, timers, disks, mice, keyboard, network
interfaces, etc. The job of the OS is to manage the allocation of these resources to users in
an orderly and controlled manner. Application programmers can then invoke different
OS services through system calls. An OS multiplexes system resources in two ways i.e., in
time and in space. Time multiplexing involves different programs taking turn in using the
resources. Space multiplexing involves different programs accessing parts of the resource,
possibly at the same time. Considering the resource constraints of typical sensor nodes in
a WSN, a new approach is required for OS design in WSN.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 21 Sensor Network Platforms and Tools

8.4.2 Major Concerns in WSN OS Design

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.2 Programming Model


The programming model supported by an OS has a significant impact on the
application development. There are two popular programming models provided by
typical WSN OSs, namely: event driven programming and multithreaded programming.

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 22 Sensor Network Platforms and Tools

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.2.4 Memory Management and Protection


1. Two commonly used memory management techniques are static memory
management and dynamic memory management. Static memory management is
simple and it is a useful technique when dealing with scare memory resources. At
the same time, it results in inflexible systems because run-time memory allocation
cannot occur.
2. On the other hand, dynamic memory management yields a more flexible system
because memory can be allocated and de-allocated at run-time. Process memory
protection refers to the protection of one process’ address space from another.
3. In early sensor network operating systems like TinyOS there was no memory
management available. Initial operating systems for WSNs assumed that only a
single application executes on a sensor mote, therefore there is no need for
memory protection. With the emergence of new application domains for WSNs,
WSNs provide support for multiple threads of execution, consequently memory
management becomes an issue for WSN OS.

8.4.2.5 Communication Protocol Support


1. In the OS context, communication refers to inter-process communication within
the system as well as with other nodes in the network. WSNs operate in a
distributed environment, where sensor nodes communicate with other nodes in
the network.
2. All WSN OSs provide an Application Programming Interface (API) that enables
application program to communicate. It is possible that a WSN is composed of
heterogeneous sensor nodes, therefore the communication protocol provided by
the OS must also consider heterogeneity.
3. In network-based communication, the OS should provide transport, network, and
MAC layer protocol implementations.

8.4.2.6 Resource Sharing


The responsibility of an OS includes resources allocation and resource sharing, which
is of immense importance when multiple programs are concurrently executing. The
majority of WSNs OSs today provide some sort of multithreading, requiring a resource
sharing mechanism. This can be performed in time e.g., scheduling of a process/thread on
the CPU and in space e.g., writing data to system memory.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 23 Sensor Network Platforms and Tools

8.4.2.7 Support for Real-Time Applications


1. A WSN can be used to monitor a mission critical system. Therefore an OS for
WSN should provide implementations of real-time scheduling algorithms to meet
the deadlines of hard real-time tasks. OS for WSN should provide
implementations of communication protocols that support real-time multimedia
streams.
2. Also, an OS for WSN should provide an Application Programming Interface (API)
to the application programmer that allows them to implement custom
communication protocols on top of the communication protocol stack supported
by the OS. Above all the OS must provide an implementation of a QoS
Architecture for traffic segregation at the network layer.
3. The decreasing cost of hardware such as CMOS cameras and microphones has
resulted in a new variant of WSNs called Wireless Multimedia Sensor Nodes or
WMSNs. WMSN nodes are equipped with integrated cameras, microphones, and
scalar sensors. Such sensor nodes are capable of capturing and communicating
audio and video streams over a wireless channel.
4. The cross layer architecture design paradigm is emerging as a promising
technique for networking using wireless communication. In cross layer design,
depending upon the condition of a wireless link, the MAC layer can choose
appropriate error coding techniques.

8.4.3 Wireless Sensor Network - Operating System Examples

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 24 Sensor Network Platforms and Tools

events. Tasks are used to express intra-component concurrency. A command is a request


to perform some service, while the event signals the completion of the service. TinyOS
provides a single shared stack and there is no separation between kernel space and user
space.

Fig. 8.4.2 TinyOS Architecture

TinyOS Programming Model


1. Earlier versions of TinyOS did not provide any multithreading support, with
application development strictly following the event driven programming model.
2. TinyOS version 2.1 provides support for multithreading and these TinyOS
threads are called TOS Threads. The TOS threading package provides the ease of
a threading programming model coupled with the efficiency of an event driven
kernel. TOS threads are backward compatible with existing TinyOS code.
3. TOS threads use a cooperative threading approach, i.e., TOS threads rely on
applications to explicitly yield the processor. This adds an additional burden on
the programmer to explicitly manage the concurrency.
4. Application level threads in TinyOS can preempt other application level threads
but they cannot preempt tasks and interrupt handlers. A high priority kernel
thread is dedicated to running the TinyOS scheduler.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 25 Sensor Network Platforms and Tools

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 26 Sensor Network Platforms and Tools

4. TinyOS does not provide a solid real-time scheduling algorithm if different


threads content for resources.

TinyOS Memory Management and Protection


1. In sensor nodes, hardware-based memory protection is not available and the
resources are scarce. Resource constraints necessitate the use of unsafe, low level
languages.
2. In TinyOS version 2.1, memory safety is incorporated. The goals of memory safety
are, trap all pointer and array errors, provide useful diagnostics, and provide
recovery strategies.
3. Implementation of memory-safe TinyOS uses the concept of a Deputy. The
Deputy is a resource to resource compiler that ensures type and memory safety
for C code. Code compiled by Deputy relies on a mix of compile and run-time
checks to ensure memory safety.
4. Safe TinyOS is backward compatible with earlier version of TinyOS. The Safe
TinyOS tool chain inserts checks into the application code to ensure safety at
run-time. When a check detects that safety is about to be violated, code inserted
by Safe TinyOS takes remedial actions. TinyOS uses a static memory management
technique.

TinyOS Communication Protocol Support


1. Earlier versions of TinyOS provide two multi-hop protocols : Dissemination and
TYMO (TinyOS Dynamic MANET On-Demand). The dissemination protocol
reliably delivers data to every node in the network.
2. This protocol enables administrators to reconfigure queries and to reprogram a
network. The dissemination protocol provides two interfaces : DisseminationValue
and DisseminationUpdate. A producer calls DisseminationUpdate. The command
DisseminationUpdate.change() should be called each time the producers wants to
disseminate a new value. On the other hand, the DisseminationValue interface is
provided for the consumer.
3. The event DisseminationValue.changed() is signaled each time the dissemination
value is changed. TYMO is the implementation of the DYMO protocol, a routing
protocol for mobile Ad hoc networks. In TYMO, packet formats have changed and
it has been implemented on top of the active messaging stack.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 27 Sensor Network Platforms and Tools

4. At the MAC layer, TinyOS provides an implementation of the following


protocols: a single hop TDMA protocol, a TDMA/CSMA hybrid protocol which
implements Z-MAC’s slot stealing optimization, B-MAC, and an optional
implementation of an IEEE 802.15.4 complaint MAC.

TinyOS Resource Sharing


1. TinyOS uses two mechanisms for managing shared resources: Virtualization and
Completion Events. A virtualized resource appears as an independent instance.
i.e., the application uses it independent of other applications. Resources that
cannot be virtualized are handled through completion events.
2. The GenericComm communication stack of TinyOS is shared among different
threads and it cannot be virtualized. GenericComm can only send one packet at a
time, send operations of other threads fail during this time. Such shared resources
are handled through completion events that inform waiting threads about the
completion of a particular job.

TinyOs Support for Real-Time Applications


1. There is no explicit support in TinyOS for real-time applications. TinyOS is not a
good choice for sensor networks that are being deployed to monitor real-time
phenomena. An effort has been made to implement an Earliest Deadline First
(EDF) process scheduling algorithm and it has been made available in newer
versions of TinyOS. However, it has been shown that the EDF algorithm cannot
produce a feasible schedule when tasks content for resources.
2. TinyOS does not provide any specific MAC, network, or transport layers protocol
implementations that support Quality of Service requirements of real-time
multimedia streams. At the MAC layer, TinyOS supports TDMA, which can be
fine-tuned depending upon the requirements of an application to support
multimedia data.

TinyOS Additional Features


1. File system - TinyOS provides a single level file system. The rationale behind
providing a single level file system is the assumption that only a single
application runs on the node at any given point in time.
2. Database support - The purpose of sensor nodes is to sense, perform
computations, store and transmit data, therefore TinyOS provides database
support in the form of TinyDB.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 28 Sensor Network Platforms and Tools

3. Security support - Communication security in wireless broadcast medium is


always required. TinyOS provides its communication security solution in the
form of TinySec.
4. Simulation support - TinyOS provides simulation support in the form of
TOSSIM. The simulation code is written in NesC language and consequently can
also be deployed to actual motes in the network.
5. Language support - TinyOS supports application development in the NesC
programming language. NesC is a dialect of the C language.
6. Supported platforms - TinyOS supports sensing platforms such as Mica, Mica2,
Micaz, Telos, Tmote and a few others.
7. Documentation support - TinyOS is a well documented OS and documentation
can be read on the TinyOS home page at http://www.tinyos.net.

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 29 Sensor Network Platforms and Tools

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.

Fig. 8.4.3 Contiki architecture

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 30 Sensor Network Platforms and Tools

Contiki Programming Model


1. Contiki has preemptive multithreading. Multi-threading is implemented as a
library on top of the event-driven kernel. The library can be linked with
applications that require multithreading.
2. The Contiki multithreading library is divided in two parts : a platform
independent part and a platform specific part. The platform independent part
interfaces to the event kernel and the platform specific part of the library
implements stack switching and preemption primitives.
3. Preemption is implemented using the timer interrupt and the thread state is
stored on a stack.
4. For multithreading, Contiki uses protothreads. Protothreads are designed for
severely memory constraint devices because they are stack-less and lightweight.
5. The main features of protothreads are that they are very small memory overhead
(only two bytes per protothread), no extra stack for a thread, highly portable
(i.e., they are fully written in C and hence there is no architecture-specific
assembly code). Since events run to completion and Contiki does not allow
interrupt handlers to post new events. Contiki does not provide process
synchronization.

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.

Contiki Memory Management and Protection


1. Contiki has dynamic memory management along with support for dynamic
linking of the programs. In order to guard against memory fragmentation Contiki
uses a Managed Memory Allocator. The primary responsibility of the managed
memory allocator is to keep the allocated memory free from fragmentation by
compacting the memory when blocks are free. Therefore, a program using the
memory allocator module cannot be sure that allocated memory stays in place.
2. For dynamic memory management, Contiki also provides memory block
management functions. This library provides simple but powerful memory
management functions for blocks of fixed length. A memory block is statically
declared using the MEMB() macro. Memory blocks are allocated from the
declared memory by the memb_alloc() function, and are de-allocated using the
memb_free() function.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 31 Sensor Network Platforms and Tools

3. Contiki does not provide any memory protection mechanism amongst various
applications.

Contiki Communication Protocol Support


1. Contiki supports a rich set of communication protocols. In Contiki, an application
can use both versions of IP i.e., IPv4 and IPv6.
2. Contiki provides an implementation of uIP, a TCP/IP protocol stack for small 8 bit
micro-controllers. uIP does not require its peers to have a complete protocol stack,
but it can communicate with peers running a similar lightweight stack.
3. The uIP implementation has the minimum set of features needed for a full TCP/IP
stack. uIP is written in C, it can only support one network interface, and it
supports TCP, UDP, ICMP, and IP protocols.
4. Contiki provides another lightweight layered protocol stack, called Rime, for
network-based communication. Rime provides single hop unicast, single hop
broadcast, and multi-hop communication support. Rime supports both best effort
and reliable transmission. In multi-hop communication, Rime allows applications
to run their own routing protocols. Applications are allowed to implement
protocols that are not present in the Rime stack.
5. As Contiki does not support multicast it does not provide any implementation of
group management protocols such as the Internet Group Management Protocol
(ICMP), or Multicast Listener Discovery (MLD) protocol.
6. Since memory is a scare resource in embedded devices, uIP uses memory
efficiently by using memory management mechanisms. The uIP stack does not
use explicit dynamic memory allocation. It uses a global buffer to hold the
incoming data packets. Whenever a packet is received, Contiki places it in the
global buffer and notifies the TCP/IP stack. If it is a data packet, TCP/IP notifies
the appropriate application.
7. The application needs to copy the data in the secondary buffer or it can
immediately process the data. Once the application is done with the received
data, Contiki overwrites the global buffer with new incoming data. If an
application delays data processing, then data can be overwritten by new incoming
data packets.
8. Contiki provides an implementation of RPL (IPv6 routing protocol for low power
and lossy networks) by the name ContikiRPL that operates over low power
wireless links and lossy power line links.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 32 Sensor Network Platforms and Tools

Contiki Resource Sharing


As events run to completion and Contiki does not allow interrupt handlers to post
new events, Contiki provides serialized access to all resources.

Contiki Support for Real-Time Applications


Contiki does not provide any support for real-time applications, hence there is no
implementation of any real-time process scheduling algorithm in Contiki. Contiki does
not consider the QoS requirements of multimedia applications. Since Contiki provides an
implementation of the micro IP stack, there is no interaction between different layers of
the protocol stack.

Contiki Additional Features

1. Coffee File System


(i) Contiki provides file system support for flash-based sensor devices in the form of
the Coffee file system. The purpose of the Coffee file system is to provide a
programming interface for building efficient and portable storage abstractions.
(ii) Coffee provides a platform independent storage abstraction through an
expressive programming interface. Coffee uses a small and constant RAM
footprint per file, making it scalable.
(iii) A simple sequential page structure is being used. Coffee also introduces the
concept of micro logs to handle file modifications without using a spanning log
structure. Because of the contiguous page structure file metadata, Coffee uses a
small and constant footprint for each file.
(iv) Flash memory is divided into logical pages and the size of the page typically
matches the underlying flash memory pages. If the file size is not known
beforehand, Coffee allocates a predefined amount of pages to the file. Later on, if
the reserved size turns out to be insufficient, Coffee creates a new larger file and
copies the old file data into it.
(v) So as to boost the file system performance, by default Coffee uses a metadata
cache of 8 entries in the RAM. Coffee also provides an implementation of a
garbage collector that reclaims obsolete pages when a file reservation request
cannot be satisfied. To allocate pages to a file, Coffee uses a first fit algorithm.
Flash memories suffer from wear, that is, every time a page is erased it increases
the chances of memory corruption.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 33 Sensor Network Platforms and Tools

(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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 34 Sensor Network Platforms and Tools

Fig. 8.4.4 MANTIS OS architecture

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.

MANTIS Programming Model


1. MOS supports preemptive multitasking. Sensor node memory is a scare resource,
therefore MOS maintains two logically distinct sections of RAM - the space for
global variables that is allocated at compile time, while the rest of the RAM is
managed as a heap.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 35 Sensor Network Platforms and Tools

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 36 Sensor Network Platforms and Tools

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.

MANTIS Memory Protection and Management


MANTIS supports dynamic memory management but it discourages its use because
dynamic memory management incurs lots of overhead. Secondly, memory is a scarce
resource in a sensor node. MANTIS manages different threads memory using the thread
table that has already been discussed. There is no memory protection provided by
MANTIS.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 37 Sensor Network Platforms and Tools

MANTIS Communication Protocol Support


1. Network stack is implemented in two parts in MOS. The first part of the network
protocol stack is implemented in user space, as depicted in Fig. 8.4.3. It contains
the implementation of layer 3 (and above) protocols. A second part contains the
implementation of the MAC and PHY layer operations.
2. To provide flexibility the layer 3 and above functionality in user space is to
provide flexibility. If an application wants to use its own data-driven routing
protocol, then it can implement its routing protocol in user space. The downside
of the approach is performance i.e., the network protocol stack has to use APIs
provided by MANTIS instead of communicating directly with the device driver
and hardware. This results in many context switches, resulting in computational
and memory overheads.
3. The second part of the networking protocol stack is implemented in a COMM
layer. The COMM layer primarily implements synchronization and MAC layer
functionalities. The COMM layer provides a unified interface for communication
with device drivers, for interfaces such as serial connections, USB, and radio
devices.
4. The COMM layer also performs packet buffering. It is possible that packets arrive
from the network for a thread that is not currently scheduled. In such scenarios
the COMM layer will buffer packets. Once the thread gets scheduled, the COMM
layer passes a pointer to the data to the concerned thread.
5. MANTIS OS does not provide support for multicast applications. Also it does not
provide an implementation for group management protocols. MANTIS also does
not provide support for real-time multimedia applications in its communication
protocol stack.
6. On the other hand MANTIS does provide a facility to implement custom routing
and transport layer protocols on top of the MAC layer. So in MANTIS one can
implement real-time transport and routing protocols for multimedia sensor
networks.

MANTIS Resource Sharing


MANTIS performs resource sharing with the help of semaphores. At the same time it
does not address the priority inversion phenomenon.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 38 Sensor Network Platforms and Tools

MANTIS Support for Real-Time Applications


1. MANTIS provides very little support for real-time applications at the process
level. Processes running high priority tasks can be mapped to the higher priority
class and within that process class such processes can further be assigned high
priorities. MOS does not provide an implementation of a scheduling algorithm
that can meet soft and hard deadlines of processes.
2. Therefore, MOS is not a real-time OS for WSNs. For real-time multimedia
applications, additional functionalities are required in the network protocol stack
for example for allocating network bandwidth to multimedia applications,
finding routes that can satisfy QoS requirements of flows etc that is not supported
in MOS

MANTIS Additional Features

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 39 Sensor Network Platforms and Tools

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.

Fig. 8.4.5 Nano-RK architecture

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 40 Sensor Network Platforms and Tools

Nano-RK Programming Model


1. Central goal of Nano-RK was to facilitate application developers by allowing
them to work in a familiar multitasking paradigm. This results in a short learning
curve, rapid application development, and improved productivity. Since Nano-
RK is a preemptive multitasking OS, it needs to save the context of the current
task before scheduling the new task. Saving the state of each task results in large
memory consumption and frequent context switches result in reduced
performance and higher energy consumption.
2. In Nano-RK, each task has an associated Task Control Block (TCB). It is
recommended that the TCB should be initialized during initialization and system
image creation. The TCB stores the register contents, priority, period of
recurrence, (CPU, network, sensors) reservation sizes, and port identifiers of the
task. Based on the period of recurrence Nano-RK maintains two linked lists of
TCB pointers to order the set of active and suspended tasks.
3. To provide real-time semantics, Nano-RK provides fully preemptive multitasking
i.e., it ensures that the highest priority process in the ready queue always runs on
the microcontroller.
4. Each task has an associated TCB which contains the register and stack contents of
the task, the task’s priority, the task’s CPU, network, and sensors reservations, the
task’s port identifier, and its period. A single TCB requires significant memory,
hence if there is large number of tasks in the system, the system may run out of
memory space.
5. Each multithreaded OS needs to provide support for synchronization primitives
so that correct state of shared data or other resources can be maintained. Nano-RK
provides synchronization support in the form of mutexes and semaphores.

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 41 Sensor Network Platforms and Tools

3. Nano-RK also provides an implementation of rate harmonized scheduling for


energy saving. The main idea behind this scheduling algorithm is to eliminate
CPU idle periods by grouping the execution of different tasks. Since initial arrival
time, periodicity, and deadlines of tasks are known a priori, rate harmonized
scheduling can be used to further save energy by eliminating idle cycles.
4. Nano-RK also provides an implementation of the priority ceiling algorithm to
bind the blocking time encountered by a higher priority process due to priority
inversion, that is the shared resource needed by the higher priority process is
being used by a lower priority process. To circumvent priority inversion, each
mutex is associated with a priority ceiling. Whenever a mutex is acquired by a
task, the priority of the task is set equal to the priority ceiling of the mutex. Once,
the mutex is released, the task priority is set to its original priority.

Nano-RK Memory Protection and Management


Nano-RK provides support for static memory management, it does not support
dynamic memory management. In Nano-RK, both the OS and applications reside in a
single address space. Nano-RK does not provide any support to safeguard co-located OS
and process address spaces that is memory protection is not provided.

Nano-RK Communication Protocol Support


1. Nano-RK provides a lightweight networking protocol stack that provides a
communication abstraction similar to sockets. As in traditional network
programming, an application that wants to send data can create a socket and then
it can start communicate via that socket.
2. Similarly, an application can bind and listen to a particular two bytes port number
to receive data. To handle memory more efficiently, transmit and receive buffers
are not managed by the OS, instead they are managed by the application. The
rational presented for this is that it wastes memory if the OS reserves a
considerable large space in memory for an application that only sends and
receives a few bytes of data.
3. Therefore, it is more appropriate to allow applications to manage their own send
and receive buffers. The OS identifies application buffers by using the port
number present in the packet header.
4. The OS copies the received data into the application buffers using zero copy
semantics. Once the data is placed into the application buffer, the application is
notified accordingly. New incoming data is not copied into the application buffer
until previously placed data is read by the application or the application explicitly
allows the OS to do so.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 42 Sensor Network Platforms and Tools

5. A Time Synchronized Link Protocol for Energy Constraint Multi-hop Wireless


Networks (RT-Link) has been implemented in Nano-RK. The primary goal of RT-
Link is to prolong a sensor network’s lifetime and to provide guarantees on end-
to-end delay.
6. RT-Link provides support for real-time applications through bounded end-to-end
delay across multiple hops and collision free transmission. RT-Link is
implemented over a TDMA link layer protocol, where each node’s transmission
occurs in predefined time slots, allowing for energy savings.
7. An RT-Link cycle consists of 32 frames and each frame consists of 32 time slots.
The duration of each time slot is equal to 5 ms, enough to transmit a maximum
size packet. The length of a single cycle is 5.12 s. There are two types of slots in
RT-Link namely, Scheduled Slots (SS) and Contention Slots (CS). SS are allocated
to those member nodes that require bounded end-to-end delay and the allocation
of slots is carried out by the gateway that is the central controlling entity.
8. Each member node sends its neighbour list to the gateway and the gateway
assigns slots to the nodes depending on the network topology constructed
through the neighbour list. A new node joins the network as a guest node and
operates in contention slots. A node makes its reservation request to a gateway
using CS. Once a SS is assigned, the node becomes a member node and operates
during the SS period. A mobile node always operates in the CS period because its
membership changes rapidly with time, disturbing the scheduling plan set by the
gateway.
9. As Nano-RK is a reservation-based OS, it provides APIs to applications so that
they can reserve network bandwidth according to the application requirements.
Nano-RK provides two sets of APIs namely, one for reserving sender side
bandwidth and the other one for reserving receiver side bandwidth. In a given
period, an application can only send or receive data according to its network
bandwidth reservation status. This restriction can be relaxed in a soft real-time
system if there is some slack bandwidth available in the system.
10. In every new period the bandwidth reservations of each application is renewed.
Nano-RK neither provides an implementation of multicasting routing algorithm
nor does it provide an implementation of a group management protocol.

Nano-RK Resource Sharing


For shared resources such as memory, Nano-RK provides mutexes and semaphores
for serialized access. To circumvent the priority inversion problem, Nano-RK provides an

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 43 Sensor Network Platforms and Tools

implementation of the Priority Ceiling algorithm. Also, Nano-RK provides APIs to


reserve system resources like CPU cycles, sensors, and network bandwidth.

Nano-RK Support for Real-time Applications


1. Nano-RK is a real-time operating system, hence it provides rich support for real-
time applications.
2. It supports real-time processes and its offline admission control procedure
guarantees to meet deadline associated with each admitted real-time process.
Nano-RK provides an implementation of real-time preemptive scheduling
algorithms and tasks are scheduled using a rate monotonic scheduling algorithm.
3. Nano-RK provides bandwidth reservations for delay-sensitive flows and it claims
to provide end-to-end delay guarantees in multi-hop wireless sensor network.
Nano-RK is a suitable OS for use in multimedia sensor networks due to its
extensive support provided to real-time applications.

Nano-RK Additional Features

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 44 Sensor Network Platforms and Tools

LiteOS Architecture

1. LiteOS is modular architecture designed.


2. LiteOS is partitioned into three subsystems namely, LiteShell, LiteFS, and the
Kernel. LiteShell is a Unix-like shell that provides support for shell commands for
file management, process management, debugging, and devices.
3. An interesting aspect of the LiteOS is its LiteShell that resides on a base station or
a PC. This leverages to support more complex commands as the base station has
abundant resources. The LiteShell can only be used when there is a user present
on a base station.
4. Some local processing is done on the user command (parsing a command) by the
shell and then it is transmitted wirelessly to the intended sensor node. The sensor
node does the required processing on the command and sends a response back,
which is then displayed to the user.
5. When a mote does not carry out the commands, an error code is returned. It is
worth noting that Contiki and Mantis also provide a shell to interact with the
motes but the implementation code resides on the mote, limiting the capabilities
of the shell due to resource constraints.
6. The second architectural component of LiteOS is its file system LiteFS. LiteFS
mounts all neighboring sensor nodes as a file. LiteFS mounts a sensor network as
a directory and then list all one hop sensor nodes as a file.
7. User on the base station can use this directory structure just like the normal Unix
directory structure and a user can also use legitimate commands on these
directories. The third major component of LiteOS is the Kernel that resides on the
sensor node.
8. The LiteOS kernel provides concurrency in the form of multithreading, provides
support for dynamic loading, uses round robin and priority scheduling, allows
programmers to register event handlers through callback functions, and provides
synchronization support. Fig. 8.4.6 depicts the architecture of LiteOS.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 45 Sensor Network Platforms and Tools

Fig. 8.4.6 LiteOS architecture

LiteOS Programming Model

1. 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.

2. LiteOS supports event handling. Application programmers can register event


handlers using a callback facility provided by LiteOS.

3. 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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 46 Sensor Network Platforms and Tools

documentation does not detail how this functions are internally implemented that
is whether they are disabling interrupts or using mutexes.

LiteOS Scheduling

1. LiteOS implements Round Robin scheduling and Priority-based scheduling.


Whenever a task is added to the ready queue, the next task to be executed is
chosen through priority-based scheduling. The tasks run to completion or until
they request a resource that is not currently available.
2. When a task requires a resource that is not available, the task enables interrupts
and goes to sleep mode. Once the required resource becomes available, the
appropriate interrupt is signaled and the task resumes it execution from where it
had left. When a task completes its operation it leaves the kernel.
3. When there are no active tasks in the system, the sensor node goes to sleep mode.
Before going to sleep mode the node enables its interrupts so that it can wake up
at the proper event or time.
4. Since the LiteOS scheduler allows tasks to run until completion, there is a chance
that a higher priority task enters the ready queue when a low priority task is
completing its execution. In this scenario, a higher priority task may miss its
deadline, therefore LiteOS is not an appropriate OS for real-time sensor networks.

LiteOS Memory Protection and Management

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 47 Sensor Network Platforms and Tools

LiteOS Communication Protocol Support


1. LiteOS provides communication support in the form of files. LiteOS creates a file
corresponding to each device on the sensor node. Similarly, it creates a file
corresponding to the radio interface.
2. Whenever there is some data that needs to be sent, the data is placed into the
radio file and is afterward wirelessly transmitted. In the same manner, whenever
some data arrives at the node it is placed in the radio file and is delivered to the
corresponding application using the port number present in the data
3. At the network layer LiteOS supports geographical forwarding. Each node
contains a table that can only hold 12 entries. This routing protocol is supported in
LiteOS version 0.3. Unfortunately, detailed documentation on communication
protocols supported by LiteOS is not available, hence there has been no indication
about the protocols supported at the MAC, network and transport layer.

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.

LiteOS Support for Real-Time Applications


LiteOS does not provide any implementation of networking protocols that support
real-time multimedia applications. It provides a priority-based process scheduling
algorithm but once a process is scheduled it runs to completion. This might result in a
missed deadline of a higher priority process that enters the ready queue once a low
priority process has been scheduled.

LiteOS Additional Features

1. Lite File System (LiteFS)

(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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 48 Sensor Network Platforms and Tools

(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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


OS/Feature TinyOS Contiki MANTIS Nano-RK LiteOS

Architecture Monolithic Modular Layered Monolithic Modular

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

protection. protection. no memory protection. protection to


processes
Communication Active message. uIP and rime At Kernel level comm Socket like abstraction File based
Protocol Support layer. networking layer for networking. communication.
isat user level.
application is free to use
custom routing
protocols
Resource Sharing Virtualization and Serialized access Through semaphores. Serialized access Through
completion events. through mutexes and synchronization

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


semaphores. provide an primitives.
implementation of
priority ceiling
8.4.3.6 WSN Operating Systems - Comparative Analysis and Features Summary

Table 8.4.1 WSN operating systems - comparative analysis


algorithm for priority
inversion.
Support for Real- No No To some extent at Yes No
time Applications process scheduling level
(Implementation of
priority scheduling
within different
processes types)
Sensor Network Platforms and Tools
Ad hoc and Wireless Sensor Networks 8 - 50 Sensor Network Platforms and Tools

OS/Feature Communication File System Simulation Programming Shell


Security Support Support Language

1. TinyOS TinySec Single level file TOSSIM NesC Not available


system
2. Contiki ContikiSec Coffee file Cooja C Unix-like shell
system. runs on sensor
mote.
3. MANTIS Not available Not available Through C Unix-like shell
AVRORA runs on sensor
mote
4. Nano-RK Not available Not available Not C Not available
available
5. LiteOS Not available LiteFS. Through LiteC++ Shell that runs
AVRORA on base station.

Table 8.4.2 Miscellaneous features summary

8.5 WSN Simulators

8.5.1 Introduction to Simulators and Various Simulators - COOJA, TOSSIM


1. In order to realize a real scenario or a test bench which provides realistic results,
the physical architecture and the hardware development require a lot of
resources, and the WSN programming and debug become extremely complex. In
this context, wireless sensor network simulation becomes a very important and
essential tool which provides good results in a cost effective way.
2. The WSN simulators can be divided into different categories in relation to their
features and applications. These categories are namely,
i) Code level simulators.
ii) Topology control simulators.
iii) Environment and wireless medium simulators.
3. Due to the ability to increase the real WSN prototyping, the Cross Levels
Simulators, like COOJA, have become an important class of simulators. This kind
of simulators operates at three abstraction levels: the network level, the operating
system level, and the machine code instruction set level.
4. Although these simulators are open source, flexible, and extensible at all levels,
the test interface, the external connection at a physical level and the direct
interaction with the process control via the WSN are very poor.
5. In recent years, to solve these problems, a few numbers of co-simulators have
been developed which integrate WSN simulators and MATLAB/Simulink tools.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 51 Sensor Network Platforms and Tools

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,

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 52 Sensor Network Platforms and Tools

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.

8.5.2 Node-Level Simulators


1. Node-level design methodologies are usually associated with simulators that
simulate the behavior of a sensor network on a per-node basis. Using simulation,
designers can quickly study the performance (in terms of timing, power,
bandwidth, and scalability) of potential algorithms without implementing them
on actual hardware and dealing with the vagaries of actual physical phenomena.
2. A node-level simulator typically has the following components -
1. Sensor node model - A node in a simulator acts as a software execution
platform, a sensor host, as well as a communication terminal. In order for
designers to focus on the application-level code, a node model typically
provides or simulates a communication protocol stack, sensor behaviors (e.g.,
sensing noise), and operating system services. If the nodes are mobile, then
the positions and motion properties of the nodes need to be modeled. If
energy characteristics are part of the design considerations, then the power
consumption of the nodes needs to be modeled.
2. Communication model - Depending on the details of modeling,
communication may be captured at different layers. The most elaborate
simulators model the communication media at the physical layer, simulating
the RF propagation delay and collision of simultaneous transmissions.
Alternately, the communication may be simulated at the MAC layer or
network layer, using, for example, stochastic processes to represent low-level
behaviors.
3. Physical environment model - A key element of the environment within a
sensor network operates is the physical phenomenon of interest. The
environment can also be simulated at various levels of details. For example, a
moving object in the physical world may be abstracted into a point signal
source. The motion of the point signal source may be modeled by differential
equations or interpolated from a trajectory profile. If the sensor network is

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 53 Sensor Network Platforms and Tools

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

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 54 Sensor Network Platforms and Tools

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.

8.5.3 The ns-2 Simulator and its Sensor Network Extensions


1. The simulator ns-2 is an open-source network simulator that was originally
designed for wired, IP networks. Extensions have been made to simulate
wireless/mobile networks (e.g. 802.11 MAC and TDMA MAC) and more recently
sensor networks.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 55 Sensor Network Platforms and Tools

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

8.6 WSN Programming and Programming Beyond Individual Node


1. Wireless sensor networks (WSNs) are attracting great interest in a number of
application domains concerned with monitoring and control of physical
phenomena, as they enable dense and untethered deployments at low cost and
with unprecedented flexibility.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 56 Sensor Network Platforms and Tools

2. However, application development is still one of the main hurdles to a wide


adoption of WSN technology. In current real-world WSN deployments,
programming is typically carried out very close to the operating system, therefore
requiring the programmer to focus on low-level system issues. This not only
distracts the programmer from the application logic, but also requires a technical
background rarely found among application domain experts.
3. The need for appropriate high-level programming abstractions, capable of
simplifying the programming chore without sacrificing efficiency, has long been
recognized, and several solutions have hitherto been proposed, which differ along
many dimensions.
4. To have overall and efficient functioning of WSN it needs to programming that is
not node centric. WSN programming should be thought beyond individual node
and programming should be considering complete network.
5. Based on the problem space and applications focus WSN programming should
consider four important requirements for sensor network applications namely,
Energy efficiency, Scalability, Failure-resilience, Collaboration.
6. WSN programming model can be classified as low-level programming models
and high-level programming models. Low-level programming models are
focused on abstracting hardware and allowing flexible control of nodes. TinyOS
with nesC is one of the earliest examples in this class and has been de facto
standard software platform for sensor network programming.
7. An approach in this class is to run a virtual machine on each node. A virtual
machine provides an execution environment for scripts that are much smaller
than binary codes for TinyOS. Thus it is appropriate for the situations where the
code on each node needs to be dynamically reprogrammed after deployment via a
wireless channel.
8. High-level programming models take an application-centric view instead of the
platform-centric view and address how easily application logics can be
programmed, as opposed to, say, providing flexibility in optimizing the system’s
performance.
9. More specifically, they mainly focus on facilitating collaboration among sensors, a
major category of sensor network applications and also one of the most difficult
challenges for sensor network programming. One of the typical approaches is to
provide a set of operations for a group defined by several criteria. These
operations include data sharing and aggregation so that programmers can
describe collaborative data processing using them. Another approach is to
provide communication abstraction by using a simple addressing scheme like
variable access.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 57 Sensor Network Platforms and Tools

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.

8.7 State Centric Programming


1. Applications that isn’t just simply generic distributed programs over an ad hoc
network. Data needs to be centralized into nodes. For example target tracking
system.
2. Applications are more than simple distributed programs. Applications depend on
state of physical environment.
3. There are collaboration Groups which are set of entities that contribute to state
updates.
4. There are abstracts network topology and communication protocols.
5. For example consider as multi-target tracking problem in which global state
decoupled into separate pieces. Each piece managed by different principal. State
is updated by looking at inputs from other principals. Collaboration groups
define communication and roles of each principal.

8.8 Two Marks Questions with Answers


Part - A
Q.1 What is relay node in WSN ?
Ans. : Relay node 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.
Q.2 What are passive sensors ?
Ans. : Passive sensors 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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 58 Sensor Network Platforms and Tools

Q.3 What is mote ?


Ans. : Mote is computing concept. The core of a mote is a small, low-cost, low-power
computer. 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. 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.
Q.4 List down some of the main WSN simulators.
Ans. : The main simulators for WSNs are,
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 .
Q.5 What are the features of ns-2 WSN simulator ?
Ans. : The simulator ns-2 is an open-source network simulator that was originally
designed for wired, IP networks. Extensions have been made to simulate
wireless/mobile networks (e.g. 802.11 MAC and TDMA MAC) and more recently
sensor networks. 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.
There are two widely known types of ns-2 for simulating sensor networks namely,
SensorSim form UCLA and the NRL sensor network extension from the Navy

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 59 Sensor Network Platforms and Tools

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.

TECHNICAL PUBLICATIONS® - An up thrust for knowledge


Ad hoc and Wireless Sensor Networks 8 - 60 Sensor Network Platforms and Tools

Q.9 What are basic features of Contiki OS programming model ?


Ans. : Contiki has preemptive multithreading. Multi-threading is implemented as a
library on top of the event-driven kernel. The library can be linked with applications
that require multithreading. The Contiki multithreading library is divided in two parts:
a platform independent part and a platform specific part. The platform independent
part interfaces to the event kernel and the platform specific part of the library
implements stack switching and preemption primitives. Preemption is implemented
using the timer interrupt and the thread state is stored on a stack. For multithreading,
Contiki uses protothreads. Protothreads are designed for severely memory constraint
devices because they are stack-less and lightweight.
Q.10 How communication protocol is supported in WSN OS ?
Ans. : In the OS context, communication refers to inter-process communication within
the system as well as with other nodes in the network. WSNs operate in a distributed
environment, where sensor nodes communicate with other nodes in the network. All
WSN OSs provide an Application Programming Interface (API) that enables application
program to communicate. It is possible that a WSN is composed of heterogeneous
sensor nodes, therefore the communication protocol provided by the OS must also
consider heterogeneity. In network-based communication, the OS should provide
transport, network, and MAC layer protocol implementations.

8.9 Long Answered Questions


Part - B
Q.1 Discuss various hardware components of sensor node. (Refer section 8.1)
Q.2 List various applications of mote. (Refer section 8.1)
Q.3 Write a note on Berkeley motes. (Refer section 8.2)
Q.4 What are various challenges faced in sensor network programming ? (Refer section 8.3)
Q.5 What are WSN simulators? Explain with example. (Refer section 8.5)
Q.6 Explain sensor node architecture. (Refer section 8.1)
Q.7 What are major concerns in WSN OS design ? (Refer section 8.4.2)
Q.8 How WSN OS supports real time applications ? (Refer section 8.4)
Q.9 Discuss TinyOs for WSN. (Refer section 8.4)
Q.10 Discuss features of MANTIS os. (Refer section 8.4)



TECHNICAL PUBLICATIONS® - An up thrust for knowledge

You might also like