InTechOpen uses cookies to offer you the best online experience. By continuing to use our site, you agree to our Privacy Policy.

Computer and Information Science » Computer Science and Engineering » "Wireless Sensor Networks - Insights and Innovations", book edited by Philip Sallis, ISBN 978-953-51-3562-3, Print ISBN 978-953-51-3561-6, Published: October 4, 2017 under CC BY 3.0 license. © The Author(s).

Chapter 2

Routing Protocols for Wireless Sensor Networks (WSNs)

By Noman Shabbir and Syed Rizwan Hassan
DOI: 10.5772/intechopen.70208

Article top


Basic classification of routing protocols.
Figure 1. Basic classification of routing protocols.
SPIN routing protocol.
Figure 2. SPIN routing protocol.
Categories of routing protocols.
Figure 3. Categories of routing protocols.
Comparison of routing protocols.
Figure 4. Comparison of routing protocols.
Simulation model.
Figure 5. Simulation model.
Simulation Results for AODV.
Figure 6. Simulation Results for AODV.
Simulation Results for DSR.
Figure 7. Simulation Results for DSR.
Simulation Results for a OLSR.
Figure 8. Simulation Results for a OLSR.
End-to-end delay in ZigBee.
Figure 9. End-to-end delay in ZigBee.
Throughput in ZigBee.
Figure 10. Throughput in ZigBee.

Routing Protocols for Wireless Sensor Networks (WSNs)

Noman Shabbir and Syed Rizwan Hassan
Show details


Wireless sensor networks (WSNs) are achieving importance with the passage of time. Out of massive usage of wireless sensor networks, few applications demand quick data transfer including minimum possible interruption. Several applications give importance to throughput and they have not much to do with delay. It all rest on the applications desires that which parameter is more favourite. The knowledge of network structure and routing protocol is very important and it should be appropriate for the requirement of the usage. In the end a performance analysis of different routing protocols is made using a WLAN and a ZigBee based Wireless Sensor Network.

Keywords: routing protocols, WSN, DSR, AODV, OLSR, WLAN, ZigBee

1. Introduction

The routing protocol is a process to select suitable path for the data to travel from source to destination. The process encounters several difficulties while selecting the route, which depends upon, type of network, channel characteristics and the performance metrics.

The data sensed by the sensor nodes in a wireless sensor network (WSN) is typically forwarded to the base station that connects the sensor network with the other networks (may be internet) where the data is collected, analyzed and some action is taken accordingly.

In very small sensor networks where the base station and motes (sensor nodes) so close that they can communicate directly with each other than this is single-hop communication but in most WSN application the coverage area is so large that requires thousands of nodes to be placed and this scenario requires multi-hop communication because most of the sensor nodes are so far from the sink node (gateway) so that they cannot communicate directly with the base station. The single-hop communication is also called direct communication and multi-hop communication is called indirect communication.

In multi-hop communication the sensor nodes not only produce and deliver their material but also serve as a path for other sensor nodes towards the base station. The process of finding suitable path from source node to destination node is called routing and this is the primary responsibility of the network layer.

2. Routing challenges in WSNs

The design task of routing protocols for WSN is quite challenging because of multiple characteristics, which differentiate them, from wireless infrastructure-less networks. Several types of routing challenges involved in wireless sensor networks. Some of important challenges are mentioned below:

  • It is almost difficult to allocate a universal identifiers scheme for a big quantity of sensor nodes. So, wireless sensor motes are not proficient of using classical IP-based protocols.

  • The flow of detected data is compulsory from a number of sources to a specific base station. But this is not occurred in typical communication networks.

  • The created data traffic has significant redundancy in most of cases. Because many sensing nodes can generate same data while sensing. So, it is essential to exploit such redundancy by the routing protocols and utilize the available bandwidth and energy as efficiently as possible.

  • Moreover wireless motes are firmly restricted in relations of transmission energy, bandwidth, capacity and storage and on-board energy. Due to such dissimilarities, a number of new routing protocols have been projected in order to cope up with these routing challenges in wireless sensor networks.

3. Design challenges in WSNs

There are some major design challenges in wireless sensor networks due to lack of resources such as energy, bandwidth and storage of processing. While designing new routing protocols, the following essentials should be fulfilled by a network engineer.

3.1. Energy efficiency

Wireless sensor networks are mostly battery powered. Energy shortage is a major issue in these sensor networks especially in aggressive environments such as battlefield etc. The performance of sensor nodes is adversely affected when battery is fallen below a pre-defined battery threshold level. Energy presents a main challenge for designers while designing sensor networks. In wireless sensor network, there are millions of motes. Each node in this network has restricted energy resources due to partial amount of power. So, the routing protocol should be energy efficient [1].

3.2. Complexity

The complexity of a routing protocol may affect the performance of the entire wireless network. The reason behind is that we have inadequate hardware competences and we also face extreme energy limitations in wireless sensor networks.

3.3. Scalability

As sensors are becoming cheaper day by day, hundreds or even thousands of sensors can be installed in wireless sensor network easily. So, the routing protocol must support scalability of network. If further nodes are to be added in the network any time then routing protocol should not interrupt this.

3.4. Delay

Some applications require instant reaction or response without any substantial delay such as temperature sensor or alarm monitoring etc. So, the routing protocol should offer minimum delay. The time needed to transmit the sensed data is required to be as little as possible in above cited WSN applications.

3.5. Robustness

Wireless sensor networks are deployed in very crucial and loss environments frequently. Occasionally, a sensor node might be expire or leaving the wireless sensor network. Thus, the routing protocol should be capable to accept all sorts of environments including severe and loss environments. The functionality of the routing protocol should be fine also [2].

3.6. Data transmission and transmission models

There are four modes of data transmission depending on the applications in wireless sensor networks namely as query driven, event driven and continuous type and hybrid type. A node begins to transmit the data only when sink creates the query or an event occurs in query driven model and event driven model. The data is sent out periodically in continuous transmission mode. The performance of the routing protocol is a function of network size and transmission media. So, transmission media of good quality enhances the network performance directly [3].

3.7. Sensor location

Another major challenge that is faced by wireless sensor network designers is to correctly locate of the sensor nodes. Most routing protocols use some localization technique to obtain knowledge concerning their locations. Global positioning system (GPS) receivers are used in some scenario.

4. Classification of routing protocols

The routing protocols define how nodes will communicate with each other and how the information will be disseminated through the network. There are many ways to classify the routing protocols of WSN. The basic classification of routing protocols is illustrated in Figure 1.


Figure 1.

Basic classification of routing protocols.

4.1. Node centric

In node centric protocols the destination node is specified with some numeric identifiers and this is not expected type of communication in Wireless sensor networks. E.g. Low energy adaptive clustering hierarchy (LEACH).

4.1.1. Low energy adaptive clustering hierarchy (LEACH)

LEACH is a routing protocol that organizes the cluster such that the energy is equally divided in all the sensor nodes in the network. In LEACH protocol several clusters are produced of sensor nodes and one node defined as cluster head and act as routing node for all the other nodes in the cluster.

As in routing protocols the cluster head is selected before the whole communication starts and the communication fails if there is any problem occurs in the cluster head and there is much chances that the battery dies earlier as compare to the other nodes in cluster as the fix cluster head is working his duties of routing for the whole cluster.

LEACH protocol apply randomization and cluster head is selected from the group of nodes so this selection of cluster head from several nodes on temporary basis make this protocol more long lasting as battery of a single node is not burdened for long.

Sensor nodes elect themselves as cluster head with some probability criteria defined by the protocol and announce this to other nodes

4.2. Data-centric

In most of the wireless sensor networks, the sensed data or information is far more valuable than the actual node itself. Therefore data centric routing techniques the prime focus is on the transmission of information specified by certain attributes rather than collecting data from certain nodes.

In data centric routing the sink node queries to specific regions to collect data of some specific characteristics so naming scheme based on attributes is necessary to describe the characteristics of data. Examples are as follows:

