Google
 
2006-08
5

Master Server db.domain Files

Filed under: Tech articles — admin @ 4:00 pm

The Berkeley Internet Name Domain (BIND) is a distributed network information lookup service. It allows you to retrieve host names and Internet addresses for any node on the network. It also provides mail routing capability by supplying a list of hosts that accept mail for other hosts

You can configure your host as any of the following types of BIND name servers:

>

  • >

    Master Server

    A master server is the authority for its domain and contains data corresponding to its domain. The master server obtains its information from a master file on the disk. On previous versions of BIND, the master server was referred to as a primary server.

  • >

    Slave Server

    A slave server is also the authority for its domain and contains the domain’s data, but it receives data over a network fromanother master server. On previous versions of BIND, the slave server was referred to as a secondary server.

  • >

    Caching-Only Server

    A caching-only server is not authoritative for any domain. The only function that a caching-only server performs is to look up data from an authoritative server and store the data in its cache.

  • >

    Forwarding Server

    A forwarding server always forwards queries that it cannot satisfy from its authoritative data or cache to a fixed list of other servers. A forwarding server is typically used when you do not want all the servers at a given site to interact with the rest of the Internet servers. An added benefit of using the forwarding feature is that the forwarding server develops a complete cache of information that all the workstations can use.

If you do not want to run a name server on your host, you can configure the resolver to query a name server on another host. By default, the resolver is configured to query the name server on the local host.

NOTE: Throughout this document, the terms zone and domain are used interchangeably, though they describe different concepts. A zone describes the domain name spacethat a name server has authority over. As such, a zone does not contain any delegated subdomains, whereas a domain can contain data delegated to other name servers. Therefore, as long as subdomains are not delegated, a zone and a domain contain the same data.

>>>>


Choosing the Type of Name Server

>

You can use any server configuration on a host. Following are some suggestions for the configuration:

>

  • >

    You must configure timeshare machines or cluster servers as master or slave servers.

  • >

    If you want the benefits of a name server but do not want to maintain authoritative data, you can set up a caching-only server. Running a caching-only server provides you better performance than querying a name server on a remote system, especially if the remote system is on the other side of a gateway or router.

  • >

    You must configure PCs, workstations that do not want to maintain a server, and other small networked systems to query a name server on another host. Cluster nodes must query the name server on the cluster server.

  • >

    If your network is isolated from the Internet, and your host is the only BIND name server in your organization, you must configure a root name server. See “Configuring a Root Name Server” for information.

The configuration file, /etc/named.conf, informs the master server of the location of all the required data files. The master name server loads its database from these data files. The hosts_to_named program creates the named.conf file.

Following is an example configuration file for a master server authoritative for the domain div.inc.com, and for the network 15.19.8.

## type domain source file#option {         directory “/etc/named.data”;};zone “0.0.127.IN-ADDR.ARPA” {         type master;         file “db.127.0.0”;};zone “div.inc.com” {       type master;       file “db.div”;

};zone “8.19.15.IN-ADDR.ARPA” {       type master;       file “db.15.19.8”;};zone “.” {       type hint;       file “db.cache”;};

Figure 2-1 “Structure of a Master Server and Slave Servers” shows the structure of a master server and a slave server. In the Figure 2-1 “Structure of a Master Server and Slave Servers”, the master server is rabbit.div.inc.com and the slave servers are cheetah.div.inc.com and indigo.div.inc.com.

>

Figure 2-1 Structure of a Master Server and Slave Servers

Structure of a Master Server and Slave Servers

Master server data File

A master server has one /etc/named.data/db.domain file for each domain for which it is authoritative. domain is the first part of the domain specified with the -d option in the hosts_to_named command. This file must contain an A (address) record for every host in the zone.

The following is an example db.div file:

