Iot Mod3
Iot Mod3
Iot Mod3
IOT
1
SYLLABUS
Unified Data Standards –Protocols –IEEE 802.15.4 -The Physical Layer, The
Media-AccessControl Layer, Uses of 802.15.4 ,The Future of 802.15.4: 802.15.4e
and 02.15.4g–Modbus–ZigBee-Zigbee Architecture- LoRaWAN -Standardization
and Alliances, Physical Layer, MAC Layer, Topology, LTE-M, NB-IoT-Network layer
–The next generation: IP-based protocols -6LoWPAN and RPL, Overview of the
6LoWPAN Adaptation Layer.
2
IOT Protocols
● The methods for gaining access to an IoT system
➔ Wired/ wireless
➔ Cellular - 2G, 3G, LTE etc ➔ Non –Cellular - WIFI, zigbee, LoRA etc
3
4
Common Information Set
➔ Standardization and alliances: The standards bodies that
maintain the protocols for a technology
➔ Physical layer: The wired or wireless methods and relevant
frequencies
➔ MAC layer: Considerations at the Media Access Control (MAC)
layer, which bridges the physical layer with data link control
➔ Topology: The topologies supported by the technology
➔ Security: Security aspects of the technology
5
IEEE 802.15.4
➔ wireless access technology - wireless personal area networks
➔ Easy installation using a compact protocol stack while remaining both simple and
flexible
1) BPSK PHY: This is DSSS (Direct sequence spread spectrum) PHY, employing
binary phase-shift keying (BPSK) modulation. BPSK specifies two unique phase
shifts as its data encoding scheme.
7
8
… Modulation Techniques employed
➔
9
Physical Layer
➔ Modulation Techniques employed
10
IEEE 802.15.4 PHY Format
PHY Header - It lets the receiver know how much total data to
expect
11
MAC Layer
➔ Manages access to the PHY channel by defining how
devices perform multiple access
➔ Scheduling and routing of data frames are coordinated
➔ Network beaconing (continuous transmission of small
packets) for devices acting as coordinators
➔ PAN association and disassociation by a device
➔ Device security
Reliable link communications between two peer MAC entities
12
Types of MAC frames
13
14
MAC Layer
➔ The MAC Header field is composed of the Frame Control,
Sequence Number and the Addressing fields.
➔ The Frame Control field defines attributes such as frame
type, addressing modes, and other control flags.
➔ The Sequence Number field indicates the sequence identifier
for the frame.
➔ The Addressing field specifies the Source and Destination
PAN identifier fields as well as the Source and Destination Address
fields
15
MAC Layer
➔ The MAC Payload field varies by individual frame type.
➔ Beacon frames have specific fields and payloads
related to beacons,
➔ MAC command frames have different fields present.
MAC Footer field is a frame check sequence (FCS) that is used
by the receiving side to confirm the integrity of the data in the
frame
16
MAC layer-Security
17
MAC Layer - Security enabled frame format
18
Topology
➔ Networks can be built as star, peer-to-peer, or mesh topologies
➔ Reduced-function devices (RFDs) are confined to star topology
➔ A minimum of one Full-function devices(FFD) acting as a
PAN coordinator is required to deliver services that allow
other devices to associate and form a cell or PAN.
➔ Path selection within the MAC layer done at Layer 2 and is
known as mesh-under
All the nodes in the same 802.15.4 network should use the same
PAN ID
19
20
➔ The IEEE frequently makes amendments to the core 802.15.4 specification, before
integrating them into the next revision
➔ When it is done, a lowercase letter is appended.
IEEE 802.15.4e
➔ Expands the MAC layer feature for addressing problems related to MAC reliability,
unbounded latency, and multipath fading
➔ To better cope with certain application domains, such as factory and process
automation and smart grid
➔ MAC layer capabilities in the areas of frame format, security, determinism
mechanism, and frequency hopping
➔ In IEEE 802.15.4e amendment is not applicable to the PHY layer, it is pertinent to
the MAC layer
➔ This amendment enhances the MAC layer through various functions, which may be
selectively enabled based on various implementations of the standard. 21
Enhancements to the MAC layer in IEEE 802.15.4e
22
IEEE 802.15.4e
➔ TSCH divides time into fixed time periods, or “time slots,” which offer guaranteed
bandwidth and predictable latency. In a time slot, one packet and its acknowledgement
can be transmitted, increasing network capacity because multiple nodes can
communicate in the same time slot
➔ Information elements (IEs) allow for the exchange of information at the MAC layer in
an extensible manner, either as header IEs (standardized) and/or payload IEs (private)
➔ Enhanced Acknowledgement: It allows for the integration of a frame counter for the
frame being acknowledged. It provides security when Acknowledgement frames are
spoofed
23
IEEE 802.15.4g
➔ The focus of this specification is the smart grid or, more specifically, smart utility
network communication
➔ New PHY definitions are introduced, as well as some MAC modifications needed
to support their implementation
➔ maximum PSDU or payload size of 127 bytes was increased to 2047 bytes
-provides a better match for the greater packet sizes found in many upper-layer
protocols.
➔ Supports multiple data rates in bands ranging from 169 MHz to 2.4 GHz
24
Use real-time information to adjust electricity
flows and ensure better energy efficiency
25
➔ Modulation scheme followed were the following
➔ In IEEE 802.15.4g majority of changes were made only in PHY layer and not MAC
26
IEEE 802.15.4g -Applications
➔ Distribution automation and industrial supervisory control and data acquisition
(SCADA) Public lighting, Environmental wireless sensors in smart cities Electrical
vehicle charging stations, Smart parking meters, Microgrids, Renewable energy
Security
➔Both IEEE 802.15.4g and 802.15.4e inherit their security attributes from the IEEE
802.15.4-2006 specification. The encryption is provided by AES, with a 128-bit key
In addition to the Auxiliary Security Header field initially defined in 802.15.4-2006,
a secure acknowledgement and a secure Enhanced Beacon field complete the MAC
layer security
27
IEEE 802.15.4
28
Modbus
➔ It is an industrial protocol that was developed in 1979 to make communication
possible between automation devices
➔ It was created by the first programmable logic controller (PLC) vendor, Modicon
➔ Typically, the master is a human machine interface (HMI) or Supervisory Control and
Data Acquisition (SCADA) system and the slave is a sensor, programmable logic
controller (PLC), or programmable automation controller (PAC)
29
..
➔ Modbus is transmitted over serial lines between devices. The simplest setup
would be a single serial cable connecting the serial ports on two devices, a Client and
a Server
30
Transmission Modes
➔ Standard Modbus networks employ one of two types of transmission modes:
➔ ASCII Mode, or RTU Mode.
➔ The transmission mode defines the bit contents of the message bytes
transmitted along the network, and how the message information is to be
packed into the message stream and decoded.
➔ The mode of transmission is usually selected along with other serial port
communication parameters (baud rate, parity, etc.) as part of the device
configuration. Some devices may only support one mode or the other.
➔ However, the transmission mode and serial parameters must be the same for all
devices connected to a Modbus network
31
➔ ASCII Mode (American Standard Code for Information Interchange):
➔ In the ASCII Transmission Mode (American Standard Code for Information
Interchange), each character byte in a message is sent as 2 ASCII characters.
◆ This mode allows time intervals of up to a second between characters during transmission
without generating errors.
◆ –It’s most useful when communication is slow.
◆ Two ASCII characters are sent as 8-bit data. A start and stop bit are also sent with each message
creating a total of 10 bits. 7 data bits comprise the message and 1 bit is added for either even or
odd parity. If no parity is used then the extra stop bit is added to maintain a total transmission of
10 bits. It also uses LRC (Longitudinal Redundancy Check) to make sure what we sent is what we
received. 32
➔ RTU mode (Remote Terminal Unit): This mode has the advantage of sending
more data in the same amount of time as in ASCII mode. Each message must be
transmitted as a continuous stream of data, however.
33
ZigBee
● This uses IEEE 802.15.4 at MAC and Physical layer.
● Promoted through the ZigBee Alliance, ZigBee defines upper-layer
components (network to application) as well as application profiles.
● ZigBee solutions are designed for low cost, low bandwidth and low power
wireless IOT networks
● Used in low data rate applications that require long battery life and secure
networking.
● Simpler and less expensive than bluetooth and WIFI.
● Operate in shorter range (10 to 20m for indoor units) and can be extended up
to 500 m using mesh networking.
● Operates at 2.4GHz.
● Data rate upto 250kbps 34
ZigBee Protocol Stack (Architecture)
35
ZigBee Protocol Stack
➔ ZigBee utilizes the IEEE 802.15.4 standard at the lower PHY and MAC layers
➔ ZigBee specifies the network and security layer and application support layer
that sit on top of the lower layers
➔ The network and security layer provides mechanisms for network startup,
configuration, routing, and securing communications.
36
● Zigbee support different network topologies like:
○ Star
○ Peer to peer
○ Cluster tree
● Zigbee can be specified as three different devices
○ Zigbee coordinator
○ Zigbee router
○ Zigbee end device
37
Topologies
used in
zigbee
38
Zigbee devices
Zigbee coordinator
● In a zigbee network it has one coordinator node which can store information.
● This node cn control the complete network, that can communicate ith the
external network.
● This require higher power and hence it is not battery powered.
Zigbee router
39
Zigbee end device(Reduced Functional Device)
40
Advantages
● Easy to install and implement.
● It has low cost , low power and longer battery life.
● It supports many node.
● It is more reliable and self healing.
Disadvantages
42
LoRaWAN-long range wide area network
➔ LoRa (Long Range Radio) was developed by a
French company named Cycleo.
44
LoRaWAN devices
➔ Class A
◆ It has longer battery life
◆ It stays in sleep mode for majority of the time.
◆ It can receive messages(downlink) only if it can send messages(uplink)
◆ Eg: fire alarm, flood detector
➔ Class B
◆ It has average battery life.
◆ It listens to the network periodically
◆ It can receive messages(downlink) even if it has not sent messages
◆ Eg: metering of temperature, humidity.
➔ Class C
◆ It has the lowest battery life
◆ It listens to the network continuously
◆ It has minimum latency for messages
45
◆ Eg: traffic monitoring, real time application
46
LoRaWAN components
➔ Gateways
◆ It operates at the physical layer
◆ One or more getaways receives wireless messages from the end nodes with the
antenna.
◆ It will demodulate the LoRa message(packet).
◆ It will forward the packet to the network server with the use of internet or LAN.
➔ Network server
◆ It is like a router of LoRa WAN protocol
◆ It handles the authentication and the authorization of the devices and the
messages.
◆ It also schedule the downlink messages.
◆ It also communicates with the application server. 47
➔ Application server
◆ It is responsible for the application layer of the protocol.
◆ It receives a message from the network server and decrypts the data.
◆ It encrypts the message and forwards it to the network server fo the
downlink.
➔ Advantages
◆ High density network
◆ Low power consumption
◆ High data rates
◆ Low cost
◆ Low bandwidth extended coverage
◆ High mobility
48
LoRaWAN Layers
49
➔ Physical Layer
The number of chirps per bit is known as spreading factor. In other words, the
duration of chirp is known as spreading factor. This enables LoRa devices to receive
on multiple channels in parallel
50
LoRaWAN 1.0.2 regional specifications describe the use of the main unlicensed
sub-GHz frequency bands of 433 MHz, 779–787 MHz, 863–870 MHz, and
902–928 MHz, as well as regional profiles for a subset of the 902–928 MHz
bandwidth. For example, Australia utilizes 915–928 MHz frequency bands,
while South Korea uses 920–923 MHz and Japan uses 920–928 MHz.
➔ LoRa gateways
53
An important feature of LoRa is its ability to handle various data rates via the
spreading factor. The spreading factor defines the relation between symbol rate and
chirp rate. Chirp rate is the number of bits per second (chirps per second) used in the
spreading signal.
A higher spreading factor increases sensitivity and range, but also prolongs the
airtime of a packet and will likely raise the risk of a collision
Devices with a low spreading factor (SF) achieve less distance in their
communications but transmit at faster speeds, resulting in less airtime. A higher SF
provides slower transmission rates but achieves a higher reliability at longer
distances.
54
For example, at an SF value of 12 for 125 kHz of channel bandwidth, the data rate is
250 bps.
However, when the SF is decreased to a value of 7, the data rate increases to 5470
bps
The effect of increasing the bandwidth is that faster data rates can be achieved for
the same spreading factor.
55
LoRaWAN MAC Layer
➔ This layer takes advantage of the LoRa physical layer and classifies LoRaWAN
endpoints to optimize their battery life and ensure downstream communications to
the LoRaWAN endpoints.
56
➔Class B: This class was designated “experimental” in LoRaWAN 1.0.1 until it can be
better defined. A Class B node or endpoint should get additional receive windows
compared to Class A, but gateways must be synchronized through a beaconing
process
➔Class C: This class is particularly adapted for powered nodes. This classification
enables a node to be continuously listening by keeping its receive window open
when not transmitting
57
58
MAC Layer
LoRaWAN messages, either uplink or downlink, have a PHY payload composed of a
1-byte MAC header, a variable-byte MAC payload, and a MIC that is 4 bytes in
length.
The MAC payload size depends on the frequency band and the data rate, ranging
from 59 to 230 bytes for the 863–870 MHz band and 19 to 250 bytes for the
902–928 MHz band
59
LoRaWAN utilizes six MAC message types
1. join request and join accept messages for over-the-air (OTA) activation and joining
the network
4. Uplink data- messages are sent from endpoints to the network server
6. Multicast
60
LoRaWAN endpoint addressing
➔ A global end device ID or DevEUI represented as an IEEE EUI64 address
By their end device address, known as a DevAddr, a 32-bit address . The 7 most
significant bits are the network identifier (NwkID), which identifies the LoRaWAN
network. The 25 least significant bits are used as the network address (NwkAddr) to
identify the endpoint in the network
61
62
LoRaWAN Topology - star of stars
➔The infrastructure consists of endpoints exchanging packets through gate ways
acting as bridges, with a central LoRaWAN network server.
➔ The application data is contained in upper protocol layers which is not managed
by the LoRa Alliance
➔ These upper layers could just be raw data on top of the LoRaWAN MAC layer, or
the data could be stacked in multiple protocols like MQTT, CoAP etc.
63
➔ LoRaWAN gateways act as bridges that relay between endpoints and the
network servers.
Security
➔ The first is “network security” applied at the MAC layer, guarantees the
authentication of the endpoints.
64
65
Security
➔ Each endpoint implements a network session key (NwkSKey), used by both itself and
the LoRaWAN network server.
➔ It ensures data integrity through computing and checking the MIC (Message
Integrity Check) of every data message as well as encrypting and decrypting MAC-only
data message payloads.
➔ The second layer is an application session key (AppSKey), which performs encryption
and decryption functions between the endpoint and its application server.
Furthermore, it computes and checks the application-level MIC, if included. This
ensures that the LoRaWAN service provider does not have access to the application
payload if it is not allowed that access
➔ Endpoints receive their AES-128 application key (AppKey) from the application
owner 66
67
IoT and Cellular networks- LTE-M (LTE-MTC)
➔ Existing cellular technologies, such as GPRS, Edge, 3G, and 4G/LTE, are not
particularly well adapted to battery-powered devices and small objects specifically
developed for the IoT
➔ IoT requires low throughput, low power consumption, decrease the complexity
and cost of devices
➔ But LTE-M device category was not sufficiently close to LPWA capabilities,
Narrowband IoT (NB-IoT) was proposed
68
Standardization and Alliances
➔ 3rd Generation Partnership Project (3GPP) is the standardization organization
cellular networks
69
LTE-MTC or LTE-M -Long Term Evolution
Machine Type Communication
➔ The first enhancements to better support IoT devices in 3GPP occurred
in LTE Release 12 - A new user equipment (UE) category, Category 0, was
added
➔ It includes important characteristics to be supported by both the
network and end devices
➔ These Cat 0 characteristics include Power saving mode (PSM) and
Half-duplex mode
70
LTE-M-Characteristics of the LTE-M
➔ Lower receiver bandwidth: Bandwidth has been lowered to 1.4 MHz vs
usual 20 MHz. This further simplifies the LTE endpoint.
➔ Lower data rate: Data is around 200 kbps for LTE-M, compared to 1
Mbps for Cat 0
➔ Half-duplex mode: Just as with Cat 0, LTE-M offers a halfduplex mode
that decreases node complexity and cost
➔ Enhanced discontinuous reception (eDRX): This capability increases
from seconds to minutes the amount of time an endpoint can “sleep”
between paging cycles.
71
➔ A paging cycle is a periodic check-in with the network.
➔ This extended “sleep” time between paging cycles extends the
battery lifetime for an endpoint significantly
➔ Low device cost: Most IoT-enabled devices must be small and fit on
equipment that is very cost-sensitive. With many low-cost IoT
systems already available, LTE-M provides the benefits of a cellular
system, but at a significantly lower cost.
72
➔ Long battery life: IoT deployment devices will need to be left unattended for
long periods of time in areas where there is no power supply.Constantly
replacing batteries is expensive, so any device should have a battery life of up to
ten years
➔ Improved coverage: Applications for this network should operate within a vari-
ety of locations, not just where coverage is good. They will need to operate
within buildings, often in locations with restrained access or even underground
(think smart meters)
73
Applications
➔ Smart cities: intelligent public lighting, monitoring environmental conditions,
checking which parking lots are free, etc.
➔ Smart meters: measuring autonomously the consumption of energy, water, or
natural gas using IoT protocols and even in hard-to-reach places where signal
strength is next to nothing.
➔ Automotive and logistics: Fleet control, route optimization to determine the
exact location of the driver or to minimize incidences of losses of goods, etc.
➔ Connected Medicine: Connected sanitary and medical devices.
➔ Personal IoT devices: People and animal trackers, fitness wearables, smart-
watches, etc.
74
NB-IoT
➔ Recognizing that the definition of new LTE device categories was not sufficient to
support LPWA IoT requirement, developed by 3GPP for Wireless cellular network.
It uses low power WAN (LPWAN). Wide area network is created using cellular
network and the device will be functioning at lower power.
It can have battery life for more than 10 years of battery life as it is narrow band
and consume less power.
NB IoT operates in liscensed mobile carries networks.we have GSM channels and
LTE channels
77
Three modes of operation are applicable to
NB-IoT
➔ Standalone: A GSM carrier is used as an NB-IoT carrier, enabling reuse
of 900 MHz or 1800 MHz.
➔ In-band: Part of an LTE carrier frequency band(1920 MHz - 2170 MHz)
is allocated for use as an NB-IoT frequency. The service provider typically
makes this allocation, and IoT devices are configured accordingly
➔ Guard band: An NB-IoT carrier is between the LTE or WCDMA (2100
MHz) bands. This requires coexistence between LTE and NB-IoT bands
78
79
➔ Consolidation occurred with the agreement to specify a single NB-IoT version
based on orthogonal frequency-division multiple access (OFDMA) in the downlink
and a couple options for the uplink
80
81
82
NB IoT uses QPSK digital modulation.
NB IoT comes with sensors actautors antenna chipset etc. so here modules will be
communicating with base station. With the module sensors are there for sensing
physical parameters actuators are there for giving physical response antenna is the
for communication over LTE or GSM carriers. Chipset are integrated with module
83
➔ Mobile service providers consider NB-IoT the target technology as it
allows them to leverage their licensed spectrum to support LPWA use
cases.
➔ For instance, NB-IoT is defined for a 200-kHz-wide channel in both
uplink and downlink, allowing mobile service providers to optimize
their spectrum, with a number of deployment options for GSM,
WCDMA, and LTE spectrum
➔ NB-IoT operates in half-duplex frequency-division duplexing (FDD)
mode with a maximum data rate uplink of 60 kbps and downlink of 30
kbps
84
NB IoT architecture
85
NB IoT applications
Smart Lighting:
Asset management
Smart parking
Water conservation
In 2023 around i billion devices are there that are using NB IoT apllications
86
NB IoT advantages
High density network : cellular network is already a high density network.
Low cost
Low bandwidth
87
➔ In an LTE network, resource blocks are defined with an effective bandwidth of
180 kHz, while on NB-IoT, tone or subcarriers replace the LTE resource blocks.
➔ The uplink channel can be 15 kHz or 3.75 kHz or multi-tone (n*15 kHz, n up to
12).
88
IP Based Protocols
➔ IP has become the important standard in many areas of IoT
Advantages of the IP suite for the Internet of Things
1. Open and standards-based
➔ Users can leverage a large set of devices and functionalities while guaranteeing
interchangeability and interoperability, security, and management - open,
standards-based solutions
➔ The IETF (Internet Engineering Task Force) is an open standards body that
focuses on the development of the Internet Protocol suite and related Internet
technologies and protocols
89
2. Versatile
➔ The layered IP architecture is well equipped to cope with any type of physical and
data link layers
90
➔ All recent operating system releases, from general-purpose computers and servers
to lightweight embedded systems (TinyOS, Contiki, and so on), have an integrated dual
(IPv4 and IPv6) IP stack that gets enhanced over time
➔ IP is the most pervasive protocol considering what is supported across the various
IoT solutions and industry verticals
➔ One of the benefits that comes from 30 years of operational IP networks is the
well-understood network management and security protocols, mechanisms, and
toolsets that are widely available.
93
IP Based Protocols -Adoption or Adaptation of
the Internet Protocol
➔ Two possible models while IP based protocols are used in IoT
➔ Adoption involves replacing all non-IP layers with their IP layer counterparts,
simplifying the deployment model and operations
➔ Eg. ZigBee solution that runs a non-IP stack between devices and a ZigBee
gateway that forwards traffic to an application server
94
Factors to determine which model is best suited
➔ Bidirectional versus unidirectional data flow :Unidirectional devices like a
switch, it is not necessarily worth implementing a full IP stack
- Any node can easily exchange data with any other node. In many IoT solutions, a
device’s data flow is limited to one or two applications (not end to end). In this case,
the adaptation model can work
95
➔ Network diversity
➔ An adaptation layer designed for IoT may include some optimizations to deal
with constrained nodes and networks
99
6LOWPAN
IP V6 over Low Power Wireless Personal Area Network.
Low power wireless area network wil be establishing using IoT devices. Here
communication will be wireless.with the use of Iot devices low power PAN will be
created and it will be communicating over internet using IPv6 in 6LOWPAN.
6LOWPAN is low cost, short range ,low memory usage,low bit rate and comprises of
edge router & sensor nodes.
Using 6LOWPAN the smallest of the IOT device can be part of the network and talk
100
to the outside world.
Architecture
101
Comparison of an IoT Protocol Stack Utilizing 6LoWPAN and
an IP Protocol Stack
102
Functions of the adaptation layer
• Functions of the adaptation layer: 6LoWPAN expresses each capability in a self- contained sub-header: mesh
addressing, fragmentation, and header compression.
103
…
➔ Header Compression
➔ IPv6 packet size is 1280 bytes. However, the maximum MAC frame size defined
by IEEE 802.15.4 is 127 bytes.
➔ Of these 127 bytes, 21 bytes are for the MAC frame header, 1 byte is for the
6LoWPAN header, 40 bytes are for the IPv6 header, 8 bytes are for the UDP
header and 4 bytes are for the Frame Check Sequence. i.e., only 53 bytes are left
for the actual payload. The rest of the space is used by the headers.
➔ Hence, it is necessary to provide efficient header compression (of IPv6 and
UDP), without losing information in order to adapt 1280 bytes of IPv6 MTU
into 127 bytes of 802.15.4 frames
104
➔ 6LowPAN provides a stateless compression of the IPv6 header: all the
information to compress and decompress is contained in the packet. The
sender/receiver does not keep any information.
➔ It is a flow-independent compression, each packet is compressed indepen-
dently from the others.
➔ Various techniques have been suggested to perform compression of the
header so as to create effective space for the payload in 6LoWPAN frame.
HC1 (Header Compression 1) and IPHC (Internet Protocol Header
Compression) are two well-known techniques among them.
105
➔ Both HC1 and IPHC compress 40 bytes of IPv6 header to 2 bytes which
indicates the way the IPv6 header is compressed and from where its
values can be recovered.
➔ In the process of compression, the header fields whose values could be
derived again at some other layer is elided from the main header.
➔ When the compressed header along with the frame reaches the
destination, the elided header fields are derived by the adaptation layer.
These fields are mainly derived from the link layer header which is carried
in an 802.15.4 frame.
106
➔ At the top , a 6LoWPAN frame without any header compression is
presented: The full 40-byte IPv6 header and the 8-byte UDP header
are visible. The 6LoWPAN header is only a single byte in this case. It is
clear that the uncompressed IPv6 and UDP headers leave only 53 bytes
of data payload out of the 127-byte maximum frame size in the case of
IEEE 802.15.4.
➔ The bottom half of Fig. 15 shows a frame where header compression has
been enabled for a best-case scenario. The 6LoWPAN header increases to
2 bytes to accommodate the compressed IPv6 header, and UDP has been
reduced in half, to 4 bytes from 8. Most importantly, the header
compression has allowed the payload to more than double, from 53 bytes
to 108 bytes, which is obviously much more efficient.
107
108
Optimizing IP for IoT- Fragmentation
➔ The maximum transmission unit (MTU) for an IPv6 network must be at least 1280
bytes
➔ 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
109
➔ Datagram Size, Datagram Tag, and Datagram Offset
110
Fragmentation
➔ The 1-byte Datagram Size field specifies the total size of the unfragmented
payload.
➔ Datagram Offset field delineates how far into a payload a particular fragment
occurs
➔ Fragmentation header field itself uses a unique bit value to identify that the
subsequent fields behind it are fragment fields as opposed to another capability,
such as header compression
111
Optimizing IP for IoT: Mesh Addressing
➔ The purpose of the 6LoWPAN mesh addressing function is to forward packets
over multiple hops.
➔ Three fields are defined for this header: Hop Limit, Source Address, and
Destination Address
➔ Three fields are defined for this header: Hop Limit- provides an upper limit on
how many times the frame can be forwarded - Each hop decrements this value by 1
as it is forwarded. Once the value hits 0, it is dropped and no longer forwarded
112
➔ The purpose of the 6LoWPAN mesh addressing function is to forward pack-
ets over multiple hops.
➔ The hop limit provides an upper limit on how many times the frame can be
forwarded. Each hop decrements this value by 1 as it is forwarded. Once the
value hits 0, it is dropped and no longer forwarded.
➔ The Source Address and Destination Address fields are IEEE 802.15.4 ad-
dresses indicating the endpoints of an IP hop.
➔ In 6LoWPAN, the adaptation layer is also responsible for routing the frag-
mented packets (mesh-under routing).
➔ If a packet is fragmented by the adaptation layer then the mesh addressing
header is sent along with every fragment. The router may route the fragments
of the same packet through different routes. When all fragments reach the
destination node, then they are reassembled by the adaptation layer present
there. If any of the fragments belonging to a packet is missing, then all
fragments are to be retransmitted.
113
RPL - Routing Protocol for Low Power and
Lossy Networks
➔ It is a new distance-vector routing protocol for IPv6 for use by IP smart objects
➔ In an RPL network, each node acts as a router and becomes part of a mesh
network.
➔ Each node examines every received IPv6 packet and determines the next-hop
destination based on the information contained in the IPv6 header.
1. Storing mode: All nodes contain the full routing table of the RPL domain.
Every node knows how to directly reach every other node
2. Non-storing mode: Only the border router(s) of the RPL domain contain(s)
the full routing table. All other nodes in the domain only maintain their list of
parents and use this as a list of default routes toward the border router. This
abbreviated routing table saves memory space and CPU
115
Non-storing mode:
Here a node always forwards its packets to the border router, which knows how to
ultimately reach the final destination
➔ RPL is based on the concept of a directed acyclic graph (DAG). A DAG is a directed
graph where no cycles exist.
➔ This means that from any vertex or point in the graph, you cannot follow an edge
or a line back to this same point.
➔ All of the edges are arranged in paths oriented toward and terminating at one or
more root nodes
116
A Directed Acyclic Graph (DAG)
117
Routing Process
➔ A basic RPL process involves building a destination-oriented directed acyclic graph
(DODAG).
➔ DAG has multiple roots, whereas the DODAG has just one
➔ In RPL, this destination occurs at a border router known as the DODAG root
➔ In a DODAG, each node maintains up to three parents that provide a path to the root
➔ Typically, one of these parents is the preferred parent, which means it is the preferred
next hop for upward routes toward the root
➔ The routing graph created by the set of DODAG parents across all nodes defines the
full set of upward routes.
118
…
➔ RPL protocol implementation should ensure that routes are loop free by disallowing
nodes from selected DODAG parents that are positioned further away from the border
router
➔ Upward routes in RPL are discovered and configured using DAG Information Object
(DIO) messages.
➔ Nodes listen to DIOs to handle changes in the topology that can affect routing
. ➔ The information in DIO messages determines parents and the best path to the
DODAG root
➔ Nodes establish downward routes by advertising their parent set toward the
DODAG root using a Destination Advertisement Object (DAO) message.
➔ DAO messages allow nodes to inform their parents of their presence and
reachability to descendants
119
➔ In the case of the non-storing mode of RPL, nodes sending DAO messages report
their parent sets directly to the DODAG root (border router), and only the root
stores the routing information.
➔ The root uses the information to then determine source routes needed for
delivering IPv6 datagrams to individual nodes downstream in the mesh
➔ For storing mode, each node keeps track of the routing information that is
advertised in the DAO messages.
➔ While this is more power- and CPU-intensive for each node, the benefit is that
packets can take shorter paths between destinations in the mesh.
➔ The nodes can make their own routing decisions; in non-storing mode, on the
other hand, all packets must go up to the root to get a route for moving downstream
120
121
122
RPL - terminology
➔ An objective function (OF) defines how metrics are used to select routes and
establish a node’s rank
➔ The rank is a rough approximation of how “close” a node is to the root and helps
avoid routing loops and the count-to-infinity problem.
➔ Nodes can only increase their rank when receiving a DIO message with a larger
version number.
➔ However, nodes may decrease their rank whenever they have established
lower-cost routes
123
RPL Metrics
➔ Expected Transmission Count (ETX): Assigns a discrete value to the number of
transmissions a node expects to make to deliver a packet
➔ Hop Count: Tracks the number of nodes traversed in a path. Typically, a path with
a lower hop count is chosen over a path with a higher hop count.
➔ Latency: Varies depending on power conservation. Paths with a lower latency are
preferred
➔ Link Quality Level: Measures the reliability of a link by taking into account packet
error rates caused by factors such as signal attenuation and interference.
➔ Node Energy: Avoids nodes with low power, so a battery powered node that is
running out of energy can be avoided and the life of that node and the network can
be prolonged.
➔ Throughput: Provides the amount of throughput for a node link. Often, nodes
conserving power use lower throughput. This metric allows the prioritization of
paths with higher throughput
125