正向解析
直接贴一个配置
[root@local-server ~]# cat /etc/named.conf
options {
listen-on port 53 { 192.168.2.30; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; };
recursion yes;
dnssec-enable no;
dnssec-validation no;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
zone "lotus.com" {
type master;
file "lotus.com.zone";
};
[root@local-server ~]# cat /var/named/lotus.com.zone
$TTL 7200
@ IN SOA lotus.com. da.lotus.com. (222 1H 15M 1W 1D)
@ IN NS dns1.lotus.com.
dns1 IN A 192.168.2.30
www IN A 192.168.1.150
test IN CNAME www
dl.lotus.com. IN NS ns1.test
ns1.test IN A 192.168.2.20