###### Abstract  
Efficient clustering and routing is a main challenge in a wireless sensor network (WSN). To achieve better quality-of-service (QoS) performance, this work introduces k-medoids with improved artificial-bee-colony (K-IABC)-based energy-efficient clustering and the cross-layer-based Harris-hawks-optimization-algorithm (CL-HHO) routing protocol for WSN. To overcome the power-asymmetry problem in wireless sensor networks, a cross-layer-based optimal-routing solution is proposed. The goal of cross-layer routing algorithms is to decrease network-transmission delay and power consumption. This algorithm which was used to evaluate and select the effective path route and data transfer was implemented using MATLAB, and the results were compared to some existing techniques. The proposed CL-HHO performs well in packet-loss ratio (PLR), throughput, end-to-end delay (E2E), jitter, network lifetime (NLT) and buffer occupancy. These results are then validated by comparing them to traditional routing strategies such as hierarchical energy-efficient data gathering (HEED), energy-efficient-clustering routing protocol (EECRP), Grey wolf optimization (GWO), and cross-layer-based Ant-Lion optimization (CL-ALO). Compared to the HEED, EECRP, GWO, and CL-ALO algorithms, the proposed CL-HHO outperforms them. cluster head (CH); routing; artificial bee colony; cross layer; Harris hawks optimizer +
Footnote †: journal: Accepted: 2 February 2023  
sensors need more resources, WSNs are challenging to secure. A dependence on network technology also leaves a wide range of security threats and assaults open. Two contentious limitations on sensor networks will vanish as processing technology develops: restricted processor bandwidth and small memory. In order to make the proper observations and decisions, sensor data must frequently be delivered within strict deadlines. Results have yet to be found so far that satisfy the real-time demands of WSNs. Various kinds of research work have been carried out to improve the above problem in WSN. But the primary concern of WSN is the power consumption of SN and QoS performance. To resolve the above problem, efficient clustering and routing has been proposed in this work. The primary goal of WSN is to collect data from the environment, but, due to resource constraints, data collected by sensor nodes for BS will necessitate another efficient solution. Most network parameters are additive, since the optimization will also be NP-hard. Local optima exist in metaheuristic algorithms, which can be solved using hybrid techniques related to CH selection [5; 6]. The sensor nodes must be powered by batteries, which are frequently difficult to replace. Furthermore, latency, energy usage and network coverage are critical in maintaining QoS performance. As a result, the implementation of efficient QoS solutions must consider the challenging factors of energy conservation within the network. However, significant research must be carried out to address the limitations that exist in this region. The most difficult challenge of a WSN operation is energy conservation. Energy consumption is essential in WSNs because extending a WSN's lifetime increases its productivity. Nodes are outfitted with limited batteries. Because it reports network performance degradation, network lifetime is an important attribute. When a node dies, the next node also dies. As a result, an urgent problem to be solved is how to improve network lifetime and save node power in WSN. However, energy conservation is a significant challenge for WSNs because the sustained capacity of WSNs is primarily determined by the lifetime of SNs. Because batteries power SNs, their lifespan is entirely dependent on their power source, which cannot be replaced. Over time, the SN's ability to detect the relevant area and transmit data to the BS depletes. As a result, the only way to achieve long WSN life is to conserve battery power. Obtaining these facts, this study proposes several algorithms to solve these problems [7; 8].