|
小弟初学freebsd,在配置DNS动态解析内部局域网时遇到点问题,在这里想请教一下各位。在线等......
实验环境:freebsd 5.1+bind 8
vr0:192.168.1.20/24 (做DHCP,连内网)
dc0:172.16.0.11/16
已经用dnskeygen生成了密钥文件
测试内容:架DHCP+DNS,用DHCP对内部局域网的PC(windows系统)分配指定的IP地址段。配置DNS能动态的解析这些局域网中被分配到IP的主机。
问题:DHCP现能正常的工作,但DNS无法动态的解析,需手动的一条一条记录的加。下面是我机器上的dhcpd.conf和named.conf的配置文件内容。
dhcpd.conf的配置文件如下:
# dhcpd.conf
#
#This is my(James) first DHCP Server!!!
ddns-update-style interim;
server-identifier 172.16.0.11;
default-lease-time 6000;
max-lease-time 72000;
option broadcast-address 192.168.1.255;
option routers 192.168.1.20;
option domain-name-servers 172.16.0.11;
option domain-name "test.com";
option perform-mask-discovery on;
option mask-supplier on;
#ddns-update-style none;
key "dns-update" {
algorithm hmac-md5;
secret "1ohLxoBhYyUMEaDm9MWn7A==";
}
zone test.com.{
primary 172.16.0.11;
key dns-updates;
}
zone 0.168.192.in-addr.arpa.{
primary 172.16.0.11;
key dns-updates;
}
zone 0.16.172.in-addr.arpa.{
primary 172.16.0.11;
key dns-updates;
}
group{
subnet 192.168.1.0 netmask 255.255.255.0{
range dynamic-bootp 192.168.1.50 192.168.1.150;
}
}
Named.conf的配置文件如下:
key "dns-updates" {
algorithm hmac-md5;
secret "1ohLxoBhYyUMEaDm9MWn7A==";
};
zone "." {
type hint;
file "named.root";
};
zone "0.0.127.IN-ADDR.ARPA" {
type master;
file "localhost.rev";
allow-update {none;};
};
zone "1.168.192.IN-ADDR.ARPA" {
type master;
file "/etc/namedb/rev/192.168.1.rev";
allow-update {key dns-updates;};
};
zone "0.16.172.IN-ADDR.ARPA" {
type master;
file "/etc/namedb/rev/172.16.0.rev";
allow-update {none;};
};
zone "test.com" {
type master;
file "/etc/namedb/hosts/test.com.hosts";
allow-update {key dns-updates;};
}; |
|