LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 610|回复: 1

DNS的动态更新问题!

[复制链接]
发表于 2005-10-8 10:30:50 | 显示全部楼层 |阅读模式
实验环境,2台机器.一台XP.我机器用FC4,作了DHCP(dhcp3)和DNS (BIND9),为了实现动态的DNS更新..
dhcp.conf如下:

ddns-update-style interim;
ignore client-updates;
subnet 192.168.1.0      netmask 255.255.255.0 {
        range 192.168.1.50      192.168.1.100;
        option  routers 192.168.1.1;
        option  domain-name "mark.com";
        option  domain-name-servers 192.168.1.110;
        option        subnet-mask 255.255.255.0;
        default-lease-time 600;
        max-lease-time  4000;
}
key "dhcp_update" {
        algorithm HMAC-MD5;
        secret "Os7RD2anDK2/4oYQJ50+Rg==";
};

zone mark.com {
        primary 127.0.0.1;
        key dhcp_update;
}

zone 1.168.192.in-addr.arpa {
        primary 127.0.0.1;
        key dhcp_update;
}

named.conf如下:

//
// named.conf for Red Hat caching-nameserver
//

options {
        directory "/var/named";
        dump-file "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
/*
         * 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
//

logging {
                channel "log" {
                file "/var/log/dns"
                versions 3 size 30M;
                severity info;
                };
                };

key dhcp_update {
       algorithm HMAC-MD5;
       secret "Os7RD2anDK2/4oYQJ50+Rg==";
};


controls {
        inet 127.0.0.1  port 953 allow { 127.0.0.1; } keys { rndckey; };
};

zone "." IN {
        type hint;
        file "named.ca";
};

zone "localdomain" IN {
        type master;
        file "localdomain.zone";
        allow-update { none; };
};

zone "localhost" IN {
        type master;
        file "localhost.zone";
        allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};

zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
        file "named.ip6.local";
        allow-update { none; };
};

zone "255.in-addr.arpa" IN {
        type master;
        file "named.broadcast";
        allow-update { none; };
};

zone "0.in-addr.arpa" IN {
        type master;
        file "named.zero";
        allow-update { none; };
};

zone "mark.com" IN {
        type master;
        file "mark.com.zone";
        allow-update { key dhcp_update; };
};

zone "1.168.192.in-addr.arpa" {
        type master;
        file "mark.com.arpa";
        allow-update { key dhcp_update; };
};


include "/etc/rndc.key";


问题,XP的机器,自动获取IP和上网正常..主机名allen...用nslookup测试,可以解析我定义的IP..
但是找不到allen.mark.com,怎么回事?是不是 我的配置文件有错误? 还要事先在mark.com.zone的数据库文件中添加allen.mark.com的A记录才能更新??
 楼主| 发表于 2005-10-9 14:53:04 | 显示全部楼层
各位帮指点一下吧
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表