In this paper, we propose a DSGE model with the term structure of interest rates drawing on the framework introduced by Andrés et al. (2004) and Marzo et al. (2008). In particular, we reproduce segmentation in financial markets by introducing bonds of different maturities and bond adjustment costs non-zero at the steady state, introducing a structural liquidity frictions among bonds with different maturities: agents are assumed to pay a cost whenever they trade bonds. As a result, the model is able to generate a non-zero demand for bonds of different maturities, which become imperfect substitutes, due to differential liquidity conditions. The main properties of the model are analysed through both simulation and estimation exercises. The importance of the results are twofold. On one hand, the calibrated model is able to replicate the stylized facts regarding the yield curve and the term premium in the US over the period 1987:3-2011:3, without compromising its ability to match macro dynamics. On the other hand, the estimation, besides providing an empirical support to the theoretical setting, highlights the potentialities of the model to analyze the term premium in a microfounded macro framework. The results match very closely the behavior of actual yields, reflecting the recent activity of the Fed on longer maturities bonds.