View Single Post
  #4   (View Single Post)  
Old 9th December 2010
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

You're very confused.

First, it's user@host.domain.name -- this is not what you have been considering.

Second, you are right. If it is a private network, or no network at all, you do not need a domain name. But you will still need the name to resolve, via DNS or via /etc/hosts files.

Example: Two computers, "Barbie" and "Ken" are on a private network together. Barbie is at 10.0.0.1, and Ken is at 10.0.0.2.

Obviously, in order for Barbie to reach Ken, applications must either use the 10.0.0.2 IP address, or resolve "Ken" to 10.0.0.2.

What is not quite so clear is that Barbie needs to know it is at 10.0.0.1. This is done through the resolver, which points to DNS server(s), or to the /etc/hosts file, or to both -- in the order you choose. See the resolv.conf(5) man page.

There are many network applications that look up their host name (fully qualified -- meaning including the domain name if there is one) to figure out their own IP address.

You can change your hostname (and domain name) at any time. It's in the /etc/hostname file. See the hostname(5) man page. But what you put in /etc/hosts or in your DNS server configurations should match it.

Both Barbie and Ken need to be able to resolve each other's IP addresses. But they also need to be able to resolve their own.
Reply With Quote