SummaryThe amount of traffic that is generated by users and high‐demanding services is expected to rise dramatically in the forthcoming years. This will unavoidably deteriorate the performance and increase the consumed energy of core networks, thus constraining the growth of Internet. To this effect, multilayer traffic engineering schemes in IP/multiprotocol label switching over dense wavelength division multiplexing networks have been proposed for achieving improved performance and increased energy savings by flexibly allocating traffic to optical lightpaths. In particular, the consumed energy in a router can be minimized if the lightpaths are established so as to traverse a router without electronic processing and conversion of their signal between optical and electrical layer. Accordingly, this paper aims at providing an energy‐aware solution to the problem of traffic allocation to optical lightpaths in multilayer core networks. The problem is first formulated and then a solution based on a heuristic algorithm, called energy‐aware traffic allocation to optical lightpaths (ETAL) is proposed. The efficiency and worthiness of ETAL is validated through numerous scenarios and simulations. The derived results indicate that the proposed algorithm is an efficient traffic engineering solution that exhibits better performance in terms of consumed energy (up to 44%), when compared to other similar traffic allocation schemes. Copyright © 2015 John Wiley & Sons, Ltd.