Operating System - HP-UX
1753672 Members
5387 Online
108799 Solutions
New Discussion юеВ

Force ping and Oracle to use /etc/hosts first

 
SOLVED
Go to solution
jasonK_1
Frequent Advisor

Force ping and Oracle to use /etc/hosts first

Hi,

In my /etc/nsswitch.conf, I have the following order: hosts then dns as below - all in one line
hosts: files [NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]

But somehow ping and Oracle always use the DNS. So the question is how do I force them to use the hosts file first?

Thanks,
Jason
3 REPLIES 3
Earl_Crowder
Trusted Contributor
Solution

Re: Force ping and Oracle to use /etc/hosts first

Add an entry for ipnodes to nsswitch.conf...

ipnodes: files [NOTFOUND=continue] dns
jasonK_1
Frequent Advisor

Re: Force ping and Oracle to use /etc/hosts first

Wow... that's what I am looking for...Thanks
jasonK_1
Frequent Advisor

Re: Force ping and Oracle to use /etc/hosts first

Have an nice day