  Migration of planetary systems caused by the action of dissipative forces may
lead the planets to be trapped in a resonance. In this work we study the
conditions and the dynamics of such resonant trapping. Particularly, we are
interested in finding out whether resonant capture ends up in a long-term
stable planetary configuration. For two planet systems we associate the
evolution of migration with the existence of families of periodic orbits in the
phase space of the three-body problem. The family of circular periodic orbits
exhibits a gap at the 2:1 resonance and an instability and bifurcation at the
3:1 resonance. These properties explain the high probability of 2:1 and 3:1
resonant capture at low eccentricities. Furthermore, we study the resonant
capture of three-planet systems. We show that such a resonant capture is
possible and can occur under particular conditions. Then, from the migration
path of the system, stable three-planet configurations, either symmetric or
asymmetric, can be determined.
