首 页 教育新闻课件中心论文中心教学教案试题中心语文专题综合下载技术教程公务员  
设为首页
加入收藏
联系我们
您当前的位置:中国教育资源网 -> 技术教程 -> 网络相关 -> 服务器 -> 域名服务器 -> 技术内容 退出登录 用户管理

[設定心得] Bind9 View 底下的 master/slave 設定方案域名服务器教程

论文作者:佚名  论文来源:不详  论文发布时间:2006-6-19 17:58:05  论文发布人:chjchjchj

减小字体 增大字体

              摘要:[設定心得] Bind9 View 底下的 master/slave 設定方案
新版本可從如下獲得:
http://www.study-area.org/tips/bind9_view.htm


[設定心得] Bind9 View 底下的 master/slave 設定方案
---------------------------------------
作者:netman(netman@study-area.org)
版本:v0.01
日期:2004-04-20

* 版本歷程:
1) 2004-04-20 v0.01
 - 初版

---------------------------------------


一、前言

bind-9 自問世以來,深受廣大 dns 管理員歡迎(年紀越大越如此... ^_^),
是由於 bind9 提供了許多功能,解決了長期以來深受困擾的 dns 管理難題。

可是在新功能出現後,也帶來了一些前所不曾預料的新問題,
其中之一,就是 view 設定下的 master/slave 的同步問題。


二、問題分析

由於 master 端利用 view 的分界,按照不同的查詢來源位址回應不同的答案。
這對一般的 query 工作是非常有效的。

倘若 master 與 slave 的對外與對內界面均能相互指定路由(這是前提),
那只要在 slave 端不同的 view 內指定 master 的不同 IP ,也能夠順利完成 zone
transfer 。

但問題在於,當 slave 端在進行 SOA 查詢及作 XFER 時,
若 master 端只看到 client 端的某一特定來源位址,因而只能回應單一的 view ,
那就不能順利完成其他 view 的 zone transfer 。


三、解決方案

我們可利用 bind9 的 transfer-source 功能,在 slave 端指定其用來作 zone transfer
的 source address ,
得以讓 master 回應正確的 answer 。

其關鍵點是 slave 需設定多個 IP (可分內外或用 IP Alias),且都能讓 master 路由得到
就行。


四、假設情景

- 假設授權 domain 為 my.domain 。

- 假設 master 的界面分配如下:
 - External: eth0 1.2.3.4
 - Internal: eth1 10.1.2.3

- 假設 slave 的界面分配如下:
 - Primary: eth0 10.1.2.4
 - Alias: eth0:0 10.1.2.5


五、設定細節:

- master
修改 /etc/named.conf ,內容類似如下:
[code:1:f86cf03583]acl "lan" { 10.1.2.0/24;  };

options { directory { "/var/named"; }; };

view "internal" {
 match-client { !10.1.2.5; lan; };  // 這裡排除 slave 的另一位址
 zone "." IN {
  type hint;
  file "named.root";
 };
 zone "my.domain" IN {
  type master;
  file "my.domain.int";
  allow-transfer { 10.1.2.4; }; //允許 slave 的 primay 位址
 };
};

view "external" {
 match-client { any; };
 recursion no;
 zone "." IN {
  type hint;
  file "named.root";
 };
 zone "my.domain" IN {
  type master;
  file "my.domain.ext";
  allow-transfer { 10.1.2.5; }; //允許 slave 的 alias 位址
 };
};[/code:1:f86cf03583]


- slave
修改 /etc/named.conf ,內容類似如下:
[code:1:f86cf03583]acl "lan" { 10.1.2.0/24;  };

options { directory { "/var/named"; }; };

view "internal" {
 match-client { lan; };
 zone "." IN {
  type hint;
  file "named.root";
 };
 zone "my.domain" IN {
  type slaver;
  file "slave.my.domain.int";
  masters { 10.1.2.3; };
  transfer-source 10.1.2.4; // 指定 primay 位址
 };
};
view "external" {
 match-client { any; };
 recursion no;
 zone "." IN {
  type hint;
  file "named.root";
 };
 zone "my.domain" IN {
  type master;
  file "slave.my.domain.ext";
  masters { 10.1.2.3; };
  transfer-source 10.1.2.5; // 指定 alias 位址
 };
};[/code:1:f86cf03583]



六、測試:

當設定完成後,只需重新啟動 master/slave 雙方的 bind 服務程式即可。


七、結語:

Bind9 的功能很多是新概念,本文希望對有志探索 bind 這一神奇系統的同好有所幫助,且
起拋磚引玉之用。


八、參考資料:

- O'Reilly, Linux Server Hacks: 100 Industrial-Strength Tips & Tools

---------------本文結束 -----------------------


-- 

======= http://www.study-area.org =======
飛雪迎春到﹐風雨送春歸
已是寒崖百丈冰﹐尤有花枝俏
俏也不爭春﹐只把春來報
待得山花爛漫時﹐他在叢中笑﹗

 阿骁 回复于:2004-04-20 17:54:52好文!简洁,易懂!

学到新东西啦! 多谢网中人斑竹呀!^_^

强烈要求给精华!!!!

 阿骁 回复于:2004-04-22 22:53:04强烈要求放入精华区!!! 我顶

 chieh 回复于:2004-04-23 14:29:01好!!!!!!!!!!!!!!!!!!!!!!!!!!
强烈要求放入精华区!!! 我顶

[] [返回上一页] [打 印] [收 藏]  
 ∷相关技术评论  (评论内容只代表网友观点,与本站立场无关!) [查看发表评论...]
 
 中国教育资源网免费技术教程下载中心-站内广告 站内广告 中国教育资源网免费技术教程下载中心-站内广告 
 中国教育资源网站内搜索 站内搜索 中国教育资源网站内搜索 
 

   
 中国教育资源网免费技术教程下载中心-栏目导航 栏目导航 中国教育资源网免费技术教程下载中心-栏目导航 
· Windows 9XMEXP · Windows NT20002003
· LinuxBSD · 系统综合
· IISApache · 硬件技术
· Web服务器 · FTP服务器
· 邮件服务器 · 域名服务器
· Windows服务器 · 代理服务器
· 服务器综合
 
中国教育资源网免费技术教程下载中心-相关教程  相关技术 中国教育资源网免费技术教程下载中心-相关教程
 中国教育资源网免费技术教程下载中心-本月热门教程 本月热门 中国教育资源网免费技术教程下载中心-本月热门教程 
 
 中国教育资源网免费技术教程下载中心-本日热门论文 本日热门 中国教育资源网免费技术教程下载中心-本日热门论文 
 
关于本站 - 网站帮助 - 免费课件 - 美容 - 绿色软件 - 软件下载 - 广告合作 - 下载声明 - 友情连接 - 网站地图 - 网站留言
浙ICP备06010405号 Email:cnkjz@163.com 技术支持:名流设计
版权所有 Copyright© 2002-2004 名流