From 323b9539f2f302321145877450c133d4c3d1d909 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 20 Dec 2003 20:55:08 +0000 Subject: [PATCH] Added examples. --- cf.dist/0 | 5 +++++ cf.dist/0.0.10 | 18 +++++++++++++++ cf.dist/0.0.127 | 7 ++++++ cf.dist/0.1.10 | 25 +++++++++++++++++++++ cf.dist/2.10 | 6 +++++ cf.dist/255 | 5 +++++ cf.dist/4.3.2.1.0.c.e.f | 5 +++++ cf.dist/64@26.0.3.10 | 13 +++++++++++ cf.dist/a.example.com | 26 +++++++++++++++++++++ cf.dist/config | 6 +++++ cf.dist/domains | 50 +++++++++++++++++++++++++++++++++++++++++ cf.dist/example.com | 43 +++++++++++++++++++++++++++++++++++ cf.dist/ip6.example.com | 8 +++++++ cf.dist/localhost | 8 +++++++ 14 files changed, 225 insertions(+) create mode 100644 cf.dist/0 create mode 100644 cf.dist/0.0.10 create mode 100644 cf.dist/0.0.127 create mode 100644 cf.dist/0.1.10 create mode 100644 cf.dist/2.10 create mode 100644 cf.dist/255 create mode 100644 cf.dist/4.3.2.1.0.c.e.f create mode 100644 cf.dist/64@26.0.3.10 create mode 100644 cf.dist/a.example.com create mode 100644 cf.dist/config create mode 100644 cf.dist/domains create mode 100644 cf.dist/example.com create mode 100644 cf.dist/ip6.example.com create mode 100644 cf.dist/localhost diff --git a/cf.dist/0 b/cf.dist/0 new file mode 100644 index 0000000..1c59fa0 --- /dev/null +++ b/cf.dist/0 @@ -0,0 +1,5 @@ +; RFC 1912 tells us to provide an empty 0.in-addr.arpa zone + +SOA(REV(0)) +NS(NSNAME) +REVERSE(0) diff --git a/cf.dist/0.0.10 b/cf.dist/0.0.10 new file mode 100644 index 0000000..66172d8 --- /dev/null +++ b/cf.dist/0.0.10 @@ -0,0 +1,18 @@ +; Domain configuration file for 0.0.10.in-addr.arpa + +; We use a `REV' macro to create the name of the reverse domain for us + +SOA(REV(10.0.0)) + +; As usually, we need to specify name servers + +NS(ns1.example.com, ns2.example.com) + +; And now, we switch NSC to the automatic reverse mode for our network + +REVERSE(10.0.0) + +; From now on, all host addresses within the specified network will +; be automatically converted to reverse `PTR' records. + +; You can find more sophisticated examples in cf/0.1.10 diff --git a/cf.dist/0.0.127 b/cf.dist/0.0.127 new file mode 100644 index 0000000..42e11aa --- /dev/null +++ b/cf.dist/0.0.127 @@ -0,0 +1,7 @@ +; RFC 1912 tells us to provide a 0.0.127.in-addr.arpa zone with `1 PTR localhost.' + +SOA(REV(127.0.0)) +NS(NSNAME) +REVERSE(127.0.0) + +; The actual localhost record comes from cf/localhost diff --git a/cf.dist/0.1.10 b/cf.dist/0.1.10 new file mode 100644 index 0000000..cc15cac --- /dev/null +++ b/cf.dist/0.1.10 @@ -0,0 +1,25 @@ +; Domain configuration file for 1.0.10.in-addr.arpa + +; The beginning is the same as in cf/0.1.10 +SOA(REV(10.1.0)) +NS(ns1.example.com, ns2.example.com) + +; A manually specified `PTR' record + +PTR(42, answer.universe.net) + +; The range 128-255 is delegated to another server using the syntax +; specified in RFC 2317. The `REVBLOCK' macro generates the subdomain +; and also all required `CNAME' records, but we need to specify the +; name servers for the subdomain explicitly. (`REVBLOCK' behaves like +; a `D' wrt. additional records.) + +; The first parameter is the name of the subdomain, the other two specify +; a range of addresses to delegate. + +REVBLOCK(128/25, 128, 255) +NS(ns.a.example.com) + +; And again the automatic reverse mode + +REVERSE(10.1.0) diff --git a/cf.dist/2.10 b/cf.dist/2.10 new file mode 100644 index 0000000..45b6bd0 --- /dev/null +++ b/cf.dist/2.10 @@ -0,0 +1,6 @@ +; Yet another reverse domain, this time for a large /16 network; +; see cf/0.0.10 for comments. + +SOA(REV(10.2)) +NS(ns1.example.com, ns2.example.com) +REVERSE(10.2) diff --git a/cf.dist/255 b/cf.dist/255 new file mode 100644 index 0000000..3e93075 --- /dev/null +++ b/cf.dist/255 @@ -0,0 +1,5 @@ +; RFC 1912 tells us to provide an empty 255.in-addr.arpa zone + +SOA(REV(255)) +NS(NSNAME) +REVERSE(255) diff --git a/cf.dist/4.3.2.1.0.c.e.f b/cf.dist/4.3.2.1.0.c.e.f new file mode 100644 index 0000000..8d82085 --- /dev/null +++ b/cf.dist/4.3.2.1.0.c.e.f @@ -0,0 +1,5 @@ +; Reverse domain for IPv6 addresses + +SOA(REV(fec0:1234::/32)) +NS(ns1.example.com, ns2.example.com) +REVERSE(fec0:1234::/32) diff --git a/cf.dist/64@26.0.3.10 b/cf.dist/64@26.0.3.10 new file mode 100644 index 0000000..3d68f7b --- /dev/null +++ b/cf.dist/64@26.0.3.10 @@ -0,0 +1,13 @@ +; Another reverse domain, this time with classless delegation: + +SOA(REV(10.3.0.64/26)) + +; Our name server +NS(ns1.example.com) + +; The provider's name servers +NS(ns1.example.net, ns2.example.net) + +; Automatic reverse mode, but this time with range specification + +REVERSE(10.3.0, 64, 127) diff --git a/cf.dist/a.example.com b/cf.dist/a.example.com new file mode 100644 index 0000000..7911c20 --- /dev/null +++ b/cf.dist/a.example.com @@ -0,0 +1,26 @@ +; Domain configuration file for a.example.com + +; Records in this network are expected to change often, so we +; decrease the minimum TTL: + +define(`MINTTL', 300) + +; Also, we'll be referring to a single IP address many times, +; so let's create a macro for it. + +define(`jabb', 10.2.3.4) + +; The SOA record + +SOA(a.example.com) +NS(ns1.example.com, ns2.example.com) + +; We want the domain itself to have an A record, but we don't want a PTR +; record to be generated, hence DADDR instead of ADDR. + +DADDR(jabb) + +; Some hosts + +H(jabberwock, jabb) +H(this-one-is-classless-reverse-delegated, 10.3.0.65) diff --git a/cf.dist/config b/cf.dist/config new file mode 100644 index 0000000..2cd0902 --- /dev/null +++ b/cf.dist/config @@ -0,0 +1,6 @@ +; User configuration of the NSC + +; All configuration macros have hard-wired defaults which can be +; overriden here (all of them), in the cf/domains file (with some +; exceptions) and in each domain configuration file (with the same +; exceptions) diff --git a/cf.dist/domains b/cf.dist/domains new file mode 100644 index 0000000..fd7afcc --- /dev/null +++ b/cf.dist/domains @@ -0,0 +1,50 @@ +; An example domain table for the NSC + +; Various mandatory things required by RFC 1912, section 4.1 +PRIMARY(localhost) +REVERSE(0) +REVERSE(255) +REVERSE(127.0.0, localhost) + +; A pretty normal example domain (we act as a primary nameserver for it) + +PRIMARY(example.com) + +; It also has a couple of sub-domains and one of them resides on another server + +PRIMARY(a.example.com) +SECONDARY(b.example.com, 10.0.0.1) + +; Here are reverse delegations for two networks. NSC automatically creates +; the PTR records from A records in all mentioned zones. See cf/{0,1}.0.10. + +REVERSE(10.0.0, example.com, a.example.com) +REVERSE(10.1.0, example.com, a.example.com, ip6.example.com) + +; You can even have reverse zones for larger networks + +REVERSE(10.2, a.example.com) + +; Here are the examples of classless reverse delegation using subdomains +; and PTR records as recommended by RFC 2317. We use the subdomain names +; recommended by the RFC, however, this is not fixed anywhere and you can +; use any names you like (or your ISP likes). + +; In the 10.1.0 network, we define a classless delegation (see cf/0.1.10), +; but we also want to run a secondary server for the subdomain. As usually, +; the REV macro is handy for constructing a reverse domain name. + +SECONDARY(REV(10.1.0.128/25), 10.1.0.2) + +; And vice versa: we are delegated 10.3.0.64/26, so we want to create +; the corresponding subdomain. + +REVERSE(10.3.0.64/26, a.example.com) + +; The final challenge: a subdomain with both IPv4 and IPv6 records +; together with the corresponding reverse records (in IPv6 mode, all +; networks are always accompanied by a netmask). +; See cf/ip6.example.com and cf/4.3.2.1.0.c.e.f for details + +PRIMARY(ip6.example.com) +REVERSE(fec0:1234::/32, ip6.example.com) diff --git a/cf.dist/example.com b/cf.dist/example.com new file mode 100644 index 0000000..6176783 --- /dev/null +++ b/cf.dist/example.com @@ -0,0 +1,43 @@ +; Domain configuration file for example.com + +; The SOA record + +SOA(example.com) + +; Other records for the domain itself (NSC remembers the name as it +; does with host names): name servers and mail exchangers with different +; priorities. + +NS(ns1.example.com, ns2.example.com) +MX(0 mail.example.com, 10 smtp.example.net) + +; A couple of hosts + +H(ns1, 10.0.0.1) +H(ns2, 10.1.0.1) +H(mail, 10.0.0.2) + +; A web server with several aliases and MX records + +H(www, 10.0.0.3) +ALIAS(fairytales, scifi, horror) +MX(0 mail.example.com) + +; A subdomain called a.example.com + +D(a) +NS(ns1.example.com, ns2.example.com) + +; Another subdomain (b.example.com), but this time one of the nameservers +; is inside, so we need to specify a glue record + +D(b) +NS(ns.b.example.com, ns1.example.com, ns2.example.com) +GLUE(ns.b.example.com, 10.1.0.2) + +; And finally a subdomain for testing IPv6 + +D(ip6) +NS(ns1.example.com, ns2.example.com) + +; That's all, you will find the more advanced examples in cf/a.example.com diff --git a/cf.dist/ip6.example.com b/cf.dist/ip6.example.com new file mode 100644 index 0000000..9479c1f --- /dev/null +++ b/cf.dist/ip6.example.com @@ -0,0 +1,8 @@ +; Domain configuration file for ip6.example.com + +SOA(ip6.example.com) +NS(ns1.example.com, ns2.example.com) + +; This host has both IPv4 and IPv6 addresses + +H(blackbox, 10.1.0.99, fec0:1234::0123:4567:89ab:cdef, fec0:1235::1234, fec0:1234::f:e:d:c) diff --git a/cf.dist/localhost b/cf.dist/localhost new file mode 100644 index 0000000..ae2a4b3 --- /dev/null +++ b/cf.dist/localhost @@ -0,0 +1,8 @@ +; RFC 1912 tells us to provide a localhost zone with `localhost A 127.0.0.1' + +SOA(localhost) +NS(NSNAME) +ADDR(127.0.0.1) + +; We don't want NSC to add the standard localhost record to this zone +define(`DISABLE_LOCALHOST', `1') -- 2.39.2