Sewer networks as one of the most important urban infrastructures plays an important role in daily life. The lack of efficient design of a sewer network in urban areas, cause threats to public health and Environments. However, High costs associated with constructing wastewater networks is the main limitation in expanding them. Trying to find more economical solution has led researchers to use different optimization methods. Design of sewer networks mainly consist of two parts. Specify the layout of network and design elements for a specific layout. Designing an desirable network needs the simultaneous consideration of these two parts. Layout optimization is finding out the optimal tree among all trees in the base layout that its diameters and slopes are optimized. Optimal design of sewer networks aims to minimize construction and maintenance costs while ensuring good system performance under hydraulic and construction constraints. In this study, the particle swarm optimization algorithm (PSO) with Ability to “fly-back” mechanism along with harmony search is used (HPSO). Using “fly-back” mechanism prevents variables from leaving the specified scope of them. The algorithm uses a harmony search to deal with constraints.The Efficiency of this algorithm with the proper choice of convergence parameters has been shown by presenting examples of sewer networks and comparing the objective function values obtained from other optimization methods. Furthermore Hybrid of HPSO with dynamic programming has introduced an effective method for simultaneous optimization of layout and sewer network components. This method can be also used to optimize the components of large scale networks. The results of both algorithms were evaluated for Clardasht sewer network as a case study. In order to evaluate the performance of the proposed model, the network was solved by dynamic programming as a precise method. The results of the objective function for HPSO and hybrid algorithms were reported smaller than the DP method. Average and standard deviation of the objective function values with respect to the exact value obtained from the DP was determined. Average objective function value obtained from Hybrid algorithm was closer to the DP results than HPSO. Also standard deviation of objective function values in hybrid algorithm was reported less than HPSO which represents the hybrid algorithm is more stable than HPSO. Keywords : Sewer networks, optimization, PSO, Dynamic programming