named.hosts -- hosts database file


$INCLUDE named.soa

host [ttl] class A address

[host [ttl] class A address] [alias [ttl] class CNAME host] [host [ttl] class HINFO hardware OS] [host [ttl] class WKS address protocol services] [name [ttl] class PTR host] [host [ttl] class TXT string] [host [ttl] class MX preference mail_exchanger] [owner [ttl] class RP mail_exchanger txt_host]
[host [ttl] class AFSDB subtype mail_exchanger] [$ORIGIN domain] [$INCLUDE filename]


The named.hosts file contains the authoritative information for a zone. It is located in the directory specified in the directory substatement of the options statement in named.conf. The file named is arbitrary; it can be specified in the primary record in named.conf.

This is created manually on the primary server.

Required records

specifies the Start Of Authority record for each zone over which it has authority. See named.soa(SFF) for a description of this record.

specifies the Name Server record for each name server in the zone. For example:
;{name}   {ttl}       class    NS    nameserver
                      IN       NS
In this example, is the name of a name server in the current zone. Each name server must have an NS record.

NOTE: These two records, SOA and NS, comprise the file named.soa. Instead of listing these two records, you can substitute the directive $INCLUDE named.soa.

specifies the Address record for each host in the zone. For example:
;{name}    {ttl}       class    A     address
host1                  IN       A
In this example, host1 is the host name, and is its IP address. There should be one A record for each address of each machine.

Optional directives

includes information from another file.

changes the domain origin. It resets the current origin for relative domain names. For example:
This example appends to every address in the file until another $ORIGIN.

Optional records

Records for the same host can be grouped together. If name is not specified, the last name specified is used.

The DCE or AFS Server record specifies the hosts that provide a style of distributed service advertised under this domain name. For example:
;name     {ttl}  class  AFSDB  subtype  mail_exchanger        IN     AFSDB  1
This is an experimental record. Subtype 1 indicates that the named host is an AFS (R) database server for the AFS cell of the given domain name. Subtype 2 indicates that the named host provides intra-cell name service for the DCE (R) cell named by the given domain name.

The Canonical Name record defines an alias for a host. For example:
;alias     {ttl}    class    CNAME     canonical_name
nickname            IN       CNAME     host1
In this example, nickname is an alias for host1.

The Host Information record lists the hardware and operating system running on a host. For example:
;{name}    {ttl}      class    HINFO     hardware     OS
host1                 IN       HINFO     VAX-11/780   UNIX
In this example, host1 is a VAX-11/780 running UNIX.

The Mail Exchanger record specifies a list of hosts which are configured to receive mail sent to this domain. For example:
;{name}   {ttl}  class  MX  preference  mail_exchanger        IN     MX  0 
In this example, is a mail gateway that knows how to deliver mail to Every host which receives mail should have an MX record. The preference is the order that a mailer should follow when there is more than one way to deliver mail to a host (lower numbers have higher precedence).

The Domain Name Pointer record defines a special name that points to some other location in the domain. This is generally used to set up reverse pointers for IN-ADDR.ARPA. For example:
;{name}    {ttl}       class    PTR     hostname
7.0                    IN       PTR
In this example, 7.0 is the pointer to, and is the unique octets of its IP address in reverse order. The trailing dot on prevents DNS from appending the current $ORIGIN. This is generally used in named.rev and is required by gethostbyaddr(SLIB).

The Responsible Person record identifies the name or group name of the responsible person for a host. For example:
;owner    {ttl}  class  RP  mail_exchanger    txt_host
ownername        IN     RP
In this example, ownername is the name or group name of the responsible person. mail_exchanger is the owner's mailbox (specified in MX). txt_host is the address of relevant TXT records.

The Text record contains free-form textual data and is generally used to store administrative data. For example:
;name    {ttl}       class    TXT    string            IN       TXT    "text"

The Well-Known Services record describes the well-known services supported by a particular protocol at a specified address. The list of services and port numbers come from the list of services specified in /etc/services. The services are grouped by protocol, with one WKS record per protocol per host (if the list of services crosses to a new line, enclose them in parentheses). For example:
;{name} {ttl} class WKS address       protocol services
              IN    WKS   UDP      (echo tftp
In this example, echo, tftp, and domain are the well-known services for UDP on the machine with address



See also

named(ADMN), named.conf(SFF), named.local(SFF), named.rev(SFF), named.soa(SFF), root.cache(SFF)

Standards conformance

This file is conformant with the Standard Resource Record Format specified in RFC 1035.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003