Things notes IV: Things networks and protocols

Things notes IV: Things networks and protocols

1. Overview

Communication is extremely important things. Network technology enables IoT devices can not only communicate with other devices, but also to communicate with the applications and services running in the cloud. Internet rely on a standardized protocol to ensure secure communication between various devices. Standard specifies a protocol used to establish and manage network devices, and networks between these rules and the format of transmitted data.

We generally considered network is constructed by the stack technology, the bottom stack technology (such as Bluetooth low energy) associated with the physical connection devices, and the stack closer to the art (such as the IPv6) addressing and logical network traffic routing devices related. Technical top of the stack (e.g., message queuing technique) is used by an application running on top of these layers.

In this article, I will introduce some widely used IoT network technologies and standards. Which will also explain how you will choose the network protocol. Then I will discuss the key associated with the IoT network considerations and challenges, including the transmission distance, bandwidth, power usage, intermittent connectivity, interoperability and security.

2. Web standards and technologies

Open Systems Interconnection (OSI) model is an ISO (International Organization for Standardization) standard abstract model, which describes a protocol stack comprising 7 layers. The layers from top to bottom is: the application layer, presentation layer, session layer, transport layer, network layer, data link layer and physical layer. TCP / IP or Internet protocol suite supports Internet, provides the OSI model layers simplified embodied.

FIG. 1. OSI and TCP / IP Network Model

 

TCP / IP model comprising only the layer 4, and a number of combined layers of the OSI model (see Figure 1):

( 1) the network access and physical layer

The TCP / IP layer and the second layer comprises a first 2 OSI's. Physical (PHY) layer (layer 1 OSI) is responsible for how each device is physically connected to the network by hardware, for example by cable, wire or the like in the wifi network via a wireless radio (IEEE 802.11 a / b / g / n) is connected. At the link layer (OSI Layer 2), the device identified by the MAC address, the protocol layer is responsible for the physical addressing this, such as how to switch frame to devices on the network.

( 2) Internet layer

This layer corresponds to layer 3 (network layer) of the OSI, it is related to a logical address. This layer defines the protocol on the packet transfer between the source and the destination host IP address of the router how identified. IoT device addressing usually IPv6.

( 3) Transport Layer

Transport layer ( layer 4 OSI in) focused on end communications, characteristics include reliability, to avoid congestion and to ensure that the packet delivery to be transmitted in the same order. For performance reasons, IoT transmission often uses UDP (User Datagram Protocol).

( 4) Application Layer

Application layer ( Layer 7 of the OSI 5,6) is responsible for the messaging application level. HTTP / S is an example of the application layer protocol widely used on the Internet.

Although TCP IP and the OSI model provides a useful abstraction of network protocols for discussion /, as well as the achievement of specific techniques of each agreement, but in fact, some of these agreements can not be properly classified as hierarchical models. For example, network traffic using encryption to ensure privacy and data integrity of the Transport Layer Security (TLS) protocol, may be considered across the OSI layers 4, 5 and 6 operate.

3. IoT network protocol

IoT are widely used and can be included in some network protocol TCP / IP layer, as shown in FIG.

FIG 2. with the TCP / IP network protocol corresponding to the model IoT

 

IoT sector is adopted by many emerging and competitive network technology. Many technologies provided by different suppliers or for different vertical markets, such as home automation, healthcare or industrial IoT, they typically provide an alternative to achieve the same standard protocol. For example, the IEEE 802.15.4  describes a low-rate wireless personal area network (LR-WPAN) works, and implemented by a variety of competing technologies, including ZigBee, Z-Wave, EnOcean, SNAP and 6LoWPAN.

For example, technology for Internet connection (such as Ethernet) can generally be used in IoT; however, new technologies are being developed to specifically address the challenges of IoT. Consider the protocol stack toward the direction of the physical transmission technology, the more specific challenges and IoT IoT device context.

Structure of the network is referred to as the network topology. The most common IoT used in network topology is a star and mesh topologies. In a star topology, each IoT device with a central hub (Gateway) is directly connected, the data is transferred from an upstream hub device is connected. In a mesh topology, as well as other devices connected to the network node and transmission distance within the device, these devices may act as a simple sensor node, the sensor node can act as a traffic route, or act as a gateway node. Mesh network is more complex than the star topology of the network, but the advantage is more resilient to failure, because they do not rely on a single central gateway.

3.1 the network access layer and the physical layer IoT network topology

