Greetings This is one of the actionspoints from RIPE-28, to present easy and short recommendations for setting up a DNS. I presented this for the DNS WG on RIPE-29. Any suggestions or remarks will still be very welcomed. Especially the times for the SOA records. Otherwise I recommend that we move forward to make this a RIPE-document. DNS recommendations. By: Hans Niklasson <hasse@swip.net> Amar Andersson <amar@telia.net> Scope: This documents act as a recommendation for configuring your DNS. This is NOT a requirement, only a recommendation of things to think about when setting up your DNS. Purpose: To decrease lame delegations and limit unecessary traffic due to resolving problems, among other things. Records: ----------------------------------------------------------------------------- SOA The address in this field must be a valid e-mail address to the administrator for the DNS. *** It's also good practise to have role address instead of personal, ie root.. admin.. hostmaster.. (when domain-administrator is leaving your company, you only change the alias for role address). Ex: domain.xx. 3600 SOA dns.domain.xx admin.domain.xx. SERIAL Serial number should follow this format: YYYYMMDDXX ( year.year.year.year.month.month.day.day.nr.nr ), where XX is the number of the latest update of the zone in the same day. (Year 2000 is near.) Ex: 1998010101 ; serial TTL A good balance of this will reduce unecessary traffic between nameservers. Ex: 28800 ; refresh (8 hours) 7200 ; retry (2 hour) 604800 ; expire (7 days) 86400 ) ; minimum (1 day) MX When pointing a domain to a mailserver/hostname, don´t forget to add a glue record ( A ) for this. Ex: domain.xx. 86400 MX 10 mail.domain.xx. mail.domain.xx 86400 A 192.168.0.1 CNAME Use this with percausion. It is *not* recommended to use a CNAME for a mailservers hostname, as this can cause resolving problems and mailloops. A A gluerecord can only point to an IP address. PTR This is used for reverse lookup of the IP address to a hostname within the zone. Make sure that your PTR records and A records match. For each A record there has to be a PTR record, and vice versa. More tips: Unecessary glue data: Don´t add unecessary glue data about hosts that is not within the zone. This can cause resolving problems if the host changes IP address. Ex: domain.xx. 86400 MX 10 mail.server.xx. mail.server.xx 86400 A 192.168.0.1 Trailing dots: Don´t forget to add a "." at the end of the domain/ hostname. If this is forgotten, this will make the DNS to add the domain name to the domain/hostname again. This will cause resolving problems. Ex: domain.xx. 86400 MX 10 mail.domain.xx.domain.xx. Illegal characters: Only a-z , 0-9 and - is valid to use. All other characters is illegal and can cause the resolving to fail. General Points: Use the latest version of the DNS software for your platform. Check for updates regulary, as new versions has the latest solutions and information. Additional reading and references: RFC1537 ( RFC1912 ) ( Common DNS Operational and Configuration Errors ) "DNS & BIND 2nd Edition" by Paul Albitz & Cricket Liu from O´Reilly & Associates Inc. ftp://ftp.ripe.net/internet-drafts/draft-ietf-dnsind-classless- inaddr-04.txt ( For reverse delegation methods for blocks smaller than /24, 256 addresses ) http://www.dns.net/dnsrd/ ( DNS Resources Directory ) /Hans Niklasson ----------------------------------------------------------------- SWipNet - The Swedish IP Network
On Thu, 14 May 1998, Hans Niklasson wrote:
Greetings
This is one of the actionspoints from RIPE-28, to present easy and short recommendations for setting up a DNS. I presented this for the DNS WG on RIPE-29. Any suggestions or remarks will still be very welcomed. Especially the times for the SOA records. Otherwise I recommend that we move forward to make this a RIPE-document.
Hello. As someone pointed out at RIPE-29, it would be a good idea to increase the expiration period appr four times, say 2419200, there is really no point in limiting this to one week, often the customers do not realize that their nameserver is out of order, and in one week their domain is vanished from Internet. Best regards
DNS recommendations.
By:
Hans Niklasson <hasse@swip.net> Amar Andersson <amar@telia.net>
Scope:
This documents act as a recommendation for configuring your DNS. This is NOT a requirement, only a recommendation of things to think about when setting up your DNS.
Purpose:
To decrease lame delegations and limit unecessary traffic due to resolving problems, among other things.
Records: -----------------------------------------------------------------------------
SOA The address in this field must be a valid e-mail address to the administrator for the DNS. *** It's also good practise to have role address instead of personal, ie root.. admin.. hostmaster.. (when domain-administrator is leaving your company, you only change the alias for role address).
Ex:
domain.xx. 3600 SOA dns.domain.xx admin.domain.xx.
SERIAL Serial number should follow this format: YYYYMMDDXX ( year.year.year.year.month.month.day.day.nr.nr ), where XX is the number of the latest update of the zone in the same day. (Year 2000 is near.)
Ex:
1998010101 ; serial
TTL A good balance of this will reduce unecessary traffic between nameservers.
Ex:
28800 ; refresh (8 hours) 7200 ; retry (2 hour) 604800 ; expire (7 days) 86400 ) ; minimum (1 day)
MX When pointing a domain to a mailserver/hostname, don4t forget to add a glue record ( A ) for this.
Ex:
domain.xx. 86400 MX 10 mail.domain.xx.
mail.domain.xx 86400 A 192.168.0.1
CNAME Use this with percausion. It is *not* recommended to use a CNAME for a mailservers hostname, as this can cause resolving problems and mailloops.
A A gluerecord can only point to an IP address.
PTR This is used for reverse lookup of the IP address to a hostname within the zone. Make sure that your PTR records and A records match. For each A record there has to be a PTR record, and vice versa.
More tips:
Unecessary glue data:
Don4t add unecessary glue data about hosts that is not within the zone. This can cause resolving problems if the host changes IP address.
Ex:
domain.xx. 86400 MX 10 mail.server.xx.
mail.server.xx 86400 A 192.168.0.1
Trailing dots: Don4t forget to add a "." at the end of the domain/ hostname. If this is forgotten, this will make the DNS to add the domain name to the domain/hostname again. This will cause resolving problems.
Ex:
domain.xx. 86400 MX 10 mail.domain.xx.domain.xx.
Illegal characters:
Only a-z , 0-9 and - is valid to use. All other characters is illegal and can cause the resolving to fail.
General Points:
Use the latest version of the DNS software for your platform. Check for updates regulary, as new versions has the latest solutions and information.
Additional reading and references:
RFC1537 ( RFC1912 ) ( Common DNS Operational and Configuration Errors )
"DNS & BIND 2nd Edition" by Paul Albitz & Cricket Liu from O4Reilly & Associates Inc.
ftp://ftp.ripe.net/internet-drafts/draft-ietf-dnsind-classless- inaddr-04.txt ( For reverse delegation methods for blocks smaller than /24, 256 addresses )
http://www.dns.net/dnsrd/ ( DNS Resources Directory )
/Hans Niklasson
----------------------------------------------------------------- SWipNet - The Swedish IP Network
/Fredrik --------------------------------- Fredrik Widell - Global IP Sweden Phone : +46 8 519 131 00 Mail : frwi@global-ip.net
Just a couple of comments... Hans Niklasson wrote:
SOA The address in this field must be a valid e-mail address to the administrator for the DNS.
It must _correspond_ to a valid email address (by replacing the first '.' with an '@') but isn't an email address itself -- I've seen some broken zone files where there was an '@' in the SOA record.
*** It's also good practise to have role address instead of personal, ie root.. admin.. hostmaster.. (when domain-administrator is leaving your company, you only change the alias for role address).
Ex:
domain.xx. 3600 SOA dns.domain.xx admin.domain.xx.
^ You're missing a '.' here (the dns.domain.xx.domain.xx. problem you mention below).
SERIAL Serial number should follow this format: YYYYMMDDXX ( year.year.year.year.month.month.day.day.nr.nr ), where XX is the number of the latest update of the zone in the same day. (Year 2000 is near.)
Ex:
1998010101 ; serial
If anyone is interested (and doesn't want to reinvent the wheel), I've got a short perl script which generates suitable numbers and replaces a magic token (%SERIAL%) in zone files when installing updates which I can tidy up a bit and make available.
TTL A good balance of this will reduce unecessary traffic between nameservers.
Ex:
28800 ; refresh (8 hours) 7200 ; retry (2 hour) 604800 ; expire (7 days) 86400 ) ; minimum (1 day)
MX When pointing a domain to a mailserver/hostname, don4t forget to add a glue record ( A ) for this.
Ex:
domain.xx. 86400 MX 10 mail.domain.xx.
mail.domain.xx 86400 A 192.168.0.1
^ Missing '.' again.
Trailing dots: Don4t forget to add a "." at the end of the domain/ hostname. If this is forgotten, this will make the DNS to add the domain name to the domain/hostname again. This will cause resolving problems.
Ex:
domain.xx. 86400 MX 10 mail.domain.xx.domain.xx.
Regards, James ----- ___ - James Aldridge, Senior Network Engineer, ---- / / / ___ ____ _/_ -- EUnet Communications Services BV --- /--- / / / / /___/ / --- Singel 540, 1017 AZ Amsterdam, NL -- /___ /___/ / / /___ /_ ---- Tel: +31 20 530 5327; Fax: +31 20 622 4657 - ----- 24hr emergency number: +31 20 421 0865
Last week I wrote:
If anyone is interested (and doesn't want to reinvent the wheel), I've got a short perl script which generates suitable numbers and replaces a magic token (%SERIAL%) in zone files when installing updates which I can tidy up a bit and make available.
Several people have asked me for this script. Since returning from Stockholm I've now had the chance to tidy it up a bit and add some basic documentation (a Unix manual page). The "inst-zone" script can now be found at http://www.staff.EU.net/jhma/dns/ Please note that I don't claim that this is the most efficient script in the world and also note that any comments on my Perl coding style will be quietly ignored ;-) Regards, James ----- ___ - James Aldridge, Senior Network Engineer, ---- / / / ___ ____ _/_ -- EUnet Communications Services BV --- /--- / / / / /___/ / --- Singel 540, 1017 AZ Amsterdam, NL -- /___ /___/ / / /___ /_ ---- Tel: +31 20 530 5327; Fax: +31 20 622 4657 - ----- 24hr emergency number: +31 20 421 0865
Hello, thanks for coming up with this again.
SOA The address in this field must be a valid e-mail address to the administrator for the DNS. *** It's also good practise to have role address instead of =09=09personal, ie root.. admin.. hostmaster..=20 =09=09(when domain-administrator is leaving your company, you=20 =09=09only change the alias for role address).
the three most common errors are: 1) Use of '@' in the DNS representation of the email address. It is essential that the '@' be encoded as '.'. One reason even knowledgable people use '@' is that you cannot publish addresses containing a dot in the local part this way. So, the popular scheme 'first.last@canonical.example' does not qualify for 1:1 translation. Usually you would (and you do, indeed) recommend using a canonical address like 'hostmaster@canonical.example' to avoid this. Another class of addresses are those from e.g. CompuServe. Just don't use them. 2) Useless defaults an unfortunately increasingly popular DNS server software suggests "administrator" either as a single label or with the zone name or probably the primary's name concatenated to it. While the first is even syntactically incorrect, mails to one of the latter nearly always bounces because the addresses have never been made valid. 3) copy 'n paste While it is tempting to use 'ns.bad.example' as the primary server for 'bad.example' and then to use 'root.ns.bad.example' as the "hostmaster" address, customers often forget one of the following: a) In most cases, although there exists an A-RR for ns.bad.example, that is not the "real" name of the host specified. To receive mail for root@ns.bad.example, the host must be informed to treat ns.bad.example as local. One of the strangest errors is receiving a mail from postmaster@schizo.example telling you that the address postmaster@schizo.example does not exist and then asking you to send further questions to, guess, postmaster@schizo.example. b) In other environments ns.bad.example is set up to handle DNS but for various reasons will not accept SMTP connections and does not have MX RRs defined for its name. During the last five years I've been sending hundreds of emails every month after evaluating the DE hostcount and most of the undeliverable mail fail due to one of the errors above (usually 15-20% of the tickets bounce.)
domain.xx. 3600 SOA dns.domain.xx admin.domain.xx.=20
IMHO there's no need to have a TTL of 3600 for the SOA, except that the software mentioned above seems to default to this value.
28800 ; refresh (8 hours) 7200 ; retry (2 hour) 604800 ; expire (7 days) 86400 ) ; minimum (1 day)
As I probably mentioned in Amsterdam, an expire of just one week is almost always way too short. An Easter weekend with some days off for the administrator too easily destroy the zone completely. The value should be at least 4 weeks, because there is really no benefit from shorter expire. For the other fields fixed values are probably not appropriate in a recommendation. The usual case of one host inside a zone can have far larger TTLs and the values of refresh and retry depend on whether NOTIFY is available or not. Additionally, they are only relevant for the providers of secondary service. If an ISP will allow the customer a refresh of 30 minutes, it's their problem. If, however, the default TTL is only 3600, that affects third parties.
MX When pointing a domain to a mailserver/hostname, don=B4t forget to add a glue record ( A ) for this.
It's the other way round. If customer X adds MX RRs to his zone pointing to the providers mail relay, the customer MUST NOT add any A-RRs for that host. Modern versions of BIND fortunately do not allow out of zone data.
domain.xx. 86400 MX 10 mail.domain.xx. =20 mail.domain.xx 86400 A 192.168.0.1
maybe we should recommend As a target of an MX or NS resource record only domain names are allowed which directly resolve into an address. That means: 1) The name you enter must exist. Note that your software may let you enter names which do not exist without complaining. It is the DNS administrators responsibility to check this. A very helpful tool for this purpose is host ["reference here"]. 2) The name must really be a name. The DNS will not understand IP addresses here. Note however, that again your software may let you make the mistake but that it will definitely not bring you the results you wanted. Use only domain names here. 3) The domain name used must directly resolve into an address, which means you must not use an alias name here and an A resource record must exist for that name. Note that unless the name is part of your namespace you must not enter that A record yourself.
A A gluerecord can only point to an IP address. Avoid the term "glue record" here.
-Peter
On Thu, May 14, 1998 at 05:20:12PM +0200, Peter Koch wrote:
2) Useless defaults an unfortunately increasingly popular DNS server software suggests "administrator" either as a single label or with the zone name or probably the primary's name concatenated to it. While the first is even syntactically incorrect, mails to one of the latter nearly always bounces because the addresses have never been made valid.
Knowledgable people, should be able to hand-edit these software's produced files ;-) One thing I've discovered is that a SOA delegation cannot be followed by a A RR if you use the tools provided ;-)
participants (5)
-
Fredrik Widell
-
Hans Niklasson
-
James Aldridge
-
Peter Koch
-
Yiorgos Adamopoulos