Extending DNS CLI. Ported from master.