阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

DNS详解及DNS主从配置

245次阅读
没有评论

共计 14891 个字符,预计需要花费 38 分钟才能阅读完成。

DNS 全称 domain name system 域名系统的缩写,它是一种将 IP 地址转换成对应的主机名或者将主机名转换成对应的 IP 的一种服务机制。其中通过域名解析出 IP 叫做正向解析,通过 IP 解析出域名叫做反向解析。DNS 使用 TCP 和 UDP 协议,端口号都是 53,但它主要使用 UDP,服务器之间备份使用 TCP。全世界只有 13 台“根”服务器,一个主根服务器放在美国,其他 12 台为辅根服务器,DNS 服务器根据角色可分为:主 DNS,从 DNS,缓存 DNS 服务器,DNS 转发服务器。

首先来看看域名的结构组成,我们平时访问网站的时候,都会用一个域名去请求,比如 www.baidu.com,其实.com 后面还有一个点,这个点叫做根域。下图是一个域名的树状结构,根域下面会有.com,.cn,.net 等顶级域,顶级域下面又有二级域名,比如 baidu.com 或者.com.cn 等,而 www.baidu.com 则为子域,我们经常用子域来做网站的域名。

DNS 详解及 DNS 主从配置

早期的域名到 IP 的映射是保存在 hosts 文件中的:

[root@cp1 ~]# cat /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

DNS 解析过程:先在本地 /etc/hosts 文件中查找解析,如果找到直接使用;如果找不到,则进行下图所示的解析过程:

DNS 详解及 DNS 主从配置

查看 DNS 配置文件的内容:

[root@cp1 ~]# cat /etc/resolv.conf

; generated by /sbin/dhclient-script

search localdomain

nameserver 192.168.147.2 

我们使用 bind 来搭建 DNS 服务,

首先安装 bind:

[root@cp1 ~]# yum install -y bind

配置文件说明:

主配置文件:/etc/named.conf

(监听的端口 53,IP127.0.0.1)

域服务器配置文件:/var/named/named.ca

本地主机配置文件:/var/named/named.localhost

反解析配置文件:/var/named/named.loopback

启动 DNS 服务 named:

[root@cp1 ~]# /etc/init.d/named start

Generating /etc/rndc.key:                                  [确定]

启动 named:[确定]

测试 1:正向解析

测试使用 @127.0.0.1 解析 localhost:

[root@cp1 ~]# dig @127.0.0.1 localhost

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> @127.0.0.1 localhost

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 11354

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;localhost.                     IN      A

;; ANSWER SECTION:

localhost.              86400   IN      A       127.0.0.1

;; AUTHORITY SECTION:

localhost.              86400   IN      NS      localhost.

;; ADDITIONAL SECTION:

localhost.              86400   IN      AAAA    ::1

;; Query time: 0 msec

;; SERVER: 127.0.0.1#53(127.0.0.1)

;; WHEN: Mon Mar 13 22:31:29 2017

;; MSG SIZE  rcvd: 85

测试使用 @127.0.0.1 解析 localhost.localdomain:

[root@cp1 ~]# dig @127.0.0.1 localhost.localdomain

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> @127.0.0.1 localhost.localdomain

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26777

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;localhost.localdomain.         IN      A

;; ANSWER SECTION:

localhost.localdomain.  86400   IN      A       127.0.0.1

;; AUTHORITY SECTION:

localhost.localdomain.  86400   IN      NS      localhost.localdomain.

;; ADDITIONAL SECTION:

localhost.localdomain.  86400   IN      AAAA    ::1

;; Query time: 0 msec

;; SERVER: 127.0.0.1#53(127.0.0.1)

;; WHEN: Mon Mar 13 22:32:30 2017

;; MSG SIZE  rcvd: 97

测试结果发现,将 localhost 和 localhost.localdomain 都解析到了 127.0.0.1。

测试 2:反向解析

反解析配置文件:/var/named/named.loopback

测试使用 @127.0.0.1 反解析 127.0.0.1:

