Basic working principle of DNS, and forward and backward parsing and master-slave synchronization

Source: Internet
Author: User
Tags domain name server

How DNS works:

DNS is a TCP/UDP-based service that listens on port 53.

Our usual URLs, such as www.qiuye.com, are actually www.qiuye.com. The last point points to the root server, just because the browser we're using now has an auto-pointing relationship, so we just need to enter the URL instead of entering the final point.


(a) The DNS server is actually the storage domain name and IP corresponding database file

1. Recursive queries
2. Iterative queries
650) this.width=650; "src=" Http://hi.csdn.net/attachment/201108/16/0_1313511250mrlr.gif "alt=" 0_ 1313511250mrlr.gif "/>

Recursive query, if a query is not ibm.com, server A will query to the next server B until the answer is found.

Iterative query, if a does not have ibm.com, but know B has, send it to the PC, let it find B.


(b) DNS server parsing is bidirectional:
NAME----->ip: Forward parsing, find the corresponding IP example qiuye.com-->1.1.1.1 name=qiuye.com!=www.qiuye.com according to the hostname.
IP------>FQDN: Echo resolution, according to IP lookup to the corresponding domain name example 1.1.1.1-->www.qiuye.com Reverse resolution when the IP address to reverse write.  

The DNS server records these parsed information mainly through some record types:
FQDN---> ip:a a means that the corresponding IP address
IP-----> fqdn:ptr (pointer) indicates that the corresponding domain name
Domain----->server:ns (name server) name Server
DOMAIN------> mta:mx (mail eXchanger) record email address, mail exchanger
aliase-----> Jerry:cname Parse the official name of an alias
SOA (Start of authority) typically identifies the primary domain name server for a domain name


(iii) DNS server type:
Local slave server
Local primary server

Primary Server----Secondary name server
In General, from the service is synchronized with other servers over time, but it also has the responsibility to notify, as long as its data changes, it will notify the other from the server, regardless of whether the other from the server changes will be synchronized with it


(iv) What is a domain, region

DNS resolution needs to define a domain, and there are two sub-zones under this domain, they are used for name resolution, name resolution is divided into two categories, one is positive, the other is reverse, and needs to be defined separately:
Forward requires a separate data file

Reverse requires a separate data file

So the area is a physical concept, which corresponds to the physical document one by one. The domain is a logical concept, and it is named a "place".

# A domain contains a forward region and a reverse region, but the region can also open up a domain,. com has ibm.com domain and region does not have a corresponding relationship between each other, not necessarily only two regions, if a domain is divided into multiple domains, there are more than two regions


Zone Transfer Type
AXFR full zone transfer--------> transmit All parsing information within the zone
IXFR Partial zone transfer--------> only change content

If a domain name is added or moved, then this information is modified to have the primary server to do, and from the server every once in a while and the main server synchronization information or send information, this transfer called zone transfer


Five DNS server responds to client request resolution process

650) this.width=650; "src=" Http://hi.csdn.net/attachment/201108/16/0_1313511954txqe.gif "style=" border:none; "/ >


Request-----> Local/etc/hosts # If there is parsing in the host file, then the parse result of the host file is returned, there is no next

----> Local DNS Cache # Find local DNS cache, if there is, return results, no next

----> Find the first DNS server----> Find Cache # Find your own defined first DNS server, the DNS server looks for the cache, if there is, returns results, such as no, next

----> See if you are responsible for your domain-------> return results # The second DNS is just responsible for changing the domain, returning the result
↓ Yes
is not# The second self-defined DNS, no results, go directly to the root server and then step by step to the subordinate domain name to find

Find a root DNS server

# The answer returned by the root server step-by-step search is an authoritative answer, and the cache returns a non-authoritative answer

Description
/etc/host can implement domain redirection because it is used preferentially

The purpose of the cache name server is to: accelerate, conserve bandwidth, and it is not responsible for managing zones


* * Forwarder: The DNS server forwards data between inside and outside firewalls by simply forwarding the user's request to other servers




Basic working principle of DNS, and forward and backward parsing and master-slave synchronization

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.