1833735 Members
2772 Online
110063 Solutions
New Discussion

resolving server names

 
SOLVED
Go to solution
Shivkumar
Super Advisor

resolving server names

i know that a server name is resolved by either /etc/hosts or /etc/resolv.conf but once i observed that server name was resolved without entries in either of them ?

how is it possible ?
4 REPLIES 4
RAC_1
Honored Contributor
Solution

Re: resolving server names

The resoltion of different things (hosts, services, alises, groups etc) is controlled by what you define in /etc/nsswitch.conf file. If the host address is defined to be resolved in certain order (for example say /etc/hosts file first and then dns), then the entry in /etc/nsswitch.conf (for hosts directive) will look as follows.

hosts : files dns

read man pages for nsswitch.conf and resolver, resolv.conf for details.
/etc/resolv.conf defines dns look policies and settings.
There is no substitute to HARDWORK
Arunvijai_4
Honored Contributor

Re: resolving server names

Hi Shiv,

This happens because of you have configured /etc/nsswitch.conf to get host names. Check any of these files in your 11i,

1) nsswitch.compat
2) nsswitch.files
3) nsswitch.hp_defaults
4) nsswitch.nis
5) nsswitch.nisplus

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Devender Khatana
Honored Contributor

Re: resolving server names

Hi,

The entry for hostname need not to be metioned in /etc/resolv.conf, it only contains the entry for the source which can be used to resolv the hostname or other parameters like passwd, group, services, networks etc.

The name defined in /etc/nsswitch.conf will actually refer to the database which should be contacted for resolving the name. It can be NIS,NIS+,DNS etc.

HTH,
Devender
Impossible itself mentions "I m possible"
Senthil Prabu.S_1
Trusted Contributor

Re: resolving server names

Hi Shiv,

Server name was resolved because you might have configured /etc/nsswitch.conf to get host names.

Is your server is a NIS client.


--
Prabu.S
One man's "magic" is another man's engineering. "Supernatural" is a null word.