4.2.1. Sensor protocols for information via negotiation (SPIN)

SPIN is abbreviation of sensor protocol for information via negotiation. This protocol is defined to use to remove the deficiency like flooding and gossiping that occurs in other protocols. The main idea is that the sharing of data, which is sensed by the node, might take more resources as compare to the meta-data, which is just a descriptor about the data sensed, by the node. The resource manager in each node monitors its resources and adapts their functionality accordingly.

Three messages namely ADV, REQ and DATA are used in SPIN. The node broadcast an ADV packet to all the other nodes that it has some data. This advertising node ADV message includes attributes of the data it has. The nodes having interests in data, which the advertising node has requested by sending REQ message, to the advertising node. On receiving the REQ message the advertising node send data to that node. This process continues when the node on reception of data generate an ADV message and send it. The whole model SPIN is shown in (Figure 2).


Figure 2.

SPIN routing protocol.

4.3. Destination-initiated (Dst-initiated)

Protocols are called destination initiated protocols when the path setup generation originates from the destination node. Examples are directed diffusion (DD) & LEACH.

4.3.1. Directed diffusion (DD)

Directed diffusion is a data centric routing technique. It uses this data centric technique for information gathering and circulating. This routing protocol is also energy efficient and energy saving protocol so that’s why life time of the network is increased. All the communication in directed diffusion routing protocol is node to node so there is no need of addressing in this protocol.

4.4. Source-initiated (Src-initiated)

In these types of protocols the source node advertises when it has data to share and then the route is generated from the source side to the destination. Examples is SPIN.

5. Categories of routing protocols

In order to transmit data in sensor networks, there are two techniques being used. The one is referred to as Flooding and the other one is gossiping protocol. There is no need to use any routing algorithm and maintenance of topology. In the flooding protocol, upon reception of a data packet by sensor nodes, this data packet is broadcast to all other neighbors. The process of broadcasting is continued till any one of two following conditions is satisfied; the packet has reached successfully to its destination. And second condition is; maximum number of hops of a packet has reached [4].

The main advantages of flooding are ease of implementation and simplicity. The drawbacks are blindness of resources and overlapping and implosion. The gossiping protocol is somewhat advanced version of flooding protocol. In gossiping protocol, the sensor node, which is getting a data packet, transmits it to the arbitrarily selected neighbor. At the next turn, the sensing nodes again randomly pick another nodes and sends data to it. This process is continued again and again. The broadcasting is not used in gossiping protocol as it was used in flooding. In this way, implosion issue can be avoided easily. But delay is enhanced in this way. The main categories of the routing protocols are depicted in Figure 3.


Figure 3.

Categories of routing protocols.

5.1. Route discovery based routing protocols

Routing protocols are classified on the basis of process they used to discover the routes.

5.1.1. Reactive protocols

Reactive routing protocols do not maintain the whole network topology they are activated just on demand when any node wants to send data to any other node. So the routes are created on demand when queries are initiated. The most commonly used reactive routing protocols are as follows: Ad-hoc on-demand distance vector routing system (AODV)

Ad-hoc on-demand distance vector (AODV) is reactive on request protocol. AODV is engineered for Mobile infrastructure-less networks. It employs the on-demand routing methodology for formations of route among network nodes. Path is established solitary when source node want to direct packs of data and pre-set route is maintained as long as the source node needs. That’s why we call it as On-Demand. AODV satisfies unicast, multicast and broadcast routing. AODV routing protocol directs packets among mobile nodes of wireless ad-hoc network. AODV permits mobile nodes to pass data packets to necessary destination node via nodes of neighbor that are unable to connect link openly. The material of routing tables is switched intermittently among neighbor nodes and prepared for sudden updates [3].

AODV chooses shortest but round free path from routing table to transmit packets. Suppose if errors or variations come in nominated path, then AODV is intelligent enough to make a fresh new route for rest of communication. Dynamic source routing (DSR)