[root@cp1 ~]# dig @127.0.0.1 -x 127.0.0.1

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> @127.0.0.1 -x 127.0.0.1

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25857

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2

;; QUESTION SECTION:

;1.0.0.127.in-addr.arpa.                IN      PTR

;; ANSWER SECTION:

1.0.0.127.in-addr.arpa. 86400   IN      PTR     localhost.

;; AUTHORITY SECTION:

1.0.0.127.in-addr.arpa. 86400   IN      NS      1.0.0.127.in-addr.arpa.

;; ADDITIONAL SECTION:

1.0.0.127.in-addr.arpa. 86400   IN      A       127.0.0.1

1.0.0.127.in-addr.arpa. 86400   IN      AAAA    ::1

;; Query time: 0 msec

;; SERVER: 127.0.0.1#53(127.0.0.1)

;; WHEN: Mon Mar 13 22:33:43 2017

;; MSG SIZE  rcvd: 121

测试结果发现,将 127.0.0.1 反解析到了 localhost。

 

 

配置一个正向解析的域:123.com

编辑主配置文件:

[root@cp1 ~]# vim /etc/named.conf

在最后面添加一个域“123.com”,格式参照 zone “.” 格式:

zone “123.com” IN {

       type master;

       file “123.com.zone”;

};

检查主配置文件是否有错:

[root@cp1 ~]# named-checkconf

编辑 123.com.zone 文件:

[root@cp1 ~]# vim /var/named/123.com.zone

内容如下,格式参考 /var/named/named.localhost:

$TTL 1D

@       IN SOA  @ admin.123.com. (

                                       2015010901       ; serial

                                       1D      ; refresh

                                       1H      ; retry

                                       1W      ; expire

                                       3H )    ; minimum

       IN      NS      ns.123.com.

       IN      MX      5       mail.123.com.

mail    IN      A       192.168.134.129

ns      IN      A       192.168.134.128

www     IN      A       11.11.11.11

bbs     IN      CNAME   www

检查域配置文件是否有错:

[root@cp1 ~]# named-checkzone “123.com” /var/named/123.com.zone

zone 123.com/IN: loaded serial 2015010901

OK

再次编辑主配置文件,

[root@cp1 ~]# vim /etc/named.conf

加入监听 DNS 的 IP192.168.147.137

listen-on port 53 {127.0.0.1;192.168.147.137;};

重启:

[root@cp1 ~]# /etc/init.d/named restart

停止 named:.                                              [确定]

启动 named:[确定]

测试 1:解析 www.123.com:

[root@cp1 ~]# dig @192.168.147.137 www.123.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> @192.168.147.137 www.123.com

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31526

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;www.123.com.                   IN      A

;; ANSWER SECTION:

www.123.com.            86400   IN      A       11.11.11.11

;; AUTHORITY SECTION:

123.com.                86400   IN      NS      ns.123.com.

;; ADDITIONAL SECTION:

ns.123.com.             86400   IN      A       192.168.134.128

;; Query time: 15 msec

;; SERVER: 192.168.147.137#53(192.168.147.137)

;; WHEN: Mon Mar 13 23:37:22 2017

;; MSG SIZE  rcvd: 78

测试 2:解析 bbs.123.com:

[root@cp1 ~]# dig @192.168.147.137 bbs.123.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> @192.168.147.137 bbs.123.com

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9966

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;bbs.123.com.                   IN      A

;; ANSWER SECTION:

bbs.123.com.            86400   IN      CNAME   www.123.com.

www.123.com.            86400   IN      A       11.11.11.11

;; AUTHORITY SECTION:

123.com.                86400   IN      NS      ns.123.com.

;; ADDITIONAL SECTION:

ns.123.com.             86400   IN      A       192.168.134.128

;; Query time: 1 msec

;; SERVER: 192.168.147.137#53(192.168.147.137)

;; WHEN: Mon Mar 13 23:38:53 2017

;; MSG SIZE  rcvd: 96

测试 3:mail.123.com:

[root@cp1 ~]# dig @192.168.147.137 mail.123.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> @192.168.147.137 mail.123.com

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41160

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;mail.123.com.                  IN      A

;; ANSWER SECTION:

mail.123.com.           86400   IN      A       192.168.134.129

;; AUTHORITY SECTION:

123.com.                86400   IN      NS      ns.123.com.

;; ADDITIONAL SECTION:

ns.123.com.             86400   IN      A       192.168.134.128

;; Query time: 0 msec

;; SERVER: 192.168.147.137#53(192.168.147.137)

;; WHEN: Mon Mar 13 23:39:42 2017

;; MSG SIZE  rcvd: 79

测试 4:没有配置的 mail2 解析失败

[root@cp1 ~]# dig @192.168.147.137 mail2.123.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> @192.168.147.137 mail2.123.com

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 47121

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:

;mail2.123.com.                 IN      A

;; AUTHORITY SECTION:

123.com.                10800   IN      SOA     123.com. admin.123.com. 2015010901 86400 3600 604800 10800

;; Query time: 9 msec

;; SERVER: 192.168.147.137#53(192.168.147.137)

;; WHEN: Mon Mar 13 23:40:34 2017

;; MSG SIZE  rcvd: 73

 

配置一个反向解析的域:147.168.192.zone

(反解析一般用于企业的邮件服务器,能够反解析出我的域名的 IP 我才给你发邮件)

编辑主配置文件:

[root@cp1 ~]# vim /etc/named.conf

在最后面添加一个域:

zone “147.168.192.in-addr.arpa” IN {

type master;

file “147.168.192.zone”;

};

检查主配置文件是否有错:

[root@cp1 ~]# named-checkconf

编辑对应的 zone 文件:

[root@cp1 ~]# vim /var/named/147.168.192.zone

$TTL 1D

@       IN SOA  @ admin.123.com. (

2015010901       ; serial

1D      ; refresh

1H      ; retry

1W      ; expire

3H )    ; minimum

IN      NS      ns.123.com.

137     IN      PTR     ns.123.com.

138     IN      PTR     mail.123.com.

检查域配置文件是否有错:

[root@cp1 ~]# named-checkzone “147.168.192” /var/named/147.168.192.zone

zone 147.168.192/IN: loaded serial 2015010901

OK

重启:

[root@cp1 ~]# /etc/init.d/named restart

停止 named:.                                              [确定]

启动 named:[确定]

测试 1:DNS 服务器自身 IP 反解析成功

[root@cp1 ~]# dig @192.168.147.137 -x 192.168.147.137

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> @192.168.147.137 -x 192.168.147.137

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38679

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;137.147.168.192.in-addr.arpa.  IN      PTR

;; ANSWER SECTION:

137.147.168.192.in-addr.arpa. 86400 IN  PTR     ns.123.com.

;; AUTHORITY SECTION:

147.168.192.in-addr.arpa. 86400 IN      NS      ns.123.com.

;; ADDITIONAL SECTION:

ns.123.com.             86400   IN      A       192.168.134.128

;; Query time: 0 msec

;; SERVER: 192.168.147.137#53(192.168.147.137)

;; WHEN: Tue Mar 14 00:00:02 2017

;; MSG SIZE  rcvd: 100

测试 2:域 192.168.147 内的任意主机都能反解析成功

[root@cp1 ~]# dig @192.168.147.137 -x 192.168.147.138

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> @192.168.147.137 -x 192.168.147.138

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50957

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;138.147.168.192.in-addr.arpa.  IN      PTR

;; ANSWER SECTION:

138.147.168.192.in-addr.arpa. 86400 IN  PTR     mail.123.com.

;; AUTHORITY SECTION:

147.168.192.in-addr.arpa. 86400 IN      NS      ns.123.com.

;; ADDITIONAL SECTION:

ns.123.com.             86400   IN      A       192.168.134.128

;; Query time: 0 msec

;; SERVER: 192.168.147.137#53(192.168.147.137)

;; WHEN: Tue Mar 14 00:01:31 2017

;; MSG SIZE  rcvd: 105

测试 3:不在域 192.168.147 内的 IP 反解析失败:

