Holders Manchester City will face FC Copenhagen in the last 16 of the Champions League.
Current Premier League leaders Arsenal will take on Portuguese side Porto in the first knockout round.
The ties, the first legs of which will take place in February, were confirmed after the draw at the Swiss headquarters of organiser UEFA in Nyon on Monday.
City played Copenhagen - who came through a group that included Manchester United - in the early stages last season, winning 5-0 at the Etihad Stadium and drawing 0-0 in Denmark.
Arsenal's opponents Porto qualified as runners-up to Barcelona in Group H.
Spanish champions Barca, meanwhile, were handed a tough assignment against Serie A winners Napoli.
Real Madrid, the record 14-time winners, were paired with RB Leipzig with their city rivals Atletico facing Inter Milan.
Paris Saint-Germain will play the fourth Spanish side in the draw, Real Sociedad, with the two German teams, Bayern Munich and Borussia Dortmund, tackling Lazio and PSV respectively.
CHAMPIONS LEAGUE ROUND OF 16
FC Porto v Arsenal
Napoli v Barcelona
PSG v Real Sociedad
Inter Milan v Atletico Madrid
PSV Eindhoven v Borussia Dortmund
Lazio v Bayern Munich
FC Copenhagen v Manchester City
RB Leipzig v Real Madrid
In the Europa League, the knockout round play-off draw sees Jose Mourinho's Roma take on Feyenoord in what is a repeat of the 2022 Europa Conference League final between the sides.
The pick of the other ties sees AC Milan face Stade Rennes of France.
Milan, who have won the Champions League on seven occasions, have never won the Europa League. They defeated Newcastle United in their final Champions League group game this season but finished third behind Borussia Dortmund and Paris Saint-Germain.
The eight group runners-up from the Europa League face eight third-placed sides from the Champions League group stages, with the winners of the two-legged playoffs progressing to the last 16.
The eight group winners from the Europa League already qualified for the last 16 are West Ham, Brighton, Rangers, Atalanta, Liverpool, Villareal, Slavia Prague and Bayer Leverkusen.
KNOCKOUT ROUND PLAY-OFF DRAW
Feyenoord v AS Roma
AC Milan v Stade Rennes
RC Lens v Freiburg
Young Boys v Sporting Lisbon
Benfica v Toulouse
Sporting Braga v Qarabag
Galatasaray v Sparta Prague
Shakhtar Donetsk v Olympique de Marseille