We present a dynamic stochastic general equilibrium (DSGE) New Keynesian model with indivisible labor and a dual labor market: a Walrasian one where wages are fully flexible and a unionized one characterized by real wage rigidity. We show that the negative effect of a productivity shock on inflation and the positive effect of a cost-push shock are crucially determined by the proportion of firms that belong to the unionized sector. The larger this number, the larger are these effects. Consequently, the larger the union coverage, the larger should be the optimal response of the nominal interest rate to exogenous productivity and cost-push shocks. The optimal inflation and output gap volatility increases as the number of the unionized firms in the economy increases.