LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 09: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, 12:18 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
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, 12: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: 344Reputation: 344Reputation: 344Reputation: 344
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



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 06:05 AM
How to tell what process last wrote to a file? - hosts file being updated by unk kcoriginal Linux - General 1 12-28-2008 11:53 PM
apache2 virtual hosts issue Geminias Linux - Networking 0 10-08-2006 03:23 PM
apache and /etc/hosts issue gravesb Linux - Software 14 08-10-2005 09:32 AM
does the /etc/hosts file work same as the M$ hosts file? Lleb_KCir Linux - Software 6 04-03-2004 04:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:51 AM.

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
Open Source Consulting | Domain Registration