DNS域名

 

DNS是什么?

网站输入域名,daxian001 --->10.0.0.10 从域名解析到IP  就绪需要DNS

DNS能干什么

A记录 www.daxian001.com --->10.0.0.10

mx解析记录  123456@qq.com   邮件服务

PTR反向解析  10.0.0.10 -->www.daxian001.com

 

DNS解析流程原理

 

 

 

DNS解析命令

 

 

dig 查看解析过程

dig @8.8.8.8 www.baidu.com +trace

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.37.rc1.el6 <<>> @8.8.8.8 www.baidu.com +trace
; (1 server found)
;; global options: +cmd
. 39456 IN NS m.root-servers.net.
. 39456 IN NS c.root-servers.net.
. 39456 IN NS h.root-servers.net.
. 39456 IN NS g.root-servers.net.
. 39456 IN NS k.root-servers.net.
. 39456 IN NS l.root-servers.net.
. 39456 IN NS e.root-servers.net.
. 39456 IN NS i.root-servers.net.
. 39456 IN NS j.root-servers.net.
. 39456 IN NS b.root-servers.net.
. 39456 IN NS d.root-servers.net.
. 39456 IN NS a.root-servers.net.
. 39456 IN NS f.root-servers.net.
;; Received 228 bytes from 8.8.8.8#53(8.8.8.8) in 76 ms

com. 172800 IN NS m.gtld-servers.net.
com. 172800 IN NS a.gtld-servers.net.
com. 172800 IN NS c.gtld-servers.net.
com. 172800 IN NS e.gtld-servers.net.
com. 172800 IN NS h.gtld-servers.net.
com. 172800 IN NS l.gtld-servers.net.
com. 172800 IN NS d.gtld-servers.net.
com. 172800 IN NS k.gtld-servers.net.
com. 172800 IN NS f.gtld-servers.net.
com. 172800 IN NS g.gtld-servers.net.
com. 172800 IN NS b.gtld-servers.net.
com. 172800 IN NS j.gtld-servers.net.
com. 172800 IN NS i.gtld-servers.net.
;; Received 491 bytes from 192.33.4.12#53(192.33.4.12) in 291 ms

baidu.com. 172800 IN NS dns.baidu.com.
baidu.com. 172800 IN NS ns2.baidu.com.
baidu.com. 172800 IN NS ns3.baidu.com.
baidu.com. 172800 IN NS ns4.baidu.com.
baidu.com. 172800 IN NS ns7.baidu.com.
;; Received 201 bytes from 192.33.14.30#53(192.33.14.30) in 301 ms

www.baidu.com. 1200 IN CNAME www.a.shifen.com.
a.shifen.com. 1200 IN NS ns4.a.shifen.com.
a.shifen.com. 1200 IN NS ns2.a.shifen.com.
a.shifen.com. 1200 IN NS ns1.a.shifen.com.
a.shifen.com. 1200 IN NS ns5.a.shifen.com.
a.shifen.com. 1200 IN NS ns3.a.shifen.com.
;; Received 228 bytes from 220.181.38.10#53(220.181.38.10) in 7 ms

 

nslookup解析域名

[root@web01 ~]# nslookup
> baidu.com                    
Server:         192.168.20.20
Address:        192.168.20.20#53

Non-authoritative answer:
Name:   baidu.com
Address: 220.181.57.217
Name:   baidu.com
Address: 123.125.114.144
Name:   baidu.com
Address: 111.13.101.208

 

host解析

host  www.baidu.com
www.baidu.com is an alias for www.a.shifen.com.
www.a.shifen.com has address 119.75.213.61
www.a.shifen.com has address 119.75.216.20

 

ping域名

[root@web01 ~]# ping www.baidu.com
PING www.a.shifen.com (119.75.213.61) 56(84) bytes of data.
64 bytes from 119.75.213.61: icmp_seq=1 ttl=53 time=3.94 ms
64 bytes from 119.75.213.61: icmp_seq=2 ttl=53 time=3.26 ms
64 bytes from 119.75.213.61: icmp_seq=3 ttl=53 time=3.33 ms
64 bytes from 119.75.213.61: icmp_seq=4 ttl=53 time=3.55 ms
64 bytes from 119.75.213.61: icmp_seq=5 ttl=53 time=3.27 ms
64 bytes from 119.75.213.61: icmp_seq=6 ttl=53 time=3.44 ms
64 bytes from 119.75.213.61: icmp_seq=7 ttl=53 time=3.24 ms
64 bytes from 119.75.213.61: icmp_seq=8 ttl=53 time=3.47 ms
64 bytes from 119.75.213.61: icmp_seq=9 ttl=53 time=3.39 ms

 

posted @ 2018-01-11 12:36  大仙儿没溜儿  阅读(213)  评论(0编辑  收藏  举报