Set up a DNS server in Linux (III)

Source: Internet
Author: User
Tags domain server mail exchange mx record nameserver nslookup nslookup command to domain
Article Title: Set up a DNS server in Linux (3 ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
4. standard resource records
  
-----------------------------------------------------------------------
  
Resource Record text name meaning record type Function
  
-----------------------------------------------------------------------
  
Start of Authority authorization Start of SOA marking area data, define parameters that affect the entire area
  
Name Server NS indicates Domain Name Server
  
Address A: Convert host name to Address
  
Pointer PTR to convert the address to the Host Name
  
Mail Exchange MX indicates the location where the Mail sent to a given domain name should be sent
  
Canonical Name regular Name CNAME defined host Name alias
  
HOST information HINFO depicts HOST hardware and operating system information
  
Wellknown Service famous Service WKS announcement NETWORK Service
  
DNS uses MX records for mail routing. It specifies that the mail server of the domain name either processes or forwards emails related to the domain name. A forward mail is sent to an individual associated with the address. A forward mail is sent to its final destination through SMTP protocol. to prevent mail routing, the MX record has a special parameter besides the Domain Name of the email exchanger: Priority value. the priority value is an unsigned integer from 0 to 65535, which gives the priority of the email exchanger.
  
The priority value itself is not important. The key lies in its relative size with the priority value of other mail exchangers. The smaller the priority value, the higher the priority. emails are always first transmitted to the email exchanger with the smallest priority value. attempt to pass to a mail exchanger with a higher priority value after the failure. an email is always sent to an email exchanger with the same priority.
  
Note that hosts listed as email switches must have address records.
  
For example:
  
Mail A 172.16.0.3
  
MX 10 mail.test.com.
  
5. Management Tools
  
5.1 dig
  
Named. the ca file is used to tell your server where you can find the domain server in the root domain. This file must be correct. Generally, this file will not change, but it cannot be guaranteed that it will not change. It is best to synchronize every one or two months.
  
Use the following command to obtain the new named. ca file.
  
Dig @ .aroot-servers.net. ns>/var/named. ca
  
5.2 ndc
  
The ndc command is used by the system administrator to manage operations on the Domain Server.
  
Get help.
  
Ndc restart is used to restart the named process;
  
Ndc reload is used to load new databases.
  
5.3 nslookup
  
Nslookup is a command used to query domain name information. It is divided into two modes: Interactive Mode and non-interactive mode.
  
Non-interactive mode: nslookup www.zhuhai.gd.cn
  
Interactive Mode: nslookup
  
  
Note: "Non-authoritative answer:" appears when you use nslookup to query, indicating that this time the query is not performed outside the network, but the data is searched and found in the cache area.
  
In addition to querying a single host, the interactive mode can also query any type of DNS records and transmit the information of the entire region of a domain. When called without parameters, nslookup displays the name server it uses and enters the interaction mode.
  
At the '>' prompt, you can type any domain name you want to query. By default, it requests A records, which contain IP addresses related to domain names.
  
You can change this type by issuing "set type = type". Here type is the resource record name described above, or ANY.
  
For example, you can have the following conversation with it:
  
$ Nslookup
  
Default Name Server: rs10.hrz.th-darmstadt.de
  
Address: 130.83.56.60
  
> Sunsite.unc.edu
  
Name Server: rs10.hrz.th-darmstadt.de
  
Address: 130.83.56.60
  
Non-authoritative answer:
  
Name: sunsite.unc.edu
  
Address: 152.2.22.81
  
If you want to query a name without a corresponding IP address, but other records can be found in the DNS database, nslookup returns an error message saying "No type A records found" ("No type A record found "). However, you can issue the "set type" command to query other records not of type. For example, to obtain the SOA record of unc.edu, you must issue:
  
> Unc.edu
  
* ** No address (A) records available for unc.edu
  
Name Server: rs10.hrz.th-darmstadt.de
  
Address: 130.83.56.60
  
> Set type = SOA
  
> Unc.edu
  
Name Server: rs10.hrz.th-darmstadt.de
  
Address: 130.83.56.60
  
Non-authoritative answer:
  
Unc.edu
  
Origin = ns.unc.edu
  
Mail addr = shava.ns.unc.edu
  
Serial = 930408
  
Refresh = 28800 (8 hours)
  
Retry = 3600 (1 hour)
  
Expire = 1209600 (14 days)
  
Minimum ttl = 86400 (1 day)
  
Authoritative answers can be found from:
  
UNC. EDU nameserver = SAMBA. ACS. UNC. EDU
  
SAMBA. ACS. UNC. EDU internet address = 128.109.157.30
  
You can query MX records in the same way. Using an ANY type, all resource records associated with a given name are returned.
  
> Set type = MX
  
> Unc.edu
  
Non-authoritative answer:
  
Unc.edu preference = 10, mail exchanger = lambada.oit.unc.edu
  
Lambada.oit.unc.edu internet address = 152.2.22.80
  
Authoritative answers can be found from:
  
UNC. EDU nameserver = SAMBA. ACS. UNC. EDU
  
SAMBA. ACS. UNC. EDU internet address = 128.109.157.30
  
In addition to debugging, an actual application of nslookup is to obtain the current list of root name servers for the named. ca file. You can query all NS type records related to the root domain:
  
> Set type = NS
  
>.
  
Name Server: fb0430.mathematik.th-darmstadt.de
  
Address: 130.83.2.30
  
Non-authoritative answer:
  
(Root) nameserver = NS. INTERNIC. NET
  
(Root) nameserver = AOS. ARL. armY. MIL
  
(Root) nameserver = C. NYSER. NET
  
(Root) nameserver = TERP. UMD. EDU
  
(Root) nameserver = NS. NASA. GOV
  
(Root) nameserver = NIC. NORDU. NET
  
(Root) nameserver = NS. NIC. DDN. MIL
  
Authoritative answers can be found from:
  
(Root) nameserver = NS. INTERNIC. NET
  
(Root) nameserver = AOS. ARL. armY. MIL
  
(Root) nameserver = C. NYSER. NET
  
(Root) nameserver = TERP. UMD. EDU
  
(Root) nameserver = NS. NASA. GOV
  
(Root) nameserver = NIC. NORDU. NET
  
(Root) nameserver = NS. NIC. DDN. MIL
  
NS. INTERNIC. NET internet address = 198.41.0.4
  
AOS. ARL. armY. MIL internet address = 128.63.4.82
  
AOS. ARL. armY. MIL internet address = 192.5.25.82
  
AOS. ARL. armY. MIL internet address = 26.3.0.29
  
C. NYSER. NET internet address = 192.33.4.12
  
TERP. UMD. EDU internet address = 128.8.10.90
  
NS. NASA. GOV internet address = 128.102.16.10
  
NS. NASA. GOV internet address = 192.52.195.10
  
NS. NASA. GOV internet address = 45.13.10.121
  
NIC. NORDU. NET internet address = 192.36.148.17
  
NS. NIC. DDN. MIL internet address = 192.112.36.4
  
The complete nslookup command set can be obtained through the help Command in nslookup.
  
  

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.