DNS server: Describes DNS service principles, installation, master-slave configuration, and dns master-slave configuration.

Source: Internet
Author: User
Tags mx record

DNS server: Describes DNS service principles, installation, master-slave configuration, and dns master-slave configuration.

DNS server: Describes DNS service principles, installation, and master-slave configuration.

1. Introduction to DNS

1. DNS

DNS is short for Domain Name System. It is a distributed database that maps Domain names and IP addresses. With the DNS server, we only need to record the domain name of a website for access, and no longer need to remember the long IP address. There are 386 root servers around the world, numbered from A to M, with 13 numbers. root servers with the same number use the same IP address, and 386 root servers use only 13 IP addresses in total, therefore, it can resist distributed denial of service (DDoS) attacks against it ). There are two root server images numbered L in Beijing in mainland China, each numbered F, I, and J. There are five images in total, so the fault mentioned above should be the fault of the DNS root domain image in China.

2. Distributed Database

In the early days, the network was relatively simple and there were few domain names, so hosts files could be said to be relatively simple databases. However, as the network exploded, A hosts file, a server, and a group of DNS clusters cannot hold more and more host requests. Therefore, a distributed database has emerged, which is used to cut a database into n slices, resolve client requests on different hosts. When different hosts need to be resolved, they are implemented on different servers to relieve the huge pressure on the root server.

3. Domain Name Division

Root Domain :.

Primary Domain:. com,. org,. mil,. gov,. edu,. net

Country:. cn,. hk,. tw,. jp,. us,. uk,. ir,. iq

Second-level domain: ibm in www.ibm.com is second-level domain name

Host Name: the www above is a host rather than a domain name

FQDN (Full Qualified Domain Name): Safe Qualified Domain Name, according to the Chinese habits from big to lowercase, but foreigners are used to writing from small to big, just like writing a letter, from bottom to top, therefore, an FQDN should be "www.ibm.com. ".

4. DNS query method

1) recursive query (recursion)

The client sends only one request and asks the other party to give the final result. If the content to be searched by the client is directly obtained on the server, the answer is an authoritative answer; otherwise, it is a reference answer.

2) iteration)

When the client sends a request, the server replaces the client's request again and again to obtain the final answer. Therefore, the iterative query is performed by the server on behalf of the client. Therefore, the client directs to the DNS server, recursion must be allowed for the local host.

5. Resource Record)

Each entry in the DNS database file is called a resource record. It is a plain text file and can only contain resource records or macro definitions.

Resource record format:

Name [ttl] INRr_type (resource record type)Value

1) SOA:

Start of Authority, Start authorization

 SOA must be the first record of the regional database file

Name: it can only be a region name. It can be abbreviated as @, for example, google.com.

Value: The FQDN of the primary DNS.

Example: @ 600 in soa ns.google.com. dnsadmin.google.com .(

Serial number; serial number, which cannot exceed 10 digits, for example, 2014120901

Refresh time; refresh time, the first interval to the master server to check

Retry time; retry time. If refresh fails, how long will it take to retry?

Expire time; expiration time

Negative answer ttl; ttl of the negative answer)

The one aboveDns.admin.google.com. Administrator emailThe first point represents @, But here @ is a macro, so it is replaced.

Note: ns.google.com..It must not be omitted. If it is omitted, the system will add your region name by default.

2) NS: a region data file can have multiple NS records;

Name Server, Domain Name Server

Name: Region name, which can be abbreviated @

Value: FQDN of the DNS server (the relative name can be used)

Note:

3),

Address, IP Address, responsible for FQDN --> IP resolution

Name: FQDN (relative names can be used)

Value: IP

4) AAAA

IPv6 address

5) MX: a region data file can have multiple MX records;

Mail eXchanger: email eXchanger. There can be multiple email switches, which requires priority.

Name: Region name, used to identify the smtp server

Value: contains the priority and FQDN. The priority ranges from 0 to 99. The smaller the number, the higher the level.

6). CNAME: defines the alias

Canonical Name, alias record

Name: FQDN

Value: FQDN

7) PTR

Responsible for IP --> FQDN resolution, can only be defined in the reverse region data file, the reverse region name for the reverse network address plus. in-addr.arpa. suffix Composition

Name: IP, the reverse host address, for example, 93.251.16.172.in-addr. arpa.

Value: FQDN. Here, the FQDN does not need to have A record,The A record and MX record cannot appear in the reverse region.

Note: If the value is FQDN, The FQDN must have an A record. Otherwise, it cannot be parsed, except for PTR.

 

 

 

The next step is my own practice: So I will share it with you.

 

 

Related Article

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.