**2. Related work**

### **2.1 Routing protocols in IoT**

To design an efficient protocol in IoT networks is a risky task due to their characteristics. The efficient routing protocol has to respond to the changes that may happen in the topology as same as the bandwidth constraint. Most of the proposed protocols are only sub-optimal. Forster et al. [4] discuss three popular machine

### *An Effective Method for Secure Data Delivery in IoT DOI: http://dx.doi.org/10.5772/intechopen.104663*

learning techniques on the communication layers in the WSNs. These algorithms are used in distributed environments to solve different problems such as ad hoc routing. They are categorized into three groups; reinforcement learning, supervised, and unsupervised. The aim is to find out a convergent mapping function that helps in prophesying the output results for any new input. Routing in IoT environments, as mentioned earlier, is associated with protocols in wireless sensors and ad hoc networks. One existing routing protocol for IoT networks is IP6 overpower personal area networks (6LoWPAN), which are used to route the data among non-IP sensors through networks with high processing capabilities. Its topology consists of a set of reduced function sensors that are linked to full function sensors [5]. It helps to support low cost, different length addresses, low bandwidth, different topologies, energy consumption, and lengthy sleep time. This protocol supports the multi-hop data delivery and reduces transmission overhead by providing header compression enclosing IPv6 long headers in the IEEE802.15.4 small packets [6]. Many of the real-world machine learning algorithms use both supervised and unsupervised learning as hybrid learning or semisupervised learning to take advantage of the strengths of these main categories and minimize their cons [7]. Another standard protocol in IoT is the Routing Protocol for Low-Power and Lossy Networks (RPL) [8], which is a distance-vector protocol based on IPV6 that can prop lots of data-link protocols. It builds a destination-oriented directed acyclic graph (DODAG). It has only one path from each node to the root, and all the communications will be through that root. All nodes advertise themselves as the root by broadcasting a DODAG information object (DIO), and then the DODAG is gradually built. For the cognitive networks, as an extension of RPL, which is the Cognitive RPL Protocol (CORPL) is designed. It uses the DODAG topology generation. Constrained Application Protocol (CoAP) [6] is another IoT protocol that produces a lightweight RESTful (HTTP) interface to reduce overhead and power consumption. The next protocol is the Message Queue Telemetry Transport (MQTT), which was introduced for providing embedded connectivity between the party of middlewares and applications and the party of networks and communications. It is a publish/subscribe design that includes three parts: publishers, which are the sensors that connect to the broker to send their data, subscribers, which are the sensory data or applications, and the broker, which sends the data to the subscribers after classifying them in topics. Secure MQTT (SMQTT) [6] is an extension of MQTT to enhance its security features. It is encryption-based, where each message is encrypted and delivered to multiple nodes, which is common in IoT applications. For supporting a large range of IoT applications, ZigBee smart energy [6] is used. It has a wide star topology, peer-to-peer topology, or cluster-tree network topology. It also allows implementations with low memory and processing power. In addition, the Advanced Message Queuing Protocol (AMQP) [9] is designed for the financial industry. It is a publish/subscribe design built over TCP, but the broker here is divided into two main components: exchange and queues. The exchange receives publisher messages and distributes them to queues based on pre-defined conditions. Moreover, the long-term evolution advanced protocol (LTE-A) [9] is used for IoT applications in wireless networks. LTE-A design has a core network (CN) to control mobile devices, a radio access network (RAN) to establish data planes and control the wireless connections, and mobile nodes.

### **2.2 Intrusion detection systems in IoT**

Because of the lack of training datasets, the current IoT intrusion detection systems are incapable of detecting the latest DoS and DDoS attacks [10], such as Network Time

