Crewe are currently third in League Two while Hampshire club Eastleigh are 13th in the National League.
They drew 2-2 on Saturday and are due to replay at Crewe on December 10.
The third round tie is due to be played on the first weekend in January.
Barnsley have not got past the third round since 2013 when the lost 5-0 at Manchester City in the last 16. Last year, they lost to a last-minute penalty at top flight Burnley.