Name Resolution
RedHat 7.2 with a static ip --
nsswitch.conf has a line like this: hosts: files dns When I try to resolve a hostname that is NOT in DNS, but I have the hostname in my /etc/hosts file, it will not resolve. If I telnet to that same hostname, or ping it, it works fine. I have tried moving the resolv.conf file to a different name, thinking that would force nslookup to use my /etc/hosts file, but that didn't even work. Any ideas? Thanks, Jim - the newest newbie |
Jim,
try to ping someting that is not on your network ping lajdflajsf then try to ping your now entry that is in the /etc/host file |
Re:
Dear Friend,
Check your /etc/host.conf file that should be order hosts,bind Thank You John Lee |
ping and telnet work fine and my host.conf does have the line
"order hosts,bind". Still, I can't resolve a hostname that is not in DNS. Somethin is preventing the /etc/hosts file from being looked at. I'm dying here. I have asked everyone I know for help and several forums. HELP!!! |
Cut from the first line of the nslookup man page:
"Nslookup is a program to query Internet domain name servers." The reason nslookup does not work for hosts not in DNS is that it is specifically designed to query name servers. So if you have a host defined in /etc/hosts but not defined in your DNS, nslookup will error with Non-existent host/domain. nslookup is good for troubleshooting nameservers. I hope this explains it for you. |
It's true that nslookup does query name servers, most of the time. However, if you specify in your /etc/nsswitch.conf file that
you want "files" to be queried too - like so: "hosts: files [NOTFOUND=continue] dns" nslookup is supposed to look at the /etc/hosts file first. |
What happened with this Q ?
Do you know if someone knows how to solve this problem? If you know, I would be grateful if you could tell me how to solve it. I have the same problem with the nslookup. Oracle Installation script use it in the pre-execution task. Thanks. |
All times are GMT -5. The time now is 05:09 PM. |