It is along way to train from Saigon to Hanoi ( over 1700 km) and the Reunification Train is quite slow and it is as not as comfortable as the tourist train from Hanoi to Sapa.
Yes, it would take 16 hours from Da Nang to Hanoi.
Here under is the train stops that you can get on/off:
SAIGON - Phan Thiet - Nha Trang- Qui NHon- Hoi an- DA NANG -Hue - Dong Ha- Dong Hoi- Vinh- Nam Dinh- Ninh Binh- HANOI.
As mentioned above that you should mix different kinds of transportation .
If you like to experience some train travel in Vietnam I would just suggest to train under 500km : The below train destinations are the short ones:
Saigon- Nha Trang or Saigon- Phan Thiet
Nha Trang- Danang
Da Nang -Hue
Hue- Dong Hoi ,Quang Binh if you want to visit Phong Nha.