[root@cp1 ~]# dig @192.168.147.137 -x 192.168.123.138

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> @192.168.147.137 -x 192.168.123.138

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 37175

;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:

;138.123.168.192.in-addr.arpa.  IN      PTR

;; Query time: 1240 msec

;; SERVER: 192.168.147.137#53(192.168.147.137)

;; WHEN: Tue Mar 14 00:01:58 2017

;; MSG SIZE  rcvd: 46

 

 

dns 服务器主从配置:

主 DNS 服务器:192.168.147.137

从 DNS 服务器:192.168.147.138

在从 DNS 服务器上 192.168.147.138:

安装 DNS:

[root@cp2 ~]# yum install -y bind

编辑主配置:

[root@cp2 ~]# vim /etc/named.conf

注释掉以下两行,表示监听所有 IP

//      listen-on port 53 {127.0.0.1;};

//      listen-on-v6 port 53 {::1;};

在最后面添加与主 DNS 一样的域配置,稍作修改如下:

zone “123.com” IN {

type slave;

file “slaves/123.com.zone”;

masters {192.168.147.137;};

};

zone “147.168.192.in-addr.arpa” IN {

type slave;

file “slaves/147.168.192.zone”;

masters {192.168.147.137;};

};

检查主配置文件是否有错:

[root@cp2 ~]# named-checkconf

启动:

[root@cp2 ~]# /etc/init.d/named start

Generating /etc/rndc.key:                                  [确定]

启动 named:[确定]

查看生成的文件:

[root@cp2 ~]# ls /var/named/slaves/

123.com.zone  147.168.192.zone

查看 123.com.zone 内容(可以看到在主 DNS 上的配置被同步到从 DNS 上):

[root@cp2 ~]# cat /var/named/slaves/123.com.zone

$ORIGIN .

$TTL 86400      ; 1 day

123.com                 IN SOA  123.com. admin.123.com. (

2015010901 ; serial

86400      ; refresh (1 day)

3600       ; retry (1 hour)

604800     ; expire (1 week)

10800      ; minimum (3 hours)

)

NS      ns.123.com.

MX      5 mail.123.com.

$ORIGIN 123.com.

bbs                     CNAME   www

mail                    A       192.168.134.129

ns                      A       192.168.134.128

www                     A       11.11.11.11

测试从 DNS 解析 www.123.com:

[root@cp2 ~]# dig @192.168.147.138 www.123.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> @192.168.147.138 www.123.com

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 38327

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;www.123.com.                   IN      A

;; ANSWER SECTION:

www.123.com.            86400   IN      A       11.11.11.11

;; AUTHORITY SECTION:

123.com.                86400   IN      NS      ns.123.com.

;; ADDITIONAL SECTION:

ns.123.com.             86400   IN      A       192.168.134.128

;; Query time: 1 msec

;; SERVER: 192.168.147.138#53(192.168.147.138)

;; WHEN: Tue Mar 14 00:34:43 2017

;; MSG SIZE  rcvd: 78

测试从 DNSbbs:

[root@cp2 ~]# dig @192.168.147.138 bbs.123.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> @192.168.147.138 bbs.123.com

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36960

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;bbs.123.com.                   IN      A

;; ANSWER SECTION:

bbs.123.com.            86400   IN      CNAME   www.123.com.

www.123.com.            86400   IN      A       11.11.11.11

;; AUTHORITY SECTION:

123.com.                86400   IN      NS      ns.123.com.

;; ADDITIONAL SECTION:

ns.123.com.             86400   IN      A       192.168.134.128

;; Query time: 0 msec

;; SERVER: 192.168.147.138#53(192.168.147.138)

;; WHEN: Tue Mar 14 00:46:35 2017

;; MSG SIZE  rcvd: 96

测试反解析:

[root@cp2 ~]# dig @192.168.147.138 -x 192.168.147.137

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> @192.168.147.138 -x 192.168.147.137

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5809

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;137.147.168.192.in-addr.arpa.  IN      PTR

;; ANSWER SECTION:

137.147.168.192.in-addr.arpa. 86400 IN  PTR     ns.123.com.

