IoT Protocols
IoT Protocols
• Link layer protocols determine how the data is physically sent over the network’s physical
layer or medium (e.g., copper wire, coaxial cable, or a radio wave).
• The scope of the link layer is the local network connection to which host is attached.
• Hosts on the same link exchange data packets over the link layer using link layer protocols.
• Link layer determines how the packets are coded and signaled by the hardware device over
the medium to which the host is attached (such as a coaxial cable).
IoT Protocols
802.3. Ethernet:
IEEE 802.3 is a collection of wired Ethernet
standards for the link layer.
For Example,
• 802.3 is the standard for 10BASE5 Ethernet that uses coaxial cable as a shared medium.
• 802.3.i is the standard for 10BASE-T Ethernet over copper twisted-pair connections.
• 802.3.j is the standard for 10BASE-F Ethernet over fiber optic connections etc.
These standards provide data rates from 10Mb/s to 40Gb/s and higher.
802.11- WiFi:
IEEE802.11 is a collection of wireless local area network (WLAN) communication standards.
For Example:
• 802.11a operates in the 5GHz band
• 802.11b and 802.11g operate in the 2.4GHz band
• 802.11n operates in the 2.4/5GHz bands
• 802.11ad operates in the 60GHz band
• 802.16m provides data rates of 100Mbit/s for mobile stations and 1 Gbit/s for fixed stations.
802.15.4 – LR-WPAN:
IEEE 802.15.4 is a collection of standards for low-
rate wireless personal area networks (LR-WPANs)
These standards form the basis of specifications for high level communications for high level communication
protocols such as ZigBee.
These standards provide low-cost and low-speed communication for power constrained devices.
2G/3G/4G- Mobile communication:
• There are different generations or mobile communication standards including 2nd (2G
including GSM and CDMA), 3rd (3G- including UMTS and CDMA2000) and 4th – including
LTE).
• IoT devices based on these standards can communicate over cellular networks.
• Data rates for these standards range from 9.6 Kb/s (for 2G) to upto 100 Mb/s (for 4G).
Network Layer
• Standard: RFC6282
• Frequency: Used over a variety of other networking media including
Bluetooth Smart (2.4GHz) or ZigBee or low-power RF (sub-1GHz)
• Range: NA
• Data Rates: NA
IP version 4 (IPv4)
• This addressing class is generally used in networks having large number of host
devices.
• The first bit of the first octet is always set to 0, so, the first octet can have a
decimal value in range from 1 to 127.
• The value of 127 for first octet in class A address remains reserved for loopback
IP address or localhost, so values only from 1 to 126 remains available.
• With this addressing scheme, maximum 126 networks and maximum 16777214
host devices in each network can be uniquely identified.
• In class B IPv4 address, first two octet are used to identify network and
last two octet are used to identify host device.
• The first two bits in first octet of Class B address is always set to 10, so
the network address can range from 128.0.X.X to 191.255.X.X.
• The first three bits in first octet of Class C address is always set to 110, so its
value can range from 192 to 223.
• With this addressing scheme, maximum 2097152 networks and maximum 254
host devices in each network can be uniquely identified.
• Suppose, a class C IPv4 address be 192.168.8.1 and a subnet mask be
255.255.255.0.
• So, in the IP address 192.168.8.1, 192.168.8.0 will be the network address and
000.000.000.1 will be the host address.
• This address space has already exhausted and is not scalable to accommodate
the billions of IOT devices.
• So, IPv6 has been introduced to expand address space for the IOT.
IP version 6 (IPv6)
• With 128-bit addresses, IPv6 can be used to identify 340 trillion trillion trillion (38X1038)
devices which is roughly 667 sextillion (667X1021) devices per square meter on earth.
• This is more than enough for the farthest future of the IOT.
Transport Layer
• The transport layer protocols provide end-to-end message transfer capability independent of the
underlaying network.
• The message transfer capability can be set up on connections, either using handshakes (as in TCP)
or without handshakes/ acknowledgements (as in UDP).
• The transport layer provides functions such as error control, segmentation, flow control and
congestion control.
TCP (Transmission Control Protocol)
• TCP is most widely used transport layer protocol, that is used by web browsers (along HTTP, HTTPS
application layer protocols), email programs(SMTP application layer protocol) and the file transfer protocol
(FTP).
• TCP is a connection oriented and stateful protocol.
• While IP protocol deals with sending packets, TCP ensures reliable transmission of packets in-order.
• TCP also provides error detection capability so that duplicate packets can be discarded and lost packets are
retransmitted.
• The flow control capability of TCP ensures that rate at which the sender sends the data is not too high for the
receiver to process.
• The congestion control capability of TCP helps in avoiding network congestion and connection collapse which
can lead to degradation of network performance.
UDP (User Datagram Protocol)
• Unlike TCP, which requires carrying out an initial setup procedure, UDP is a connectionless protocol.
• UDP is useful for time-sensitive applications that have very small data units to exchange and do not
want the overhead of connection setup.
• UDP does not provide guaranteed delivery, ordering of messages and duplicate elimination.
• Higher level of protocols can ensure reliable delivery or ensuring connections created are reliable.
Application Layer
• Application layer protocols define how the applications interface with the lower layer protocols to
send the data over the network.
• The application data, typically in files, is encoded by the application layer protocol and
encapsulated in the transport layer protocol which provides connection addressing (for example
port 80 for HTTP, port 22 for SSH, etc.).
• HTTP includes commands such as GET, PUT, POST, DELETE, HEAD, TRACE, OPTIONS etc.
• The protocol follows a request-response model where a client sends requests to a server using the HTTP
commands.
• HTTP is the stateless protocol and each HTTP request is independent of the other requests.
• An HTTP client can be a browser or an application running on the client (e.g ., an application running on an
IoT device, a mobile applicationor other software).
• HTTP protocol uses Universal Resource Identifiers (URIs) to identify HTTP resources.
CoAP (Constrained Application Protocol)
• CoAP is an application layer protocol for machine-to-machine (M2M) applications,
meant for constrained environments with constrained devices and constrained networks.
• Like HTTP, CoAP is a web transfer protocol and uses a request-response model, however it runs
on top of UDP instead of TCP.
• CoAP uses a client-server architecture where clients communicate with servers using
connectionless datagrams.
• Like HTTP, CoAP supports methods such as GET,PUT, POST, and DELETE.
WebSocket
• WebSocket protocols allows full-duplex communication over a single
socket connection for sending messages between client and server.
• MQTT uses a client server architecture where the client (such as an IoT device)
connects to the server (also called MQTT Broker) and publishes messages to
topics on the server.
• MQTT is well suited for constrained environments where the devices have
limited processing and memory resources and the network bandwidth is low.
XMPP (Extensible Messaging and Presence
Protocol)
• XMPP is a protocol for real-time communication and streaming XML data between
network entities.
• XMPP powers wide range of applications including messaging, presence, data syndication,
gaming, multi-party chat and voice/video calls.
• XMPP allows sending small chunks of XML data from one network entity to another in
near real-time.
• DDS uses a publish- subscribe model where publishers (e.g. devices that generate data) create topic
to which subscribers (e.g. devices that wat to consume data) can subscribe.
• Publisher is an object responsible for data distribution and the subscriber is responsible for receiving
published data.
• AMPQ supports both point-to-point and publisher/subscriber models, routing and queuing.
• AMQP brokers receive messages from publishers (e.g., devices or applications that generate data).
• Publishers publish the messages to exchanges which then distribute message copies to queues.
• Messages are either delivered by the broker to the consumers which have subscribed to the queues
or the consumers can pull the messages from the queue.