免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2005 | 回复: 3
打印 上一主题 下一主题

[DNS] 辅DNS的问题?? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-04-05 19:30 |只看该作者 |倒序浏览
我分别在两台的freebsd4.7上面启动了DNS,都是系统自带的版本,是bind8.3.3的,两台DNS的运行都良好,但是我把其中的一台作主DNS,另外的一台作辅DNS,但是我怎么样修改我主DNS的数据,辅DNS就是没有反应,数据没法更新,不知是什么原因,主DNS的域名是ns.fatb.org(192.168.0.1),辅DNS域名是dns.fatb.org(192.168.0.2)的下面是主要的文件内容:
主DNS的named.conf
———————————————————————————
options {
        directory "/etc/namedb";
        datasize 50M;
        maintain-ixfr-base yes;
        };
};
zone "." {
        type hint;
        file "named.root";
};

zone "0.0.127.IN-ADDR.ARPA" {
        type master;
        file "localhost.rev";
};

zone "fatb.org" {
        type master;
        file "db.fatb.org";
};

zone "0.168.192.in-addr.arpa" {
        type master;
        file "db.192.168.0";
localhost.rev文件
———————————————————————————
$TTL 60
@       IN      SOA    ns.fatb.org. xing.ha.edu.cn.  (
                                20030403        ; Serial
                                120     ; Refresh
                                60      ; Retry
                                1w      ; Expire
                                60 )    ; Minimum
        IN      NS      ns.fatb.org.
        IN      NS      dns.fatb.org.
1       IN      PTR     localhost.fatb.org.
db.fatb.org文件
———————————————————————————
$TTL 60

@       IN      SOA     ns.fatb.org. xing.ha.edu.cn. (
                        20030403         ; Serial
                        120             ; Refresh - 5 minutes
                        60              ; Retry - 1 minute
                        1w              ; Expire - 2 weeks
                        60 )           ; Minimum - 12 hours
        IN      NS      ns.fatb.org.
        IN          NS     dns.fatb.org.

localhost    IN      A                127.0.0.1
ns              IN      A                192.168.0.1
dns          IN      A                     192.168.0.2
mail          IN      A                     192.168.0.3
www          IN      A                     192.168.0.4
friend          IN     CNAME        www
下面是辅DNS的文件,named.conf
———————————————————————————
options {
        directory "/etc/namedb";
        datasize 50M;
        };
};

server 192.168.0.1 {
        support-ixfr yes;
};

zone "." {
        type hint;
        file "named.root";
};

zone "0.0.127.IN-ADDR.ARPA" {
        type master;
        file "localhost.rev";
};

zone "fatb.org" {
        type slave;
        file "bak.fatb.org";
        masters { 192.168.0.1; };
};

zone "0.168.192.in-addr.arpa" {
        type slave;
        file "bak.192.168.0";
        masters { 192.168.0.1; };
};
localhost.rev文件
———————————————————————————
$TTL 60
                             //我就只改了db.fatb.org文件中的这里
@       IN      SOA    dns.fatb.org. xing.ha.edu.cn.  (
                                20030301        ; Serial
                                120     ; Refresh
                                60      ; Retry
                                1w      ; Expire
                                60 )    ; Minimum
        IN          NS      ns.fatb.org.
        IN      NS      dns.fatb.org.
1       IN      PTR     localhost.fatb.org.
bak.fatb.org文件
——————————————————————————
$TTL 60

@       IN      SOA     dns.fatb.org. xing.ha.edu.cn. (
                        20030301         ; Serial
                        120             ; Refresh - 5 minutes
                        60              ; Retry - 1 minute
                        1w              ; Expire - 2 weeks
                        60 )           ; Minimum - 12 hours
         IN     NS      ns.fatb.org.
         IN          NS     dns.fatb.org.

localhost    IN      A                127.0.0.1
ns              IN      A                192.168.0.1
dns          IN      A                     192.168.0.2
mail          IN      A                     192.168.0.3
www          IN      A                     192.168.0.4
friend          IN     CNAME               www
全部的文件就在这里了,不知道是什么问题,请指教!!!

论坛徽章:
0
2 [报告]
发表于 2003-04-06 15:51 |只看该作者

辅DNS的问题??

每次更新zone文件时,记得将序列号改大才行。

论坛徽章:
0
3 [报告]
发表于 2003-04-13 19:19 |只看该作者

辅DNS的问题??

我在每次修改我的数据文件的时候,我都改serial的,在我把我的两台DNS重启的时候,我等了好久都没有数据的改变,不知道是什么原因!!!

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
4 [报告]
发表于 2003-04-13 20:24 |只看该作者

辅DNS的问题??

你的主dns配置有问题,好好看看资料啊,那有你怎样配的。

options {
        directory        "/etc/namedb";
        allow-transfer {192.168.0.2;};
        also-notify      {192.168.0.2;};
datasize 50M;
maintain-ixfr-base yes;
..............
..........
在更改/etc/namedb下的相应的zone文件时,要改变serial的值,习惯写成时间格式,要比以前的大。
在重起主、副dns的named进程,记住顺序。
也可以在主dns运行/etc/rc.d/init.d/named reload.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP