05-linux DNS in detail (ii)

Source: Internet
Author: User

"DNS in 04-linux (i)"

VI. testing domain name resolution on Linux
1. First check that DNS is set correctly

cat /etc/resolv.conf
[resolv.conf]# Generated by NetworkManagernameserver 192.168.80.100

2, use Nslookup to test the domain name resolution
A. General analytical method

nslookup wwww.zhangyujia.cn-----Server:         192.168.80.100Address:        192.168.80.100#53

B. Using the specified DNS resolution

nslookup www.zhangyujia.cn 114.114.114.114 #后边接上指定的DNS-----Server:         114.114.114.114Address:        114.114.114.114#53Non-authoritative answer: #非权威应答,解析的是互联网上的主机Name:   www.zhangyujia.cnAddress: xxx.xxx.xxx.xxx

C. Interactive test domain name resolution

nslookup-----> www.zhangyujia.cnServer:         192.168.80.100Address:        192.168.80.100#53Name:   www.zhangyujia.cnAddress: 192.168.80.100> set type=mx #和WINDOWS一样,也可以设置解析类别> 163.com

D. exit

exit

3, the use of host to test the domain name resolution (four methods, if the Discovery command is not available, please perform the Yum install bind-utils installed domain name resolution test related tools)

host -a zhangyujia.cn. 192.168.80.100 #列出该主机的所有相关信息host -l zhangyujia.cn. 192.168.80.100 #列出该域名的所有主机记录host -i 131.107.8.222 192.168.80.100  #逆向解析host -t mx zhangyujia.cn 192.168.80.100 #指定查找类型记录类型(a ptr cname txt......)

3, use dig to test the domain name resolution

dig @192.168.80.100 www.baidu.com a #使用192.168.80.100DNS服务器解析www.baidu.com主机记录

4. Use Whois to query the domain name owner (if the command is found to be unavailable, perform the Yum install Jwhois installation of this tool)

whois baidu.com

Welcome attention
Sina Weibo: https://weibo.com/yougazhang0506
Public platform: Zhang Yujia

My site: http://www.zhangyujia.cn
51CTO Blog: http://blog.51cto.com/11099293

05-linux DNS in detail (ii)

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.