nslookup oddities (Was: SRV record not working)

Lee ler762 at gmail.com
Mon Aug 20 17:14:37 UTC 2018

On 8/19/18, Mark Andrews <marka at isc.org> wrote:
> nslookup applies the search list by default and doesn’t stop on a NODATA
> response.
> Some versions of nslookup have been modified by OS vendors to use /etc/hosts
> for address lookups.
> nslookup doesn’t display the entire response by default.

I learned something :)  Thank you
Not that I know the implications of "doesn’t stop on a NODATA
response" but hopefully that can be remedied.

wrt the search list, that's why I got in the habit of always typing
the trailing dot.  I've never seen that fail, but 'set nosearch' is
supposed to do the same thing.

'set debug' and 'set d2' displays lots, but I never checked to see if
it was the entire response or no

So... it seems like the bottom line is that dig is better but nslookup
ain't all that bad


>> On 20 Aug 2018, at 12:28 pm, Lee <ler762 at gmail.com> wrote:
>> On 8/19/18, Doug Barton <dougb at dougbarton.us> wrote:
>>> On 08/19/2018 12:11 PM, Lee wrote:
>>>> On 8/18/18, Doug Barton <dougb at dougbarton.us> wrote:
>>>>> nslookup uses the local resolver stub. That's fine, if that's what you
>>>>> want/need to test. If you want to test specific servers, or what is
>>>>> visible from the Internet, etc. dig is the right tool, as the answers
>>>>> you get from nslookup cannot be guaranteed to be directly related to
>>>>> the
>>>>> question you asked.
>>>> Could you expand on that a bit please?  I thought
>>>>   nslookup <name> <server>
>>>> was pretty much equivalent to
>>>>  dig <name> @<server>
>>>> the exception being that nslookup looks for a & aaaa records and dig
>>>> just looks for a records
>>> Nope. Depending on what operating system you're on, what version of
>>> nslookup you have, how you format your query, and how the system is
>>> configured; even telling nslookup to query a specific server may not get
>>> you the answer you're looking for.
>> That's still awfully vague.  Do you have any examples of
>>    nslookup <name> <server>
>> returning bad information?
>>> If you want to know what answer your stub resolver is going to return
>>> for a given query, nslookup is a great tool. Although, if you just need
>>> to know what address record you'll get back, ping works just as well.
>> ping just shows one address; "nslookup  www.yahoo.com" shows all of them
>>> If you want to really debug DNS you need to learn to use dig, and
>>> understand the output.
>> Agreed.  If you're serious about debugging DNS you needs to learn dig.
>> But the assertion is
>>>>> ... the answers
>>>>> you get from nslookup cannot be guaranteed to be directly related to
>>>>> the
>>>>> question you asked.
>> so I'm wondering how, or under what circumstances, nslookup returns
>> invalid information.
>> Thanks
>> Lee

More information about the bind-users mailing list