The most detailed tutorial documents for setting up DNS services on linux servers are good materials for more value.

Source: Internet
Author: User
Tags nameserver subdomain subdomain name to domain
DNS server setup in Linux (1) I. Introduction to Domain Name System 1. the domain name system of the domain name system is a distributed database that enables local control of part of the entire Distributed Database segment. The data in each segment can be accessed through the customer, and the server mode can be accessed throughout the network, through the use of replication technology and cache technology to make the entire database reliable, but also have a good set of Linux DNS server (I) I. Domain Name System Introduction 1. the domain name system of the domain name system is a distributed database that enables local control of part of the entire Distributed Database segment. The data in each segment can be accessed through the customer, and the server mode can be accessed throughout the network, by using the replication and cache technologies, the entire database is reliable and has good performance. the Domain Name Server contains part of the database segment information and can be accessed by customers called the parser. the DNS database structure forms an inverted tree structure. The root name is represented by an empty string "", ". "to write. each node in the tree represents a partition (domain) in the entire distributed database. Each domain can be further divided into subpartitions (domains). Each domain has a LABEL ), it indicates its relationship with the parent domain. the domain name also has a domain name to indicate its location in the distributed database. in DNS, the domain name is a sequence of tags from the domain to the root, ". "Separate these tags. the tag can contain a maximum of 63 characters. the complete domain name of each node in the tree is the tag sequence from the node to the root path. if the root domain appears in the domain name of the node, the name looks like ending with a vertex (actually ending with a vertex and an empty tag ). these Domain names ending with vertices are called absolute Domain Names (Absoulte Domain names ). A domain name that does not end with a vertex is called a relative domain name. domains is a subtree in the tree Domain Name Space. The domain name is the same as the domain name of the child root node. that is to say, the domain name is the name of the top node in the domain. for example, the top of the zhuhai.gd.cn domain is a node named zhuhai.gd.cn. in DNS, each domain is managed by a different organization. each organization can divide its domains into a certain number of subdomains and delegate these subdomains to other organizations for management. the domain can include both the host and other domains (its subdomains ). the domain name is used as an index in the DNS database. any domain name in the subdomain is considered as part of the domain. in fact, the host is a domain, and the domain name is only an index in the DNS database. "host" can be indexed by the Domain Name Pointing to the relevant host information. The domain contains all hosts whose domain names are located in the domain. in the domain name tree, the domains of leaf nodes usually represent hosts. Their domain names can point to network addresses, hardware information, and mail routing information. for a node in the tree, its domain name can either name a host or point to the structure information about the child or subdomain of the domain. The internal domain name in the domain name tree is not restricted by uniqueness, they can represent both the domain they correspond to and a specific host on the network. for example, SuN.com is not only the sun domain, but also the Domain Name of the email server that forwards emails between sun and the internet. each host on the network has a domain name. The domain name provides information about the host, including IP addresses and MAIL route information. The host can also have one or more domain name aliases, an alias is only a second 1.1 domain name pointing to a formal domain name. A simple way to determine whether a domain is a subdomain of another domain is to compare their domain names. the subdomain name ends with its parent domain name. one of the main purposes of designing a Domain Name System is to decentralize management, which is achieved through proxy. the organization that manages the domain divides the domain into subdomains. each subdomain can be represented by another organization. This means that the proxy organizations are responsible for maintaining all data in this subdomain. they can change data freely, and even divide the subdomains they manage into more subdomains and reallocate them. the parent domain only contains pointers pointing to these subdomains, so it references queries there. 1.2 A Domain name server is called a Domain name server ). generally, a Domain Name Server has complete information about some domain name spaces (called zone zones. the domain name server can have multiple zones for authorization. relationship between a zone and a domain: the zone contains all domain names and data contained in the domain except for the subdomains that are proxies to other places. if the subdomain of the domain is not proxies, the region contains the subdomain name and data in the subdomain. DNS defines two types of domain name servers: primary Master and secondary Master. the PM Domain Name Server obtains the data of the zone it is responsible for from the files on the host it runs, the SM Domain Name Server obtains data from other domain name servers with the authorization in this region. the SM Domain Name Server regularly queries the PM Domain Name Server to ensure that the zone data is the latest version. generally, it is best to set up a PM Domain Name Server and several SM domain name servers. in this way, the load can be shared. make sure that all hosts in the zone have nearby domain name servers for convenient access. 1.3 The parser runs on the host and requires Domain Name Space Information re-requires the Parser (Resolver). In bind, the parser is just a set of Library Routines and compiled into the image te LnEt and FtpIn such programs, they are not independent processes. the parser collects queries, sends queries, and waits for responses. If no response is received, resend the query. 1.4 The data mapped from an address to a domain name in the domain name space is indexed by name, and it is relatively easy to find the address of a given domain name. however, to find the domain name mapped to a certain address, you need to search for the domain name space in the tree. in this case, the efficiency will be quite low. To solve this problem, create an address-Based Domain Name Space. this part of namespace is called in- DdNodes in the r. arpa domain. in-addr.arpa domain take the Dot Ed-Octet (representing the 32bitIP address ". "separated by four 8-bit decimal form) represents the IP address. the IP address is represented in the opposite direction in the namespace, because the name is read from the leaf root, for example, the IP address of www.zhuhai.gd.cn is 202.105.177.100, then the corresponding in-addr.arpa subdomain is 177.105.202.in-addr. arpa enables the first byte in the IP address to appear at the top of the tree to enable the Administrator to proxy the in-addr.arpa domain along the network connection, such as 177.105.202.in-addr. arpa can be delegated to the administrator of 177.105.202. 1.5 when processing recursive queries, the cache and lifetime name server may need to perform multiple queries to obtain information. In this process, the name server can obtain a lot of information about the Domain Name Space, the Name Server caches the information to accelerate future queries. in addition to accelerated query, the cache does not require you to query the root name server again. This removes the need to rely too much on the Root name server to significantly reduce the load on the Root name server. TTL is the length of time allowed by the name server to cache data. Once TTL reaches, the name server must discard the cached data and obtain new data from the authorized name server. this ensures domain data consistency across the network. 1.6 BIND: Like other unix systems, the LINUX name service uses BIND to implement the name service. the software on the BIND server is a daemon called named. the home page of bind is the DNS server set up by the http://www.isc.orgLinux (2) 2. install server software 2.1 get bind package (now new version 8.2.2 p5) get three files of the latest stable version from the bind home page http://www.isc.org: bind-con TrIb.tar.gz bind-doc.tar.gz bind-src.tar.gz or get three files from the http://www.redhat.com: bind-8.2.2-p5-9.i386.rpm bind-devel-8.2.2-p5-9.i386.rpm cache-nameserver-6.2-2.noarch.rpm 2.2 install bind package install tar package: first ExtractPackage tar zxpf bind-contrib.tar.gz tar zxpf bind-doc.tar.gz tar zxpf bind-src.tar.gz edit modify Make File. SetFile, add or modify 'destlib =/usr/lib/bind/lib' 'destinc = '/usr/lib/bind/I NcLude 'compile and install make install the rpm package: rpm-Uhv bind-8.2.2-p5-9.i386.rpm rpm-Uhv bind-devel-8.2.2-p5-9.i386.rpm rpm-Uhv cache-nameserver-6.2-2.noarch.rpm 3. let the Server Run --- basic article 3.1 BIND can be configured into several different running modes. The general BIND configuration is pure parser system, pure Cache Server, master server, and auxiliary server. a parser is a program code used by the Domain Name Server to query domain information. In unix systems, it is implemented in the form of Library Routines, rather than a separate client program. the pure parser system is easy to configure. Just set/etc/resolv. conf file. this method is usually used in systems where Domain Name Server software cannot be run locally due to some restrictions. for example:/etc/resolv. the conf content is similar to: search linu Xso.com nameserver 127.0.0.1 nameserver 172.16.0.1 When configuring the parser library to use the BIND name service for host search, you must also inform the server of the name it uses. There is an independent file called resolv. conf. If the file does not exist or is empty, the parser assumes that the name server is on your local host. If you run a name server on your local host, you must set it separately. The most important option in resolv. conf is nameserver, which provides the IP address of the name server to be used. If you specify several name servers by giving the nameserver option several times, they will be tried in the given order. Therefore, you should first provide the most reliable server. Currently, up to three name servers are supported. If the nameserver option is not provided, the parser tries to connect to the name server on the local host. The other two options: domain and search involve the default domain attached to the host name if BIND cannot be resolved with the first request. The search option specifies a list of domain names for trial use. List items are separated by spaces or tabs. If the search option is not provided, a search list is created from the local domain name and from the root parent domain by using the domain name itself. The local domain name can be given using the domain statement. If neither of them is provided, the parser will obtain the domain name by calling getdomainname (2. 3.2 The other three configuration methods are used for Domain Name Server pure Cache Server pure cache server running Domain Name Server software, but there is no Domain Name Server database file, it records the data obtained from the remote Domain Name Server to answer future queries on the same information. three basic configuration files required for a pure Cache Server:/etc/named. conf/var/named. ca/var/named. local creates or modifies/etc/named. conf: // generated by named-bootconf.pl options {directory "/var/named ";
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.