This paper studies a decentralized routing problem over a network, using the paradigm of mean-field games with large number of players. Building on a state-space extension technique, we turn the problem into an optimal control one for each single player. The main contribution is an explicit expression of the optimal decentralized control which guarantees the convergence both to local and to global equilibrium points. Furthermore, we study the stability of the system also in the presence of a delay which we model using an hysteresis operator. As a result of the hysteresis, we prove existence of multiple equilibrium points and analyze convergence conditions. The stability of the system is illustrated via numerical studies.