Differences between version 23 and previous revision of NamedNotes.
Other diffs: Previous Major Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 23 | Last edited on Wednesday, July 13, 2005 10:27:50 am | by PerryLorier | Revert |
Older page: | version 22 | Last edited on Tuesday, January 25, 2005 9:43:36 pm | by AristotlePagaltzis | Revert |
@@ -1,15 +1,15 @@
See Also: named(8), named.conf(5), [DNSHowto], ZoneFile, [DNSBestPractices]
----
-If you have problems with your zone files, you probably forgot a "."
+If you have any
problems with your zone files, you probably forgot a "."
----
-named(8) lets you
generate lines in
your zonefile
by:
+You can
generate huge sections of
your zone file (for dhcp entries for instance)
by using $GENERATE, for example
:
- $GENERATE 150-250 $..
.10
.in-addr.arpa. PTR dhcp-$.example.com.
+ $GENERATE 150-250 $..168
.192
.in-addr.arpa. PTR dhcp-$.example.com.
----
-Remember,
MX's and NS records can't point to CNAMEs or directly to raw IP addresses, point them to something with an A or AAAA (or A6) record.
+MX's and NS records can't point to CNAMEs or directly to raw IP addresses, point them to something with an A or AAAA (or A6) record.
----
You can have more than one record type for a domain/host, so long as none of them as CNAMEs. ie: you can have two A's, or an A and a TXT, but ''never'' an A and a CNAME, or an TXT and a CNAME, or even two CNAMES.
@@ -21,32 +21,34 @@
This will give shortttl.domain.co.nz a TTL of an hour
----
-Try and have names for services (such as "proxy", "www", "smtp" etc) as this means when you move a service onto a different machine you can change the DNS once and everything will be updated.
+Try and have names for services (such as "proxy", "www", "smtp" etc) as this means when you move a service onto a different machine you can change the DNS once and everything will be updated. See [DNSBestPractices] for examples
.
----
-Try and use one name for a NS record for all zones that reside on that machine. for example in "foo.example.com" use "ns1.example.com" and in "example2.com" use "ns1.example.com", this means that when "ns1.example.com" changes it's IP, you will only have to update it once for each registrar, not once per registrar per zone.
+Try and use one name for a NS record for all zones that reside on that machine. for example in "foo.example.com" use "ns1.example.com" and in "example2.com" use "ns1.example.com", this means that when "ns1.example.com" changes it's IP, you will only have to update it once for each registrar, not once per registrar per zone. This also means that DNS caches don't fill up with needless entries. Try to make sure that this name server has glue to avoid unnecessary lookups.
+
----
-Sample
zone file:
- @ IN SOA foo
.com. soa.foo
.com. (
- 2002060700
; serial
+An example
zone file:
+ $TTL 3600
+ @ IN SOA example
.com. soa.example
.com. (
+ 2005071300
; serial (in YYYY-mm-dd revision format)
10800 ; refresh (10800 seconds = 3 hours)
3600 ; retry (3600 seconds = 1 hour)
- 3600000
; expire
+ 3628800
; expire ( 6 weeks)
86400 ) ; negative cache time-to-live
- @ IN NS ns1.foo
.com.
- @ IN NS ns2.foo
.com.
- @
IN MX 10 smtp.foo
.com.
- @
IN MX 20 smtp.baz
.com
.
- ns1 IN A 1
.2.3.4
- ns2 IN A 1
.2
.4
.5
- smtp
IN A 1
.2.3.4
- box1
IN A 1
.2.3.6
- proxy
IN CNAME box1
- pop3
IN CNAME box1
- www
IN CNAME box1
- news
IN CNAME box1
+ @ 604800
IN NS ns1.example
.com.
+ @ 604800
IN NS ns2.example
.com.
+ @
IN MX 10 smtp.example
.com.
+ @
IN MX 20 smtp.example
.org
.
+ ns1 604800
IN A 192.
.2.1
+ ns2 604800
IN A 10
.
.
.1
+ smtp
IN A 192.
.2.1
+ box1
IN A 192.
.2.2
+ proxy
IN CNAME box1
+ pop3
IN CNAME box1
+ www
IN CNAME box1
+ news
IN CNAME box1
See ZoneFile for a more verbose description.
----
Useful config tweaks (possibly [Debian]-specific).