Networking Forums

Networking Forums > Computer Networking > Linux Networking > hosts file

Reply
 
 
McHenry
Guest
Posts: n/a

 
      06-08-2006, 12:32 AM
I have two Centos servers in a prviate office.

Our business has a registered domain name.

Should the hosts files on the two servers contain entries for the ip add &
machine name or ipadd and fqdn ?

Thanks


 
Reply With Quote
 
 
 
 
left_coast
Guest
Posts: n/a

 
      06-08-2006, 12:52 AM
McHenry wrote:

> I have two Centos servers in a prviate office.
>
> Our business has a registered domain name.
>
> Should the hosts files on the two servers contain entries for the ip add &
> machine name or ipadd and fqdn ?
>
> Thanks



If you have the man pages installed, I suggest you read the man page for
hosts. But I would suggest something like

<IP address> fqdn machine_name

Then either the fqdn or the machine name could be used.

--
NOTE: Name change. Was matt_left_coast.
Dan C. Gets caught apparently Plagiarizing:
Message ID: <3ab7l3-(E-Mail Removed)>
Yeah, this is the type critical of me!
 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      06-08-2006, 08:03 PM
On Thu, 8 Jun 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<44877032$0$26212$(E-Mail Removed)>, McHenry wrote:

>Should the hosts files on the two servers contain entries for the ip add &
>machine name or ipadd and fqdn ?


Not sure what you mean by 'machine name'. If that is the host portion of
the FQDN, no. There should be two entries (minimum) for a host that has
a registered address:

127.0.0.1 localhost
192.0.2.10 full.host.name.example.com alias shortname

The full name is not required for localhost (localhost.localdomain) as this
is a special case. You _can_ put it in if you want it, but it's not required.

The full name of the host _is_ required as it is often needed as part of the
boot scripts. It needs to be the first following the address. You can then
add (optional) shortnames or aliases which would be used by this host. The
whitespace between address and name(s) is a tab or space(s). Note that while
hostnames can be long (63 char between dots, 255 char max in most modern
implementations - 14/80 for ancient stuff), make sure the text editor you
are using isn't "helping" you by auto-inserting line wrapping at some
arbitrary length. If you 'grep' the hosts file for a hostname, grep should
return the entire line, not parts of it.

You can have only one line with a specific IP address. You can have only
one line with a specific hostname. If your systems do not have continuous
access to a name server (DNS, NIS or whatever) that can resolve any hostname
on your local networks, you should include a line for each host on your LAN
that will be connecting to this server.

Old guy
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xp hosts file andrew Home Networking 26 04-30-2008 10:22 AM
hosts file Mike Windows Networking 6 01-08-2005 11:17 PM
Hosts file in win 98 SE LBJ Windows Networking 1 12-10-2003 03:19 AM
hosts file frank neuner Windows Networking 1 10-08-2003 07:31 PM
Hosts file in Win 98 John McLean Windows Networking 2 09-08-2003 12:10 PM



1 2 3 4 5 6 7 8 9 10 11