LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-20-2014, 09:41 AM   #1
supersteven
LQ Newbie
 
Registered: Dec 2013
Posts: 6

Rep: Reputation: Disabled
Hostname Configuration Files


According to my reference manual, RHCSA/RHCE Red Hat Linux Certification Study Guide, "the /etc/hosts file is a static database of hostname and IP addresses". It also states, "that every time a system is added or removed, you'll have to change this file--not only on the local system, but also on every other system on the network".

Does this mean that if I am setting up a test network with three VM's, using static IP addresses, that I must add the static IP address and hostname for the three VM's to this file and then do the same thing on each of these VM's /etc/hosts file too?

If so, why is this required, so they can communicate?

Steven
 
Old 01-20-2014, 10:12 AM   #2
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by supersteven View Post
Does this mean that if I am setting up a test network with three VM's, using static IP addresses, that I must add the static IP address and hostname for the three VM's to this file and then do the same thing on each of these VM's /etc/hosts file too?
Yes, you should

Quote:
Originally Posted by supersteven View Post
If so, why is this required, so they can communicate?
Actually its not required for _them_ to communicate but for _us_ (humans) to make things easier. Computers only talk by IP numbers but we humans are aquainted to names. Think about the hosts file as a dictionary and you're a foreigner. You look up some stuff but the natives (computes) dont actually need to talk to with each other.
 
2 members found this post helpful.
Old 01-20-2014, 10:20 AM   #3
lpwevers
Member
 
Registered: Apr 2005
Location: The Netherlands
Distribution: SuSE, CentOS
Posts: 128

Rep: Reputation: 20
Hi,

Well, it depends a bit on your configuration and what you want to do. If you have the VM's registered in DNS there's no need. If you don't have them in DNS and you don't need to go from 1 machine to the other by hostname there's also no need.

You can always access them by IP-address.

So, it's only required if you want to access them by hostname and you don't have DNS running.

Louis
 
1 members found this post helpful.
  


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
Postfix Hostname / domain name configuration problem. farrukhndm Linux - Server 6 10-30-2010 08:05 PM
About hostname configuration on BIND. sparc86 Linux - Server 1 01-02-2010 04:47 PM
Squid Configuration (Visible Hostname) villajohn Linux - Software 7 02-25-2009 01:20 PM
Suse 9.3 - Hostname Proper Configuration? macgyver007 Linux - Newbie 0 04-18-2005 08:15 PM
Hostname Configuration strimp099 Linux - Networking 1 12-28-2004 03:48 AM


All times are GMT -5. The time now is 05:22 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration