The Internet of things (IOT) will utilize the existing networking infrastructure, technologies and protocols currently used in homes/offices and on the Internet, and will introduce many more.
The purpose of this tutorial is to give you a quick overview of what networking and application protocols are likely to be used to build the IOT.
Note: You should have a understanding of basic Networking and Networking technologies before you continue.
The IOT will run over the existing TCP/IP network.
The existing TCP/IP networking model uses a 4 layer model with protocols def ined at each level. See understanding the TCP/IP 4 layer model.
The diagram below shows a side by side comparison of the Internet protocols currently in use and those that are likely to be used for the IOT.
1. I have used larger font sizes to depict the protocol popularity. For example IPv4 is larger on the left as it is far more popular on the current Internet. However on the right it is smaller as IPv6 is expected to be more popular in the IOT.
2. Not all protocols are shown.
3. The areas that are showing the greatest activity are the datalink (levels 1and 2) and application layer (level 4).
4. The network and transport layers are likely to remain unaltered.
Data Link Level Protocols
At this layer you will have a requirement to connect devices that are nearby e.g. on Local networks, and that are more distant e.g. Metropolitan and wide area networks.
Current computer networks use Ethernet and Wi-Fi at this level for home/office networking (LANs) and 3G/4G for Mobile connections (WANs).
However many IOT devices, like sensors, will be low powered (battery only).
Ethernet isn’t suitable for these applications but low powered W-fi and low powered Bluetooth are.
Although existing wireless technologies (Wi-Fi, Bluetooth,3G/4G) will be used to connect these devices, other newer wireless technology, especially designed for IOT applications, will also need to be considered, and will likely grow in importance.
Among these are:
- BLE– Blue tooth Low Energy
- LoRaWAN –
These are covered in more detail in An overview of IOT wireless technologies
Networking Level or Layer
The protocol that is set to dominate at the networking level in the long term is IPv6.
It is very unlikely that IPv4 will be used, but it may play a role in the initial stages.
For example, most Home IOT devices e.g smart lights currently use IPv4.
Transport Level or Layer
At the transport level TCP has dominated the Internet and the web. It is used by HTTP and many other popular Internet protocols (SMTP, POP3, IMAP4 etc).
MQTT which I expect to be one of the dominant messaging application protocols currently using TCP and is already deployed.
However because of the requirement for low protocol overhead I would expect UDP to feature much more in the future IOTs.
MQTT-SN –which runs over UDP is likely to see more widespread use in the future.
See TCP vs UDP for more details
Application Level and Messaging Protocols
HTTP is probably the best known protocol at this level as it it the protocol that powers the Web (WWW).
HTTP is also going to be important to the Internet of things as it is used for REST APIs which are becoming the main mechanism for Web Applications and services to communicate.
However because of the high protocol overhead HTTP is not likely to be a major IOT protocol, but will still enjoy widespread usage on the Internet. See MQTT vs HTTP for IOT.
Application Layer Messaging Protocols
What is a messaging protocol ?– A message protocol defines the rules, formats and functions for transferring messages between the components of a messaging system. –PC Magazine Encyclopedia
IMO Machine to Machine (M2M) Messaging will probably become the Email of the IOT world.
Common IOT Messaging Protocols
There are several messaging protocols currently in use. Many where designed and developed before the IOTs became a buzzword.
However some messaging protocols e.g. COAP have been developed for the IOTs.
Which of these protocols will dominate is unsure, but because of the very many different requirements of Internet connected devices there will be more than one.
Important Characteristics for IOT Protocols
- Speed – Amount of data that can be transferred/second
- Latency – amount of time a message takes to be transferred
- Power consumption
- Availability of software stacks.
- MQTT– (Message Queuing Telemetry Transport) Uses TCP/IP. Publish subscribe model (P/S)requires a message broker (switch). See an Introduction to MQTT for beginners
- AMQP -( Advanced Message Queuing Protocol) Uses TCP/IP. Publish subscribe model and Point to Point .
- COAP-(Constrained Application Protocol) -Uses UDP designed specifically for IOT uses request response model like HTTP. RFC 7252
- DDS– (Data Distribution Service) –
This article covers the main protocols and their main uses.
The conclusion of this articles seems to be that the IOT will consist of a collection of protocols depending on their intended use.
However if you look back to the early days of the Internet HTTP was just one of many protocols, but it has become the dominant one.
Even though HTPP wasn’t designed for file transfer it is used for file transfer. It wasn’t designed for email either, but it is used for email.
IMO IOT messaging protocols will follow a similar pattern with most of the services using 1 dominant protocol.
Below are the Google trend charts showing how the popularity of MQTT, COAP and AMQP has changed over the last few years.
Google Trends Overview
For 2017 the interest in MQTT has remained extremely high.
For 2017 the interest in AMQP has remained high.
For 2017 the interest in COAP has declined
The areas that are showing the greatest activity are the datalink (levels 1and 2) and application layer (level 4).
The network and transport layers are likely to remain unaltered.
At the Application level messaging protocols will be used for Interconnecting IOT components.
Although we are still in the early stages of IOT adoption it is likely that the Industry will consolidate around 1 or possibly 2 messaging protocols.
Over the last few years MQTT has emerged as the most popular, and is the one I’m currently focusing on on this site.
- IOT and Messaging
- What’s the Right Messaging Standard for the IoT?
- real-time protocols IOT
- Slideshare overview of main IOT messaging Protocols Good comparison of MQTT and DDS
- Comparison of Modbus and MQTT IOT protocols
- MQTT,MQTT-SN and COAP