Thread View: demon.tech.unix
2 messages
2 total messages
Started by Robin
Sat, 25 Nov 2000 00:00
DNS
Author: Robin
Date: Sat, 25 Nov 2000 00:00
Date: Sat, 25 Nov 2000 00:00
17 lines
1327 bytes
1327 bytes
Hi, Id like to set up a caching DNS on my machine to serve up local DNS numbers and cache off ns1/2 at demon for the internet stuff.. this should speed up the various queries on my local net, reduce network traffic and also make it a damm sight easier to admin my local domain rather than cut/pastin /etc/host files every week I've played around with my /etc/named.conf but its a) making my head hurt and b) not working. I;d really appreciate any good tips/short howtos / copies of your named.bott and named.conf and a sample master file I can understand cos its beginning to bug me :) Ive figured I probably need a master zone and a slave zone .. after that its a bit sletchy at the moment. r.
Re: DNS
Author: Ian Northeast
Date: Sat, 25 Nov 2000 00:00
Date: Sat, 25 Nov 2000 00:00
113 lines
4578 bytes
4578 bytes
Robin wrote:
>
> Hi,
>
> Id like to set up a caching DNS on my machine to serve up local DNS
> numbers and cache off ns1/2 at demon for the internet stuff.. this
> should speed up the various queries on my local net, reduce network
> traffic and also make it a damm sight easier to admin my local domain
> rather than cut/pastin /etc/host files every week
Do you want a caching or a forwarding DNS? A caching DNS will not cache
off any DNS in particular, it makes reference to the root nameservers
directly, using a hints file. Red Hat ship bind configured as a caching
(only) DNS by default, I don't know if Mandrake do. The clause that sets
up a caching DNS is:
zone "." {
type hint;
file "named.ca";
};
It doesn't matter what you call the file, but it must contain a valid
list of the root nameservers, which can be obtained with "dig
@a.root-servers.net . ns".
Forwarding is different; the nameserver doesn't know the root
nameservers but instead forwards all requests it cannot answer to other
nominated nameservers. It will also cache - all nameservers cache. Here
you would put:
forwarders { 158.152.1.58; 158.152.1.43; };
inside the "options" clause. You may need "forward-only;" in there too.
Internet etiquette suggests that you should obtain permission before
forwarding to someone else's nameserver; as a Demon customer I should
not think they would make any difficulty.
>
> I've played around with my /etc/named.conf but its a) making my head
> hurt and b) not working. I;d really appreciate any good tips/short
> howtos / copies of your named.bott and named.conf and a sample master
> file I can understand cos its beginning to bug me :)
Named.boot is for bind4. Named.conf for bind8. I am assuming that as you
are runnning a recent looking Mandrake you have bind8.
>
> Ive figured I probably need a master zone and a slave zone .. after that
> its a bit sletchy at the moment.
Do you mean master and slave servers? This would be for the internal
bit. It is normal to have one master and one or more slaves for the
internal data, each of which would also either have a hints file or a
forwarders option. More complex structures are possible.
Here you will have 3 internal domains - one for loopback, one for name
to address translation and one for the reverse (an in-addr.arpa domain).
All servers will be master for the first, which is always the same, and
one will be master and one slave for the other two. On a small network
you can get away with no slave but it's not recommended. Something like:
zone "0.0.127.in-addr.arpa" {
type master;
file "named.local";
};
On both
zone "mycompany.com" {
type master;
file "db.mycompany";
};
zone "0.168.192.in-addr.arpa" {
type master;
file
"db.192.168.0";
};
On the master
zone "mycompany.com" {
type slave;
file "db.mycompany";
masters {
192.168.0.1;
};
};
zone "0.168.192.in-addr.arpa" {
type slave;
file "db.192.168.0";
masters {
192.168.0.1;
};
};
On the slave. Names are fictitious and the addresses I quote are from
the private range and assume the master is on 192.168.0.1.
You have to build the zone files too of course. This will get too long
if I post samples of these. You should obtain a copy of "DNS and Bind"
by Cricket & Liu, O'Reilly 1-56592-512-2, from any good computer
bookshop. The authors provide a Perl script called "h2n", which is in a
package of utilities which can be obtained from
ftp://ftp.ora.com/published/orielly/nutshell/dnsbind/dns.tar.Z
H2n will take /etc/hosts and build the bind files.
But I *really* recommend the book.
Ian
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads