'No man is an island' [John Donne]. Human and technological networks play a vital part in our lives, and their failures have often caused severe adverse consequences. In this paper we address this crucial issue by presenting a model to prevent not only network failures but also their propagation to the remaining network elements. Our model forecasts the number of packets each node is able to service without becoming overloaded, by determining the transition probabilities assigned to each link. Thus, our model ensures that nodes receive as many packets as their network resources prescribe. The model is portable to any type of topology and is based on Ordinary Differential Equations (ODEs), which are numerically solved as a multivariable, coupled system, over a variety of topologies. Our numerical algorithm is based on the classic Runge--Kutta 4th order, which is adjusted to integrate graph principles.