Both nations avoided four-time winners Italy and will be hopeful of booking their place in Russia next summer.
Martin O’Neill’s Repbublic beat Wales last week to seal their spot as runners-up in Group D while Northern Ireland finished second to Germany in Group C.
The two-legged ties will take place between 9 -14 November, with Michael O’Neill’s Northern Ireland at home in the opening leg, while the Republic of Ireland travel to Denmark.
Switzerland were unlucky not to reach the finals as winners of Group B, ending the campaign with nine wins from their 10 qualifiers.
They lost to Portugal in the final game of the group to finish behind the European champions and are the highest-ranked nation in the play-offs, sitting 11th in the rankings.
Northern Ireland lost to Germany and Norway in their final two qualifiers but still finished four points clear of Czech Republic to seal their place in the play-offs.
Michael O’Neill took them to the second round at Euro 2016 and they are 23rd in the latest FIFA rankings.
The Republic of Ireland ended their Group D qualification campaign on 19 points, the same as their northern neighbours, as Serbia topped the group.
A James McClean goal was enough for Martin O’Neill’s side to win in Wales last week and secure the play-off berth at the expense of their hosts.
Denmark missed out on the 2014 World Cup but finished second in Group E behind winners Poland as they look to book their fifth appearance at the finals.
Croatia play Greece with Italy and Sweden drawn together in the most eye-catching of the play-off fixtures.