LinuxSir.cn,穿越时空的Linuxsir!

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

[求助]关于djbdns的设置

[复制链接]
发表于 2006-3-17 19:56:40 | 显示全部楼层 |阅读模式
在gentoo-wiki上的http://gentoo-wiki.com/HOWTO_Setup_a_DNS_Server_with_DJBDNS
中有这么一段话
  1. Important Note

  2. Contrary to the monolithic BIND, djbdns has split the Cache DNS Server (dnscache) and Authoritative DNS Server (tinydns). Both will listen on port 53, which means that if you want to run both servers on the same box, you will have to bind them to different IP addresses. While this may sound like a limitation compared to BIND, this is actually a Very Good Thing™, as these two services should never run on the same IP anyway. For more information, you can check this explanation.

  3. For a small network, one machine typically provides both name caching services via dnscachex for all machines on the network as well as publishing local domain name services via tinydns. IPs listed in /etc/resolv of the other machines should point to a DNS cache and never to a name server [1]:

  4.     ...the IP addresses listed in /etc/resolv.conf should never match any IP addresses listed in NS records.

  5. For this reason, typical small networks should place dnscachex on a public address such as 192.168.0.254 and this address should be entered into the /etc/resolv (or equivalent location for dns server information, e.g. On Windows: TCP/IP Properties -> DNS Servers) of all machines on the network. If you also want to publish the addresses of local domains then place tinydns on a private address such as 127.53.0.1 and have dnscachex reference this name server by adding the proper file(s) in /var/dnscachex/root/servers/. See [2] for details.

  6. For external Internet DNS service (e.g. ns1.example.com), usually two or more servers (most accredited domain registrars require two or more for reliability) all provide external domain name services via tinydns. They may also run dnscache locally to provide cached lookups to services running locally on the box, but for the main part all exist to respond to external queries.
复制代码


我看了都快晕了。不知其真正意义。
我现在的机子是192.168.0.2,为局域网内其他机子提供解析服务(cache),还要设置自己的域名(domain),怎么设置?设置两个IP地址,另一个如127.53.0.1?
我的需求其实源于假设局域网webmail服务的需要。
http://www.linuxsir.cn/bbs/showthread.php?t=246944
 楼主| 发表于 2006-3-18 18:04:07 | 显示全部楼层
Important Note 重要注意事项

Contrary to the monolithic BIND, djbdns has split the Cache DNS Server (dnscache) and Authoritative DNS Server (tinydns). Both will listen on port 53, which means that if you want to run both servers on the same box, you will have to bind them to different IP addresses. While this may sound like a limitation compared to BIND, this is actually a Very Good Thing™, as these two services should never run on the same IP anyway. For more information, you can check this explanation.

与单一的bind不同,djbdns将DNS的cache服务(dnscache)和Authoritative服务(tinydns)分开了。这两个服务都监听53端口,这意味着,如果你在同一台机器中运行这两个服务,你将不得不把他们绑定到不同的IP地址。虽然与bind相比这听起来是个缺陷,但这确实是个非常好的事情,因为这两个服务从来不应该运行于同一IP上。如果要获得更多信息,你可以参看这里的解释。

For a small network, one machine typically provides both name caching services via dnscachex for all machines on the network as well as publishing local domain name services via tinydns. IPs listed in /etc/resolv of the other machines should point to a DNS cache and never to a name server [1]:

对于一个小网络,经常一台机器即通过dnscachex提供名称缓存服务也通过tinydns提供本地域名服务。在/etc/resolv中列出的其他机器的IP地址应该指向DNS缓存服务而不是名称服务:

    ...the IP addresses listed in /etc/resolv.conf should never match any IP addresses listed in NS records.

        在/etc/resolv.conf中列出的IP地址从来不应该列于NS记录中的IP地址相匹配。

For this reason, typical small networks should place dnscachex on a public address such as 192.168.0.254 and this address should be entered into the /etc/resolv (or equivalent location for dns server information, e.g. On Windows: TCP/IP Properties -> DNS Servers) of all machines on the network. If you also want to publish the addresses of local domains then place tinydns on a private address such as 127.53.0.1 and have dnscachex reference this name server by adding the proper file(s) in /var/dnscachex/root/servers/. See [2] for details.

由于这个原因,一般的小型网络应该将dnscachex放在一个像192.168.0.254的公共地址,这个公共地址应该放入网络中所有机器的/etc/resolv(或者其他设置DNS服务信息的位置,例如,在Windows中位于:TCP/IP Properties -> DNS Servers)。如果你还想要发布本地域名地址,那么把tinydns放在例如127.53.0.1的私有地址。然后,通过在/var/dnscaches/root/servers/目录中添加合适的文件,使dnscachex指向这个名称服务。

For external Internet DNS service (e.g. ns1.example.com), usually two or more servers (most accredited domain registrars require two or more for reliability) all provide external domain name services via tinydns. They may also run dnscache locally to provide cached lookups to services running locally on the box, but for the main part all exist to respond to external queries.
回复 支持 反对

使用道具 举报

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

本版积分规则

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