
The Swiss defending champion successfully fended off the towering Croatian's big serve and will next take on a qualifying unknown in Fabio Foglini.
But the effort certainly didn't feel like a party to the winner, playing his first match since lifting a fifth Wimbledon title a month ago.
"I had no chance on his serve. I couldn't read it at all," Federer said of the 2.08-metre Croatian giant, who was "limited" to 16 aces in one hour, 23 minutes. "There was no way to prepare for a match like this, as he takes control away from you with his serve. I was pleased with how I played, especially in the tiebreakers."
After Federer advanced for his 37th victory of the season, a cake was brought out as fans serenaded Federer in a Quebecois version of "Happy Birthday."
Federer was able to enjoy an evening out in Montreal with girlfriend Mirka, other Swiss players and a handful of other friends at a restaurant for a private celebration.
While he put his feet up, Rafael Nadal defeated Marat Safin 7-6 (7-4), 6-0.
Fourth seed Nikolay Davydenko and former champion Andy Roddick joined Federer in surviving a day of upsets.
Davydenko beat Finn Jarkko Nieminen 6-3, 7-6 (7-5), while number- five Roddick, last weekend's Washington winner, defeated Arnaud Clement 6-1, 7-6 (7-5).
"I go out with the mentality I want to try to play well on a daily basis," Roddick said of his favourite portion of the season.
"I take the attitude in the summer, you play well one week, that will give you a chance to play well the next week, so on and so forth. Before you know it, hopefully you're further along in the US Open."
Five seeds lost earlier in the day, led by Tommy Robredo, last weekend's Sopot champion on clay. The Spanish number seven fell 6-2, 6-4 to Dominik Hrbaty, unable to complete the quick change in continents, time zones and surfaces.
Spain's Fernando Verdasco knocked out French eighth seed Richard Gasquet 3-6, 7-6 (9-7), 6-4.
Australian Lleyton Hewitt earned a free ride into the third round as ninth-seeded opponent James Blake withdrew before their contest with a minor abdominal muscle strain.
The optimistic American hit the roadblock on cement as his season slows, following a losing final last month in Los Angeles and a quarter-final defeat in Indianapolis, Indiana.
"It's still painful. It felt even worse this morning than it did last night," said Blake. "The adrenaline of playing the match kind of numbed it a little."
Despite the fact that German Tommy Haas suffered a similar injury at Wimbledon and missed five weeks, Blake said he will work to get ready for next week's Cincinnati Masters in Ohio.
"I hope (with) four, five days of rest, ice, ultrasound, all the other treatments ... it will be OK for Cincinnati," he said. "I need to be careful with the US Open coming up. I don't want to do something that's going to cause some serious damage."
Italian qualifier Fognini ended this week's wrist-injury comeback effort of Briton Andy Murray by dominating the 13th seed 6-2, 6-2.
Murray suffered the injury, which kept him out for three months, on May 15 against another Italian, Filippo Volandri.
Argentine David Nalbandian beat 16th seed David Ferrer 7-6 (7-4), 6-1.
DPA