Dynamic source routing (DSR) is a routing protocol used in wireless sensor networks developed at CMU in 1996. Dynamic source routing can be reactive or on demand. As its name shows that it uses source routing instead of routing tables. Routing in DSR is divided into two parts, route discovery and route maintenance.

Source node will initiate a route discovery phase and this phase consist of route request and route reply (RREP) messages. In DSR only destination node will reply with route reply RREP message to the source node unlike in AODV where every intermediate node would reply with route reply message RREP. And the purpose of next phase route maintenance is to avoid flooding of RREP messages and used for shortening of nodes between source and destination [6, 8].

5.1.2. Proactive protocols

They are also known as table driven routing protocols, because they maintains the routing tables for the complete network by passing the network information from node to node and the routes are pre-defined prior to their use and even when there is no traffic flow. The most commonly used algorithm is as follows: Optimized link state routing (OLSR)

Optimized link state routing (OLSR) belongs to the category of proactive routing protocols and it uses table focused practice. The main drawback of OLSR is that it has a massive overhead. To compensate this delay, multipoint relays (MPRs) are used to overcome the large overhead. For data transmission, three adjutant nodes are used as MPRs by every node. No consistent control information is required as each node sends it alternatingly [6, 8].

5.1.3. Hybrid routing protocols

Hybrid Routing Protocols have the merits of proactive and reactive routing protocols by neglecting their demerits.

5.2. Network organization based routing protocols

Following protocols are based on the network organization of wireless sensor network.

5.2.1. Flat topology

Flat topology treats all nodes equally. Flat topology is mainly for homogeneous networks where all nodes are of same characteristics and have same functionality. Examples are:

  • Gradient based routing (GBR)

  • Cougar

  • Constrained anisotropic diffusion routing (CADR)

  • Rumor routing (RR)

5.2.2. Hierarchical based routing

Mostly heterogeneous networks apply hierarchical routing protocols where some nodes are more advance and powerful than the other nodes, but not always this is the case, sometimes in hierarchical (clustering) protocols sometimes the nodes are grouped together to form a cluster and the cluster head is assigned to every cluster, which after data aggregation from all the nodes, communicates with the base node .The clustering scheme is more energy efficient and more easily manageable. Examples are:

  • Threshold sensitive energy efficient sensor network (TEEN)

  • Adaptive threshold sensitive energy efficient sensor network (APTEEN)

  • Low energy adaptive clustering hierarchy (LEACH)

  • The power-efficient gathering in sensor information systems (PEGASIS)

  • Virtual grid architecture routing (VGA)

  • Self-organizing protocol (SOP)

  • Geographic adaptive fidelity (GAF)

5.2.3. Location-based routing (geo-centric)

In location based routing the nodes have capability to locate their present location using various localization protocols. Location information helps in improving the routing procedure and also enables sensor networks to provide some extra services. Examples are:


  • Geographical and energy aware routing (GEAR)

  • SPAN

5.3. Operation based routing protocols

According to the operational basis the routing protocols are classified as:

  • Multipath routing protocols

  • Query based routing

  • Negotiation based routing

  • QoS-based routing

  • Coherent routing

5.3.1. Multi-path routing protocol

Multi-path routing protocols provide multiple paths for data to reach the destination providing load balancing, low delay and improved network performance as a result. The multiple routing protocol also provide alternate path in case of failure of any path. Dense networks more interested in multiple path networks. To keep the paths alive some sort of periodic messages have to a send after some specific intervals hence multiple path routing is not more energy efficient. Multipath routing protocols are: [6]

  • Multi path and Multi SPEED (MMSPEED)

  • Sensor protocols for information via negotiation (SPIN)

5.3.2. Query based routing protocol

These type of routing protocols are mostly receiver-initiated. The sensor nodes will only send data in response to queries generated by the destination node. The destination node sends query of interest for receiving some information through the network and the target node sense the information and send back to the node that has initiated the request. The examples are [6]:

  • Sensor protocols for information via negotiation (SPIN)

  • Directed diffusion (DD)


5.3.3. Negotiation based routing protocols

In these types of protocols to keep the redundant data transmission level at minimum, the sensor nodes negotiate with the other nodes a and share their information with the neighboring nodes about the resources available and data transmission decisions are made after the negotiation process. Examples are [6]:

  • Sensor protocols for information via negotiation (SPAN)

  • Sequential assignment routing (SAR)

  • Directed diffusion (DD)

5.3.4. QoS based routing protocols

To get good Quality of Service these protocols are used. QoS aware protocols try to discover path from source to sink that satisfies the level of metrics related to good QoS like throughput, data delivery, energy and delay, but also making the optimum use of the network resources.

Examples are: [4, 6]

  • Sequential assignment routing (SAR)


  • Multi path and Multi SPEED (MMSPEED)

5.3.5. Coherent data processing routing protocol

In coherent data processing routing protocol the nodes perform minimum processing (time stamping, data compression etc.) on the data before transmitting it towards the other sensor nodes or aggregators. Aggregator performs aggregation of data from different nodes and then passes to the sink node.

5.4. Comparison of routing protocols of WSN

A detailed comparison of WSN routing protocols is given below in tabular form is shown in Figure 4 [5].

Simulation parametersValues
No. of nodes20, 40, 80
Simulation time120 s
Simulation area1000 m2
Data rate of nodes11 Mbps
TrafficFTP (high load)
Routing protocolsAODV, DSR and OLSR

Table 1.

Simulation parameters.


Figure 4.

Comparison of routing protocols.

5.5. Performance analysis of routing protocols

OPNET Modeler 14.5 network simulator is used to analyze AODV, DSR and OLSR routing protocols in WLAN based WSNs. These protocols are compatible in WLAN based WSNs and previous reseraches indicated that they have better performnace.Here, the perforrmance of these protocols will be evaluated in small, medium and large scale network against delay, throughput and network load. Small scale network contains 20 nodes, medium scale with 40 nodes and large scale network takes 80 nodes. The simulation model is represented in Figure 5. The general parameters for simulation scenarios are given in Table 1.


Figure 5.

Simulation model.

Now three network metrics are defined; End-to-End delay, throughput and network load. ETE delay is described by way of time engaged by an envelope to be communicated through a network from source to destination. It comprises retransmission delays on media access layer (MAC), packet transfer time and broadcast delay plus other delays at route discovery and conservation. The quantity of data transmission from source to destination network node in a given specified amount of time. It is dignified in byte per second. Network load (NL) shows net load, which indicates, in bits per second. Work load is sometimes also called as Network Congestion. When traffic load exceeds than link capacity then it is almost impossible for network to handle the traffic thus creating congestion in the network.

In simulations, there sensor networks are considered, firstly in a small scale network, 20 nodes are selected with one stationary WLAN server. These nodes are interconnected in star topology. Area of the network is 1000 × 1000 m. IPv4 scheme is applied to entirely nodes and File Transfer Protocol is used as great traffic load. Each WLAN node has data rate of 11 Mbps. Similarly, a medium scale network is with 40 nodes and large scale network is consisted of 80 nodes.

After running simulations, the following results are obtained. Figures 68 depicts simulation results of delay, network load and throughput for AODV in small, medium and large scale networks, respectively. Delay is represented in seconds while throughtput and network load in bits per seconds.


Figure 6.

Simulation Results for AODV.


Figure 7.

Simulation Results for DSR.


Figure 8.

Simulation Results for a OLSR.

The entire results of small, medium and large scale networks are mentioned below in Table 2. It is cocluded from the table that in terms of delay, the efficiency of OLSR is more than 100% in small and medium scale network as compared to the other two protocols while AODV is significantly (>50%) better in large networks. In case of network load, OLSR gives minimum load in all three scenarios. However, AODV gives best throughput in small scale network which is 40% more than DSR and 86% higher than OLSR. DSR is better than AODV and OLSR by a factor of 13 and 40% respectively, in medium scale network. Similarly, in large scale network it is better by a margin of 47 and 18%.

