RE: domainname and hostname


Subject: RE: domainname and hostname
From: James Zuelow (jamesz@ideafamilies.org)
Date: Mon Jul 15 2002 - 08:59:59 AKDT


> -----Original Message-----
> From: aklug-bounce@aklug.org [mailto:aklug-bounce@aklug.org]On Behalf Of
> Justin Dieters
> Subject: domainname and hostname
>
> Hey all. I have a couple rather simple questions, but I can't seem to
> find any clear, simple answers to them anywhere.
>
I'm guessing that people replied to you individually yesterday. I'll post
to the list just in case someone searches the archives.

(Take my answers with a grain of salt, Justin - I don't have a lot of
experience with large networks so my answers reflect my limited experience
with smaller networks & home LANs. My answers may be corrected by more
knowledgeable people on the list.)

> 1. On a linux box, what are the domain name and host name?
>
The host name is a friendly name for your computer. "Joe" "Printserver"
"GX240" - whatever turns your crank.

The domain name is (roughly) the name of your local network. If you have a
public network, (accessible from the internet) then the domain name should
reflect the information in DNS. For example, a machine with the domain of
eed.state.ak.us should probably be on the Department of Education & Early
Development network. If you're on a private network not accessible from the
internet, just put whatever you want. justins.house is perfectly OK here.
In fact, I always use a fake TLD on private LANS such as .home or .house.
It is a good reminder that the LAN is a separate entity and special steps
need to be taken to interact with the outside world (read firewall/gateway).

> 2. What are their purpose as far as internet and local networks go?

Some applications use the system domain name and host name to generate
information. For example, if you install Postfix and don't tell it
otherwise, it will use the system hostname & domain name to generate mailing
addresses. This can lead to problems if you try to send mail to people and
your address is displayed as "justin@GX240.justins.house" - replies will
obviously not get to you, and some mail servers will refuse to accept the
mail at all when they cannot resolve the justins.house domain. You also
have to be careful when setting up Apache. If you let things sit with the
default install, the server will think of itself as "Apache 1.3.26 at
GX240.justins.house" - it is setting the server name from the system
entries. If the people browsing your site are just typing in an IP address
to get to you, things will mostly work. However Apache will occasionally
replace the IP address with the server name (GX240...). This sometimes
happens when Apache rewrites a URL (for redirects or fixing a missing
trailing /). People browsing your site will suddenly get 404 errors when
their browsers can't find the justins.house domain.

This is something to consider when you set up a private LAN in your home or
office - you have to rewrite some things before they get out into the wild.
Generally, any server (mail, web, ftp, etc.) that has contact with the
outside would should know its public name as well as its name on the LAN.

> 3. What would one typically put into these settings and how/when do they
> come into play?

Umm, see above. Hostnames should generally be descriptive, not random. For
example "PrintServer03" is good. If you have a large number of hosts, you
can play little games like everything in accounting is named after LOTR
characters, everything in shipping is named after Star Trek characters, all
of the printers are named after famous authors, etc. Then when there's a
problem you know where to look. For a home LAN naming conventions are not
really that important, as you probably know exactly what every machine does.

>
> Thanks!
> Justin
>
Cheers,

James

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Mon Jul 15 2002 - 09:00:11 AKDT