The key responsibility of the network layer is to find paths from data sources to sink devices
(e.g., gateways). In the single-hop routing model (left graph in Figure 7.1), all sensor nodes
are able to communicate directly with the sink device. This direct communication model is
the simplest approach, where all data travels a single hop to reach the destination. However,
in practical settings, this single-hop approach is unrealistic and a multi-hop communication
model (right graph in Figure 7.1) must be used. In this case, the critical task of the
network layer of all sensor nodes is to identify a path from the sensor to the sink across multiple
other sensor nodes acting as relays. This design of a routing protocol is challenging
due to the unique characteristics of WSNs, including resource scarcity or the unreliability
of the wireless medium. For example, the limited processing, storage, bandwidth, and
energy capacities require routing solutions that are lightweight, while the frequent dynamic
changes in a WSN (e.g., topology changes due to node failures) require routing solutions