This is a discussion on Re: Impact of having loghost defined in DNS...? - DNS ; > Date: Sun, 28 Nov 2004 19:19:38 -0500 > From: Danny Mayer > > At 04:40 AM 11/28/2004, Gregory Hicks wrote: > >Greetings: > > > >Not sure if this is "on-topic" or not, but what would you expect the ...
> Date: Sun, 28 Nov 2004 19:19:38 -0500
> From: Danny Mayer
> At 04:40 AM 11/28/2004, Gregory Hicks wrote:
> >Not sure if this is "on-topic" or not, but what would you expect the
> >impact of defining "loghost" to be 127.0.0.1 via DNS...
> >My db.127.0.0 PTR file already has
> >18.104.22.168.IN-ADDR.ARPA. IN PTR localhost.
> >entered, and I don't see how any other name can be added to this when
> >running under Bind 9.3...
> You can add as many records as you like. However there are no known
> applications that ever look beyond the first record nor is it clear why
> it would need to.
> >It would be possible to define loghost as
> >loghost.example.com. IN A 127.0.0.1
> >localhost.example.com. IN A 127.0.0.1
> >in the main zone file, but I don't see any other way to do it other
> >than defining the entry in the /etc/hosts file.
> Those are valid records. /etc/hosts only affects the local system.
> >Any thoughts on any potential impacts?
> No impact. It's not clear why you want to define a "loghost". Maybe
> you should tell us the problem you are trying to solve instead
> of this non-problem.
I, and several others, were asked the following:
What impact, if any, would there be if we were to add 'loghost' as an
alias to 'localhost' in DNS/LDAP/NIS?
My response to this was:
"loghost" is generally, the "logging" host for syslogd via syslog.conf,
"loghost" should be defined in /etc/hosts on each machine and should be
an alias for the name/IP address of that particular machine.
It is OK to put the loghost entry on the 'localhost' entry on each
machine. Almost all current OSs make this as the default entry, but
"loghost" should NOT be defined in LDAP/host/DNS. The 127.0.0.1
hostname/IP address is defined on each machine in /etc/hosts thusly:
This is the ONLY place that the entry is valid. There is no "domain"
for "localhost" that is a standard. (Linux uses "localdomain" but this
is ALSO only valid for the local machine since there is no TLD called
However, if you DO define it in DNS, then the db.127.0.0 file on ALL
dns servers should be updated... However, the PTR records do not
really allow for multiple names having the same IP address....
when you look up "localhost" via DNS, you are NOT
looking up "localhost" as the OS understands it. You are really
looking up "localhost.example.com". This is NOT the same NAME as
"localhost" on each individual machine since "localhost" is tied by the
OS (as in HARD-WIRED or HARD-CODED) to the loopback interface.
You may get the same IP address by resolving the name from DNS instead
of from /etc/files, but what you are resolving is NOT the same NAME
that the OS uses... In fact, if you do add it to DNS/LDAP, the name is
no longer "loghost" (as is used in /etc/syslog.conf), but
"loghost.cadence.com" since the ONLY db file you can add it to is
db.cadence... (There is no db.localhost available via DNS since there
is no DOMAIN associated with the name...)
Defining the name at all in /etc/hosts on either the localhost entry or
the machine hostname entry just 'defines' the name for the m4
processing of syslog.conf. At the point when this processing is taking
place, DNS and LDAP has not yet been started. The OS is relying on
/etc/hosts for any IP address info.
Some examples using "getent" and letting the OS resolve the IP
ghicks-vpn% getent hosts loghost
22.214.171.124 ghicks-vpn ghicks-vpn.cadence.com loghost ghicks-dsl
ghicks-vpn% rsh metis getent hosts loghost
metis being added to access control list
126.96.36.199 metis metis.cadence.com loghost
ghicks-vpn% rsh cadence getent hosts loghost
188.8.131.52 cadence loghost
ghicks-vpn% rsh cds2 getent hosts loghost
184.108.40.206 cds2.Cadence.COM cds2 loghost
ghicks-vpn% rsh nis11-7 getent hosts loghost
127.0.0.1 localhost loghost
ghicks-vpn% rsh adder getent hosts loghost
220.127.116.11 adder loghost
It does not appear to be defined on the several Linux hosts I checked.
Gregory Hicks | Principal Systems Engineer
Cadence Design Systems | Direct: 408.576.3609
555 River Oaks Pkwy M/S 6B1 | Fax: 408.894.3479
San Jose, CA 95134 | Internet: firstname.lastname@example.org
I am perfectly capable of learning from my mistakes. I will surely
learn a great deal today.
"A democracy is a sheep and two wolves deciding on what to have for
lunch. Freedom is a well armed sheep contesting the results of the
decision." - Benjamin Franklin
"The best we can hope for concerning the people at large is that they
be properly armed." --Alexander Hamilton