Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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