Google
 

host name

A hostname (occasionally also, a sitename) is the unique name by which a network-attached device (which could consist of a computer, file server, network storage device, fax machine, copier, cable modem, etc.) is known on a network. The hostname is used to identify a particular host in various forms of electronic communication such as the World Wide Web, e-mail or Usenet.

On the Internet, the terms "hostname" and "domain name" are often used interchangeably, but there are subtle technical differences between them.

Contents

[hide]

[edit] Overview

Hostnames are used by various naming systems, NIS, DNS, SMB, etc., and so the meaning of the word hostname will vary depending on naming system in question, which in turn varies by type of network. A hostname meaningful to a Microsoft NetBIOS workgroup may be an invalid Internet hostname. When presented with a hostname and no context, it is usually safe to assume that the network is the Internet and DNS is the hostname's naming system.

Host names are typically used in an administrative capacity and may appear in computer browser lists, active directory lists, IP address to hostname resolutions, email headers, etc. They are human-readable nick-names, which ultimately correspond to unique network hardware MAC addresses. In some cases the host name may contain embedded domain names and/or locations, non-dotted IP addresses, etc.

On a simple local area network, a hostname is usually a single word: for instance, an organization's CVS server might be named "cvs" or "server-1".

[edit] Internet hostnames

On the Internet, a hostname is a domain name assigned to the host. This is usually a combination of the host's local name with its parent domain's name. For example, "en.wikipedia.org" consists of a hostname ("en") and the domain name "wikipedia.org". This kind of hostname is translated into an IP address via the local hosts file, or the Domain Name System (DNS) resolver. It is possible for a single host to have several hostnames; but generally the operating system of the host prefers to have one hostname that the host uses for itself.

Any domain name can also be hostname, as long as the restrictions mentioned below are followed. So, for example, both "en.wikimedia.org" and "wikimedia.org" are hostnames because they both have IP addresses assigned to them. The domain name "pmtpa.wikimedia.org" is not a hostname since it does not have an IP address, but "rr.pmtpa.wikimedia.org" is a hostname. All hostnames are domain names, but not all domain names are hostnames.

[edit] Restrictions on valid host names

Hostnames, like all domain names[1], are made up of a series of "labels", with each label being separated by a dot. Each label must be between 1 and 63 characters long, and there is a maximum of 255 characters when all labels are combined.

Unlike domain names, hostname labels can only be made up of the ASCII letters 'a' through 'z' (case-insensitive), the digits '0' through '9', and the hyphen. Labels can not start nor end with a hyphen. Special characters other than the hyphen (and the dot between labels) are not allowed, although they are sometimes used anyway. Underscore characters are commonly used by Windows systems but according to RFC 952 they are not allowed and several systems, such as DomainKeys and the SRV record deliberately use the underscore to make sure their special domain names are not confused with a hostname. Since some systems will check to make sure that hostnames contain only valid characters and others do not, the use of the invalid characters such as the underscore has caused many subtle problems in systems that connect to the wider world.

So, the hostname "en.wikipedia.org" is made up of the DNS labels "en", "wikipedia" and "org". Labels such as "2600" and "3com" can be used in hostnames, but "-hi-" and "*hi*" are invalid.

A hostname is considered to be a fully qualified domain name (FQDN) if all the labels up to and including the top-level domain name (TLD) are specified. Depending on the system, an unqualified hostname such as "compsci" or "wikipedia" may be combined with default domain names in order to determine the fully qualified domain name. So, a student at Harvard may be able to send mail to "joe@compsci" and have it sent to compsci.harvard.edu.

[edit] Choosing host names

General guidelines on choosing a good hostnames are outlined in RFC 1178. The folklore interest of hostnames stems from the creativity and humour they often display. Interpreting a sitename is not unlike interpreting a vanity licence plate; one has to mentally unpack it, allowing for mono-case and length restrictions and the lack of whitespace. Hacker tradition deprecates dull, institutional-sounding names in favour of punchy, humorous, and clever coinages (except that it is considered appropriate for the official public gateway machine of an organisation to bear the organisation's name or acronym). Mythological references, cartoon characters, animal names, and allusions to sci-fi or fantasy literature are probably the most popular sources for sitenames (in roughly descending order). The obligatory comment is Harris's lament: "All the good ones are taken!"

It is often possible to guess a hostname for a particular institution. This is useful if you want to know if they operate network services like anonymous FTP, World-Wide Web or finger. First try the institution's name or obvious abbreviations thereof, with the appropriate domain appended, e.g. "mit.edu". If this fails, prepend "ftp." or "www." as appropriate, e.g. "www.data-io.com". You can use the ping command as a quick way to test whether a hostname is valid.

[edit] See also

[edit] Notes and references

[edit] External links

  • RFC 952 - "DoD Internet host table specification."
  • RFC 1034 - "DOMAIN NAMES - CONCEPTS AND FACILITIES" (In particular, section 3.5)
  • RFC 1035 - "DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION" (In particular, section 2.3.1)
  • RFC 1123 - "Requirements for Internet Hosts - Application and Support."
  • RFC 1178 - "Choosing a Name for Your Computer"
  • RFC 3696 - "Application Techniques for Checking and Transformation of Names"