The Dungeons of Doom go down to about level 26, at which point there is a Castle. Below the castle is one more level, and the next level after that is the Valley of the Dead, the first level of Gehennom (Hell). Once you go down past the Valley of the Dead, you cannot go back up to the Dungeons of Doom.

Somewhere around the fifth level of the Dungeons of Doom is an additional staircase going down to the Gnomish Mines. Somewhere around level 8 is an additional staircase going up to Sokoban.