In this paper we propose a semi-Markov modulated model of interest rates. We assume that the switching process is a semi-Markov process with finite state space E and the modulated process is a diffusive process. We derive recursive equations for the higher order moments of the discount factor and we describe a Monte Carlo al- gorithm to execute simulations. The results are specialized to classical models as those by Vasicek, Hull and White and CIR with a semi-Markov modulation.