The 36-year-old Swiss guaranteed himself a place in the last four of the Nitto ATP Finals at the 02 Arena when he saw off an initially vigorous challenge from Germany's Alex Zverev, who finally showed a British crowd what all the fuss is about.
"It's been a tough group so to be through in two matches is great".
Federer, in his 66th ATP World Tour Finals match, could hardly blame nerves whereas Zverev, in just his second, might have been afforded that excuse for his double-fault at the beginning of his first service game.
Federer didn't panic, though, and served his way out of trouble, with Zverev missing an early opportunity to snatch the initiative.
"Definitely not a great record, but I felt that I played even well a year ago", Cilic said.
"I wouldn't be out here playing, competing if I didn't think I could give myself a chance to win tournaments, to be here", Sock said.
Earthquake: Iran calls off rescue operations as death toll rises to 530
The Iranian Red Crescent said many areas lacked water and electricity and that aid supplies were being hampered by blocked roads. Iranian medical officials announced that several field hospitals have been set up in the quake-hit areas.
Sock claimed five points in a row to set up two match points and he converted the first when a Cilic backhand floated long.
In doing so, the belief rushed back through the world No. 3 and he set up three set point chances on Federer's serve at 5-6 - converting the third. The serve again dominated until the 12th game when, just as Zverev had in the first set, Federer faced set points on his serve.
The Swiss re-found his focus and some consistency on serve in the decider as Zverev's level dipped, earning three breaks to close it out 6-1.
"It's been an interesting morning so far", said the American. But I love playing here in London.
The top two players from each group qualify for the semi-finals and after top seed Rafa Nadal pulled out through injury Federer is now a massive odds-on favourite to win the tournament. It has mostly been played on an indoor hard-court, with other stints on carpet, grass and outdoor hard-courts when it was staged in various cities before setting up home in London in 2009. As the world's most formidable player on clay, Nadal has in the past suggested it would be better if the season-ending Tour Finals at least occasionally took place on his preferred surface.