A methodology is proposed for the production optimization of oil reservoirs constrained by gathering systems. Because of differences in scale and simulation tools, production optimization involving oil reservoirs and gathering networks typically adopts standalone models for each domain. Although some reservoir simulators allow the modeling of inflow-control devices (ICDs) and deviated wells, the handling of gathering-network constraints is still limited. The disregard of such constraints might render unfeasible operational plans with respect to the gathering facilities, precluding their application in real-world fields. We propose using multiple shooting (MS) to handle the output constraints from the gathering network in a scalable way. MS allowed the handling of multiple output constraints because it splits the prediction horizon into several smaller intervals, enabling the use of decomposition and parallelization techniques. The novelty of this work lies in the coupling of reservoir and network models, and in the exploitation of the problem structure to cope with multiple network constraints. An explicit coupling of reservoir and network models is used to avoid the extra burden of converging the equations of the integrated system at every timestep. Instead, the inconsistencies between reservoir and network flows and pressures are modeled as constraints in the optimization formulation. Hence, all constraints regarding both reservoir and network equations are consistent at the convergence of the algorithm. The integrated-production-optimization problem is solved with a reduced sequential quadratic programming (SQP) (RSQP) algorithm, which is an efficient gradient-based optimization method. The MS ability to handle such constraints is assessed by a simulation analysis performed in a two-phase black-oil reservoir producing to a gathering network equipped with electrical submersible pumps (ESPs). The results showed that the method is suitable to handle complex and numerous network constraints. Because of the nonconvex nature of the control-optimization problem, a heuristic procedure was developed to obtain a feasible initial solution for the integrated-production system. Further, a case study compared long-term optimization with short-term practices, where the latter yielded a lower net present value (NPV), arguably because it could not anticipate early water-front arrivals.