Chapter 03 IoT Networking
Chapter 03 IoT Networking
Chapter 3
IoT NETWORKING
1
1/6/2025
2
1/6/2025
IoT Networking
3
1/6/2025
4
1/6/2025
◼ Consist of :
◼ LoRaWAN
◼ Sigfox
◼ Weightless
◼ RPMA
◼ Others
◼LPWAN
REQUIREMENTS
5
1/6/2025
OSI model
6
1/6/2025
7
1/6/2025
IoT Protocols
Protocol Stacks
8
1/6/2025
IoT Protocols
9
1/6/2025
10
1/6/2025
Connectivity Terminologies
11
1/6/2025
12
1/6/2025
Multihoming
◼ Multihoming is the practice of connecting a host or a computer network to more than one
network. This can be done in order to increase reliability or performance or to reduce
cost. There are several different ways to perform multihoming.
◼ Host multihoming
A single host may be connected to multiple networks. For example, a mobile phone
might be simultaneously connected to a WiFi network and a 3G network, and a desktop
computer might be connected to both a home network and a VPN. A multihomed host
usually is assigned multiple addresses, one per connected network.
◼ Classical multihoming
In classical multihoming a network is connected to multiple providers, and uses its own
range of addresses (typically from a Provider Independent (PI) range). The network's
edge routers communicate with the providers using a dynamic routing protocol, typically
BGP, which announces the network's address range to all providers. If one of the links
fails, the dynamic routing protocol recognizes the failure within seconds or minutes, and
reconfigures its routing tables to use the remaining links, transparently to the hosts.
13
1/6/2025
14
1/6/2025
It uses UDP which is faster due to smaller It uses TCP which is connection
Transport layer header size compare to TCP. It is lighter oriented and slower compare to
protocol compare to TCP UDP.
It uses DTLS (Datagram Transport Layer It uses TLS/SSL protocols for the
Security layer
Security) protocol for security. same.
It uses 6LoWPAN to convert large IPv6
packets into small size packets to be carried It does not require protocols like
on wireless medium as per bluetooth, zigbee 6LoWPAN. Fragmentation and
Internet layer
etc. standards. It does fragmentation and reassembly is taken care by
reassembly. It also does header compression transport layer (i.e. TCP) itself
to reduce packet size
It will have MAC layer as per IoT wireless
technology used viz. bluetooth, zigbee, It will have MAC layer as per
Datalink or MAC layer zwave etc. It takes care of medium access LAN or WLAN or DSL or ISDN
control and resource allocation and technologies
management
It will have physical layer (baseband) as per
IoT wireless technologies viz. bluetooth, It will have PHY layer as per
Physical layer and Radio Frequency (RF)
zigbee, zwave etc. It uses frequencies as per LAN or WLAN or DSL or ISDN
layer
cellular or indoor wireless technologies and technologies
country wide allocations for the same
◼ IPv4:
◼ IP version four addresses are 32-bit integers which will be expressed in dotted
decimal notation. Example- 192.0.2.126 could be an IPv4 address.
◼ Characteristics of IPv4
◼ IPv4 could be a 32-Bit IP Address.
◼ IPv4 could be a numeric address, and its bits are separated by a dot.
◼ The number of header fields is twelve and the length of the header field is twenty.
◼ It has Unicast, broadcast, and multicast style of addresses.
◼ IPv4 supports VLSM (Virtual Length Subnet Mask).
◼ IPv4 uses the Post Address Resolution Protocol to map to the MAC address.
◼ RIP may be a routing protocol supported by the routed daemon.
◼ Networks ought to be designed either manually or with DHCP.
◼ Packet fragmentation permits from routers and causing hos
15
1/6/2025
◼ IPv6
Internet Protocol version 6 (IPv6) is also known as Internet Protocol
next generation (IPng). It also accommodates more feature to meet the
global requirement of growing Internet.
◼ To allocate a sufficient number of network address, IPv6 allows 128 bits of
IP address separated into 8 sections of 2 bytes each. Unlike IPv4 where the
address is represented as dotted-decimal notation, IPv6 uses hexadecimal
numbers and colon (“:”) is used as a delimiter between the sections.
Example: IPv6 address may be like this:
FA20:B120: 6230:0000:0000: CE12:0006: ABDF
16
1/6/2025
17
1/6/2025
Request/Response model
18
1/6/2025
19
1/6/2025
20
1/6/2025
21
1/6/2025
22
1/6/2025
◼ MQTT
◼ It is a publish‐subscribe‐based lightweight messaging protocol for use in conjunction
with the TCP/IP protocol.
◼ Designed to provide connectivity (mostly embedded) between applications and
middle‐wares on one side and networks and communications on the other side.
◼ A message broker controls the publish‐subscribe messaging pattern.
◼ A topic to which a client is subscribed is updated in the form of messages and
distributed by the message broker.
◼ Designed for: Remote connections, Limited bandwidth, Small‐code footprint.
23
1/6/2025
◼ MQTT Components
◼ Publishers: Lightweight sensors
◼ Subscribers: Applications interested in sensor data
◼ Brokers: Connect publishers and subscribers and Classify sensor data into topics
Communication:
24
1/6/2025
◼ Applications
◼ Facebook Messenger uses MQTT for online chat.
◼ Amazon Web Services use Amazon IoT with MQTT.
◼ Microsoft Azure IoT Hub uses MQTT as its main protocol for telemetry messages.
◼ The EVRYTHNG IoT platform uses MQTT as an M2M protocol for millions of
connected products.
◼ Adafruit launched a free MQTT cloud service for IoT experimenters called Adafruit
IO.
25
1/6/2025
◼ SMQTT
◼ Secure MQTT is an extension of MQTT which uses encryption based on lightweight
attribute-based encryption.
◼ The main advantage of using such encryption is the broadcast encryption feature, in
which one message is encrypted and delivered to multiple other nodes, which is quite
common in IoT applications.
◼ In general, the algorithm consists of four main stages: setup, encryption, publish and
decryption.
26
1/6/2025
◼ CoAP Features
◼ Web RESTful protocol fulfilling M2M requirements in constrained environments
◼ Simple request/response HTTP mapping, to access CoAP resources via HTTP
◼ URI and Content-type support (a sensor is identified by an URI)
◼ Low header overhead and parsing complexity
◼ Security binding to Datagram Transport Layer Security (DTLS)
◼ UDP binding with optional reliability, supporting unicast and multicast
◼ Asynchronous message exchanges
◼ Services and resources discovery
◼ Also publish/subscribe (and push notifications)
◼ Simple caching (max-age parameter)
◼ CoAP implementations in many programming language, e.g., C, C++, and Java
◼ CoAP Messaging
◼ Duplicate detection and optional reliability
◼ Possible messages:
◼ confirmable message (CON), wait for ACK
◼ acknowledgement message (ACK), in response to CON
◼ non-confirmable message (NON), no need to wait for ACK
◼ CoAP on top of UDP allows for multicast requests
27
1/6/2025
◼ Publish/Subscribe model
◼ Publish/subscribe (pub/sub) pattern alternative to traditional clientserver
model, where a client communicates directly with an endpoint
◼ Roles:
◼ publisher: a client sending a message
◼ subscriber: one or more receivers waiting for the message
◼ broker: a central component receiving and distributing messages to interested
receivers
28
1/6/2025
29
1/6/2025
◼ Publish/Subscribe: Decoupling
◼ Space decoupling: publisher and subscriber do not need to know each
other (by ip address and port for example)
◼ Time decoupling: publisher and subscriber do not need to run at the
same time
◼ Synchronization decoupling: operations on both components are not
halted during publish or receiving
◼ Event system as logically centralized system
◼ anonymous communication
◼ possibility to use filters (on headers or entire messages)
◼ basic primitives: subscribe, unsubscribe, publish
◼ CoAP
◼ CoAP – Constrained Application Protocol.
◼ Web transfer protocol for use with constrained nodes and networks.
◼ Designed for Machine to Machine (M2M) applications such as smart energy and
building automation and Based on Request‐Response model between end‐points
◼ Client‐Server interaction is asynchronous over a datagram-oriented transport protocol
such as UDP
◼ The Constrained Application Protocol (CoAP) is a session layer protocol designed by
IETF Constrained RESTful Environment (CoRE) working group to provide
lightweight RESTful (HTTP) interface
30
1/6/2025
31
1/6/2025
32
1/6/2025
◼ XMPP
◼ XMPP – Extensible Messaging and Presence Protocol.
◼ A communication protocol for message‐oriented middleware based on XML
(Extensible Markup Language).
◼ Real‐time exchange of structured data.
◼ It is an open standard protocol
◼ XMPP uses a client‐server architecture.
◼ As the model is decentralized, no central server is required.
◼ XMPP provides for the discovery of services residing locally or across a network, and the
availability information of these services
◼ Well‐suited for cloud computing where virtual machines, networks, and firewalls
would otherwise present obstacles to alternative service discovery and presence‐ based
solutions.
◼ Open means to support machine‐to‐machine or peer‐to‐peer communications across a diverse
set of networks.
◼ Applications:
◼ Publish‐subscribe systems.
◼ Signaling for VoIP.
◼ Video.
◼ File transfer.
◼ Gaming.
◼ Internet of Things applications: Smart grid and Social networking
33
1/6/2025
◼ Richer semantic than MQTT, e.g., supports topics and queues, but
also heavier, e.g., the broker is much more complex
◼ AMQP implementations, e.g., Apache Qpid, focus on providing
several features: queuing, message distribution, security, management,
clustering, federation, heterogeneous multi-platform support
◼ most of them (possibly) not essential in the IoT scenario
◼ Originally developed at JPMorgan Chase in London, AMQP was
designed as a message-oriented protocol for the integration of enterprise IT
components (Enterprise Message Bus)
34
1/6/2025
◼ AMQP
◼ Advanced Message Queuing Protocol.
◼ Open standard for passing business messages between applications or organizations.
◼ Connects between systems and business processes.
◼ It is a binary application layer protocol.
◼ Basic unit of data is a frame
35
1/6/2025
◼ Components
◼ Exchange:
◼ Part of Broker.
◼ Receives messages and routes them to Queues.
◼ Queue:
◼ Separate queues for separate business processes.
◼ Consumers receive messages from queues.
◼ Bindings:
◼ Rules for distributing messages (who can access what message, destination of the
message)
36
1/6/2025
◼ AMQP Features
◼ Targeted QoS (Selectively offering QoS to links).
◼ Persistence (Message delivery guarantees).
◼ Delivery of messages to multiple consumers.
◼ Possibility of ensuring multiple consumption.
◼ Possibility of preventing multiple consumption.
◼ High speed protocol.
◼ Applications
◼ Monitoring and global update sharing.
◼ Connecting different systems and processes to talk to each other.
◼ Allowing servers to respond to immediate requests quickly and delegate time
consuming tasks for later processing.
◼ Distributing a message to multiple recipients for consumption.
◼ Enabling offline clients to fetch data at a later time.
◼ Introducing fully asynchronous functionality for systems.
◼ Increasing reliability and uptime of application deployments.
37