Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I configure the /etc/hosts in red aht ES 5.4 I want to ask what is the function of "loghost ".. If I miss it , any different or problem ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2009
    Posts
    44

    loghost in etc host


    Hi,
    I configure the /etc/hosts in red aht ES 5.4
    I want to ask what is the function of "loghost "..
    If I miss it , any different or problem ??/

    Below is the etc/hosts file

    127.0.0.1 localhost
    192.168.59.10 A.abc.com A loghost
    192.168.59.12 B.abc.com B
    192.168.59.13 C.abc.com C

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,439
    Well, someone decided to point loghost to 192.168.59.10
    You should be able to tell, if that hostname/IP is correct.

    If you remove loghost from /etc/hosts on that rh 5.4 box, then it probably cannot resolve the name loghost anymore.
    So, *guessing* from the name: maybe remote logging wont work from there on.

    Apart from that:
    Usually, DNServer are prefered in comparison to /etc/hosts, as they provide a central and consistent way of managing hostnames, etc
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    May 2011
    Posts
    44
    From wikipedia:
    The hosts file contains lines of text consisting of an IP address in the first text field followed by one or more hostnames. Each field is separated by white space (blanks or tabulation characters). Comment lines may be included; they are indicated by a hash character (#) in the first position of such lines. Entirely blank lines in the file are ignored. For example a typical hosts file may contain the following:
    #This is an example of the hosts file
    127.0.0.1 localhost loopback
    ::1 localhost
    What this means is the example computer is now able to resolve host names 'localhost' and 'loopback' to 127.0.0.1 (the loopback interface), because the hosts file is an IP followed by a list of host names that resolve to the IP.

    IOW `loghost` is the name assigned (locally on the machine that has the /etc/hosts file) to the computer at 192.168.59.10.

    try to ping loghost from the command line, see how ping automatically resolves the host name into an IP?

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •