In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This "Linux system to see what DNS commands are" article, the article sample code is introduced in great detail, with a certain reference value, interested friends must refer to, for the "Linux system view what DNS commands are", Xiaobian sorted out the following knowledge points, please follow the pace of the editor step by step slowly understand, then let us enter the topic.
First, the dig command Dig is a tool for querying DNS including NS records, A records, MX records and other related information in a similar Unix command line mode. The source code of Dig is part of the ISC BIND package, but it is not included in most documents that compile and install Bind, but in linux systems, it is usually part of a package, bind-tools in Gentoo, bind-utils in Redhat/Fedora, or dnsutils in Debian.
1. Dig-DNS lookup utility
When there is an access failure of a domain name, you can check the domain name resolution to determine whether the problem is caused by incorrect resolution.
Domain name resolution has no result (does not exist or is not verified by HOLD, etc.)
Domain name is resolved to the wrong IP (blocked and hijacked in response to the error result, and the resolution process needs to be judged)
The value of the corresponding CNAME record cannot be parsed
Partial resolution exception (when configuring multiple domain name servers, the resolution results of multiple servers are inconsistent. You need to confirm whether the resolution records added on the DNS server are consistent)
To parse the www.baidu.com easily, the results are as follows:
You can see that there are request segment and reply segment, and the final parsed A record has two.
2. Dig command to do iterative query
Add + trace after the command to track the entire parsing process:
Parsing process:
Find the top-level domain name server responsible for resolving .com by the root domain name server
Find the secondary domain name server of baidu.com by the top-level domain name server
Www.baidu.com corresponding to a CNAME record www.a.shifen.com is found by the secondary domain name server.
Then find the A record corresponding to www.a.shifen.com.
Finally, the IP address of A record is returned.
3. How does the dig command return when the domain name does not exist
For example, the resolution of the domain name www.not-exists-domain.com does not exist.
The whole process is as follows:
Returns the server address of the .com top-level domain from the root domain
Check from the .com top-level domain that the second-level domain does not exist and return a SOA record
Nslookup-query Internet name servers interactivelynslookup is a network management command line tool that can be used to query DNS domain names and IP address input instructions nslookup default server and Address is the DNS server domain name and address A record A (Address) record currently used to surf the Internet refers to the IP record used to specify the host name or domain name. Enter the domain name directly after the prompt >, you can view the A record of the domain name (you can also set it with the set type=an instruction): MX record MX (mail exchanger) record, mail exchange record, which points to a mail server, which is used by the e-mail system to locate the mail server according to the address suffix of the recipient when sending e-mail. Enter set type=mx, and then enter the domain name to query the mx type record MX perference = 10 refers to the priority NS record NS (nameserver) record of the MX record, which is used to specify which DNS server to resolve the domain name. Enter set type=ns first and then the domain name CNAME record cname record is an alias record and also becomes a standard name. This kind of record allows multiple names to be mapped to the same computer. Enter set type=cname to query n.
Slookup can be used in both interactive and non-interactive ways as shown in the following figure:
Nslookup can also specify the resolution command format to a domain name server as follows:
Nslookup www.baidu.com 8.8.8.8 (domain name server address)
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
The above is all the contents of the article "what are the DNS commands checked by the Linux system?" Thank you for your reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.