All the data files used by the DNS daemon in.named are written in standard resource record format. Each line of a file is a record, called a resource record (RR). Each DNS data file must contain certain resource records.
See Solaris Naming Administration Guide for a description of resource records, their formats, the fields they contain, special characters, and control entries.
The most commonly used types of resource records are listed in Commonly Used Resource Record Types . They are usually entered in the order shown in Commonly Used Resource Record Types , but that is not a requirement.
Type | Description |
|---|---|
SOA | start of authority |
NS | name server |
A | Internet address (name to address) |
PTR | pointer (address to name) |
CNAME | canonical name (nickname) |
TXT | text information |
MX | mail exchanger |
See Solaris Naming Administration Guide for detailed descriptions of these Resource Record types.
In the sample files included in the following sections, @ indicates the current zone or origin and lines that begin with a semicolon (;) are comments.
he root servers. Root server names are indicated in the NS record and addresses in the A record. You need to add an NS record and an A record for each root server you want to include in the file.
How you obtain or create your named.ca file depends on whether or not your network is connected to the world Internet.
If your network is connected to the Internet, at the present time you obtain your named.ca file from InterNIC registration services via:
Anonymous FTP. The FTP site is: ftp.rs.internic.net. The file name is: /domain/named.root.
Gopher. The Gopher site is: rs.internic.net. The file is: named.root, which can be found under the InterNIC Registration Services menu, InterNIC Registration Archives submenu.
If you are following the naming conventions used in this manual, you then move named.root to /var/named/named.ca.
|
If your network is not connected to the Internet, you create your own named.ca file. To do this, you designate one of your servers to be your root server, then create a named.ca file on every DNS server pointing to that root server.
For example, suppose your domain is named private and you designate the machine ourroot as your non-Internet root server. The ourroot machine has an IP address of 192.1.1.10. Your named.ca files would then contain the line:
|
Cache files also need an SOA record, NS records for each domain and subdomain, and A records for each server.
For example, suppose that in addition to ourroot you also had DNS name servers called ourprimary and oursecondary. The named.ca files on all of your DNS servers would then look like this:
|
See Setting Up a Non-Internet Root Master for a more complete discussion of setting up a domain that is not connected to the Internet.
The hosts file contains all the data about every machine in your zone. If a zone covers more than one domain, all machines in all the domains covered by the zone are listed in the zone's host file (see Setting Up Subdomains Same Zone ).
The name hosts is a generic name indicating the file's purpose and content. But to avoid confusion with /etc/hosts, you should name this file something other than hosts. If you have more than one zone, each zone must have its own hosts file and each of these zone hosts files must have a unique name. For example, if your DNS domain is divided into doc.com and sales.doc.com zones, you could name one hosts file db.doc and the other sales.db.doc.
There must be a separate, uniquely named, hosts file for each zone. If you have more than one zone, each zone's host file must include information about the master (primary and secondary) servers of the other zones as described in Setting Up Subdomains Different Zones .
|
A hosts file usually contains five elements:
A Start of Authority (SOA) record
One or more Name Server (NS) records identifying primary and secondary DNS name servers
Address (A) records for each host in the zone
Canonical Name (CNAME) records for each host alias in the zone
One or more Mail Exchange (MX) records
(See Solaris Naming Administration Guide for detailed descriptions of these resource record types.)
The hosts.rev file sets up inverse mapping.
The name hosts.rev is a generic name indicating the file's purpose and content. If you have more than one zone, each zone must have its own hosts.rev file and each of these zone hosts.rev files must have a unique name. For example, if your DNS domain is divided into doc.com and sales.doc.com zones, you could name one hosts.rev file doc.rev and the other sales.rev.
|
A hosts.rev file contains three elements:
A Start of Authority (SOA) record
One or more Name Server (NS) records identifying primary and secondary DNS name servers. Server names should be fully qualified.
A PTR record for each host in the zone. Machine names should be fully qualified.
(See Solaris Naming Administration Guide for detailed descriptions of these resource record types.)
The named.local file sets up the local loopback interface for your name server.
|
A named.local file contains three elements:
A Start of Authority (SOA) record, which indicates the start of a zone and includes the name of the host on which the named.local data file reside.
One or more Name Server (NS) records identifying primary and secondary DNS name servers. Server and domain names should be fully qualified.
A PTR record for localhost
(See Solaris Naming Administration Guide for detailed descriptions of these resource record types.)