none
nslookup command error "server: unknown"

    Question

  • Hi experts,

    I install DNS server on windows Server 2008.

    But when i run "nslookup localhost"

    I always get Server: unknown.

    Such as :

    nslookup localhost

    Server: Unknown

    Address: 10.63.6.2

    Name: localhost.netact.noklab.net

    Address: 127.0.0.1

    What's the real problem there?

    Thanks so much!

    Br,

    Fiona

    Monday, June 18, 2012 8:56 AM

All replies

  • Hi Fiona, localhost name resolution is handled within DNS itself.  Localhost is not a DNS recognized name.  It will try to look under your domain of netact.noklab.net for the name 'localhost'.

    If you type in the command: nslookup 127.0.0.1 then it will resolve to a name by querying your local DNS server.

    Type IPconfig /all to determine your DNS servers and ensure that you have them set or that DHCP is assigning them correctly to your host.

    The NSlookup command by itself is the same thing as doing a ping localhost -a.  This of course is not the purpose of a reverse lookup as it does not exist in the domain.  You should use is as ping 127.0.0.1 -a.  This will provide you a correct reverse lookup by querying the domain and then the domain realizing that it is indeed your local host.  It will not provide a name as this is a local address in the IP stack.

    This really isn't an issue with DNS or it's design.  Seems that you just need to use the command correctly.

    For instance, if you type the following: nslookup www.yahoo.com it will query your local DNS server and then your DNS server will forward it onto the next server (by use of the .com root hint) and recurse down from there.  This will more than likely be cached somewhere on some other DNS server along the way thus providing a swift return. 

    Hope this helps

    • Proposed as answer by Steve Mighty Wednesday, June 20, 2012 8:59 PM
    Wednesday, June 20, 2012 3:37 PM