Energy consumption is becoming a serious issue for data centers. Minimizing the energy consumption of a data center is a complex problem. It consists of developing energy models for servers and network elements and investigating energy-aware (green) routing strategies using these models. In this paper, we adapt energy models for servers and network elements in a data center. The server energy model incorporates the impact of temperature and voltage of a server on its leakage energy. Using the server and network energy models, we propose a green routing scheme that minimizes the total combined energy consumption of servers and network elements in a data center under dynamic traffic. The proposed green routing scheme uses dynamic voltage scaling, rate adaptation, and anycast transmission for minimizing the total energy consumption. Extensive simulation results validate the effectiveness of the proposed green routing in minimizing the total energy consumption of a data center as compared to well-known existing approaches.