Re: hosts seems to not be used by the resolver



"Nico Kadel-Garcia" <nkadel@xxxxxxxxxxx> writes:

Unruh wrote:
"Nico Kadel-Garcia" <nkadel@xxxxxxxxxxx> writes:

Dave Uhring wrote:
On Thu, 03 Aug 2006 11:39:02 -0700, x wrote:

Now, on our test server when we do `nslookup prodsrv`, it gives us
the ip address of the production server rather than the address of
the test server.

nslookup does not refer to the /etc/hosts file.

This is exactly why DNS and /etc/hosts should never be allowed to
*conflict* in their information for the same hosts or IP addresses.
Tools which use one source of data will argue with the other.

Only if they are allowed into the same room together. Why would
anyone use nslookup for anything except giving information to a human?

Because nslookup is hardly the only thing that does DNS checking. Take a
look at the contents of your /etc/nsswitch.conf to see if it's actually set
to use "files" or "dns" first: then look what happens if you change the
order around, then add "nis" with the automatic or semi-automatic
configuration tools and your order gets messed up. Then look at tools like
SSH that do reverse DNS lookups and watch the craziness *they* create when
you wind up with two IP addresses corresponding to the same hostname.

??? If you have a hosts file you had better have the order files,hosts.
Anything else would be silly. If you misuse and operating system, and it
bites you, you should not be making laws about how how others use theirs.

It is true that the new host lookup routines (which ssh uses and which are
supposed to ip6 ready)break almost everything for no discernable reason.


.



Relevant Pages

  • Re: hosts seems to not be used by the resolver
    ... nslookup does not refer to the /etc/hosts file. ... anyone use nslookup for anything except giving information to a human? ... SSH that do reverse DNS lookups and watch the craziness *they* create when ...
    (comp.os.linux.setup)
  • Re: CNET.com
    ... >> the DNS and getting an invalid address, ... --- "Mike" wrote in message ... If not you won't have nslookup and>> will have to check that your HOSTS file isn't causing any>> interference in the lookups. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Broken nsswitch.conf with Fedora?
    ... I don't get nsswitch to work as I am used to it on other Unices ... e.g. on an HP-UX box I would simply add these entries ... $ grep hosts /etc/nsswitch.conf ... The nice thing on HP-UX is that they even patched their nslookup ...
    (Fedora)
  • Re: Cant get to certain sites
    ... >A more likely explanation is a problem with your DNS ... >Since you have XP you could use nslookup to check it. ... either in HOSTS or in your dnscache. ... >the dnscache by entering this command in a command ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: DNS page error with Windows Update
    ... DNS address might have been used by the lookup for the ping ... You could check that possibility by forcing nslookup to use ... If you do have HOSTS entries they may show up with these commands: ... hides the HOSTS file in a different directory. ...
    (microsoft.public.windowsupdate)