Slave and Cache Servers


Just as with normal zones, you can (and should) set up slave servers for your root zone, as in the following:

 zone "." {         type slave;         masters { 10.0.255.2; };         file "slave/root.zone"; } 

Please note that with the previous stub zones only configuration, this will not work because the server doesn't have a root zone it just has the information that would be in a root zone if it had one.

As with DNS on the Internet, you also can set up caching nameservers. The only difference is the root.hints file, which obviously will need to contain information relevant to your network rather than the Internet. An appropriate root.hints file can be constructed with the dig(1) command, as shown earlier in this chapter, with appropriate adjustments for your setup, of course.

The following is the code for our Bouvet scenario:

 $ dig @10.0.255.2 ns . ; <<>> DiG 8.2 <<>> @10.0.255.2 ns . ; (1 server found) ;; res options: init recurs defnam dnsrch ;; got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 2 ;; QUERY SECTION: ;;      ., type = NS, class = IN ;; ANSWER SECTION: .                       1D IN NS        rootns.penguin.bv. .                       1D IN NS        nic.walruss.bv. ;; ADDITIONAL SECTION: rootns.penguin.bv.      23h59s IN A     10.0.255.2 nic.walruss.bv.         1D IN A         10.1.0.2 ;; Total query time: 0 msec ;; FROM: barbar to SERVER: 10.0.255.2 ;; WHEN: Sun Feb 20 14:54:35 2000 ;; MSG SIZE  sent: 17  rcvd: 104 

It is, of course, much shorter than the Internet equivalent because Bouvet has only two rootservers. As before, the output of dig can be placed directly into the root.hints file. With the stub zone only configuration, getting a root.hints file like this automatically isn't possible. You must write one yourself, listing your root-capable server NS and A records exactly as you would in a normal root zone.



The Concise Guide to DNS and BIND
The Concise Guide to DNS and BIND
ISBN: 0789722739
EAN: 2147483647
Year: 1999
Pages: 183

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net