LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-11-2002, 01:27 PM   #1
jbooker
LQ Newbie
 
Registered: Jan 2002
Posts: 3

Rep: Reputation: 0
Question 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

Last edited by jbooker; 01-11-2002 at 01:53 PM.
 
Old 01-11-2002, 05:43 PM   #2
BaerRS
Member
 
Registered: Oct 2001
Location: Columbus, Ohio
Distribution: all.. but mainly SuSe--- looks like it changing to Red Hat
Posts: 119

Rep: Reputation: 15
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
 
Old 01-12-2002, 02:18 AM   #3
johnlee
Member
 
Registered: Oct 2001
Location: China
Distribution: RedHat 7.0
Posts: 43

Rep: Reputation: 15
Re:

Dear Friend,

Check your /etc/host.conf file that should be

order hosts,bind


Thank You

John Lee
 
Old 01-14-2002, 09:19 AM   #4
jbooker
LQ Newbie
 
Registered: Jan 2002
Posts: 3

Original Poster
Rep: Reputation: 0
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!!!
 
Old 01-15-2002, 05:58 PM   #5
johnmc
LQ Newbie
 
Registered: Apr 2001
Location: Brisbane, Australia
Distribution: RedHat 7.x
Posts: 2

Rep: Reputation: 0
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.
 
Old 01-16-2002, 08:38 AM   #6
jbooker
LQ Newbie
 
Registered: Jan 2002
Posts: 3

Original Poster
Rep: Reputation: 0
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.
 
Old 07-04-2003, 01:02 PM   #7
astickar
LQ Newbie
 
Registered: Jul 2003
Location: Argentina
Distribution: Suse / RedHat
Posts: 1

Rep: Reputation: 0
Exclamation

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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
default screen resolution smaller than max. resolution ?? Thoddy Linux - General 2 11-10-2005 01:33 AM
X: using larger resolution for games than default desktop resolution Jamo Linux - Games 2 04-10-2005 03:16 AM
Text Resolution, Graphic resolution. Change from prompt dlublink SUSE / openSUSE 2 01-28-2005 11:50 AM
[resolution 1600 x 1200] Virtual resolution - help! MaicoMedia Linux - Hardware 2 10-15-2004 03:15 AM
seeking a resolution to my resolution troubles! kinbote Linux - General 3 05-11-2004 03:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration