domain name / host name
matthias.rampke at googlemail.com
Sun May 31 03:00:15 PDT 2015
(Trying to answer the original question a bit more broadly).
This is not a DragonFly specific distinction, it exists in the same way in
all Unix-ish systems I know of; some are just more defaulty about it. OS X,
for example, asks you for a computer name during setup (which it mangles to
make a hostname without spaces), but just defaults the domain name to
Traditionally, the "hostname" represents the identity of a machine, and the
domain the network it belongs to. DNS and other mechanisms help resolving
*the combination of both* to a routable (IP) address, but they build on top
of the original concept and are not a prerequisite.
The hostname in this sense is a variable in memory, you can manipulate and
query it using the hostname command. The domain is set in /etc/hosts and
read from there.
There is a bit of divergence in what to use as "the hostname". Hence, more
terminology was created:
When you enter "thehost" as hostname, and "example.org" as domain, your box
has a Fully Qualified Domain Name (FQDN) of thehost.example.org. When you
type "hostname" on the shell, you get "thehost", " hostname -f" gives "
However, in many installations, people just set the FQDN as the hostname.
For example, Chef used to have some weird edge cases if you don't do this.
In that case, " hostname " would give the FQDN, as would "hostname -f".
Since you sometimes still want just the host part, there is " hostname -s"
which always only gives the part before the first dot. Of you want to
specifically talk about this part, it's called the "short hostname".
Put together, FQDN = short hostname + domain; hostname = either short
hostname or FQDN.
All this is internal to the node; it does not matter whether the domain "
exists " or is resolvable. It's purely self-identification up to this point.
However, many applications use this identity in contexts where it is
communicated to others.
One example is sending email; unless specifically configured otherwise,
sending email as user "emily" on our example host will generate it with a
sender address of "emily at thehost.example. org". The daily scripts just
happen to be something that sends email from a vanilla DragonFly box (but
normally only locally).
Spam filters frequently back-check if the name you say you are sending from
resolves back to you (in various ways); so if your FQDN is not resolvable
you are very likely to have this email classified as spam.
Another example are local network sharing/discovery protocols; SMB for "
windows networks" and Bonjour for "Mac networks" being the most notable.
Both include (among other things) mechanisms to a) enumerate all
participating hostnames in the local network and b) resolve those names
back to IP addresses. On DragonFly, both require additional software (samba
for SMB, avahi for Bonjour); but when you install and enable them they use
I hope that makes it more clear what these are about?
On Fri, May 29, 2015, 19:22 Christoph Harder <shadowomf at arcor.de> wrote:
In the setup one may provide a hostname and domain for the computer.
How and where is this information exactly used?
Hostname is pretty self-explaining, though I'm not sure, can it be used to
access it like in a local windows network e.g. \\mycomputer\shareddisk\
e.g. after setting up an NFS share?
And domain, is a real domain name required/recommend? One that is
resolvable through DNS?
And what happens if there are multiple domains hosted on a single server'?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users