This paper presents a simple general equilibrium model of optimal taxation in which both private agents and the government can default on their debt. As a benchmark we consider Ramsey equilibria in which the government can precommit to its policies at the beginning of time, but in which private agents can default. We then consider sustainable equilibria in which both government and private agent decision rules are required to be sequentially rational. We completely characterize the set of sustainable equilibria. In particular, we show that when there is sufficiently little discounting and government consumption fluctuates enough, the Ramsey allocations and policies (in which the government never defaults) can be supported by a sustainable equilibrium.