如何测试dns解析。正向与反向。

来源:百度知道 编辑:UC知道 时间:2024/05/18 08:03:23
如何测试dns解析。正向与反向。

主要是命令,和参数。

图文的最好。

下面是我配置DNS的实例:

1 所需配置文件:

/etc/named.conf 系统自带,需要配置
/etc/resolv.conf 系统自带,需要配置
/var/named/myqmail.com.db 系统没有,自已创建
/var/named/db.192.168.0.198 系统没有,自已创建
/var/named/named.local 系统自带,不需要修改
/var/named/named.ca 系统自带,不需要修改

2 相关工具

nslookup
说明:检测DNS是否配置正确的工具,系统自带。

3 配置方案

3.1 /etc/named.conf

说明:DNS主配置文件,定义了域数据库信息的基本参数和源点,该文件可以存放在本地或远程的服务器上。源文件:

// generated by named-bootconf.pl

options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};

//
// a caching only nameserver config
//
con