nslookup adds domain name to requests

  • Thread starter Thread starter Sascha Picchiantano
  • Start date Start date
S

Sascha Picchiantano

hi there,

I am on a fresh XP installation. when doing nslookups, it always returns the
query result with my domain name added (the domain name is configured as the
"primary DNS suffix for this computer").

Example: my machine's name is "substance" and the primary DNS suffix
(configure through system properties/computer name/change.../) is
something.com. now whenever I do a

nslookup www.yahoo.com

then nslookup actually queries for "www.yahoo.com.something.com".

I trid everything to get rid od this and the only way (except for removing
the primary DNS suffix) is to add a . at the end of the nslookup query.
which is of course very annoying and not standard.

any ideas what I got wrong here?

thanks,
sascha
 
Hi Sascha,

This is exactly the way nslookup is designed to work. If you don't do a
fully qualified query (with a "dot" at the end) it will append the domain
suffix. Your solution is to use fully qualified queries when using
nslookup.

Thanks,
Marc Reynolds
Microsoft Technical Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Marc Reynolds said:
Actually it depends, if you don't have a primary DNS suffix set the
behavior Ron describes is accurate. If you have a Primary DNS suffix set
then nslookup will always try appending your primary suffix to any query
that is not fully qualified (with a trainling . )

Here is an article with a lttile info about MS nslookup:

200525 Using NSlookup.exe
http://support.microsoft.com/?id=200525


Thanks,
Marc Reynolds
Microsoft Technical Support

This posting is provided "AS IS" with no warranties, and confers no rights.


Hmm, but I *do* have a primary DNS suffix.
It's my win2k3 domain name...
( homenet.local )

Here's 2 nslookups done in quick succession:

The first is a non-dot-terminated nearly-FQDN.
( the same example I posted earlier, which fails for the OP. )
In this case, it resolves on step (2) of the sequence I listed.
In otherwords, a dot is appended to the multi-label name, and this is
resolved correctly...

C:\Documents and Settings\Ron.HOMENET>nslookup www.yahoo.com
Server: homenetdc01.homenet.local
Address: 192.168.0.220

Non-authoritative answer:
Name: www.yahoo.akadns.net
Addresses: 216.109.118.71, 216.109.118.72, 216.109.118.68, 216.109.118.69
216.109.118.66, 216.109.118.76, 216.109.118.65, 216.109.118.77
Aliases: www.yahoo.com


In the second example, the primary DNS suffix _is_ appended.
I query for my router...
( which has an entry in my DNS server's 'homenet.local' forward lookup
zone. )
Here, I only lookup the name 'router'.
This would fail to resolve, and also 'router.' would fail to resolve.
So it falls through to step (3), where the primary DNS suffx is appended

C:\Documents and Settings\Ron.HOMENET>nslookup router
Server: homenetdc01.homenet.local
Address: 192.168.0.220

Name: router.homenet.local
Address: 192.168.0.1


So the behaviour is exactly as I'd expect.
The Primary DNS suffix is only appended *after* resolution failure has
occoured for the original name, and for the dot-terminated FQDN.

The OP ought to be able to repro this.
ie: nslookup www.yahoo.com *without* and DNS suffix being appended;
and nslookup localmachine *with* the DNS suffix being appended.

I don't know why the OP is seeing the behaviour he describes.
It works fine for me on all my systems, and on every network I administer.

Odd.
 
My nslookup definetly does not do the second query, because the first one,
which adds the primary domain suffix, is always successfull. I suppose the
domain has an A-Record that uses a wildcard, so that any host resolves just
fine. If that makes any sense....

So now the question is, how do I get nslookup to NOT append the primary
domain suffix in it's first query.

This is an old chestnut. You can state that a name is a fully qualified
domain name (FQDN) by putting a full stop ("period", for you Americans) at
the end. For instance, "fish.example.com" is not the same as
"fish.example.com." - the latter is stated to be a FQDN, whereas the former
may have the domain suffices appended to it for a name lookup.

Many a DNS configuration has been fouled up by the absence of a terminating
full-stop

Alun.
~~~~

[Please don't email posters, if a Usenet response is appropriate.]
 
Back
Top