LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-10-2012, 10:39 AM   #1
ranjithtk
LQ Newbie
 
Registered: Jun 2012
Posts: 1

Rep: Reputation: Disabled
/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
 
Old 06-10-2012, 01:18 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 15,374

Rep: Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198Reputation: 2198
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.
 
Old 06-10-2012, 01:31 PM   #3
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 343Reputation: 343Reputation: 343Reputation: 343
Hi there,

Quote:
Originally Posted by ranjithtk View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
issue with /etc/hosts file nekkro-kvlt Linux - Networking 2 06-05-2009 07:05 AM
How to tell what process last wrote to a file? - hosts file being updated by unk kcoriginal Linux - General 1 12-29-2008 12:53 AM
apache2 virtual hosts issue Geminias Linux - Networking 0 10-08-2006 04:23 PM
apache and /etc/hosts issue gravesb Linux - Software 14 08-10-2005 10:32 AM
does the /etc/hosts file work same as the M$ hosts file? Lleb_KCir Linux - Software 6 04-03-2004 05:33 PM


All times are GMT -5. The time now is 03:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration