CNAME'ing www to localhost seems to be useless, reCNAME it to '@' and describe
specifically. <programlisting> tags do not grok tabs. Fix this at least in zone files where they look especially ugly.
This commit is contained in:
parent
7a1a8437fd
commit
6305033db4
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=28157
1 changed files with 44 additions and 37 deletions
|
@ -3440,34 +3440,34 @@ zone "1.168.192.in-addr.arpa" {
|
|||
<filename>/etc/namedb/master/example.org</filename>) is as
|
||||
follows:</para>
|
||||
|
||||
<programlisting>$TTL 3600 ; 1 hour
|
||||
example.org. IN SOA ns1.example.org. admin.example.org. (
|
||||
2006051501 ; Serial
|
||||
10800 ; Refresh
|
||||
3600 ; Retry
|
||||
604800 ; Expire
|
||||
86400 ; Minimum TTL
|
||||
)
|
||||
<programlisting>$TTL 3600 ; 1 hour
|
||||
example.org. IN SOA ns1.example.org. admin.example.org. (
|
||||
2006051501 ; Serial
|
||||
10800 ; Refresh
|
||||
3600 ; Retry
|
||||
604800 ; Expire
|
||||
86400 ; Minimum TTL
|
||||
)
|
||||
|
||||
; DNS Servers
|
||||
IN NS ns1.example.org.
|
||||
IN NS ns2.example.org.
|
||||
IN NS ns1.example.org.
|
||||
IN NS ns2.example.org.
|
||||
|
||||
; MX Records
|
||||
IN MX 10 mx.example.org.
|
||||
IN MX 20 mail.example.org.
|
||||
IN MX 10 mx.example.org.
|
||||
IN MX 20 mail.example.org.
|
||||
|
||||
IN A 192.168.1.1
|
||||
IN A 192.168.1.1
|
||||
|
||||
; Machine Names
|
||||
localhost IN A 127.0.0.1
|
||||
ns1 IN A 192.168.1.2
|
||||
ns2 IN A 192.168.1.3
|
||||
mx IN A 192.168.1.4
|
||||
mail IN A 192.168.1.5
|
||||
localhost IN A 127.0.0.1
|
||||
ns1 IN A 192.168.1.2
|
||||
ns2 IN A 192.168.1.3
|
||||
mx IN A 192.168.1.4
|
||||
mail IN A 192.168.1.5
|
||||
|
||||
; Aliases
|
||||
www IN CNAME localhost</programlisting>
|
||||
www IN CNAME @</programlisting>
|
||||
|
||||
<para>
|
||||
Note that every hostname ending in a <quote>.</quote> is an
|
||||
|
@ -3534,7 +3534,7 @@ www IN CNAME localhost</programlisting>
|
|||
|
||||
<programlisting>
|
||||
example.org. IN SOA ns1.example.org. admin.example.org. (
|
||||
2006051501 ; Serial
|
||||
2006051501 ; Serial
|
||||
10800 ; Refresh after 3 hours
|
||||
3600 ; Retry after 1 hour
|
||||
604800 ; Expire after 1 week
|
||||
|
@ -3593,11 +3593,11 @@ example.org. IN SOA ns1.example.org. admin.example.org. (
|
|||
</para>
|
||||
|
||||
<programlisting>
|
||||
localhost IN A 127.0.0.1
|
||||
ns1 IN A 192.168.1.2
|
||||
ns2 IN A 192.168.1.3
|
||||
mx IN A 192.168.1.4
|
||||
mail IN A 192.168.1.5</programlisting>
|
||||
localhost IN A 127.0.0.1
|
||||
ns1 IN A 192.168.1.2
|
||||
ns2 IN A 192.168.1.3
|
||||
mx IN A 192.168.1.4
|
||||
mail IN A 192.168.1.5</programlisting>
|
||||
|
||||
<para>
|
||||
The A record indicates machine names. As seen above,
|
||||
|
@ -3606,14 +3606,21 @@ mail IN A 192.168.1.5</programlisting>
|
|||
</para>
|
||||
|
||||
<programlisting>
|
||||
www IN CNAME localhost</programlisting>
|
||||
IN A 192.168.1.1</programlisting>
|
||||
|
||||
<para>This line assigns IP address
|
||||
<hostid role="ipaddr">192.168.1.1</hostid> to the current origin,
|
||||
in this case <hostid role="domainname">example.org</hostid>.</para>
|
||||
|
||||
<programlisting>
|
||||
www IN CNAME @</programlisting>
|
||||
|
||||
<para>
|
||||
The canonical name record is usually used for giving aliases
|
||||
to a machine. In the example, <hostid>www</hostid> is
|
||||
aliased to the machine known as
|
||||
<hostid role="domainname">localhost.example.org</hostid>
|
||||
(<hostid role="ipaddr">127.0.0.1</hostid>).
|
||||
aliased to the <quote>master</quote> machine which name equals
|
||||
to domain name <hostid role="domainname">example.org</hostid>
|
||||
(<hostid role="ipaddr">192.168.1.1</hostid>).
|
||||
CNAMEs can be used to provide alias
|
||||
hostnames, or round robin one hostname among multiple
|
||||
machines.
|
||||
|
@ -3652,20 +3659,20 @@ www IN CNAME localhost</programlisting>
|
|||
<programlisting>$TTL 3600
|
||||
|
||||
1.168.192.in-addr.arpa. IN SOA ns1.example.org. admin.example.org. (
|
||||
2006051501 ; Serial
|
||||
2006051501 ; Serial
|
||||
10800 ; Refresh
|
||||
3600 ; Retry
|
||||
604800 ; Expire
|
||||
3600 ) ; Minimum
|
||||
|
||||
IN NS ns1.example.org.
|
||||
IN NS ns2.example.org.
|
||||
IN NS ns1.example.org.
|
||||
IN NS ns2.example.org.
|
||||
|
||||
1 IN PTR example.org.
|
||||
2 IN PTR ns1.example.org.
|
||||
3 IN PTR ns2.example.org.
|
||||
4 IN PTR mx.example.org.
|
||||
5 IN PTR mail.example.org.</programlisting>
|
||||
1 IN PTR example.org.
|
||||
2 IN PTR ns1.example.org.
|
||||
3 IN PTR ns2.example.org.
|
||||
4 IN PTR mx.example.org.
|
||||
5 IN PTR mail.example.org.</programlisting>
|
||||
|
||||
<para>This file gives the proper IP address to hostname
|
||||
mappings of our above fictitious domain.</para>
|
||||
|
|
Loading…
Reference in a new issue