请在给我发邮件之前阅读本节。
您正在阅读错误的 HOWTO。请查看本 HOWTO 的旧版本,其中介绍了 BIND 4,网址为 http://langfeldt.net/DNS-HOWTO/
提示:forward only;
。您可能还需要
query-source port 53;
在 named.conf
文件的 “options” 部分中,如示例 缓存 部分中建议的那样。
www.busy.site
,以获得负载均衡效果或类似效果?为 www.busy.site
创建多个 A 记录,并使用 BIND 4.9.3 或更高版本。然后 BIND 将轮询答案。它不适用于早期版本的 BIND。
您删除 root.hints
文件,只需使用区域文件即可。这也意味着您不必一直获取新的提示文件。
如果主服务器的地址为 127.0.0.1,则在辅助服务器的 named.conf 文件中放入如下行:
zone "linux.bogus" { type slave; file "sz/linux.bogus"; masters { 127.0.0.1; }; };
您可以在 “masters” 列表中列出多个备用主服务器,区域可以从这些服务器复制,用“;”(分号)分隔。
关于这一点有四项
I have discovered with newer versions of BIND that this
[<em/shuffeling files, -ed/] is no longer necessary. There is a
"forward" directive in addition to the "forwarders" directive that
controls how they are used. The default setting is "forward first",
which first asks each of the forwarders, and then tries the normal
approach of doing the legwork itself if that fails. This gives the
familiar behaviour of gethostbyname() taking an inordinately long time
when the link is not up. But if "forward only" is set, then BIND
gives up when it doesn't get a response from the forwarders, and
gethostbyname() returns immediately. Hence there is no need to
perform sleight-of-hand with files in /etc and restart the server.
In my case, I just added the lines
forward only;
forwarders { 193.133.58.5; };
to the options { } section of my named.conf file. It works very
nicely. The only disadvantage of this is that it reduces an incredibly
sophisticated piece of DNS software to the status of a dumb cache. To
some extent, I would just like to run a dumb cache for DNS instead,
but there doesn't seem to be such a piece of software available for
Linux.
I run named on my 'Masquerading' machine here. I have
two root.hints files, one called root.hints.real which contains
the real root server names and the other called root.hints.fake
which contains...
----
; root.hints.fake
; this file contains no information
----
When I go off line I copy the root.hints.fake file to root.hints and
restart named.
When I go online I copy root.hints.real to root.hints and restart
named.
This is done from ip-down & ip-up respectively.
The first time I do a query off line on a domain name named doesn't
have details for it puts an entry like this in messages..
Jan 28 20:10:11 hazchem named[10147]: No root nameserver for class IN
which I can live with.
It certainly seems to work for me. I can use the nameserver for
local machines while off the 'net without the timeout delay for
external domain names and I while on the 'net queries for external
domains work normally
Peter Denison 认为 Ian 的方法还不够深入。他写道
When connected) serve all cached (and local network) entries immediately
for non-cached entries, forward to my ISPs nameserver
When off-line) serve local network queries immediately
fail all other queries **immediately**
The combination of changing the root cache file and forwarding queries
doesn't work.
So, I've set up (with some discussion of this on the local LUG) two nameds
as follows:
named-online: forwards to ISPs nameserver
master for localnet zone
master for localnet reverse zone (1.168.192.in-addr.arpa)
master for 0.0.127.in-addr.arpa
listens on port 60053
named-offline: no forwarding
"fake" root cache file
slave for 3 local zones (master is 127.0.0.1:60053)
listens on port 61053
And combined this with port forwarding, to send port 53 to 61053 when
off-line, and to port 60053 when online. (I'm using the new netfilter
package under 2.3.18, but the old (ipchains) mechanism should work.)
Note that this won't quite work out-of-the-box, as there's a slight bug in
BIND 8.2, which I have logged wth the developers, preventing a slave
having a master on the same IP address (even if a different port). It's a
trivial patch, and should go in soon I hope.
I use to run my own named on all my machines which are only
occasionally connected to the Internet by modem. The nameserver only
acts as a cache, it has no area of authority and asks back for
everything at the name servers in the root.cache file. As is usual
with Slackware, it is started before nfsd and mountd.
With one of my machines (a Libretto 30 notebook) I had the problem
that sometimes I could mount it from another system connected to my
local LAN, but most of the time it didn't work. I had the same effect
regardless of using PLIP, a PCMCIA ethernet card or PPP over a serial
interface.
After some time of guessing and experimenting I found out that
apparently named messed with the process of registration nfsd and
mountd have to carry out with the portmapper upon startup (I start
these daemons at boot time as usual). Starting named after nfsd and
mountd eliminated this problem completely.
As there are no disadvantages to expect from such a modified boot
sequence I'd advise everybody to do it that way to prevent potential
trouble.
缓存完全存储在内存中,任何时候都不会写入磁盘。每次您终止 named 进程时,缓存都会丢失。缓存是完全不可控的。named 根据一些简单的规则管理它,仅此而已。您不能以任何方式、出于任何原因控制缓存或缓存大小。如果您想“修复”这一点,可以通过破解 named 来实现。但这不推荐。
不,named 在终止时不会保存缓存。这意味着每次您终止并重启 named 时,都必须重新构建缓存。没有办法让 named 将缓存保存在文件中。如果您想“修复”这一点,可以通过破解 named 来实现。但这不推荐。
linux-rules.net
。如何获得分配给我的想要的域名?请联系您的网络服务提供商。他们将能够在这方面为您提供帮助。请注意,在世界大部分地区,您需要付费才能获得域名。
这两者都是高级主题。它们都在 http://www.etherboy.com/dns/chrootdns.html 中介绍。我将不再在此处进一步解释这些主题。