DNS architecture under FreeBSD

Source: Internet
Author: User
Tags dns names nslookup subdomain
The DNS architecture under FreeBSD-Linux Enterprise Application-Linux server application information. The following is a detailed description. Generally, a computer only needs to configure domain name resolution and does not need to run the name server daemon process on its own. However, sometimes you need to set your own name server, in this case, you need to configure the Name Server BIND (Berkeley Internet Name D omain) under FreeBSD ). BIND is also a well-known software developed by Berkeley. Its execution program is named and runs on almost all name servers on the Internet to form an Internet name system.

Since a common client computer does not need to run named, named_enable should be no in its/etc/rc. conf configuration file. When you need to run named to provide DNS services, you need to change the value of this parameter to "YES ".


DNS Architecture

The DNS name service on the Internet is a distributed system. The domain name resolution service is provided by the named daemon on DNS servers distributed across the Internet. The DNS domain name structure is hierarchical. For example, the final cn in www.online.ha.cn is a top-level domain name, which is divided into different levels from the back to the front.

There are two top-level domain names on the Internet, one is Country Code such as cn, the other is Classification Code such as edu, org, net, com. Subdomain names under country top-level domains can also be classified by region or organizational structure.

To resolve the domain name, you need to search for the domain name at the first level from the back of the domain name. Therefore, some DNS servers provide resolution tasks for top-level domains on the Internet. These DNS servers are called root DNS servers. Once you know the address of the root DNS server, you can find the name of any host with a DNS domain name. The BIND Code includes the address of these root DNS servers.

The Name Service uses the concept of zone to represent a host in the domain. However, the zone and the domain are also different. The zone is only part of the domain, not the whole domain. Because zone does not include subdomains under the domain. For example, the domain name www.example.org.cn is example.org.cn, which is an independent zone. This domain can be composed of subdomains. For example, www.sub.example.org.cn belongs to its subdomain sub.example.org.cn. The subdomain is also an independent zone, not included in example.org.cn, the domain example.org.cn contains the sub.example.org.cn subdomain.

In addition to finding the host's IP address by name, there is also a way to reverse query the host's domain name resolution from the IP address. In many cases, reverse resolution is used in the network to determine the identity of the host, so it is also important. The reverse resolution of the search name is performed step by step from the previous network address to the back Node Address. Therefore, the IP address zone is the front part of the IP address. However, because the domain name of a host can be set at will, it is not necessarily related to the IP address, so forward search and reverse search are two different search processes, and different zones need to be configured.

Use DNS query tools

A very useful tool for DNS query is nslookup, which can be used to query various data in DNS. In addition to directly performing basic DNS queries under the command line, directly starting nslookup will enter an interactive mode where you can query various types of DNS data.

The data for name resolution can be of different types, including the SOA type data for setting the parameter of this zone, and the type data for setting the IP address corresponding to the name, there are PTR data that is set to reverse-resolve DNS names from IP addresses, NS data of the DNS server that defines the service and this zone, and CNAME data that defines the host alias. These different types of data can be queried through the nslookup interactive mode. You need to use the set type command to set the corresponding Query type.

$ Nslookup

Default Server: ns.hazzptt.net.cn

Address: 202.102.224.68



> Set type = ns

> Yahoo.com

Server: ns.hazzptt.net.cn

Address: 202.102.224.68



Non-authoritative answer:

Yahoo.com nameserver = NS2.DCA.yahoo.com

Yahoo.com nameserver = NS5.DCX.yahoo.com

Yahoo.com nameserver = NS.EUROPE.yahoo.com

Yahoo.com nameserver = NS1.yahoo.com



Authoritative answers can be found from:

NS2.DCA.yahoo.com internet address = 209.143.200.34

NS5.DCX.yahoo.com internet address = 216.32.74.10

NS.EUROPE.yahoo.com internet address = 195.67.49.25

NS1.yahoo.com internet address = 204.71.200.33

>

In this example, nslookup is used to query the name server of the zone yahoo.com. You need to set the type to ns to execute the query. There are many other tools to help you obtain DNS data. For example, dig can quickly return the name resolution data of the entire zone, and dnswalk can be used to query the name server settings. These tools can be used to find DNS settings.
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.