  We study the positive recurrence of multi-dimensional birth-and-death
processes describing the evolution of a large class of stochastic systems, a
typical example being the randomly varying number of flow-level transfers in a
telecommunication wire-line or wireless network.
  We first provide a generic method to construct a Lyapunov function when the
drift can be extended to a smooth function on $\mathbb R^N$, using an
associated deterministic dynamical system. This approach gives an elementary
proof of ergodicity without needing to establish the convergence of the scaled
version of the process towards a fluid limit and then proving that the
stability of the fluid limit implies the stability of the process. We also
provide a counterpart result proving instability conditions.
  We then show how discontinuous drifts change the nature of the stability
conditions and we provide generic sufficient stability conditions having a
simple geometric interpretation. These conditions turn out to be necessary
(outside a negligible set of the parameter space) for piece-wise constant
drifts in dimension 2.
