Black Cats handed home tie in third round.
Sunderland will play Peterborough United at the Stadium of Light in the third round of the Capital One Cup.
Paolo Di Canio's side saw off MK Dons on Wearside on Tuesday to book their place in the draw and will now take on another League One outfit.
Meanwhile, Peterborough secured their spot in the third round with an emphatic 6-0 home win over Championship side Reading.
They had previously won 5-1 at Colchester in the first round.
Posh - managed by Darren Ferguson - have won all six of their competitive games so far and sit in second place in the third tier on goal difference.
Sunderland and Peterborough last faced each other in January 2012, when the Black Cats ran out 2-0 winners at London Road in the FA Cup with Budweiser thanks to goals from Seb Larsson and James McClean.
The tie will be played during the week commencing September 23 and ticketing info will be confirmed in due course.