## 1 Introduction  
The nodes of the Mobile Ad-hoc Network (MANET) are the group of self-organized mobile nodes that are deployed randomly without predefined models. These mobile nodes follow adhoc modelling for data communication in the absence of a router or any centralized devices. MANETs are widely applied for observing terrestrial abnormalities such as earthquakes, forest disasters and other natural disasters. Generally, MANETs are deployed with a vast amount of adhoc nodes to cover a wide range of geographical areas to detect notable natural objects. In this case, the Internet of Things (IoT) is considered a decentralized MANET environment. IoT base is required to take MANET observations into the internet domain, or any processing node (cloud system) deployed outside the local network domain. In the same manner, WSN is a type of network that contains resource-limited sensor nodes with a homogeneous type of internal components. In this work, WSN has mostly energy-limited sensor nodes than MANET nodes. In addition, sensor nodes deployed under the WSN environment need a gateway node to reach the outer network. The combination of MANET and WSN under an IoT environment creates heterogeneous network characteristics. Under this environment, energy optimization and routing protocol optimization are challenging tasks. This work takes this challenging research problem to be solved. The MANET topology changes dynamically between multiple nodes, [PERSON] et al. [1] and [PERSON] et al. [2]. The routing protocols are providing a route from source to destination. At the same time, various types of routing attacks in the network are reducing the performance of the network and minimizing the rate of transferred packets from sender to receiver, [PERSON] et al. [3]. This kind of problem can be solved using the trust route method. Initially, available routes are identified using the route discovery process. Finally, the best and trusted route is selected from the available routes with the support of optimization techniques. WSN nodes are spatially dispersed and linked to the wireless medium, [PERSON], [PERSON] et al. [4]. The sensors collect data from the physical environment and transmit the data to a centralised location, [PERSON] et al. [5]. The nodes of the IoT environment can collect, control and monitor environmental data such as weather, forecast, object detection, gas leakage, etc. In an IoT environment, the collected information is stored and processed in the cloud system. The MANET carries more data than the WSN, but the WSN consists of more sensors than the MANET, [PERSON], [PERSON] et al. [6] and [PERSON] et al. [7]. The number of WSN sensor nodes is static and sensor nodes consume less energy than a MANET node. In contrast, node mobility is higher in MANET than in WSN. The MANET provides better power utilization and increases network lifetime through various energy-saving routing algorithms. The MANET is a special network, it utilizes less amount of energy with good scalability. In a MANET, the energy-saving mode increases the lifetime of each node's energy level and controls energy utilization by the appropriate selection of the energy-saving algorithm. The MANET connects the nodes to the Internet through the gateway node. The gateway node acts as a connector to connect the MANET node to the Internet. The source MANET node is connected directly to the gateway node, or connected to the gateway node with the support of the adjacent node. The gateway node connects the different networks by MANET routing protocol and DNS server. In this paper, the destination node gathers all of the sensor nodes' details, like protocol address, position and mobility rate (meters/second) in MANET. Here, IoT communication is established by WSN, MANET and the Internet. Consequently, this kind of network is represented as a heterogeneous network. The source sensor nodes detect the physical information and transfer the data to destinations through a multi-hop fashion. The clustering method is used to form the MANET.