20Delay (s)
Network load (Kbps)
Throughput (Kbps)
40Delay (s)
Network load (Kbps)
Throughput (Kbps)
80Delay (s)
Network load (Kbps)
Throughput (Kbps)

Table 2.

Simulation results.

5.5.1. Performance analysis for a ZigBee based network

The same comparison can be made for a ZigBee based Wireless Sensor Network using AODV. ZIGBEE nodes use in lower data rates applications where we need a longer battery life. Through wireless sensor nodes provides higher data rates but their disadvantage is that they require higher power. So in those applications where we don’t need higher data rates we use ZIGBEE because they increase the life of the network [7].

Figure 9 depicts that the end-to-end delay is higher in a network where we use ZIGBEE nodes. End-to-end delay starts from 0.060 s and then step up in the starting and then gets saturated at approximately 0.070 s. While in WSN nodes, End-to-end delay hardly increase from 0.010 s and throughput is lower in a ZIGBEE network as we can see in the Figure 10. From Figure 10, throughput increases linearly in the start and then gets stable at 6300 bits/s. So ZIGBEE nodes are used when there are concerns with the life span of network and economic issues because ZIGBEE is a low power, low cost devices.


Figure 9.

End-to-end delay in ZigBee.


Figure 10.

Throughput in ZigBee.

5.6. Conclusion

Routing protocols plays a very significant part to produce interruption less and efficient communication between source and destination nodes. The performance, service and reliability of a network mostly depend on the selection of good routing protocol. Protocols being used in Wireless sensor networks and ad hoc networks must be round-free. The routing protocols in WSN are classified in many different ways.

The categories of routing protocols are network based organization, operation and route discovery. Most of the applications of WSN uses route discovery base routing protocols e.g. AODV, DSR & OLSR. The performance of these protocols is compared in different scenarios on the basis of throughput, delay and congestion.

In small scale network with 20 nodes, OLSR gives less jitter & less congestion/load as matched with AODV and DSR. AODV & DSR give high throughput than OLSR. In medium scale network with 40 nodes, OLSR again give less delay and less network load when compared with AODV and DSR. On the other hand, DSR provides high throughput as compared to AODV and OLSR. In large scale network with 80 nodes, OLSR shows same behavior as in small and medium scale networks. In large scale network, OLSR has less delay and network load than DSR and AODV. Interestingly, DSR give highest value for throughput. AODV has least value of throughput in large scale network.


1 - G Yin, G Yang, W Yang, B Zhang, W Jin. An energy-efficient routing algorithm for wireless. In. International Conference on Internet Computing in Science and Engineering (ICICSE’08), IEEE, China; 2008.
2 - Zang Z, Qi JD, Cao YJ. A robust routing protocol in wireless sensor networks. In: IET International Conference on Wireless Sensor Network. China: IET; 2010. pp. 276-279
3 - Ehsan S, Hamdaoui B. A survey on energy-efficient routing techniques with QoS assurances for wireless multimedia sensor networks. IEEE Communications Surveys & Tutorials. 2012;14(2), PP. 265-278.
4 - Hassan SR. Performance analysis of ZigBee based wireless sensor networks [thesis]. Lahore: GCU; 2014. Available from:
5 - Nawaz R. Performance analysis of WLAN based routing protocols [thesis]. Lahore: GCU; 2015. Available from:
6 - Shabbir N, Nawaz R, Iqbal MN, Zafar J. Routing protocols for a small scale WLAN based wireless sensor networks. In: 9th International Conference on Sensing Technologies. New Zealand: IEEE; 2015
7 - Khan AA. A survey of routing protocol in wireless sensor networks [thesis]. Lahore: GCU; 2016. Available from:
8 - Bakr BA, Lilien L. LEACH-SM: A protocol for extending wireless sensor network lifetime by management of spare nodes. In: International Symposium on Modelling and Optimization in Mobile, Ad Hoc and Wireless Networks (WiOpt); IEEE; New Jersey, Princeton; 2011