Linux bind-utils 一、简介

DNS是一种将域名解析为IP地址的服务.如:www.turbolinux.com.cn通过DNS解析,可以得到210.77.38.126. bind是linux系统下的一个DNS服务程序.bind-utils是bind软件提供的一组DNS工具包,里面有一些DNS相关的工具.主要有:dig,host,nslookup,nsupdate.使用这些工具可以进行域名解析和DNS调试工作.

二、bind-utils的安装

1.yum方式安装 [root@zabbix-server ~]# yum install bind-utils -y [root@zabbix-server ~]# nslookup www.baidu.com
Server: 10.41.7.13 Address: 10.41.7.13#53

Non-authoritative answer: www.baidu.com canonical name = www.a.shifen.com. Name: www.a.shifen.com Address: 61.135.169.125 Name: www.a.shifen.com Address: 61.135.169.121 [root@zabbix-server ~]# host www.baidu.com
www.baidu.com is an alias for www.a.shifen.com. www.a.shifen.com has address 61.135.169.121 www.a.shifen.com has address 61.135.169.125 [root@zabbix-server ~]# dig www.baidu.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.68.rc1.el6 <<>> www.baidu.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50791 ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION: ;www.baidu.com. IN A

;; ANSWER SECTION: www.baidu.com. 1153 IN CNAME www.a.shifen.com. www.a.shifen.com. 257 IN A 61.135.169.121 www.a.shifen.com. 257 IN A 61.135.169.125

;; Query time: 4 msec ;; SERVER: 10.41.7.13#53(10.41.7.13) ;; WHEN: Tue Jul 31 16:18:43 2018 ;; MSG SIZE rcvd: 90