1.实现对域example.com 内的各类主机的域名解析。
2.实现对mail.example.com,www.example.com,ns.example.com,app1.example.com,app2.example.com,
java.example.com 等域名的正向解析(所有域名对应的IP 地址都指向192.168.0.101)。
3.同时提供对上述域名的反向域名解析功能。
1 安装bind9软件包,还有dnsutils软件包(DNS测试工具)。
sudo apt-get install bind9
sudo apt-get install dnsutils
2 在主配置/etc/bind/named.conf.local文件中添加正向和反向zone声明。
sudo vi /etc/bind/named.conf.local
3 sudo cp /etc/bind/db.local /etc/bind/db.example.com
再编辑正向解析区域文件:sudo vi /etc/bind/db.example.com
4 sudo cp /etc/bind/db.127 /etc/bind/192
再编辑正向解析区域文件:vi /etc/bind/db.192
5 重启BIND9并了解BIND的启动情况
6 确保客户端中/etc/resolv.conf文件中有域名服务器地址
7 使用nslookup测试
8 使用dig测试
9 使用named-checkzone进行区域文件有效性检查和转换
10 使用ping测试: