Energy saving is of great interest in current information and communications technology applications. In this paper, we consider energy saving for an IP over wavelength division multiplexed (WDM) optical network by putting protection router cards to sleep when the network is operating normally. Doing this requires that we must jointly consider several aspects. These are multi-layer traffic grooming, network protection, and the assignment of router ports/cards for working and protection optical channels. By employing different network protection techniques and the multi-hop traffic grooming strategy, we develop mixed integer linear programming (MILP) models for the optimization problem by considering five different router port assignment schemes. These aim to minimize the total power consumption of the whole network. Subsequently, to tackle the computational difficulty of the MILP models, we propose an efficient heuristic algorithm to handle large networks. This heuristic algorithm consists of two steps, i.e., survivable traffic grooming and router port assignment. Results show that the proposed energy-saving strategy is efficient and can significantly reduce the total power consumption of an IP over WDM network, where the assignment strategy for router cards is of primary importance for energy-saving efficiency. We also observe that the proposed heuristic algorithm performs almost as well as the MILP models in terms of the energy efficiency of the system.