DNS named. conf file details
Configuration file:
/Etc/named. conf
/Use // and/**/In the NAMED. CONF configuration file for comments,
Options {/* OPTIONS is used to define some environments that affect the entire DNS server. For example, di rectory is used to specify the path of the file specified in this file,
For example, you can specify it to/var/named, and you can also specify a port here. If this parameter is not specified, the port is 53.
*/
Directory "/var/named ";
};//
//
// A caching only nameserver config
//
Controls {
Inet 127.0.0.1 allow {localhost;} keys {rndckey ;};
};
Zone "." IN {// IN this file, the zone keyword is used to define the domain zone. A zone keyword defines a domain zone.
Type hint;
/* Here there are three types of type: master, slave, and hint. Their meanings are:
Master: indicates that the master Domain Name Server is defined
Slave: defines the secondary Domain Name Server
Hint: indicates the root domain name server in the Internet.
*/
File "named. ca"; // specifies the file that stores DNS records.
};
Zone "localhost" IN {// defines a forward region with the domain name localhost
Type master;
File "localhost. zone ";
Allow-update {none ;};
};
Zone "test.net" IN {// specifies a forward region with the domain name test.net.
Type master;
File "test.net"
Allow-update {none ;};
};
Zone "0.0.127.in-addr. arpa" IN {// defines a reverse domain with the IP address 127.0.0. *
Type master;
File "named. local ";
Allow-update {none ;};
};
Zone "0.192.168.in-addr. arpa" IN {// defines an IP address as 168.192.0. * Reverse Domain
Type master;
File "168.192.0 ";
/Var/named/test.net File
@ In soa dns.wqmsl.com. root.wqmsl.com. (// SOA indicates that authorization starts.
/* The IN above indicates that the subsequent data uses INTERNET standards. @ Indicates the corresponding domain name. For example, test.net indicates the beginning of a domain name record definition.
Linux.test.net is the primary Domain Name Server for this domain, while webmaster.test.net is the administrator's email address.
Note that this is used in the mail address to replace @. In the common mail address, and SOA indicates the beginning of authorization.
*/
2003012101; serial (d. adams)/* The number above the line represents the modified version of the configuration file. The format is the number of modifications made on the day of the year, month, and day,
This number should be modified every time you modify this configuration file. Otherwise, your modifications will not be updated to the databases of other DNS servers on the Internet,
That is, your updates may not reflect your updates for clients that do not use your configured DNS server as the DNS server,
It makes no sense for them to update.
*/
28800; refresh
/* Defines the refresh frequency of the unit, that is, the time required to query a master server from the Domain Name Server to ensure that the data on the slave server is up-to-date.
*/
7200; retry
/* The above value specifies the Retry Interval in seconds. That is, when the slave server attempts to query more information on the master server, the connection fails,
The value specifies how long the service will take and try again.
*/
3600000; expiry
/* The above is used to specify the time after the slave server fails to update the master service to clear the corresponding records. The above values are measured in minutes.
*/
8400)
/* The above data is used to specify the time after the buffer server cannot contact the master service to clear the corresponding records.
*/
In ns wqmsl
In mx 10 mail.wqmsl.com.
Linux in a 168.192.0.14
It-test1 in a 168.192.0 .#
Www in cname wqmsl
/* The first column above indicates the host name, saving the subsequent domain.
NS: indicates that the host is a Domain Name Server,
A: defines A record, that is, the corresponding record from the host name to the IP address.
MX defines an email record
CNAME: defines an alias for the corresponding host
/Var/named/168.192.0
@ In soa dns.wqmsl.com. root.wqmsl.com .(
1997022700; Serial
28800; Refresh
14400; Retry
3600000; Expire
86400); Minimum
In ns linux.test.net.
/* The meanings of the preceding keywords are the same as those of wqmsl.com.
88 in ptr wqmsl.com.
188 in ptr linux.wqmsl.com.
/*
The first column above indicates the IP address of the host. The network address section is omitted. If 88 is complete, it should be:
168.192.0.88
PTR: Indicates Reverse Record
The last column indicates the host domain name.
This article reposted from the "RedHat Park" blog, source http://wqmsl.blog.51cto.com/847418/308032