You need to know the protocol stack near the bottom IoT network technologies including cellular technology, wifi and Ethernet, as well as more specialized solutions, such LPWAN, Bluetooth low energy (BLE), ZigBee, NFC and RFID.

1)LPWAN

( Low-Power Wide Area Network ) technology category is a specially designed for low power consumption, long distance wireless communication and design, so they are very suitable for use in low-power wireless sensors and other large-scale deployment of IoT device. LPWAN techniques include LoRa (LongRange physical layer protocol), Haystack, SigFox, LTE- M and NB-IoT (narrowband IoT).

( 2) cellular technology

LPWAN  NB-the IoT  and  LTE-M  standard is designed to use existing cellular networks to provide low-power, IoT selected communication cost. NB-IoT these standards is the latest standard, focusing on long-distance communication between a large number of mainly indoors equipment. LTE-M and NB-IoT IoT is designed for the development of long distance wireless communication but also frequently employed prior art honeycomb. These techniques include 2G (GSM), mainly used in legacy equipment, the technology is now being phased out, CDMA, 3G and 4G is true.

( 3) Bluetooth low energy (BLE)

BLE  is a low-power version of the popular 2.4 GHz wireless Bluetooth communication protocol. It is designed for short distances (up to 100 meters) communication and design, usually in a star configuration, the control device has a plurality of main auxiliary equipment. Bluetooth cross OSI model Layer 1 (a PHY) and layer 2 (MAC) operate as shown in FIG. BLE most suitable burst transfer small amounts of data to the device, because these devices are designed to be dormant when no data is transmitted, to conserve power. Wearable health and fitness tracker and other personal IoT devices are often used BLE.

4)ZigBee

ZigBee  is also run 2.4GHz wireless communication spectrum, but its transmission distance of up to 100 meters longer than the BLE. Compared with BLE (270 kbps), its data transfer rate is slightly lower (up to 250 kbps). ZigBee is a mesh network protocol, different from the BLE, not all devices can not sleep during the data burst transfer, depending on their position in the grid serving as the grid and whether a router or controller . ZigBee-built for building and home automation applications, such as lighting control. Another closely related ZigBee technology is Z-Wave, which is also based on IEEE 802.15.4 MAC. Z-Wave is designed specifically for home automation, it used to be a special technique, only recently as a public domain specification release .

5)NFC

Near Field Communication (NFC)  protocol for communication (up to 4 cm) very short distance, such as a hand-held near the reader NFC card or tag. NFC payment systems are often used, but its attendance systems and industrial IoT applications for intellectual asset tracking labels are also useful.

6)RFID

RFID  represents a radio frequency identification. RFID tags and store data identifier, and attach them to the RFID reader reads the device for reference. A typical RFID transmission distance is less than 1 meter. RFID tags may use active, passive or passive secondary form. Passive tags are not suitable for battery-powered devices, since the ID read by the reader passively. Active tags periodically broadcasts its ID, rather assisted passive tag when the RFID reader appears becomes active. Dash7  is a communication protocol that uses active RFID IoT designed for use in industrial applications designed to perform a secure long distance communications. A typical use case like NFC, RFID tracking stock of retail and industrial applications IoT.

7)Wifi

Wifi  is based on the IEEE 802.11a / b / g / n specification standard wireless networking technology. 802.11n offers the highest data throughput, but at the expense of high power consumption, so for energy reasons, the device may only use the IoT 802.11b or g. Although many prototypes and the latest generation of IoT devices are using wifi, but with the long-range and low-power solutions become more prevalent, wifi could be replaced by these low-power alternatives.

( 8) Ethernet

Ethernet uses the IEEE 802.3 standard, the LAN are widely deployed to establish a wired connection. Not all IoT devices must be compact design wireless devices. For example, the sensor device is installed in a building automation system may be a wired network using Ethernet technology such. Power Line Communication (PLC) is hard-wired to an alternative solution, which uses a special place of the conventional wire cable.

3.2 Internet layer IoT network topology

Internet layer technology ( the OSI layer 3) is responsible for identifying and routing packets. This layer and associated with the technique commonly employed include IPv6,6LoWPAN IoT and RPL.

Internet layer technology ( the OSI layer 3) is responsible for identifying and routing packets. This layer and associated with the technique commonly employed include IPv6,6LoWPAN IoT and RPL.

IPv6

