Error in nslookup

hi everyone,

When i am trying nslookup i am getting the following error

*** Can't find server name for address 24.218.191.2: Non-existent host/domain

*** Default servers are not available

can anyone explain ?

tanks in advance

[392 byte] By [avid] at [2007-11-25 22:41:25]
# 1
It appears that the host you are trying to do a lokoup for is not in the dns namespace, or does not exist.
suran_k2003 at 2007-7-5 14:18:14 > top of Java-index,General,Sun Networking Services and Protocols...
# 2

I am also getting the same error. I have tried looking up an external IP address as well as an IP address within the LAN. Can anyone tell me how this can be resolved?

<a href="mailto:root&#64;adminc" target="_blank">root@adminc</a> # nslookup 143.222.251.22

*** Can't find server name for address 127.0.0.1: Unspecified error

*** Default servers are not available

<a href="mailto:root&#64;adminc" target="_blank">root@adminc</a> #

<a href="mailto:root&#64;adminc" target="_blank">root@adminc</a> # nslookup 160.95.206.74

*** Can't find server name for address 127.0.0.1: Unspecified error

*** Default servers are not available

<a href="mailto:root&#64;adminc" target="_blank">root@adminc</a> #

DavidSun at 2007-7-5 14:18:14 > top of Java-index,General,Sun Networking Services and Protocols...
# 3

<div align="left">

It looks like DNS is not configured for the machine you are trying to use nslookup on. Are you using NIS, NIS+, or LDAP for authentication and lookups?

In order for nslookup to work correctly, the /etc/resolv.conf has to be available and point to a live DNS server (which could be the local machine), as it's trying to query Name Servers and ignores the NIS[+] configs. Here's a very simple /etc/resolv.conf:

<div class="pre"><pre>

nameserver <dns server IP>

search <append-this-domain-1st>,<append-this-domain-2nd>

</pre></div>

The 'search' key should be non-default domains that you want appended to hostnames you pass nslookup (or other ns utilities). So if your default domain is 'foo.com', and you also co-exist with 'bar.com' you would want to put 'bar.com' in the search list. This way, when you try to nslookup "hammer" it will look for "hammer.foo.com" and "hammer.bar.com" (if hammer.foo.com does not exist).

If /etc/resolv.conf does not exist (which may be the case if you are using NIS[+]), that would be why nslookup is failing.

If you know the IP of a DNS server on your network, you can make nslookup work by executing:

<div class="pre"><pre>nslookup - <DNS Server IP></pre></div>

i.e.

<div class="pre"><pre>nslookup - 192.168.254.128</pre></div>

This will put you in an interactive session, but the first message you see should be:

<div class="pre"><pre>

Default Server: <DNS Server canonical name>

Address: <DNS Server IP>

</pre></div>

Of course, if you don't have reverse lookup configured on the DNS Server (something that happened on our project :-P), the "Default Server" line will fail, but you should still be able to map hostnames to IP's.

C.J.

</div>

CJ at 2007-7-5 14:18:14 > top of Java-index,General,Sun Networking Services and Protocols...