Setting Up the Data Files

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.

Resource Record Types

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.

Commonly Used Resource Record Types

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.

Setting Up the named.ca File

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.

Internet named.ca File

If your network is connected to the Internet, at the present time you obtain your named.ca file from InterNIC registration services via:

If you are following the naming conventions used in this manual, you then move named.root to /var/named/named.ca.


Example Internet named.ca file


; ; formerly NS1.ISI.EDU . 3600000 NS B.ROOT-SERVERS.NET. B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107 ; ; formerly C.PSI.NET . 3600000 NS C.ROOT-SERVERS.NET. C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12 ; ; formerly TERP.UMD.EDU . 3600000 NS D.ROOT-SERVERS.NET. D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90 ; ; formerly NS.NASA.GOV ;. 3600000 NS E.ROOT-SERVERS.NET. E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10 ; ; formerly NS.ISC.ORG . 3600000 NS F.ROOT-SERVERS.NET. F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241 ; ; formerly NS.NIC.DDN.MIL . 3600000 NS G.ROOT-SERVERS.NET. G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4 ; ; formerly AOS.ARL.ARMY.MIL . 3600000 NS H.ROOT-SERVERS.NET. H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53 ; ; formerly NIC.NORDU.NET . 3600000 NS I.ROOT-SERVERS.NET. I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17 ; ; temporarily housed at NSI (InterNIC) . 3600000 NS J.ROOT-SERVERS.NET. J.ROOT-SERVERS.NET. 3600000 A 198.41.0.10 ; ; temporarily housed at NSI (InterNIC) . 3600000 NS K.ROOT-SERVERS.NET. K.ROOT-SERVERS.NET. 3600000 A 198.41.0.11 ; ; temporarily housed at ISI (IANA) . 3600000 NS L.ROOT-SERVERS.NET. L.ROOT-SERVERS.NET. 3600000 A 198.32.64.12 ; ; temporarily housed at ISI (IANA) . 3600000 NS M.ROOT-SERVERS.NET. M.ROOT-SERVERS.NET. 3600000 A 198.32.65.12 ; End of File

Non-Internet named.ca File

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:


ourroot.private. 999999 IN A 192.1.1.10

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:


Sample named.ca File (Non-Internet)


; @ IN SOA ourroot.private. hermit.ourroot.private ( 1997071401 ; serial number (YYYYMMDD##) 10800 ; refresh after 3 hours 3600 ; retry after 1 hour 604800 ; expire after 1 week 86400 ) ; minimum TTL of 1 day ; ourroot.private. 999999 IN A 192.1.1.10 ; private. IN NS ourprimary.private. 1.1.192.in-addr.arpa IN NS ourprimary.private. ourprivate.private. IN A 192.1.1.1 ; private. IN NS oursecondary.private. 1.1.192.in-addr.arpa IN NS ourseconary.private. oursecondary.private. IN A 192.1.1.2

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.

Setting Up the hosts File

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 ).


Note  - 

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 .


Sample hosts File


; ; SOA rec doc.com IN SOA sirius.doc.com sysop.centauri.doc.com ( 1997071401 ; serial number (YYYYMMDD##) 10800 ; refresh every 3 hours 10800 ; retry every 3 hours 604800 ; expire after a week 86400 ) ; TTL of 1 day ; Name Servers doc.com IN NS sirius.doc.com sales.doc.com IN NS altair.sales.doc.com ; Addresses localhost IN A 127.0.0.1 sirius IN A 123.45.6.1 rigel IN A 123.45.6.112 antares IN A 123.45.6.90 polaris IN A 123.45.6.101 procyon IN A 123.45.6.79 tauceti IN A 123.45.6.69 altair.sales.doc.com IN A 111.22.3.4 ; aliases durvasa IN CNAME sirius.doc.com dnsmastr IN CNAME sirius.doc.com dnssales IN CNAME altair.sales.doc.com

A hosts file usually contains five elements:

(See Solaris Naming Administration Guide for detailed descriptions of these resource record types.)

Setting Up the hosts.rev File

The hosts.rev file sets up inverse mapping.


Note  - 

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.



Sample hosts.rev File


; SOA rec 6.45.123.in-addr.arpa. IN SOA sirius.doc.com sysop.centauri.doc.com ( 1997071401 ; serial number (YYYYMMDD##) 10800 ; refresh every 3 hours 10800 ; retry every 3 hours 604800 ; expire after a week 86400 ) ; TTL of 1 day ; Name Servers 6.45.123.in-addr.arpa. IN NS sirius.doc.com 1 IN PTR sirius.doc.com

A hosts.rev file contains three elements:

(See Solaris Naming Administration Guide for detailed descriptions of these resource record types.)

Setting Up the named.local File

The named.local file sets up the local loopback interface for your name server.


Sample named.localFile


; SOA rec 0.0.127.in-addr.arpa. IN SOA sirius.doc.com sysop.centauri.doc.com ( 1997071401 ; serial number (YYYYMMDD##) 10800 ; refresh every 3 hours 10800 ; retry every 3 hours 604800 ; expire after a week 86400 ) ; TTL of 1 day ; Name Servers 0.0.127.in-addr.arpa. IN NS sirius.doc.com 1 IN PTR localhost.

A named.local file contains three elements:

(See Solaris Naming Administration Guide for detailed descriptions of these resource record types.)

Next Topic


Other topics in Solaris Naming Setup and Configuration Guide

FNS Setup and Configuration
DNS Setup and Configuration
Setting Up DNS Servers
Setting Up DNS Servers
Server Boot and Data File Names
Domain Names
Setting Up the resolv.conf File
Setting Up the Boot File
Specifying Server Function
You are here Setting Up the Data Files
Resource Record Types
Setting Up the named.ca File
Setting Up the hosts File
Setting Up the hosts.rev File
Setting Up the named.local File
Initializing the Server
Testing Your Installation
Setting Up Subdomains
Setting Up a Non-Internet Root Master
A Practical Example
 
 
Book Table of ContentsComplete Table of Contents for book