In this paper, centralized and distributed multiregion perimeter flow control approaches are proposed for congestion avoidance in urban networks. First, multi-region network dynamics are modeled with Macroscopic Fundamental Diagrams (MFDs) and necessary stability conditions are derived using Lyapunov stability theory for a centralized perimeter controller. Later, an optimization problem is formulated, solved and the desired optimal states are reached by means of an algorithm based on Model Predictive Control (MPC). Finally, the paper combines the centralized controller for perimeter control as a first layer controller and a distributed controller managing the inter-transfers between regions, thus optimizing the overall state of the network. Simulations show that the distributed control scheme leads to good results maximizing the output of the traffic network, similar to the MPC controller.