0

i have only a question about nslookup and Default Server.I have two primary zones on my server:

1. pedf.com
2. test.cz

When I start command NSLOOKUP, I see that the Default Server: server.test.cz ... my question is, why .test.cz instead .pedf.com (server.pedf.com). PTR record for server is set for both zones (server.pedf.com and server.test.cz). Is there any priority rule?!

Thank you :)

Screenshot

Ral1s
  • 1
  • 1
  • 2
  • I've never seen this or had reason to test it but my guess is it's using the primary or connection specific DNS suffix of your computer and returning the DNS record for the server that matches that DNS suffix. – joeqwerty Apr 22 '18 at 15:17
  • joeqwerty - yup. Windows is returning the hostname of the computer when it does the default server check in nslookup. – kelvintechie Jul 05 '19 at 04:29

1 Answers1

1

The name nslookup prints as "default server" when it starts is pretty pointless (the name is not used for anything else than printing it there). It's just a case of nslookup having the OS resolver look up (reverse lookup) the configured resolver server IP address and presenting the resulting name to the user (if it could find one).
The actual IP address is printed on the next line (much more relevant, this is what is actually used by default).

As for your setup, with a reverse zone with multiple PTR records for the same IP mapping, that doesn't really make sense. I'd suggest that you have a single entry per IP, as is expected.

When there are multiple records in a reverse mapping, the choice of which one ends up being used by the client in any given situation is arbitrary.
If, as you say, nslookup ends up consistently using one over the other that happens based on arbitrary implementation choices along the way, there is no priority on the DNS level.

Sidenote: Other tools (such as dig) are generally favored over nslookup.

Håkan Lindqvist
  • 33,741
  • 5
  • 65
  • 90