Copyright (c) 1986, 1988 The Regents of the University of California.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
@(#)files.me 6.10 (Berkeley) 4/22/91
.sh 1 "Files .pp The name server uses several files to load its data base. This section covers the files and their formats needed for named. .sh 2 "Boot File" .pp This is the file that is first read when named starts up. This tells the server what type of server it is, which zones it has authority over and where to get its initial data. The default location for this file is /\|etc\|/\|named\|.\|boot\|. However this can be changed by setting the BOOTFILE variable when you compile named or by specifying the location on the command line when named is started up. .sh 3 "Domain" .pp A default domain may be specified for the nameserver using a line such as .(b l domain Berkeley\|.\|Edu .)b .re The name server uses this information when it receives a query for a name without a ``.'' that is not known. When it receives one of these queries, it appends the name in the second field to the query name. This is an obsolete facility which will be removed from future releases. .sh 3 "Directory" .pp The directory line specifies the directory in which the nameserver should run, allowing the other file names in the boot file to use relative path names. .(b l directory /usr/local/domain .)b .re If you have more than a couple of named files to be maintained, you may wish to place the named files in a directory such as /usr/local/domain and adjust the directory command properly. The main purposes of this command are to make sure named is in the proper directory when trying to include files by relative path names with $Include and to allow named to run in a location that is reasonable to dump core if it feels the urge. .sh 3 "Primary Master" .pp The line in the boot file that designates the server as a primary server for a zone looks as follows: .(b l primary Berkeley\|.\|Edu ucbhosts .)b .re The first field specifies that the server is a primary one for the zone stated in the second field. The third field is the name of the file from which the data is read. .sh 3 "Secondary Master" .pp The line for a secondary server is similar to the primary except that it lists addresses of other servers (usually primary servers) from which the zone data will be obtained. .(b l secondary Berkeley\|.\|Edu 128.32.0.10 128.32.0.4 ucbhosts.bak .)b .re The first field specifies that the server is a secondary master server for the zone stated in the second field. The two network addresses specify the name servers that are primary for the zone. The secondary server gets its data across the network from the listed servers. Each server is tried in the order listed until it successfully receives the data from a listed server. If a filename is present after the list of primary servers, data for the zone will be dumped into that file as a backup. When the server is first started, the data are loaded from the backup file if possible, and a primary server is then consulted to check that the zone is still up-to-date. .sh 3 "Caching Only Server" .pp You do not need a special line to designate that a server is a caching server. What denotes a caching only server is the absence of authority lines, such as secondary or primary in the boot file. .pp All servers should have a line as follows in the boot file to prime the name servers cache: .(b l cache . root.cache .)b All cache files listed will be read in at named boot time and any values still valid will be reinstated in the cache and the root nameserver information in the cache files will always be used. For information on cache file see section on Cache Initialization. .sh 3 "Forwarders" Any server can make use of forwarders. A forwarder is another server capable of processing recursive queries that is willing to try resolving queries on behalf of other systems. The forwarders command specifies forwarders by internet address as follows: .(b l forwarders 128.32.0.10 128.32.0.4 .)b .re There are two main reasons for wanting to do so. First, the other systems may not have full network access and may be prevented from sending any IP packets into the rest of the network and therefore must rely on a forwarder which does have access to the full net. The second reason is that the forwarder sees a union of all queries as they pass through his server and therefore he builds up a very rich cache of data compared to the cache in a typical workstation nameserver. In effect, the forwarder becomes a meta-cache that all hosts can benefit from, thereby reducing the total number of queries from that site to the rest of the net. .sh 3 "Slave Mode" .pp Slave mode is used if the use of forwarders is the only possible way to resolve queries due to lack of full net access or if you wish to prevent the nameserver from using other than the listed forwarders. Slave mode is activated by placing the simple command .(b l slave .)b in the bootfile. If slave is used, then you must specify forwarders. When in slave mode, the server will forward each query to each of the forwarders until an answer is found or the list of forwarders is exhausted. .sh 3 "Remote Server" .pp To set up a host that will use a remote server instead of a local server to answer queries, the file /\|etc/\|resolv\|.\|conf needs to be created. This file designates the name servers on the network that should be sent queries. It is not advisable to create this file if you have a local server running. If this file exists it is read almost every time gethostbyname\|() or gethostbyaddr\|() is called. .sh 2 "Cache Initialization" .sh 3 root.cache .pp The name server needs to know the servers that are the authoritative name servers for the root domain of the network. To do this we have to prime the name server's cache with the addresses of these higher authorities. The location of this file is specified in the boot file. This file uses the Standard Resource Record Format (aka. Masterfile Format) covered further on in this paper. .sh 2 "Domain Data Files" .pp There are three standard files for specifying the data for a domain. These are named\|.\|local, hosts and host\|.\|rev. These files use the Standard Resource Record Format covered later in this paper. .sh 3 named\|.\|local .pp This file specifies the address for the local loopback interface, better known as localhost with the network address 127.0.0.1. The location of this file is specified in the boot file. .sh 3 hosts .pp This file contains all the data about the machines in this zone. The location of this file is specified in the boot file. .sh 3 hosts\|.\|rev .pp This file specifies the IN-ADDR\|.\|ARPA domain. This is a special domain for allowing address to name mapping. As internet host addresses do not fall within domain boundaries, this special domain was formed to allow inverse mapping. The IN-ADDR\|.\|ARPA domain has four labels preceding it. These labels correspond to the 4 octets of an Internet address. All four octets must be specified even if an octets is zero. The Internet address 128.32.0.4 is located in the domain 4\|.\|0\|.\|32\|.\|128\|.\|IN-ADDR\|.\|ARPA. This reversal of the address is awkward to read but allows for the natural grouping of hosts in a network. .sh 2 "Standard Resource Record Format" .pp The records in the name server data files are called resource records. The Standard Resource Record Format (RR) is specified in RFC1035. The following is a general description of these records:
Resource records have a standard format shown above.
The first field is always the name of the domain record
and it must always start in column 1.
For some RR's the name may be left blank;
in that case it takes on the name of the previous RR.
The second field is an optional time to live field.
This specifies how long this data will be stored in the data base.
By leaving this field blank the default time to live is specified
in the Start Of Authority resource record (see below).
The third field is the address class; currently, only one class is supported:
IN for internet addresses and other information.
The fourth field states the type of the resource record.
The fields after that are dependent on the type of the RR.
Case is preserved in names and data fields when loaded into the name server.
All comparisons and lookups in the name server data base are case insensitive.
.bl
.b
The following characters have special meanings:
.ip .
A free standing dot in the name field refers to the current domain.
.ip @
A free standing @ in the name field denotes the current origin.
.ip ".\|."
Two free standing dots represent the null domain name of the root when used in
the name field.
.ip "\\\X"
Where X is any character other than a digit (0-9),
quotes that character so that its special meaning does not apply.
For example, ``\e.'' can be used to place a dot character in a label.
.ip "\\\DDD"
Where each D is a digit, is the octet corresponding to the
decimal number described by DDD.
The resulting octet is assumed to be text and
is not checked for special meaning.
.ip "( )"
Parentheses are used to group data that crosses a line.
In effect, line terminations are not recognized within parentheses.
.ip ";"
Semicolon starts a comment; the remainder of the line is ignored.
.ip "*"
An asterisk signifies wildcarding.
.pp
Most resource records will have the current origin appended to names if they
are not terminated by a ``.''.
This is useful for appending the current domain name to the data,
such as machine names, but may cause problems where you do not want
this to happen.
A good rule of thumb is that, if the name is not in the domain for which
you are creating the data file, end the name with a ``.''.
.sh 3 $INCLUDE
.pp
An include line begins with $INCLUDE, starting in column 1,
and is followed by a file name.
This feature is
particularly useful for separating different types of data into multiple files.
An example would be:
.(b l
$INCLUDE /usr/named/data/mailboxes
.)b
The line would be interpreted as a request to load the file
/usr/named/data/mailboxes.
The $INCLUDE command does not cause data to be loaded into a
different zone or tree. This is simply a way to allow data for a
given zone to be organized in separate files. For example,
mailbox data might be kept separately from host data using this
mechanism.
.sh 3 $ORIGIN
.pp
The origin is a way of changing the origin in a data file.
The line starts in column 1, and is followed by a domain origin.
This is useful for putting more then one domain in a data file.
.sh 3 "SOA - Start Of Authority"
.(b L
.)b
The Start of Authority, SOA, record designates the start of a zone.
The name is the name of the zone.
Origin is the name of the host on which this data file resides.
Person in charge is the mailing address for the person responsible
for the name server.
The serial number is the version number of this data file,
this number should be incremented whenever a change is made to the data.
The name server cannot handle numbers over 9999 after the decimal point.
The refresh indicates how often, in seconds, a secondary name servers
is to check with the primary name server to see if an update is needed.
The retry indicates how long, in seconds, a secondary server is to retry
after a failure to check for a refresh.
Expire is the upper limit, in seconds, that a secondary name server
is to use the data before it expires for lack of getting a refresh.
Minimum is the default number of seconds to be used for the time to live
field on resource records.
There should only be one SOA record per zone.
.sh 3 "NS - Name Server"
The Name Server record, NS, lists a name server responsible
for a given domain.
The first name field lists the domain that is serviced by
the listed name server.
There should be one NS record for each Primary Master
server for the domain.
.sh 3 "A - Address"
The Address record, A, lists the address for a given machine.
The name field is the machine name and the address is the network address.
There should be one A record for each address of the machine.
.sh 3 "HINFO - Host Information"
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
@(#)files.me 6.10 (Berkeley) 4/22/91
.sh 1 "Files .pp The name server uses several files to load its data base. This section covers the files and their formats needed for named. .sh 2 "Boot File" .pp This is the file that is first read when named starts up. This tells the server what type of server it is, which zones it has authority over and where to get its initial data. The default location for this file is /\|etc\|/\|named\|.\|boot\|. However this can be changed by setting the BOOTFILE variable when you compile named or by specifying the location on the command line when named is started up. .sh 3 "Domain" .pp A default domain may be specified for the nameserver using a line such as .(b l domain Berkeley\|.\|Edu .)b .re The name server uses this information when it receives a query for a name without a ``.'' that is not known. When it receives one of these queries, it appends the name in the second field to the query name. This is an obsolete facility which will be removed from future releases. .sh 3 "Directory" .pp The directory line specifies the directory in which the nameserver should run, allowing the other file names in the boot file to use relative path names. .(b l directory /usr/local/domain .)b .re If you have more than a couple of named files to be maintained, you may wish to place the named files in a directory such as /usr/local/domain and adjust the directory command properly. The main purposes of this command are to make sure named is in the proper directory when trying to include files by relative path names with $Include and to allow named to run in a location that is reasonable to dump core if it feels the urge. .sh 3 "Primary Master" .pp The line in the boot file that designates the server as a primary server for a zone looks as follows: .(b l primary Berkeley\|.\|Edu ucbhosts .)b .re The first field specifies that the server is a primary one for the zone stated in the second field. The third field is the name of the file from which the data is read. .sh 3 "Secondary Master" .pp The line for a secondary server is similar to the primary except that it lists addresses of other servers (usually primary servers) from which the zone data will be obtained. .(b l secondary Berkeley\|.\|Edu 128.32.0.10 128.32.0.4 ucbhosts.bak .)b .re The first field specifies that the server is a secondary master server for the zone stated in the second field. The two network addresses specify the name servers that are primary for the zone. The secondary server gets its data across the network from the listed servers. Each server is tried in the order listed until it successfully receives the data from a listed server. If a filename is present after the list of primary servers, data for the zone will be dumped into that file as a backup. When the server is first started, the data are loaded from the backup file if possible, and a primary server is then consulted to check that the zone is still up-to-date. .sh 3 "Caching Only Server" .pp You do not need a special line to designate that a server is a caching server. What denotes a caching only server is the absence of authority lines, such as secondary or primary in the boot file. .pp All servers should have a line as follows in the boot file to prime the name servers cache: .(b l cache . root.cache .)b All cache files listed will be read in at named boot time and any values still valid will be reinstated in the cache and the root nameserver information in the cache files will always be used. For information on cache file see section on Cache Initialization. .sh 3 "Forwarders" Any server can make use of forwarders. A forwarder is another server capable of processing recursive queries that is willing to try resolving queries on behalf of other systems. The forwarders command specifies forwarders by internet address as follows: .(b l forwarders 128.32.0.10 128.32.0.4 .)b .re There are two main reasons for wanting to do so. First, the other systems may not have full network access and may be prevented from sending any IP packets into the rest of the network and therefore must rely on a forwarder which does have access to the full net. The second reason is that the forwarder sees a union of all queries as they pass through his server and therefore he builds up a very rich cache of data compared to the cache in a typical workstation nameserver. In effect, the forwarder becomes a meta-cache that all hosts can benefit from, thereby reducing the total number of queries from that site to the rest of the net. .sh 3 "Slave Mode" .pp Slave mode is used if the use of forwarders is the only possible way to resolve queries due to lack of full net access or if you wish to prevent the nameserver from using other than the listed forwarders. Slave mode is activated by placing the simple command .(b l slave .)b in the bootfile. If slave is used, then you must specify forwarders. When in slave mode, the server will forward each query to each of the forwarders until an answer is found or the list of forwarders is exhausted. .sh 3 "Remote Server" .pp To set up a host that will use a remote server instead of a local server to answer queries, the file /\|etc/\|resolv\|.\|conf needs to be created. This file designates the name servers on the network that should be sent queries. It is not advisable to create this file if you have a local server running. If this file exists it is read almost every time gethostbyname\|() or gethostbyaddr\|() is called. .sh 2 "Cache Initialization" .sh 3 root.cache .pp The name server needs to know the servers that are the authoritative name servers for the root domain of the network. To do this we have to prime the name server's cache with the addresses of these higher authorities. The location of this file is specified in the boot file. This file uses the Standard Resource Record Format (aka. Masterfile Format) covered further on in this paper. .sh 2 "Domain Data Files" .pp There are three standard files for specifying the data for a domain. These are named\|.\|local, hosts and host\|.\|rev. These files use the Standard Resource Record Format covered later in this paper. .sh 3 named\|.\|local .pp This file specifies the address for the local loopback interface, better known as localhost with the network address 127.0.0.1. The location of this file is specified in the boot file. .sh 3 hosts .pp This file contains all the data about the machines in this zone. The location of this file is specified in the boot file. .sh 3 hosts\|.\|rev .pp This file specifies the IN-ADDR\|.\|ARPA domain. This is a special domain for allowing address to name mapping. As internet host addresses do not fall within domain boundaries, this special domain was formed to allow inverse mapping. The IN-ADDR\|.\|ARPA domain has four labels preceding it. These labels correspond to the 4 octets of an Internet address. All four octets must be specified even if an octets is zero. The Internet address 128.32.0.4 is located in the domain 4\|.\|0\|.\|32\|.\|128\|.\|IN-ADDR\|.\|ARPA. This reversal of the address is awkward to read but allows for the natural grouping of hosts in a network. .sh 2 "Standard Resource Record Format" .pp The records in the name server data files are called resource records. The Standard Resource Record Format (RR) is specified in RFC1035. The following is a general description of these records:
{name} {ttl} addr-class Record Type Record Specific data |
name {ttl} addr-class SOA Origin Person in charge |
@ IN SOA ucbvax.Berkeley.Edu. kjd.ucbvax.Berkeley.Edu. ( |
1\|.\|1 ; Serial |
10800 ; Refresh |
1800 ; Retry |
3600000 ; Expire |
86400 ) ; Minimum |
{name} {ttl} addr-class NS Name servers name |
IN NS ucbarpa\|.\|Berkeley\|.\|Edu. |
{name} {ttl} addr-class A address |
ucbarpa IN A 128.32.0.4 |
IN A 10.0.0.78 |
This lists the hardware and operating system that are running at | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
the listed host. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
It should be noted that only a single space separates the hardware info | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
and the operating system info. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If you want to include a space in the machine name you must quote the name. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There should be one HINFO record for each host. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.(b L | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
.sh 3 "WKS - Well Known Services" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|