Establishing a DNS server on Linux (3)

  




3. About the format of the DNS configuration file

The format of the DNS configuration file is more complicated. It needs to be noted that the format of each line is as follows:
Name IN record_type data
where name is the host name to be processed. (Note: If the host name is not ending with a period, the domain name will be automatically added afterwards.)
The parameter IN indicates that the named process uses the Internet record class.
record_type and data indicate the type of record and the corresponding parameters. There are seven types of them, which are described as follows:

(1) SOA - the starting record, which is the starting record for the description of the DNS entry, in the following format:


@ IN SOA domain .com. hostmaster.domain.com.(
1999022201 ; Serial number
10800 ; Refresh rate in seconds(3 hours)
1800 ; Retry in seconds(30 minutes)
1209600 ; Expire in seconds (2 weeks)
604800) ; Minimum in seconds(1 week)


In is followed by the domain's primary domain name server, followed by the specified Administrator's E-mail address, Note that the E-mail address format here is different from the usual one. The last left parenthesis in the first line indicates that the next line is a continuation of the line. There are five numbers in parentheses. The first one is the number represented by YYYY (year), MM (month), DD (day), and XX (version number), where XX is the number of times of modification within one day. The second value is the refresh rate in seconds, which determines how often the secondary DNS server queries the primary DNS server for any records that have been updated. The third value determines how long the DNS server will retry the connection if it fails to update the record to the primary DNS server. The fourth value determines if the secondary DNS server cannot connect to the primary DNS server, and the secondary DNS server discards the entries obtained from the primary DNS server after this time. The fifth value determines whether the cached DNS server will drop an entry from the primary DNS server if it is unable to get in touch with the primary DNS server.

(2) NS - Domain Name Server
is used to determine the domain name server of a specified domain. If the domain name is the domain name of the SOA record, you do not need to specify the name field here.

(3) A - Address Record
is used to provide a basis for forward resolution from domain name to IP address. For example:
linux IN A 192.168.22.33

(4) PTR - pointer record
is used to provide the basis for reverse resolution from IP address to domain name. For example:
56.42.168.192. IN PTR linux.domain.com

(5) MX - Mail Exchanger
Specifies the host responsible for accepting external mail on this network. The format is as follows:

Domain Name IN MX Number Host Name
IN MX Number Host Name
There can be more than one number and host name. The smaller the number, the higher the host priority.

(6) CHAME - the name of the specification
Specifies the correspondence between the name of the host's specification and its alias.

(7) RP and TXT - information items
TXT records are free-form text, can put any information; RP records are used to clearly describe the person responsible for the management of the specified host, pay attention to management The E-mail address format of the member is the same as that of the SOA record, which is different from the format we use.


Copyright © Windows knowledge All Rights Reserved