With the rapid growth of data center networks in providing a myriad of services and applications to store, access, and process data, the power consumption of data center networks has become critically important and must be efficiently managed. In this paper, we discuss the power optimization of data center networks in a hierarchical perspective. We establish a two-level power optimization model to reduce the power consumption of data center networks by switching off network switches and links while still guaranteeing full connectivity and maximum link utilization. After having shown that the addressed problem falls in the class of capacity constraint multi-commodity flow problems, we design several simple heuristic algorithms to solve the problem. Our simulations show that hierarchical energy optimization can effectively save power consumption in data center networks.