[NBLUG/talk] Setting up RH 9

Ron Wickersham rjw at alembic.com
Fri Oct 3 20:11:02 PDT 2003


hi Todd,

On Fri, 3 Oct 2003, Todd Cary wrote:

> I have found the problem, but I do not know enough about Linux to know
> what to change...
>
> Here is the current "hosts" file that "sendmail" likes:
>
> # Do not remove the following line, or various programs
> # that require network functionality will fail.
> 127.0.0.1    localhost.localdomain    localhost
> 192.168.0.11    fireball
> 192.168.0.20    blue-thunder
> 192.168.0.12    linux
> # 192.168.0.22    tlix
> 192.168.0.22    t-lix
>
> "getname" returns "tlix", so somwhere in the scheme of things, "tlix"
> when in the hosts file is "not liked".
>
> Also, when I am on another computer that is part of the DOMAIN, I can
> ping "tlix"; but not "t-lix".

what you have in /etc/hosts is only used by this machine when it needs the
numeric address of another machine.    you need to make the change in all
the machines on the network, changing the ipaddress and name on t-lix is
not communicated to the other machines.

think of it this way...ip (internet protocol) only talks to other machines
by numbers.  for convenience we use human-friendly names, and when we ping
a host name we rely on the computer to look up the numeric address.
where does the machine find the information?   in the hosts file, for
starters.  in the really old days of the internet, all the hosts on the
internet were listed in each machine's hosts file.  and you had to update
your hosts file whenever a new machine was added anywhere in the world to
the internet.  obviously this method became very inconvenient as thousands
and then millions of machines were added.  i don't even have an estimate of
the size of a global hosts file today, but i bet it exceeds the capacity
of the drive in your computer.

the /etc/hosts file is perfectly adequate for a small network and may be
less hassle than setting up a DNS server for four machines.  but if you're
on blue-thunder and want to ping t-lix then blue-thunder looks up t-lix's
ip address in blue-thunder's hosts file.   so make sure all machines have
the same hosts file.    the advantage of DNS is that you have only one file
(the domain zone file) on the DNS server to maintain, and that other
machines anywhere on the internet can look up your hosts numeric addresses
automatically.  this based on having public numeric addresses.  when you
have private addresses, there is no way to communicate with the machines
from the greater internet anyway (at least with their private numbers) so
many people would just set up /etc/hosts files for a small private network,
unless they had experience in running DNS (or wanted to gain experience).

but we still have the issue of getting mail problem messages back to you
so i think you will want to have a fully-qualified entry in /etc/hosts for
at least the machine that's acting as the mail server.  so the line in
/etc/hosts might look like this:

192.168.0.22    t-lix.aristesoftware.com	t-lix

so you would have numeric lookups for both the fully-qualified name and
the short host name as well.

once you get all the hosts files synced we still need to have an idea
what sendmail thinks its hostname is. so you still need to type:

telnet localhost 25

and see what you get.

###

i've never run into the command getname.   i've only seen the command
hostname to see what the host name of the machine is.   hostname with
an argument can also be used to temporarily change the name of a machine
without having to reboot, like hostname mynewname

-ron





More information about the talk mailing list