Returning to Davis Cup tennis, Federer cruised past Ilija Bozoljac, winning 6-4, 7-5, 6-2 in less than two hours. Federer faced little challenge from Bozoljac, who served well but still was no match for his Swiss opponent.
Australian Open champion Wawrinka faced a tougher task against 102-ranked Dusan Lajovic in the second match, before winning 6-4, 4-6, 6-1, 7-6 (7).
Bozoljac began his match against Federer with two aces and had a set point while leading 5-2 in the second. But Federer held serve and broke to regain control over the set.
"Ilija was playing well, especially in the second set," Federer said. "It was a tough game, it could have been one set all."
Federer was making his first Davis Cup appearance since 2012.
Bozoljac said he was disappointed about his missed chance to win the second set.
"I lost focus and Federer stepped up the game," Bozoljac said.
Lajovic opened his match with a break, but Wawrinka soon broke back and went on to win the set easily. Lajovic then took advantage of several unforced errors by Wawrinka to take the second set.
However, Lajovic missed two set points in the tie break of the fourth before Wawrinka closed out the match.
"It was a tough game, he played well," Wawrinka said. "It's never easy when you come so late after an important tournament, but I managed to overcome that."
Switzerland is an overwhelming favorite against Serbia, last year's finalist and the 2010 Davis Cup champion, which is playing without Novak Djokovic and two other top players.
The second-ranked Djokovic decided to rest after losing to Wawrinka in the Australian Open quarterfinals, while Janko Tipsarevic is nursing a heel injury and Viktor Troicki is serving a 12-month doping ban for failing to appear at a test. That means Lajovic is Serbia's highest-ranked team member.
The winner plays Belgium or Kazakhstan in the quarterfinals in April.