Four of the six Championship clubs involved at this stage were also drawn together, with Queen of the South hosting Hamilton.
Highland League outfit Inverurie Loco Works will travel to Alloa, while Raith Rovers make the trip to League Two leaders East Stirlingshire.
None of the top-flight clubs in Scotland are involved in the competition until 30 November, when the fourth round ties take place.
Draw in Full:
Forfar v East Fife
Culter v Berwick
Elgin v Dunfermline
Stranraer v Auchinleck
Alloa v Inverurie Loco Works
Ayr v Queen's Park or Preston Athletic
Rangers v Airdrieonians
Dumbarton v Cowdenbeath
Arbroath v Brechin
Stenhousemuir v Buckie Thistle or Annan
Edinburgh City or Fraserburgh v Montrose
Turiff v Stirling Albion or Whitehill Welfare
East Stirlingshire v Raith Rovers
Albion Rovers v Deveronvale or Linlithgow Rose
Clyde v Brora Rangers or Cove Rangers
Queen of the South v Hamilton
Ties weekend Novmber 2/3