The "middle ages" are anything between the collapse of Rome (400 AD) to its re-emergence in Rennaissance Italy (1400). Rennaissance means "rebirth".

The "dark ages" are the period in the middle ages which were relatively undocumented. This would definitely include 400 AD to 700 AD, and some extend it to 900 AD.

The "viking period" is 700 AD to 900 AD. Some authors include that period as the dark ages, others do not.

The "medieval period" is the time between the dark ages and the Renaissance, 700 AD to 1400 AD.