Double defending champion Roger Federer weathered a stern test from the impressive Dan Evans but wore down the British qualifier 7-6(5) 7-6(3) 6-3 to reach the third round of the Australian Open.

Having thrashed Denis Istomin in his Melbourne Park opener, third seed Federer encountered far stiffer resistance against the determined world number 189 Evans, who is rebuilding his career after missing a year due to a doping suspension.

Evans broke Federer for the first time in the tournament to drag the second set into a tiebreak but the Swiss was supreme on the clutch points at Rod Laver Arena.

He broke Evans in the fourth game of the third set and closed out the match with an imperious backhand winner down the line to set up a clash with either Gael Monfils or Taylor Fritz.

"He was feeling it today, I thought," said Federer, who will play Taylor Fritz for a place in the fourth round.

"He was very sort of cat and mouse a bit. Very interesting. I liked the match. I thought he was playing well. It was enjoyable."

Evans sparkled in a run to the fourth round at the 2017 tournament but missed last year's action at Melbourne Park, after testing positive for cocaine at the Barcelona Open.

Australian Open fifth seed Kevin Anderson lost his second round match to Frances Tiafoe 4-6 6-4 6-4 7-5 in a major upset. 

The Wimbledon finalist took a medical time-out mid-way through the four-set match before becoming the highest ranked player to be ousted from the first major of the year.

After sealing match point against the South African, Tiafoe slapped his right bicep, thumped his chest and roared at the terraces.

"It means the world to me, I lost to Kevin three times last year. I would love to get to the second week of a Slam and if you guys get behind me like you did again, then it's going to be pretty easy for me," Tiafoe said.

American Tiafoe, ranked 39 in the world, will play Italy's Andreas Seppi in the third round, which will at least equal his best performance at a Grand Slam, having made the third round of Wimbledon last year.