The exponential growth of various applications requires deploying an ever-growing number of network services. A generalized service deployment framework for Open Shortest Path First (OSPF) networks is proposed in this paper. The framework includes placing programmable routers, distributing different types of services on these routers, and leading traffic flow through them according to the predetermined sequence order requirement. However, it is not possible to direct all the traffic flows through the required service nodes along the shortest path with a single and suitable set of link weights. To address the issue, multiple topology routing (MTR) technique is incorporated to have various logical topologies with multiple sets of link weights. Correspondingly, the problem of jointly optimizing Placement of programmable routers, Distribution of different types of services among these routers, and Link Weights setting based on MTR (shortened to PD-LW-MTR) and its mixed integer linear programming formulation are presented in this paper. A novel decomposition algorithm is also proposed to address this problem efficiently. Experiment results validate the correctness and feasibility of our algorithm. It is also shown that the optimization algorithm can obtain near-optimal solution and just only a few logical topologies over multiple sets of link weights are necessary for traffic flows to guarantee service order requirements. KEYWORDS link weight setting, multiple topology routing (MTR), placement and distribution (PD), service deployment, service order requirement Int J Commun Syst. 2019;32:e3978.wileyonlinelibrary.com/journal/dac