The IoT applications implement the Routing protocol for low-power and lossy networks, RPLs in the routing layer. The RPL protocol connects IoT devices through multi-hop paths to the root node, responsible for collecting and distributing the sensed data. The RPL accounts for Objective Functions (OFs) to construct the Destination Oriented Directed Acyclic Graph (DODAG) to the root node. The OF optimizes the route to the destination in the perspective of communication reliability, energy conservation, or security. The lifetime of IoT devices mainly depends on the selection of the OFs. The OF accounts for the metrics of Packet Delivery Ratio (PDR), the Expected Transmission Count (ETX), remaining energy, and security-related metrics by separately or combinable to select the best parent towards the root. By default, the RPL has no security mechanism, so it is a vulnerable protocol to several types of attacks. The security pitfalls in RPL enforce the attackers to disrupt the communication and make the RPL invaluable in IoT smart applications. It is imperative to design reliable and secure OFs for RPL for IoT networks.