dns-that thing.

Source: Internet
Author: User

I. What is DNS?

DNS (domain Name System), the Internet as the domain name andIP Addressone of the mutual mappingsDistributed DatabaseTo make it easier for users to accessInternet, instead of remembering the number of IP strings that can be read directly by the machine. ThroughHostname, the process of eventually getting the IP address for that hostname is called Domain name resolution (or hostname resolution). The DNS protocol runs onUDPprotocol, use the port number 53.

Two. The difference between recursive queries and iterative queries

(1) Recursive query
A recursive query is a query pattern for a DNS server in which a DNS server receives a client request and must reply to the client with an accurate query result. If the DNS server does not store query DNS information locally, the server asks the other server and submits the returned query results to the client.
(2) Iterative query
DNS server Another way of querying for an iterative query, the DNS server provides the client with other DNS server addresses that can resolve the query request, when the client sends a query request, the DNS server does not directly reply to the query results, but tells the client another DNS server address, The client then submits the request to this DNS server, looping until the results of the query are returned

So far.

650) this.width=650; "src=" Http://hi.csdn.net/attachment/201108/26/0_1314324260OQ6b.gif "alt=" 0_ 1314324260oq6b.gif "/>

Three. Primary and secondary DNS

Primary-Secondary DNS servers:

Primary DNS server: The server that maintains the domain database that is responsible for parsing, read and write operations can be carried out;

From the DNS server: From the primary DNS server or other from the DNS server "copy" a copy of the parse library, but only read operations;

How the copy operation is implemented:

Serial number: Serial, which is the version number of the database, the version number is incremented when the contents of the main server database change;

Refresh time interval: refresh, check the serial number update status from the server every time to the main server;

Retry interval: Retry the time interval to attempt the request from the server when it fails to request synchronization from the primary server;

Expiration time: Expire, when the primary server is always not contacted from the server, how long after the data is discarded from the primary server, stop providing services;

Cache duration for negative answers:

Master server "notifications" from the server to update data at any time;

Zone transfer:

Full-Volume transmission: AXFR, transmission of the entire database;

Incremental transfer: IXFR, transferring only the data of variables;


Four. Regional database files

Zone database files:

Resource record: Resource record, abbreviated RR;

Records have type: A, AAAA, PTR, SOA, NS, CNAME, MX

Soa:start of authority, starting authorization record; A zone resolution library has and can have only one SOA record, and must be placed in the first article;

Ns:name service, domain name services record; A zone resolution library can have multiple NS records; One of them is the main;

A:address, address record, FQDN---IPv4;

AAAA: Address record, FQDN---IPv6;

Cname:canonical name, alias record;

Ptr:pointer,ip to FQDN

Mx:mail eXchanger, mail exchanger;

Priority: 0-99, the smaller the number, the higher the priority;

Definition format for resource records:

Syntax:name [TTL] inrr_type value

Soa:

Name: Names of the current region, such as "mageud.com.", or "2.3.4.in-addr.arpa." ;

Value: Multi-Part composition

(1) The zone name of the current zone (you can also use the primary DNS server name);

(2) The current regional administrator's e-mail address, but the address can not use the @ symbol, the general use of the point number to replace;

(3) (the definition of the master-slave Service Coordination attribute and the TTL of the negative answer)

For example:

magedu.com. 86400 in SOA magedu.com. admin.magedu.com. (

2017010801; Serial

2H ; Refresh

10M ; Retry

1W; Expire

1D; Negative answer TTL


Ns:

Name: The region names of the current zone

Value: The name of a DNS server for the current zone, such as ns.magedu.com.;

Note: An area can have more than one NS record;

For example:

magedu.com. 86400 in NS ns1.magedu.com.

magedu.com. 86400 in NS ns2.magedu.com.

Mx:

Name: The region names of the current zone

Value: The host name of a mail exchanger in the current region;

Note: MX records can have multiple, but the value of each record should have a number indicating its priority;

For example:

magedu.com. in MX ten mx1.magedu.com.

magedu.com. in MX mx2.magedu.com.

A:

Name: An FQDN, such as www.magedu.com.

Value: a IPV4 address;

For example:

Www.magedu.com. in A1.1.1.1

Www.magedu.com. in A1.1.1.2

Bbs.magedu.com. in A1.1.1.1

Aaaa:

Name:fqdn

Value:ipv6

Ptr:

Name:ip address, have a specific format, IP in turn, and add a specific suffix, such as 1.2.3.4 Records should be written as 4.3.2.1.in-addr.arpa.

Value:fqnd

For example:

4.3.2.1.in-addr.arpa. in PTRwww.magedu.com.

CNAME:

Alias of the NAME:FQDN format;

Official name of the VALUE:FQDN format;

For example:

web.magedu.com. in CNAME www.magedu.com.

Attention:

(1) TTL can be inherited from the global;

(2) @ Indicates the name of the current region;

(3) The adjacent two records whose name is the same, the following can be omitted;

(4) For the positive region, the value of the record of each mx,ns type is the FQDN, and this FQDN should have an a record;













dns-that thing.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.