Posh will travel to Field Mill in the third round of the Carabao Cup.
Peterborough United will travel to Sky Bet League Two side Mansfield Town in the third round of the Carabao Cup following the draw on Wednesday evening.
Mansfield overcame Sheffield Wednesday in the second round while Posh progressed on penalties at Portsmouth.