Network reliability optimization is an optimization problem that focuses on finding an optimal solution for a reliable network design. In network reliability optimization, the goal is to maximize network reliability so that the overall cost of the network is reduced at the same time. The discussion of the reliability of various systems in the field of industry and engineering is of great importance, that's why reliability optimization has received a lot of attention in recent decades. Since this problem is included in the category of NP-Hard problems, the use of soft computing methods will be highly effective in solving it. In this paper, an approach based on the Giza Pyramids Construction (GPC) metaheuristic algorithm is proposed to solve the network reliability problem. For this purpose, two independent single objective functions with constraints are defined, and then the reliability of the network is calculated through optimistic estimation using the upper bound method. In order to compare the performance, 12 types of diverse and complex network models have been generated and the proposed algorithm has been compared with 10 popular and state-of-the-art algorithms. Statistical analysis has been used to find significant differences in the performance of algorithms. Also, a real model of the university network has been generated, investigated, and solved as a case study. The results of experiments, statistical analysis, and observations show that the proposed algorithm has a better performance than other metaheuristic algorithms and the proposed approach in solving reliability is an effective and low-cost approach.