LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   /etc/hosts file issue (https://www.linuxquestions.org/questions/linux-newbie-8/etc-hosts-file-issue-4175410735/)

ranjithtk 06-10-2012 09:39 AM

/etc/hosts file issue
 
Dear Team,

We have added more than three thousand entries in etc/hosts file for the local naming resolution. Some times naming resolution is not happening properly. We have restarted the network service after updated the hosts file. Kindly suggest what is correct procedure to update /etc/hosts file and is there any count limit for hosts file?

we are using red hat 5 in our system.

thanks in advance..

regards
ranjith

jefro 06-10-2012 12:18 PM

nslookup or dig the name to see what is resolving it.

Be sure to watch out for www.somename.com and somename.com issues.

Cache in some apps might need to be cleared. The hosts file tends to be checked at the start of an app. Changes made to hosts will not be checked until the app is restarted. It should not affect networking services.

A proxy.pac will not use a hosts file.

Doc CPU 06-10-2012 12:31 PM

Hi there,

Quote:

Originally Posted by ranjithtk (Post 4700022)
We have added more than three thousand entries in etc/hosts file for the local naming resolution. Some times naming resolution is not happening properly. We have restarted the network service after updated the hosts file. Kindly suggest what is correct procedure to update /etc/hosts file and is there any count limit for hosts file?

there is no rock hard limit to the number of entries in the /etc/hosts file. But three thousand seems like an awful lot. Bear in mind that the hosts file is searched first every time a DNS host name is being resolved, so a large hosts file like yours is very likely to slow down the DNS queries.
However, I can't think of a reason why it would sometimes fail altogether.

[X] Doc CPU


All times are GMT -5. The time now is 09:55 PM.