亚洲欧美精品沙发,日韩在线精品视频,亚洲Av每日更新在线观看,亚洲国产另类一区在线5

<pre id="hdphd"></pre>

  • <div id="hdphd"><small id="hdphd"></small></div>
      學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 操作系統(tǒng) > Linux教程 > linux查看dns命令

      linux查看dns命令

      時(shí)間: 佳洲1085 分享

      linux查看dns命令

        linux下我們要查看服務(wù)器的DNS信息可以通過(guò)命令來(lái)實(shí)現(xiàn),下面由學(xué)習(xí)啦小編為大家整理了linux查看dns命令的相關(guān)知識(shí),希望對(duì)大家有幫助!

        linux查看dns命令1:查看/etc/resolv.con文件

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

        nameserver 192.168.xxx.xxx

        #search localdomain

        [root@localhost ~]#

        linux查看dns命令2:使用nslookup命令查看DNS信息

        [root@localhost ~]# nslookup 127.0.0.1 | grep Server

        Server: 192.168.xxx.xxx

        [root@localhost ~]#

        linux查看dns命令3:使用dig命令來(lái)查看DNS信息

        root@localhost ~]# dig

        ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>>

        ;; global options: printcmd

        ;; Got answer:

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

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

        ;; QUESTION SECTION:

        ;. IN NS

        ;; ANSWER SECTION:

        . 86163 IN NS m.root-servers.net.

        . 86163 IN NS a.root-servers.net.

        . 86163 IN NS j.root-servers.net.

        . 86163 IN NS l.root-servers.net.

        . 86163 IN NS e.root-servers.net.

        . 86163 IN NS d.root-servers.net.

        . 86163 IN NS k.root-servers.net.

        . 86163 IN NS f.root-servers.net.

        . 86163 IN NS h.root-servers.net.

        . 86163 IN NS c.root-servers.net.

        . 86163 IN NS g.root-servers.net.

        . 86163 IN NS b.root-servers.net.

        . 86163 IN NS i.root-servers.net.

        ;; ADDITIONAL SECTION:

        a.root-servers.net. 3599 IN A 112.4.20.71

        b.root-servers.net. 86163 IN A 192.228.79.201

        i.root-servers.net. 86173 IN A 192.36.148.17

        ;; Query time: 8 msec

        ;; SERVER: 192.168.xxx.xxx#53(192.168.xxx.xxx)

        ;; WHEN: Sat Apr 16 07:34:37 2016

        ;; MSG SIZE rcvd: 289

        [root@localhost ~]# dig | grep SERVER: | awk -F# '{ print class="main">

      linux查看dns命令

      時(shí)間: 佳洲1085 分享
      linux查看dns命令

        linux下我們要查看服務(wù)器的DNS信息可以通過(guò)命令來(lái)實(shí)現(xiàn),下面由學(xué)習(xí)啦小編為大家整理了linux查看dns命令的相關(guān)知識(shí),希望對(duì)大家有幫助!

        linux查看dns命令1:查看/etc/resolv.con文件

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

        nameserver 192.168.xxx.xxx

        #search localdomain

        [root@localhost ~]#

        linux查看dns命令2:使用nslookup命令查看DNS信息

        [root@localhost ~]# nslookup 127.0.0.1 | grep Server

        Server: 192.168.xxx.xxx

        [root@localhost ~]#

        linux查看dns命令3:使用dig命令來(lái)查看DNS信息

        root@localhost ~]# dig

        ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>>

        ;; global options: printcmd

        ;; Got answer:

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

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

        ;; QUESTION SECTION:

        ;. IN NS

        ;; ANSWER SECTION:

        . 86163 IN NS m.root-servers.net.

        . 86163 IN NS a.root-servers.net.

        . 86163 IN NS j.root-servers.net.

        . 86163 IN NS l.root-servers.net.

        . 86163 IN NS e.root-servers.net.

        . 86163 IN NS d.root-servers.net.

        . 86163 IN NS k.root-servers.net.

        . 86163 IN NS f.root-servers.net.

        . 86163 IN NS h.root-servers.net.

        . 86163 IN NS c.root-servers.net.

        . 86163 IN NS g.root-servers.net.

        . 86163 IN NS b.root-servers.net.

        . 86163 IN NS i.root-servers.net.

        ;; ADDITIONAL SECTION:

        a.root-servers.net. 3599 IN A 112.4.20.71

        b.root-servers.net. 86163 IN A 192.228.79.201

        i.root-servers.net. 86173 IN A 192.36.148.17

        ;; Query time: 8 msec

        ;; SERVER: 192.168.xxx.xxx#53(192.168.xxx.xxx)

        ;; WHEN: Sat Apr 16 07:34:37 2016

        ;; MSG SIZE rcvd: 289

        [root@localhost ~]# dig | grep SERVER: | awk -F# '{ print $1 }' | awk -F: '{ print $2 }'

        192.168.xxx.xxx

        linux查看dns命令4:其它一些方法查看DNS信息

        在網(wǎng)上看到還有一些其他方法,查看服務(wù)器的DNS配置信息,如下所示,不過(guò)這些方法,由于環(huán)境限制,我沒(méi)有驗(yàn)證過(guò),僅供參考。

        nm-tool | grep DNS

        nmcli dev list iface eth0 | grep IP4

      }'

        192.168.xxx.xxx

        linux查看dns命令4:其它一些方法查看DNS信息

        在網(wǎng)上看到還有一些其他方法,查看服務(wù)器的DNS配置信息,如下所示,不過(guò)這些方法,由于環(huán)境限制,我沒(méi)有驗(yàn)證過(guò),僅供參考。

        nm-tool | grep DNS

        nmcli dev list iface eth0 | grep IP4

      3628718