3 Engineering IoT Networks
107
3.2.2.3 Network Layer
It is responsible for routing PDUs in tree and mesh topology thus increasing network
coverage with respect to star topology.
The most common protocol at the Network Layer is the Internet Protocol (IP).
There are two options for IP protocol, i.e., IP Version 4, the traditional one, and
the new IP Version 6 which is spreading over the Internet. The former is not welloptimized for low data rate transmissions, while the latter is very flexible, and one
of its flavors, named 6LoWPAN and described in Sect. 3.3.14, has been specifically
designed for wireless IoT transmissions.
IP provides an unacknowledged connectionless service. Each network interface
has an IP address (32 bits in IPv4 and 128 bits in IPv6) consisting of a network prefix
and a remaining part which is interface-specific. Each PDU contains the source and
destination address for the delivery. All the interfaces on the same physical medium
have the same network prefix thus simplifying the routing process. IP networks are
created by connecting end-nodes (named hosts in IP terminology) to intermediate
systems named routers which handle PDU delivery to the destination interface in
a hop-by-hop way. Figure 3.6 reports the Simplified ISO/OSI Model for two hosts
connected through a router. Layer 4 and 5 PDUs go unchanged through the router
as if it were not present (for this reason, Layer 4 and 5 are grouped under the name
host layer). The router handles the three lowest layers (grouped under the name
media layer). In particular, forwarding decision is performed at Layer 3 according
to routing rules.
IoT applications that use IP protocol are widespread since, in this case, the interoperation with traditional Internet applications is straightforward.
3.2.2.4 Data Link Layer
It deals with the communication on each shared physical medium by identifying the
nodes’ interfaces and regulating the access to the medium. Since the simultaneous
transmission of two or more messages on the same physical medium corrupts all
of them, an arbitration policy should be adopted to share a common medium as
the wireless channel. There are two main approaches, i.e., Carrier Sense Multiple
Access (CSMA) born with Ethernet 40 years ago and Time Division Multiple
Access (TDMA) taken from telephone networks. In CSMA, a node willing to send
a message checks whether the medium is free and in that case starts transmitting.
Multiple transmitters recover from collisions by resending the message after a
random delay. In TDMA, a master node keeps synchronized all the other nodes
by sending a periodic broadcast message (usually denoted as beacon) thus defining
a periodic time interval named superframe divided into time slots. Each node is only
allowed to transmit in a specific time slot to avoid collisions. CSMA is simple thus
reducing the software size but may lead to non-deterministic delays and waste of
energy to sense the channel. TDMA leads to deterministic periodic transmissions
107
3.2.2.3 Network Layer
It is responsible for routing PDUs in tree and mesh topology thus increasing network
coverage with respect to star topology.
The most common protocol at the Network Layer is the Internet Protocol (IP).
There are two options for IP protocol, i.e., IP Version 4, the traditional one, and
the new IP Version 6 which is spreading over the Internet. The former is not welloptimized for low data rate transmissions, while the latter is very flexible, and one
of its flavors, named 6LoWPAN and described in Sect. 3.3.14, has been specifically
designed for wireless IoT transmissions.
IP provides an unacknowledged connectionless service. Each network interface
has an IP address (32 bits in IPv4 and 128 bits in IPv6) consisting of a network prefix
and a remaining part which is interface-specific. Each PDU contains the source and
destination address for the delivery. All the interfaces on the same physical medium
have the same network prefix thus simplifying the routing process. IP networks are
created by connecting end-nodes (named hosts in IP terminology) to intermediate
systems named routers which handle PDU delivery to the destination interface in
a hop-by-hop way. Figure 3.6 reports the Simplified ISO/OSI Model for two hosts
connected through a router. Layer 4 and 5 PDUs go unchanged through the router
as if it were not present (for this reason, Layer 4 and 5 are grouped under the name
host layer). The router handles the three lowest layers (grouped under the name
media layer). In particular, forwarding decision is performed at Layer 3 according
to routing rules.
IoT applications that use IP protocol are widespread since, in this case, the interoperation with traditional Internet applications is straightforward.
3.2.2.4 Data Link Layer
It deals with the communication on each shared physical medium by identifying the
nodes’ interfaces and regulating the access to the medium. Since the simultaneous
transmission of two or more messages on the same physical medium corrupts all
of them, an arbitration policy should be adopted to share a common medium as
the wireless channel. There are two main approaches, i.e., Carrier Sense Multiple
Access (CSMA) born with Ethernet 40 years ago and Time Division Multiple
Access (TDMA) taken from telephone networks. In CSMA, a node willing to send
a message checks whether the medium is free and in that case starts transmitting.
Multiple transmitters recover from collisions by resending the message after a
random delay. In TDMA, a master node keeps synchronized all the other nodes
by sending a periodic broadcast message (usually denoted as beacon) thus defining
a periodic time interval named superframe divided into time slots. Each node is only
allowed to transmit in a specific time slot to avoid collisions. CSMA is simple thus
reducing the software size but may lead to non-deterministic delays and waste of
energy to sense the channel. TDMA leads to deterministic periodic transmissions
