Web Hosting Talk







View Full Version : nslookup


raylin
02-14-2001, 12:43 PM
If my RaQ4r doesn't turn on DNS service,
can I run nslookup command from shell prompt ?

Because my DNS service is not working today,
when I typed nslookup command , I got response as

[admin admin]$ nslookup
*** Can't find server name for address 216.234.xxx.1: No response from server
*** Can't find server name for address 216.234.xxx.2: No response from server
*** Default servers are not available


216.234.xxx.1 was IP of ns1.mysite.com, and
216.234.xxx.2 was IP of ns2.mysite.com

Any idea ?

allan
02-14-2001, 04:23 PM
Sure, type nslookup and hit enter. After you get the can't find server error message, you should see a prompt that looks like this ">". At that prompt type "server some.IP.add.ress" This will allow you to do queries from a different server.

What is happening now, is that the server is trying to use the DNS servers you have in your control panel. They are either not right, or it can't reach them for some reason.

Of course, if you want to avoid this problem all together, and become a real geek in the process, you can dump nslookup and switch to dig :) (type man dig for details)

raylin
02-14-2001, 10:31 PM
uuallan,

Thank you very much. Your information is vary helpful.


Sure, type nslookup and hit enter. After you get the can't find server error message, you should see a prompt that looks like this ">". At that prompt type "server some.IP.add.ress" This will allow you to do queries from a different server.

No, I can not see that ">" prompt. I just return to shell prompt "$".


I read dig manual, and I found there is a file /etc/resolv.conf keeping nameserver setting. The content of my resolv.conf file is as following:

[admin admin]$ cat /etc/resolv.conf
search mysite.com
nameserver 216.234.xxx.1
nameserver 216.234.xxx.2
[admin admin]$

Can I just override it with following ?

search tera-byte.com
nameserver 216.234.161.11
nameserver 216.234.161.12
nameserver 204.209.56.2


After I replace the content, should I reboot the server ?

allan
02-14-2001, 10:42 PM
Yes, that will work fine.

Reboot?? Go back to Windows, you blasphemer :). You should be able to do the update by simply restarting named.

raylin
02-14-2001, 11:30 PM
uuallan,

Thank you for the very kindly help.

Here is what I have done:


login server as admin
su as root
cd /etc
cp resolv.conf resolv.conf.bad
vi resolv.conf and replace the content
cd /etc/rc.d/init.d
./named restart


Now I can run nslookup as usual.

Thanks, uuallan.

allan
02-14-2001, 11:38 PM
Glad I could be of help, although it appears you figured out most of it, I mostly just made sarcastic comments :).