In the Internet layer, the device identifies the IP address. IPv6 IoT applications typically used, rather than the traditional IPv4 addressing. Is defined as a 32-bit IPv4 address, it can only provide about a total of 4.3 billion addresses, which is less than the number of current IoT networked devices, while IPv6 uses 128-bit addresses, it is possible to provide addresses 2128 (approximately 3.4 × 1038 or 340 x 10 x 10 Yi Yi Yi x 10 x 10 billion addresses). In fact, not all IoT devices require public address. In the next few years is expected to connect to the tens of billions of IoT devices, many devices will be deployed in private networks, these networks will use private address ranges, but only to other devices or services on the gateway and external networks for outbound communication .

6LoWPAN

IPv6 low power Wireless Personal Area Network (6LoWPAN)  standard 802.15.4 wireless network allows the use IPv6.6LoWPAN often used in wireless sensor networks, home automation and apparatus for  Thread  protocol is also running on 6LoWPAN.

RPL

Internet layer is also responsible for routing. Low-power and lossy IPv6 network routing protocol (the RPL)  designed in low power networks (such 6LoWPAN implemented on a network) of the road designed for IPv6 traffic. Package RPL (pronounced "ripple") was designed for routing data packets in a restricted network, such as wireless sensor networks, these networks, not all devices are always up, and there is a high or unpredictable loss the amount. RPL can be based on dynamic indicators and constraints (such as the lowest energy or delay) in the network nodes in the graph constructed so as to calculate the best path.

3.3 application layer IoT network topology

HTTP and HTTPS everywhere in Internet applications, as well as in IoT, the IoT is widely deployed RESTful HTTP and HTTPS interfaces. CoAP (limited application protocol) as a lightweight HTTP, often in conjunction with the use of UDP-based 6LoWPAN. MQTT, AMQP XMPP and other message protocol often used in applications IoT:

( 1) MQTT

Message Queue Telemetry Transport (the MQTT)  is based publish / subscribe messaging protocol, designed for use in low bandwidth design, particularly suitable for mobile devices and sensors on an unreliable network.

2)AMQP

Advanced Message Queuing Protocol (the AMQP)  is an open standard message-oriented middleware message protocol used. Obviously, AMQP by the  RabbitMQ  design.

3)XMPP

Extensible Messaging and Presence Protocol (XMPP)  originally between human beings, including real-time communications, including instant messaging and design. This agreement has been adjusted for inter-machine (M2M) communication, in order to achieve a lightweight middleware and routing XML data. XMPP mainly for wisdom appliances.

This choice will depend on the technical level specific application requirements IoT project. For example, for economical home automation system involving multiple sensors, MQTT is a good choice, because it is ideally suited for message functions on without much storage or processing capacity of equipment, and implementation of the protocol is simple and lightweight.

4. IoT network considerations and challenges

In consideration when using IoT applications which network technology, be sure to pay attention to the following limitations:

transmission distance

Bandwidth

Power

Intermittent Connectivity

Interoperability

Security

4.1 transmission distance

May be attached to the network through a network will be described IoT typical data transmission from the device:

( . 1) the PAN (personal area network)

PAN is a short-range network, wherein the distance in meters to measure, such as wearable fitness tracking application communication device via the BLE phone.

( 2) the LAN (Local Area Network)

LAN is a short to medium distance network, wherein the longest distance of several hundred meters, such as home automation or installed in the factory production line sensors that communicate with the gateway through the wifi equipment installed in the same buildings.

( . 3) MAN (Metropolitan Area Network)

MAN is a long distance (city-level) network, wherein a distance up to several kilometers, the smart parking sensors throughout the city such as through the mesh connected network topology.

( 4) WAN (wide area network)

WAN is a long-distance network, wherein a distance up to several kilometers, such as installing a sensor for monitoring agricultural microclimate conditions over the entire farm large farms.

Your network should be designed, from obtaining data IoT devices, and the data used in these devices. So make sure you select the transmission distance of a network protocol required for your use case matches. For example, it should not be required WAN applications run across a few kilometers from the choice of BLE. If there are challenges within a desired distance transmission of data, it may be considered edge computation, it can transfer data to the analysis device, rather than transfer the data for processing elsewhere.

4.2 Bandwidth

Bandwidth, or the amount of data can be transmitted in a particular time period, from limits the data collection device and transferred to IoT upstream rate. Consider the following factors:

The amount of data generated for each device

The number of devices deployed in the network

