## 1 Introduction  
From a luxury to a necessity, the internet has revolutionized communication and has been a keen interest in industries and academic research. With the world nowadays at the end of our fingertips, the intellectualization of machines, vehicles, homes, factories, and embedded systems, in parallel with the Internet of Things (IoT), has simplified and enhanced the control of routine tasks [1; 2; 3]. The IoT act as a sophisticated multidisciplinary channel that carries an immense weight of information. Large amounts of data are transmitted and received daily to carry out orders and to provide information. Nevertheless, the current telecommunication technologies could not cope with the exponential insistence of the emerging digital era. Higher data throughput, lower latency, and less device energy consumption are needed to cater to the augmenting demand of the internet, which complies with the Fifth Generation (5G) network [4; 5; 6]. The 5G network provides a more robust, dexterous system and a more reliable technology for data transmission. Despite all the offered advantages, the 5 Gnetwork has limited network coverage, which is one of the main concerns before deploying the network infrastructure. The 5G network infrastructure is using a millimeter-wave frequency range that does not travel far, which jeopardizes the consistency of the network coverage [7; 8; 9]. Although the 5G network carries a higher data rate, it has a smaller coverage profile. To propagate the waves in densely populated areas such as in a megalopolis, more subsidiary repeaters will be needed to conserve stable data speeds. Thus, to efficiently deploy a 5G network, a more extensive network of antenna and base stations infrastructure is required to provide stable coverage and signal. The expenses incurred in building the antenna network and base stations is not likely cost-effective. Furthermore, for the remote and sub-urban areas, it is not practical and convenient for the network infrastructure to be set-up. In the case of natural disaster, total connectivity is removed for the survivors due to damage to the base station's infrastructure; hence, it is impractical for the cellular base station to be constructed during a short time frame. In these situations, Device-to-Device (D2D) communications technology offered the best solution to increase signal proximity [10; 11]. As the name implies, in D2D communications technology, numerous devices are connected with each other to create an ad-hoc wireless network. D2D communications technology opens up a new avenue that overrides the orthodox way of the cellular network (that all the communications must go through the base stations) by offering an option to work with an absence of cellular network infrastructure [12; 13; 14]. The main features of D2D communications technology are shown in Figure 1.  
The D2D communications technology is one of the key components of 5G network infrastructure, developed by the researchers to enhance the data transmission efficiency [15; 16]. With D2D technology, the devices can communicate with each other, with or without the core network, and alleviates the amount of data being sent to the base stations. By reusing cellular resources, D2D technology offered a prominent advantage that can boost spectral efficiency, fairness, delay, and network throughput performances [17; 18]. Despite its notable advantages, several key challenges have been identified by the researchers to deploy reliable D2D communications technology in 5G network infrastructure,  
Figure 1: Features of the Device-to-Device (D2D) communication technology. including resource management, selection of transmission band, and routing path [19]. An example of a D2D communications scenario in 5G IoT networks is depicted in Figure 2.  
However, this paper focuses on the routing path selection to facilitate an optimal route for the efficient transmission of data packets.