IOT Unit-3
IOT Unit-3
The Internet of Things will largely be built on the Internet Protocol suite. However, challenges
still exist for IP in IoT solutions. In addition to coping with the integration of non-IP devices,
you may need to deal with the limits at the device and network levels that IoT often imposes.
Therefore, optimizations are needed at various layers of the IP stack to handle the restrictions
that are present in IoT networks.
Constrained Nodes
Power consumption is a key characteristic of constrained nodes. IoT constrained nodes can be
classified as follows:
Devices that are very constrained in resources, may communicate infrequently to transmit a few
bytes, and may have limited security and management capabilities: This drives the need for the
IP adaptation model, where nodes communicate through gateways and proxies.
Devices with enough power and capacities to implement a stripped-down IP stack or non-IP
stack: In this case, you may implement either an optimized IP stack and directly communicate
with application servers (adoption model) or go for an IP or non-IP stack and communicate
through gateways and proxies (adaptation model).
Devices that are similar to generic PCs in terms of computing and power resources but have
constrained networking capacities, such as bandwidth: These nodes usually implement a full
IP stack (adoption model), but network design and application behaviours must cope with the
bandwidth constraints.
Constrained Networks
Constrained networks have unique characteristics and requirements. In contrast with typical
IP networks, where highly stable and fast links are available, constrained networks are limited
by low-power, low-bandwidth links (wireless and wired). They operate between a few kbps and
a few hundred kbps and may utilize a star, mesh, or combined network topologies, ensuring
proper operations.
IP Versions
A variety of factors dictate whether IPv4, IPv6, or both can be used in an IoT solution. Most
often these factors include a legacy protocol or technology that supports only IPv4. Newer
technologies and protocols almost always support both IP versions. The following are some of
the main factors applicable to IPv4 and IPv6 support in an IoT solution:
Application Protocol: IoT devices implementing Ethernet or Wi-Fi interfaces can communicate
over both IPv4 and IPv6, but the application protocol may dictate the choice of the IP version.
Cellular Provider and Technology: IoT devices with cellular modems are dependent on the
generation of the cellular technology as well as the data services offered by the provider. For
the first three generations of data services GPRS, Edge and 3G, IPv4 is the base protocol
version. Consequently, if IPv6 is used with these generations, it must be tunnelled over IPv4.
On 4G/LTE networks, data services can use IPv4 or IPv6 as a base protocol, depending on the
provider.
Serial Communications: Many legacy devices in certain industries, such as manufacturing and
utilities, communicate through serial lines. Data is transferred using either proprietary or
standards-based protocols. Encapsulation of serial protocols over IP leverages mechanisms
such as raw socket TCP or UDP. While raw socket sessions can run over both IPv4 and IPv6,
current implementations are mostly available for IPv4 only.
IPv6 Adaptation Layer: IPv6-only adaptation layers for some physical and data link layers for
recently standardized IoT protocols support only IPv6. While the most common physical and
data link layers stipulate adaptation layers for both versions, newer technologies, such as
IEEE 802.15.4, IEEE 1901.2, and ITU G.9903 (Narrowband Power Line Communications) only
have an IPv6 adaptation layer specified.
While the Internet Protocol is key for a successful Internet of Things, constrained nodes and
constrained networks mandate optimization at various layers and on multiple protocols of the IP
architecture. Figure highlights the TCP/IP layers where optimization is applied.
Header Compression
6LoWPAN header compression is stateless, and conceptually it is not too complicated. However,
a number of factors affect the amount of compression, such as implementation of RFC 4944
versus RFC 6922, whether UDP is included, and various IPv6 addressing scenarios. It is beyond
the scope of this book to cover every use case and how the header fields change for each.
However, this chapter provides an example that shows the impact of 6LoWPAN header
compression.
At a high level, 6LoWPAN works by taking advantage of shared information known by all nodes
from their participation in the local network. In addition, it omits some standard header fields by
assuming commonly used values. Figure 5-
4 highlights an example that shows the
amount of reduction that is possible with
6LoWPAN header compression.
Fragmentation
The maximum transmission unit (MTU)
for an IPv6 network must be at least
1280 bytes. The term MTU defines the
size of the largest protocol data unit
that can be passed. For IEEE 802.15.4,
127 bytes is the MTU. You can see that
this is a problem because IPv6, with a
much larger MTU, is carried inside the
802.15.4 frame with a much smaller
one. To remedy this situation, large
IPv6 packets must be fragmented
across multiple 802.15.4 frames at
Layer 2.
The fragment header utilized by 6LoWPAN is composed of three primary fields: Datagram Size,
Datagram Tag, and Datagram Offset. The 1-byte Datagram Size field specifies the total size of the
unfragmented payload. Datagram Tag identifies the set of fragments for a payload. Finally, the
Datagram Offset field delineates how far into a payload a particular fragment occurs. Figure
provides an overview of a 6LoWPAN fragmentation header.