An endless stream of data is transmitted or intermittently transmitted burst, because of the need to use the available bandwidth to deal with peak periods

Network protocol packet size you choose should match the size of the normal transmission of data. Sending null data to fill a packet is an inefficient operation, but on the other hand, larger blocks of data to be split into many packets will produce overhead. Data transfer rates are not always symmetrical (that is, upload rate may be lower than download speed). Thus, if there is bidirectional communication between devices, data transmission need to be considered. Wireless and cellular networks typically have lower bandwidth, it is necessary to consider the volume of data application selection appropriateness wireless technology.

In addition, consider whether all the original data to be transmitted. One solution might be to discard the unimportant data by decreasing the sampling frequency, less variable capture, or perform some filtering on the device, to capture less data. If the polymerization is carried out before transmitting its data, it helps reduce the amount of data to be transmitted, but this will affect the flexibility of the process and upstream of the particle size analysis. Polymerizable and not always appropriate burst transmission time-sensitive or delay-sensitive data. All of these technologies will increase the data processing and storage needs of IoT devices.

4.3 Power

Transmitting data from the device consumes power, long-distance transmission of data requires more power than a short distance. It must be considered running on battery device to conserve power, thereby extending battery life and reducing operating costs. To prolong battery life, you can be allowed in the idle into sleep mode. A good idea that the equipment and the energy consumption at different loads and different network conditions modeled, the power supply to ensure the storage capacity and the necessary equipment required for data transmission using a particular network technology power match.

4.4 Intermittent Connectivity

IoT devices are not always connected. In some cases, the device is designed to be connected periodically to save power or bandwidth. Sometimes, however, may cause unreliable network equipment due to connection problems and dropped calls. Sometimes the quality of service issues, such as dealing with interference on a wireless network or shared spectrum channel contention.

4.5 Interoperability

There are so many different devices connected to the IoT, interoperability may be a challenge. Using a standard protocol is the traditional method of maintaining interoperability on the Internet. However, for the IoT, the standardization process is sometimes difficult to keep up with the rapid pace of change, and publishing technology is based on the standard version is imminent, and these criteria may still change. In these cases, consider the ecosystem around these technologies; that is, ask the following questions: whether they be widely adopted? They are open or private? How many implementations are available?

4.6 Security

Safety is always a priority matter, so be sure to select the network from end to end security technologies, including authentication, encryption and protection of open ports. For example, a safe model contains IEEE 802.15.4 provides a number of security features, including access control, message integrity, message confidentiality, and replay protection, these features are achieved by a standard based on this technology (such as ZigBee).

( 1) Authentication

The use of security protocols to support device-level gateways, users, applications and services authentication. For example, consider the X.509 standard to perform device authentication.

( 2) encryption

If wifi, it may be performed using a wireless network encryption WPA2 (Wireless Protected Access 2, the radio access protection 2nd generation), or may be employed PPSK (Private Pre-Shared Key, the pre-shared private key) method. To ensure privacy and data integrity between communicating applications, be sure to use a DTLS based TLS or the TLS (Datagram Transport Layer Security), but adjusted for running on unreliable UDP connection. TLS encrypts the application data and ensure its integrity.

( 3) Port Protection

Port Protection to ensure that only the gateway ports required for upstream applications or services to external communications is to keep the connection open. All other ports should be disabled or protected by a firewall. For example, Universal Plug and Play time (UPnP) are exploited device port may be disclosed, it should be disabled on the UPnP router.

5. Conclusion

Select used IoT network technology throughout the process involves a compromise to consider. Network technology you choose will affect the design of IoT devices, and most of the considerations I have discussed in this article are interdependent. For example, network transmission distance, data rate and power are directly related. If the increase in the amount or rate of data transmission distance and network transmission, IoT apparatus almost certainly need additional power to transmit data under these conditions.

For basic home automation project, supply standards may be considered less important, because the device is likely to be directly powered by a wall outlet. Bandwidth limitations and loss of connection with a higher priority, so you can use wifi, because it provides a reasonable bandwidth, but also makes the project more easily built using commodity hardware. However, wifi not optimized for low-power devices, so for battery-powered devices, the selection may not be a good choice.

In this article, I outlined some of the most commonly used network protocols and technologies of IoT. You need to consider your needs IoT network in accordance with these challenges, to find the technology that best suits your IoT applications

Guess you like

Origin www.cnblogs.com/3echo/p/11612979.html