LinuxSir.cn,穿越时空的Linuxsir!

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

关于view的DNS域名解析

[复制链接]
发表于 2007-12-19 22:01:36 | 显示全部楼层 |阅读模式
我们学校有教网和电信网,平时非教育网用户访问我们主页会很慢,我应用了DNS的View来判断访问者的IP来决定从教育网还是从电信走,从而也做出了一个简单的网络负载均衡,有什么不足之处或有改进的地方请多多指教。



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

acl edu {
  58.154.0.0/15;
  58.192.0.0/12;
  59.64.0.0/12;
  116.13.0.0/16;
  116.56.0.0/15;
  121.48.0.0/15;
  121.192.0.0/14;
  121.248.0.0/14;
  122.204.0.0/14;
  125.216.0.0/13;
  162.105.0.0/16;
  166.111.0.0/16;
  202.4.128.0/19;
  202.38.64.0/18;
  202.38.140.0/23;
  202.38.184.0/21;
  202.38.192.0/18;
  202.112.0.0/13;
  202.120.0.0/15;
  202.127.216.0/21;
  202.127.224.0/19;
  202.179.240.0/20;
  202.192.0.0/12;
  203.91.120.0/21;
  210.25.0.0/17;
  210.25.128.0/18;
  210.26.0.0/15;
  210.28.0.0/14;
  210.32.0.0/12;
  211.64.0.0/13;
  211.80.0.0/13;
  218.192.0.0/13;
  219.216.0.0/13;
  219.224.0.0/13;
  219.242.0.0/15;
  219.244.0.0/14;
  222.16.0.0/12;
  222.192.0.0/12;


};

view  "edu" {
        match-clients { edu; };           
        recursion yes;               
   zone "xxx.xxx.xxx" {   
      type master;
      file "db.xxx.xxx.xxx";
        };

   zone "." in {
        type hint;
        file "db.cache";
        };

   zone "0.0.127.in-addr.arpa" in {
        type master;
        file "db.127.0.0";
        };
   zone "192.119.202.in-addr.arpa" in {
        type master;
        file "db.192.119.208";
        };
};

view "other" {
        match-clients { any; };
        recursion yes;
   zone "njfu.edu.cn" {
           type master;
           file "db.xxx.xxx.other";
        };

   zone "." in {
        type hint;
        file "db.cache";
        };

   zone "0.0.127.in-addr.arpa" in {
        type master;
        file "db.127.0.0";
        };
   zone "192.119.202.in-addr.arpa" in {
        type master;
        file "db.192.119.208";
        };
};
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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