DNS server under Linux environment

Source: Internet
Author: User
Tags domain name server mx record

DNS (Domain Name Service)

Domain Name Service

Used for host name and IP conversion. Divided into forward parsing (FQDN--->ip) and reverse parsing (IP--->fqdn)

UDP protocol, 53 port

TCP protocol, 53 port


DNS Server type:

Primary DNS server: Server that maintains the resolved libraries within the responsible zone

Update the content records of the primary DNS server from the DNS server: Timed synchronization. The slave server will only take over when the primary server is on the computer.

Cache servers: Cache frequently queried DNS records locally so that the next time you parse the feedback faster

Forwarding server: Responsible for forwarding domain names that are not in the zone to other DNS zones for querying and returning local


Query method:

Recursive lookup:

A-->b-->c-->d

(similar to serial circuit)

Iterative lookups:

A-->b

A-->c

A-->d

(similar to parallel circuit)


Division of the domain:

root domain :. to indicate

A total of 13 root domains Worldwide

Top-Level domains:

Organizational domains:. com,. org,. NET,. mil,. edu,. gov,

Country domain:. cn,. US,. UK,. JP,. TW,. HK, IQ, IR,

Reverse domain:. in-addr.arpa

Second-level domain:

Company, organization, personal use, such as www.baidu.com,. Baidu is a two-level domain name

Host:

WWW,MAIL,POP,FTP, etc.


DNS resource records:


FQDN(full qualified domain name, fully qualified domainname)

The format is:

hostname + Level two domain name + domain + root domain .

such as: www.baidu.com. is a full FQDN.

WWW is the hostname,. baidu.com. is a level two domain name,. com. For the top-level domain. to the root domain.


SOA: (start of authority, start authorization record)

There can be only one in a region. Defines a DNS query area.

the first record of any parse library file must be SOA

Format:

Name in rrtype value Mail-add

@ in SOA ns.xiaofei.com.               Admin.xiaofei.com. (20160720; serial 2H; refresh 24H; retry 1W; expire 3H; negative)

# #name: Zone name, usually abbreviated as @

# #IN: Fixed format

# #Rrtype: Types of resource records, as well as resource types such as Ns,mx,a,ptr,aaaa,cname

# #value: The FQDN of the primary DNS server, which is the full host name. You can also have the zone name of the current zone. such as: www.xiaofei.com. is an FQDN.

# #mail-add: Email address of the current regional domain administrator

# #Serial: Here is the version number of the resolution library, manually added, typically the current time of 20160720.

# #refresh: Here is the time interval for periodic synchronization

# #retry: The time interval for retry, how often to retry synchronization if the synchronization object is not responding

# #expire: This is the expiration time, that is, if you have not synchronized, how long will give up trying

# #negative: the unified cache duration for negative answers here

Note: a semicolon; a comment


Ns:name Server

DNS host records, which identify the name of the domain name server, what the server hostname is, can have multiple, but the name cannot be the same.

@ in NS ns1.xiaofei.com.@ in NS ns2.xiaofei.com.

# #name: Region name, also abbreviated as @

# #value: FQDN of DNS server

Attention:

If you have more than one NS server, each server must have a corresponding NS record

For forward parsing files, each NS FQDN should have an A record


Mx:mail EXchanger

Mail Exchanger,

Name: Zone names

Value: FQDN of the mail server

@ in MX ten mail.xiaofei.com.@ in MX mail2.xiaofei.com.

# #10, 20: Here is the priority, the smaller the priority the higher

Attention:

If you have more than one MX server, each server must have a corresponding MX record, and each MX record has a priority attribute

For forward parsing files, each MX FQDN should have an A record


A:address

Host records, each host name corresponds to the IP address, the hostname to the IP address of the conversion. The same host name (FQDN) can refer to multiple IPs, and different host names (FQDNs) may also refer to the same IP.

Name:fqdn

Value:ip

Www.xiaofei.com. In A 192.168.6.100www.xiaofei.com.    In A 192.168.6.101pop3.xiaofei.com.    In A 192.168.6.102imap.xiaofei.com. In A 192.168.6.102


Aaaa:ipv6 's address


Cname:canonical Name

Official name, followed by the previous official hostname

Name:fqdn

Value:fqdn

Www.xiaofei.com. In A 192.168.6.100web.xiaofei.com. In CNAME www.xiaofei.com.

The second article means that the official name of Web.xiaofei.com is www.xiaofei.com.


Ptr:pointer

Reverse parse record. The conversion of the IP address to the host name.

Name: The reverse host IP, such as 172.16.100.7/16, whose name is 7.100.in-addr.arpa. Does not contain network address, 192.168.6.100/24, whose name is 6.168.192.in-addr.arpa)

Value:fqdn

Www.xiaofei.com. In A 192.168.6.100100.6.168.in-addr.arpa in PTR www.xiaofei.com.


This article is from the "Storm Coming" blog, make sure to keep this source http://xinyixzy001.blog.51cto.com/340837/1828064

DNS server under Linux environment

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.