The Champions League holders strolled to the three points to ensure they remain unbeaten in the competition after three games
Real Madrid survived an early scare to comfortably see off Legia Warsaw 5-1 in the Champions League and extend their unbeaten run to 23 games across all competitions.
Madrid made hard work of the contest before Gareth Bale's first Champions League goal since December 2014 opened the scoring, with Vadis Odidja-Ofoe previously hitting the post in one of several early chances.
A Tomasz Jodlowiec own-goal did not dishearten Legia either, as Miroslav Radovic won and scored a penalty to give them a deserved lifeline, but Marco Asensio's first goal in the competition just before the break was a bitter blow.
The visitors struggled to impose themselves thereafter as Madrid became a more compact unit in the second half and they should have fallen even further behind just after the break - Karim Benzema spurning a good chance.
Second-half substitute Lucas Vazquez provided a powerful finish 22 minutes from the end to effectively make the points safe for Zinedine Zidane's men.
Alvaro Morata applied further gloss to the scoreline late on with a coolly taken effort as Madrid took their tally to seven points from three Group F games.
Madrid unsurprisingly dominated possession during the opening exchanges and almost managed an early breakthrough eight minutes in – Gareth Bale scuffing wide from close range following a Ronaldo cross.
Legia looked bright on the counter, though, and went close twice in quick succession, as Thibault Moulin forced Keylor Navas into action and Odidja-Ofoe struck the woodwork after Guilherme's cut-back.
Madrid made them pay for their wastefulness, though, as Bale darted in from the left in the 16th minute and found the bottom-left corner with a fine finish from just inside the box.
They swiftly doubled their lead, with Marcelo's 20-yard effort taking a huge deflection off Jodlowiec on its way in.
Legia pulled one back in the 22nd minute, however, as Radovic ran at Danilo and drew a foul from the Brazilian, before coolly dispatching the resulting spot-kick.
But Madrid restored the two-goal advantage eight minutes before the break. Ronaldo collected Danilo's low cross and teed up Asensio, who found the bottom-right corner from the edge of the area.
Madrid should have gone even further ahead in the 49th minute, as Arkadiusz Malarz punched a Toni Kroos corner as far as Benzema, who sent a half-volley straight back at the Legia goalkeeper.
The hosts looked more intent on not allowing the match to become as open as the first half and Legia struggled to find the space to catch Madrid on the break.
Zidane's decision to introduce Morata and Vazquez from the bench just after the hour mark injected a little more life into the second half and within a few moments the pair combined to give Madrid a fourth.
Vazquez met Morata's chipped pass into the right side of the area with a strong right-footed strike, but Malarz should have done better.
Morata also got in on the act in the closing stages, as he latched on to Ronaldo's pass and tucked a neat finish inside the near post to round off the rout.