;; AUTHORITY SECTION:

147.168.192.in-addr.arpa. 86400 IN      NS      ns.123.com.

;; ADDITIONAL SECTION:

ns.123.com.             86400   IN      A       192.168.134.128

;; Query time: 0 msec

;; SERVER: 192.168.147.138#53(192.168.147.138)

;; WHEN: Tue Mar 14 00:48:28 2017

;; MSG SIZE  rcvd: 100

测试结果发现,从 DNS 服务器正常工作。

在主上增加一条记录:

[root@cp1 ~]# vim /var/named/123.com.zone

$TTL 1D

@       IN SOA  @ admin.123.com. (

2015010902       ; serial

1D      ; refresh

1H      ; retry

1W      ; expire

3H )    ; minimum

IN      NS      ns.123.com.

IN      MX      5       mail.123.com.

mail    IN      A       192.168.147.137

ns      IN      A       192.168.147.138

www     IN      A       11.11.11.11

bbs     IN      CNAME   www

test    IN      A       111.111.111.111

重启:

[root@cp1 ~]# /etc/init.d/named restart

停止 named:.                                              [确定]

启动 named:[确定]

测试解析新加入的记录 test.123.com:

[root@cp1 ~]# dig @192.168.147.137 test.123.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> @192.168.147.137 test.123.com

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2695

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;test.123.com.                  IN      A

;; ANSWER SECTION:

test.123.com.           86400   IN      A       111.111.111.111

;; AUTHORITY SECTION:

123.com.                86400   IN      NS      ns.123.com.

;; ADDITIONAL SECTION:

ns.123.com.             86400   IN      A       192.168.147.138

;; Query time: 0 msec

;; SERVER: 192.168.147.137#53(192.168.147.137)

;; WHEN: Tue Mar 14 00:53:47 2017

;; MSG SIZE  rcvd: 79

1 天刷新一次不方便测试,我们想只要主发生更改,从立即跟着更改:

在主上编辑配置文件:加入向从发送通知的配置

zone “123.com” IN {

type master;

file “123.com.zone”;

notify yes;

also-notify {192.168.147.138;};

};

zone “147.168.192.in-addr.arpa” IN {

type master;

file “147.168.192.zone”;

notify yes;

also-notify {192.168.147.138;};

};

检查配置:

[root@cp1 ~]# named-checkconf

重启:[root@cp1 ~]# /etc/init.d/named restart

停止 named:.                                              [确定]

启动 named:[确定]

在从上测试:

发现从 DNS 上配置文件 123.com.zone 也自动更新:

[root@cp2 ~]# cat /var/named/slaves/123.com.zone

$ORIGIN .

$TTL 86400      ; 1 day

123.com                 IN SOA  123.com. admin.123.com. (

2015010902 ; serial

86400      ; refresh (1 day)

3600       ; retry (1 hour)

604800     ; expire (1 week)

10800      ; minimum (3 hours)

)

NS      ns.123.com.

MX      5 mail.123.com.

$ORIGIN 123.com.

bbs                     CNAME   www

mail                    A       192.168.147.137

ns                      A       192.168.147.138

test                    A       111.111.111.111

www                     A       11.11.11.11

测试解析 test.123.com:

[root@cp2 ~]# dig @192.168.147.138 test.123.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.47.rc1.el6_8.4 <<>> @192.168.147.138 test.123.com

; (1 server found)

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57454

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:

;test.123.com.                  IN      A

;; ANSWER SECTION:

test.123.com.           86400   IN      A       111.111.111.111

;; AUTHORITY SECTION:

123.com.                86400   IN      NS      ns.123.com.

;; ADDITIONAL SECTION:

ns.123.com.             86400   IN      A       192.168.147.138

;; Query time: 0 msec

;; SERVER: 192.168.147.138#53(192.168.147.138)

;; WHEN: Tue Mar 14 00:58:05 2017

;; MSG SIZE  rcvd: 79

本文永久更新链接地址 :http://www.linuxidc.com/Linux/2017-03/142192.htm

正文完
星哥玩云-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-21发表,共计14891字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中