;; db.div;$TTL    86400@   IN   SOA   rabbit.div.inc.com root.moon.div.inc.com (     1          ; Serial     10800      ; Refresh every 3 hours     3600       ; Retry every hour     604800     ; Expires after a week     86400      ; Minimum ttl of 1 day    IN   NS    rabbit.div.inc.com    IN   NS    indigo.div.inc.comlocalhost IN    A   127.0.0.1indigo    IN    A   15.19.8.197          IN    A   15.19.13.197          IN    HINFO  HP9000/840 HPUXincindigo IN    CNAME   indigo

cheetah   IN    A      15.19.8.64          IN    HINFO  HP9000/850  HPUX          IN    WKS    15.19.8.64  UPD  syslog  domain  route           IN    WKS    15.19.8.64  TCP (telnet smtp ftp shell domain)rabbit    IN    MX    5   rabbit.div.inc.com          IN    MX   10   indigo.div.inc.comrabbit     IN    A         15.19.8.119

The example file db.div contains the following types of records:

>


SOA  

Start of Authority record. The SOA recorddesignates the start of a domain, and indicates that this server is authoritative for the data in the domain.

The at sign (@) in the data file represents the current origin. @ is used to represent the domain name when the domain name and the origin are the same. The origin is the domain configured in this file, according to the /etc/named.conf configuration file. The /etc/named.conf file denotes that the div.inc.com domain is configured in the db.div file. Therefore, every instance of @in the db.div file represents div.inc.com.

The SOA record specifies the name of the host this data file was created on, an electronic mail address of the name server’s technical contact, and the following values:

>


Serial  

Indicates the version number of this file, incremented whenever the data is changed.

Refresh  

Indicates (in seconds) how often a slave name server must try to update its data from a master server.

Retry  

Indicates (in seconds) how often a slave server must retry after an attempted refresh fails.

Expire  

Indicates (in seconds) how long the slave name server can use the data before it expires for lack of a refresh.

Minimum ttl  

Indicates (in seconds) the minimum number of seconds the name server is allowed to cache data. After the ttl (time to live) value expires, the name server must discard the cached data and obtain new data from the authoritative name servers

NS  

Name Server records. The NS records provide the names of the name servers and the domains for which the domain has authority. The domain for the name servers in the example db.div file is the current origin (div.inc.com), because @ was the last domain specified.

A  

Address records. A records provide the Internet addresses for all the hosts in the domain.

The current origin is appended to names that do not end with a dot. For example, localhost in the first A record is interpreted as localhost.div.inc.com.

HINFO  

Host Information records. The HINFO records indicate the hardware and operating system of the host.

CNAME  

Canonical Name record. The CNAME record specifies an alias for a host name. When a name server looks up a name and finds a CNAME record, it replaces the name with the canonical name and looks up the new name. All other resource records must use the canonical name instead of the actual host name.

WKS  

Well Known Service records. The WKS record describes the services provided by a particular protocol on a particular interface. The protocol is any of the entries in the /etc/protocols file. The list of services is as specified in the host’s /etc/services file. You can specify only one WKS record per protocol per address.

MX  

Mail Exchanger records. MX records specify a list of hosts to try when mailing to a destination on the Internet. The MX data indicates an alternate host or list of hosts that accept mail for the target host if the target host is down or inaccessible. The preference field specifies the order a mailer must follow if there is more than one mail exchanger for a given host. A low preference value indicates a higher precedence for the mail exchanger.

In the example db.div file, mail for rabbit must go to rabbit.div.inc.com first. If rabbit is down, its mail must be sent to the host indigo.div.inc.com.

See HP-UX Mailing Services Administrator’s Guide for information on Sendmail and how Sendmail uses the name server’s MX records for routing mail.

$TTL  

Indicates (in seconds) the time to live value for records that do not have the ttl value defined in the data field.

The above resources is from www.hp.com.
Detailed information about BIND9, Please reffer to www.bind9.net

Tags: ,

Related posts

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

38 queries. 0.520 seconds. Powered by WordPress
沪-ICP备07003363号 Stat.