This was something of a pain. It seems that if you limit the number of RPC ports as part of your server build it will cause you problems with installing the DNS role.
To check the current configuration:
I can’t find the article that I used, but here was the fix.
First, use the netsh command to return to the defaults:
Then install the DNS role.
Finally, use the netsh command to replace the custom settings: