The presence of data centres in IP over WDM networks can create a hot node scenario leading to a significant increase in the power consumption of data centre nodes. In this paper, we investigate the power consumption associated with transporting data between data centres and end-users in IP over WDM networks. We study two problems. Firstly, we optimize the location of the data centres in the IP over WDM network so as to minimize the power consumption. Secondly, we investigate introducing renewable energy to IP over WDM networks with data centres and evaluate the problem of whether to locate data centres next to renewable energy or to transmit renewable energy to data centres. The results show that optimizing the data centre locations in the presence of renewable energy sources can save up to 71% of the power consumption.