rack-mail_exception 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +22 -0
- data/LICENSE +20 -0
- data/README.rdoc +38 -0
- data/Rakefile +56 -0
- data/VERSION +1 -0
- data/lib/rack/mail_exception.rb +103 -0
- data/test/helper.rb +13 -0
- data/test/test_rack_mail_exception.rb +93 -0
- data/vendor/mail/.bundle/config +2 -0
- data/vendor/mail/CHANGELOG.rdoc +370 -0
- data/vendor/mail/Dependencies.txt +3 -0
- data/vendor/mail/Gemfile +17 -0
- data/vendor/mail/README.rdoc +572 -0
- data/vendor/mail/ROADMAP +92 -0
- data/vendor/mail/Rakefile +41 -0
- data/vendor/mail/TODO.rdoc +9 -0
- data/vendor/mail/lib/mail.rb +76 -0
- data/vendor/mail/lib/mail/attachments_list.rb +99 -0
- data/vendor/mail/lib/mail/body.rb +287 -0
- data/vendor/mail/lib/mail/configuration.rb +67 -0
- data/vendor/mail/lib/mail/core_extensions/blank.rb +26 -0
- data/vendor/mail/lib/mail/core_extensions/nil.rb +11 -0
- data/vendor/mail/lib/mail/core_extensions/string.rb +27 -0
- data/vendor/mail/lib/mail/elements.rb +14 -0
- data/vendor/mail/lib/mail/elements/address.rb +306 -0
- data/vendor/mail/lib/mail/elements/address_list.rb +74 -0
- data/vendor/mail/lib/mail/elements/content_disposition_element.rb +30 -0
- data/vendor/mail/lib/mail/elements/content_location_element.rb +25 -0
- data/vendor/mail/lib/mail/elements/content_transfer_encoding_element.rb +24 -0
- data/vendor/mail/lib/mail/elements/content_type_element.rb +35 -0
- data/vendor/mail/lib/mail/elements/date_time_element.rb +26 -0
- data/vendor/mail/lib/mail/elements/envelope_from_element.rb +34 -0
- data/vendor/mail/lib/mail/elements/message_ids_element.rb +29 -0
- data/vendor/mail/lib/mail/elements/mime_version_element.rb +26 -0
- data/vendor/mail/lib/mail/elements/phrase_list.rb +21 -0
- data/vendor/mail/lib/mail/elements/received_element.rb +30 -0
- data/vendor/mail/lib/mail/encodings.rb +258 -0
- data/vendor/mail/lib/mail/encodings/7bit.rb +31 -0
- data/vendor/mail/lib/mail/encodings/8bit.rb +31 -0
- data/vendor/mail/lib/mail/encodings/base64.rb +33 -0
- data/vendor/mail/lib/mail/encodings/binary.rb +31 -0
- data/vendor/mail/lib/mail/encodings/quoted_printable.rb +38 -0
- data/vendor/mail/lib/mail/encodings/transfer_encoding.rb +58 -0
- data/vendor/mail/lib/mail/envelope.rb +35 -0
- data/vendor/mail/lib/mail/field.rb +223 -0
- data/vendor/mail/lib/mail/field_list.rb +33 -0
- data/vendor/mail/lib/mail/fields.rb +35 -0
- data/vendor/mail/lib/mail/fields/bcc_field.rb +56 -0
- data/vendor/mail/lib/mail/fields/cc_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/comments_field.rb +41 -0
- data/vendor/mail/lib/mail/fields/common/address_container.rb +16 -0
- data/vendor/mail/lib/mail/fields/common/common_address.rb +125 -0
- data/vendor/mail/lib/mail/fields/common/common_date.rb +42 -0
- data/vendor/mail/lib/mail/fields/common/common_field.rb +50 -0
- data/vendor/mail/lib/mail/fields/common/common_message_id.rb +43 -0
- data/vendor/mail/lib/mail/fields/common/parameter_hash.rb +52 -0
- data/vendor/mail/lib/mail/fields/content_description_field.rb +19 -0
- data/vendor/mail/lib/mail/fields/content_disposition_field.rb +69 -0
- data/vendor/mail/lib/mail/fields/content_id_field.rb +63 -0
- data/vendor/mail/lib/mail/fields/content_location_field.rb +42 -0
- data/vendor/mail/lib/mail/fields/content_transfer_encoding_field.rb +50 -0
- data/vendor/mail/lib/mail/fields/content_type_field.rb +185 -0
- data/vendor/mail/lib/mail/fields/date_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/from_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/in_reply_to_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/keywords_field.rb +44 -0
- data/vendor/mail/lib/mail/fields/message_id_field.rb +83 -0
- data/vendor/mail/lib/mail/fields/mime_version_field.rb +53 -0
- data/vendor/mail/lib/mail/fields/optional_field.rb +13 -0
- data/vendor/mail/lib/mail/fields/received_field.rb +67 -0
- data/vendor/mail/lib/mail/fields/references_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/reply_to_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/resent_bcc_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/resent_cc_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/resent_date_field.rb +35 -0
- data/vendor/mail/lib/mail/fields/resent_from_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/resent_message_id_field.rb +34 -0
- data/vendor/mail/lib/mail/fields/resent_sender_field.rb +62 -0
- data/vendor/mail/lib/mail/fields/resent_to_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/return_path_field.rb +64 -0
- data/vendor/mail/lib/mail/fields/sender_field.rb +67 -0
- data/vendor/mail/lib/mail/fields/structured_field.rb +51 -0
- data/vendor/mail/lib/mail/fields/subject_field.rb +16 -0
- data/vendor/mail/lib/mail/fields/to_field.rb +55 -0
- data/vendor/mail/lib/mail/fields/unstructured_field.rb +166 -0
- data/vendor/mail/lib/mail/header.rb +262 -0
- data/vendor/mail/lib/mail/mail.rb +234 -0
- data/vendor/mail/lib/mail/message.rb +1867 -0
- data/vendor/mail/lib/mail/network.rb +9 -0
- data/vendor/mail/lib/mail/network/delivery_methods/file_delivery.rb +40 -0
- data/vendor/mail/lib/mail/network/delivery_methods/sendmail.rb +62 -0
- data/vendor/mail/lib/mail/network/delivery_methods/smtp.rb +110 -0
- data/vendor/mail/lib/mail/network/delivery_methods/test_mailer.rb +40 -0
- data/vendor/mail/lib/mail/network/retriever_methods/imap.rb +18 -0
- data/vendor/mail/lib/mail/network/retriever_methods/pop3.rb +149 -0
- data/vendor/mail/lib/mail/parsers/address_lists.rb +64 -0
- data/vendor/mail/lib/mail/parsers/address_lists.treetop +19 -0
- data/vendor/mail/lib/mail/parsers/content_disposition.rb +387 -0
- data/vendor/mail/lib/mail/parsers/content_disposition.treetop +46 -0
- data/vendor/mail/lib/mail/parsers/content_location.rb +139 -0
- data/vendor/mail/lib/mail/parsers/content_location.treetop +20 -0
- data/vendor/mail/lib/mail/parsers/content_transfer_encoding.rb +162 -0
- data/vendor/mail/lib/mail/parsers/content_transfer_encoding.treetop +20 -0
- data/vendor/mail/lib/mail/parsers/content_type.rb +539 -0
- data/vendor/mail/lib/mail/parsers/content_type.treetop +58 -0
- data/vendor/mail/lib/mail/parsers/date_time.rb +114 -0
- data/vendor/mail/lib/mail/parsers/date_time.treetop +11 -0
- data/vendor/mail/lib/mail/parsers/envelope_from.rb +194 -0
- data/vendor/mail/lib/mail/parsers/envelope_from.treetop +32 -0
- data/vendor/mail/lib/mail/parsers/message_ids.rb +45 -0
- data/vendor/mail/lib/mail/parsers/message_ids.treetop +15 -0
- data/vendor/mail/lib/mail/parsers/mime_version.rb +144 -0
- data/vendor/mail/lib/mail/parsers/mime_version.treetop +19 -0
- data/vendor/mail/lib/mail/parsers/phrase_lists.rb +45 -0
- data/vendor/mail/lib/mail/parsers/phrase_lists.treetop +15 -0
- data/vendor/mail/lib/mail/parsers/received.rb +71 -0
- data/vendor/mail/lib/mail/parsers/received.treetop +11 -0
- data/vendor/mail/lib/mail/parsers/rfc2045.rb +464 -0
- data/vendor/mail/lib/mail/parsers/rfc2045.treetop +36 -0
- data/vendor/mail/lib/mail/parsers/rfc2822.rb +5318 -0
- data/vendor/mail/lib/mail/parsers/rfc2822.treetop +410 -0
- data/vendor/mail/lib/mail/parsers/rfc2822_obsolete.rb +3757 -0
- data/vendor/mail/lib/mail/parsers/rfc2822_obsolete.treetop +241 -0
- data/vendor/mail/lib/mail/part.rb +102 -0
- data/vendor/mail/lib/mail/parts_list.rb +34 -0
- data/vendor/mail/lib/mail/patterns.rb +30 -0
- data/vendor/mail/lib/mail/utilities.rb +181 -0
- data/vendor/mail/lib/mail/version.rb +10 -0
- data/vendor/mail/lib/mail/version_specific/ruby_1_8.rb +97 -0
- data/vendor/mail/lib/mail/version_specific/ruby_1_9.rb +87 -0
- data/vendor/mail/lib/tasks/corpus.rake +125 -0
- data/vendor/mail/lib/tasks/treetop.rake +10 -0
- data/vendor/mail/mail.gemspec +20 -0
- data/vendor/mail/reference/US ASCII Table.txt +130 -0
- data/vendor/mail/reference/rfc1035 Domain Implementation and Specification.txt +3083 -0
- data/vendor/mail/reference/rfc1049 Content-Type Header Field for Internet Messages.txt +451 -0
- data/vendor/mail/reference/rfc1344 Implications of MIME for Internet Mail Gateways.txt +586 -0
- data/vendor/mail/reference/rfc1345 Character Mnemonics & Character Sets.txt +5761 -0
- data/vendor/mail/reference/rfc1524 A User Agent Configuration Mechanism For Multimedia Mail Format Information.txt +675 -0
- data/vendor/mail/reference/rfc1652 SMTP Service Extension for 8bit-MIMEtransport.txt +339 -0
- data/vendor/mail/reference/rfc1892 Multipart Report .txt +227 -0
- data/vendor/mail/reference/rfc1893 Mail System Status Codes.txt +843 -0
- data/vendor/mail/reference/rfc2045 Multipurpose Internet Mail Extensions (1).txt +1739 -0
- data/vendor/mail/reference/rfc2046 Multipurpose Internet Mail Extensions (2).txt +2467 -0
- data/vendor/mail/reference/rfc2047 Multipurpose Internet Mail Extensions (3).txt +843 -0
- data/vendor/mail/reference/rfc2048 Multipurpose Internet Mail Extensions (4).txt +1180 -0
- data/vendor/mail/reference/rfc2049 Multipurpose Internet Mail Extensions (5).txt +1347 -0
- data/vendor/mail/reference/rfc2111 Content-ID and Message-ID URLs.txt +283 -0
- data/vendor/mail/reference/rfc2183 Content-Disposition Header Field.txt +675 -0
- data/vendor/mail/reference/rfc2231 MIME Parameter Value and Encoded Word Extensions.txt +563 -0
- data/vendor/mail/reference/rfc2387 MIME Multipart-Related Content-type.txt +563 -0
- data/vendor/mail/reference/rfc2821 Simple Mail Transfer Protocol.txt +3711 -0
- data/vendor/mail/reference/rfc2822 Internet Message Format.txt +2859 -0
- data/vendor/mail/reference/rfc3462 Reporting of Mail System Administrative Messages.txt +396 -0
- data/vendor/mail/reference/rfc3696 Checking and Transformation of Names.txt +898 -0
- data/vendor/mail/reference/rfc4155 The application-mbox Media Type.txt +502 -0
- data/vendor/mail/reference/rfc4234 Augmented BNF for Syntax Specifications: ABNF.txt +899 -0
- data/vendor/mail/reference/rfc822 Standard for the Format of ARPA Internet Text Messages.txt +2900 -0
- data/vendor/mail/spec/environment.rb +15 -0
- data/vendor/mail/spec/features/making_a_new_message.feature +14 -0
- data/vendor/mail/spec/features/steps/env.rb +6 -0
- data/vendor/mail/spec/features/steps/making_a_new_message_steps.rb +11 -0
- data/vendor/mail/spec/fixtures/attachments/basic_email.eml +31 -0
- data/vendor/mail/spec/fixtures/attachments/test.gif +0 -0
- data/vendor/mail/spec/fixtures/attachments/test.jpg +0 -0
- data/vendor/mail/spec/fixtures/attachments/test.pdf +0 -0
- data/vendor/mail/spec/fixtures/attachments/test.png +0 -0
- data/vendor/mail/spec/fixtures/attachments/test.tiff +0 -0
- data/vendor/mail/spec/fixtures/attachments/test.zip +0 -0
- data/vendor/mail/spec/fixtures/attachments//343/201/246/343/201/231/343/201/250.txt +2 -0
- data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_content_disposition.eml +29 -0
- data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_content_location.eml +32 -0
- data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_message_rfc822.eml +92 -0
- data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_only_email.eml +17 -0
- data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_pdf.eml +70 -0
- data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_with_encoded_name.eml +47 -0
- data/vendor/mail/spec/fixtures/emails/attachment_emails/attachment_with_quoted_filename.eml +60 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/cant_parse_from.eml +33 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_7-bit.eml +231 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_empty.eml +33 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_plain.eml +148 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_qp_with_space.eml +53 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_spam.eml +44 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_text-html.eml +50 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_with_8bits.eml +770 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_with_semi_colon.eml +269 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/content_transfer_encoding_x_uuencode.eml +79 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/empty_group_lists.eml +162 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/header_fields_with_empty_values.eml +33 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/missing_body.eml +16 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/missing_content_disposition.eml +43 -0
- data/vendor/mail/spec/fixtures/emails/error_emails/multiple_content_types.eml +25 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email11.eml +34 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email12.eml +32 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email2.eml +114 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email4.eml +59 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email7.eml +66 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_encoded_stack_level_too_deep.eml +53 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_illegal_boundary.eml +58 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_mimepart_without_content_type.eml +94 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_multipart_mixed_quoted_boundary.eml +50 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_nested_attachment.eml +100 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/raw_email_with_quoted_illegal_boundary.eml +58 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/sig_only_email.eml +29 -0
- data/vendor/mail/spec/fixtures/emails/mime_emails/two_from_in_message.eml +42 -0
- data/vendor/mail/spec/fixtures/emails/multi_charset/japanese.eml +9 -0
- data/vendor/mail/spec/fixtures/emails/multi_charset/japanese_attachment.eml +27 -0
- data/vendor/mail/spec/fixtures/emails/multi_charset/japanese_attachment_long_name.eml +44 -0
- data/vendor/mail/spec/fixtures/emails/multipart_report_emails/multi_address_bounce1.eml +179 -0
- data/vendor/mail/spec/fixtures/emails/multipart_report_emails/multi_address_bounce2.eml +179 -0
- data/vendor/mail/spec/fixtures/emails/multipart_report_emails/report_422.eml +98 -0
- data/vendor/mail/spec/fixtures/emails/multipart_report_emails/report_530.eml +97 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/basic_email.eml +31 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email.eml +14 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email10.eml +20 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email5.eml +19 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email6.eml +20 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email8.eml +47 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_bad_time.eml +62 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_double_at_in_header.eml +14 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_incorrect_header.eml +28 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_multiple_from.eml +30 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_quoted_with_0d0a.eml +14 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_reply.eml +32 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_simple.eml +11 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_string_in_date_field.eml +17 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_trailing_dot.eml +21 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_with_bad_date.eml +48 -0
- data/vendor/mail/spec/fixtures/emails/plain_emails/raw_email_with_partially_quoted_subject.eml +14 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example01.eml +8 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example02.eml +9 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example03.eml +7 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example04.eml +7 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example05.eml +8 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example06.eml +10 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example07.eml +9 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example08.eml +12 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example09.eml +15 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example10.eml +15 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example11.eml +6 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example12.eml +8 -0
- data/vendor/mail/spec/fixtures/emails/rfc2822/example13.eml +10 -0
- data/vendor/mail/spec/fixtures/emails/sample_output_multipart +0 -0
- data/vendor/mail/spec/mail/attachments_list_spec.rb +214 -0
- data/vendor/mail/spec/mail/body_spec.rb +385 -0
- data/vendor/mail/spec/mail/configuration_spec.rb +19 -0
- data/vendor/mail/spec/mail/core_extensions/string_spec.rb +62 -0
- data/vendor/mail/spec/mail/core_extensions_spec.rb +99 -0
- data/vendor/mail/spec/mail/elements/address_list_spec.rb +109 -0
- data/vendor/mail/spec/mail/elements/address_spec.rb +609 -0
- data/vendor/mail/spec/mail/elements/date_time_element_spec.rb +20 -0
- data/vendor/mail/spec/mail/elements/envelope_from_element_spec.rb +31 -0
- data/vendor/mail/spec/mail/elements/message_ids_element_spec.rb +43 -0
- data/vendor/mail/spec/mail/elements/phrase_list_spec.rb +22 -0
- data/vendor/mail/spec/mail/elements/received_element_spec.rb +34 -0
- data/vendor/mail/spec/mail/encoding_spec.rb +189 -0
- data/vendor/mail/spec/mail/encodings/base64_spec.rb +25 -0
- data/vendor/mail/spec/mail/encodings/quoted_printable_spec.rb +25 -0
- data/vendor/mail/spec/mail/encodings_spec.rb +664 -0
- data/vendor/mail/spec/mail/example_emails_spec.rb +303 -0
- data/vendor/mail/spec/mail/field_list_spec.rb +33 -0
- data/vendor/mail/spec/mail/field_spec.rb +198 -0
- data/vendor/mail/spec/mail/fields/bcc_field_spec.rb +89 -0
- data/vendor/mail/spec/mail/fields/cc_field_spec.rb +79 -0
- data/vendor/mail/spec/mail/fields/comments_field_spec.rb +25 -0
- data/vendor/mail/spec/mail/fields/common/address_container_spec.rb +18 -0
- data/vendor/mail/spec/mail/fields/common/common_address_spec.rb +132 -0
- data/vendor/mail/spec/mail/fields/common/common_date_spec.rb +25 -0
- data/vendor/mail/spec/mail/fields/common/common_field_spec.rb +69 -0
- data/vendor/mail/spec/mail/fields/common/common_message_id_spec.rb +30 -0
- data/vendor/mail/spec/mail/fields/common/parameter_hash_spec.rb +56 -0
- data/vendor/mail/spec/mail/fields/content_description_field_spec.rb +39 -0
- data/vendor/mail/spec/mail/fields/content_disposition_field_spec.rb +55 -0
- data/vendor/mail/spec/mail/fields/content_id_field_spec.rb +117 -0
- data/vendor/mail/spec/mail/fields/content_location_field_spec.rb +46 -0
- data/vendor/mail/spec/mail/fields/content_transfer_encoding_field_spec.rb +113 -0
- data/vendor/mail/spec/mail/fields/content_type_field_spec.rb +678 -0
- data/vendor/mail/spec/mail/fields/date_field_spec.rb +73 -0
- data/vendor/mail/spec/mail/fields/envelope_spec.rb +48 -0
- data/vendor/mail/spec/mail/fields/from_field_spec.rb +89 -0
- data/vendor/mail/spec/mail/fields/in_reply_to_field_spec.rb +62 -0
- data/vendor/mail/spec/mail/fields/keywords_field_spec.rb +66 -0
- data/vendor/mail/spec/mail/fields/message_id_field_spec.rb +147 -0
- data/vendor/mail/spec/mail/fields/mime_version_field_spec.rb +166 -0
- data/vendor/mail/spec/mail/fields/received_field_spec.rb +44 -0
- data/vendor/mail/spec/mail/fields/references_field_spec.rb +35 -0
- data/vendor/mail/spec/mail/fields/reply_to_field_spec.rb +67 -0
- data/vendor/mail/spec/mail/fields/resent_bcc_field_spec.rb +66 -0
- data/vendor/mail/spec/mail/fields/resent_cc_field_spec.rb +66 -0
- data/vendor/mail/spec/mail/fields/resent_date_field_spec.rb +39 -0
- data/vendor/mail/spec/mail/fields/resent_from_field_spec.rb +66 -0
- data/vendor/mail/spec/mail/fields/resent_message_id_field_spec.rb +24 -0
- data/vendor/mail/spec/mail/fields/resent_sender_field_spec.rb +58 -0
- data/vendor/mail/spec/mail/fields/resent_to_field_spec.rb +66 -0
- data/vendor/mail/spec/mail/fields/return_path_field_spec.rb +52 -0
- data/vendor/mail/spec/mail/fields/sender_field_spec.rb +58 -0
- data/vendor/mail/spec/mail/fields/structured_field_spec.rb +72 -0
- data/vendor/mail/spec/mail/fields/to_field_spec.rb +92 -0
- data/vendor/mail/spec/mail/fields/unstructured_field_spec.rb +134 -0
- data/vendor/mail/spec/mail/header_spec.rb +578 -0
- data/vendor/mail/spec/mail/mail_spec.rb +34 -0
- data/vendor/mail/spec/mail/message_spec.rb +1409 -0
- data/vendor/mail/spec/mail/mime_messages_spec.rb +435 -0
- data/vendor/mail/spec/mail/multipart_report_spec.rb +112 -0
- data/vendor/mail/spec/mail/network/delivery_methods/file_delivery_spec.rb +79 -0
- data/vendor/mail/spec/mail/network/delivery_methods/sendmail_spec.rb +125 -0
- data/vendor/mail/spec/mail/network/delivery_methods/smtp_spec.rb +133 -0
- data/vendor/mail/spec/mail/network/delivery_methods/test_mailer_spec.rb +57 -0
- data/vendor/mail/spec/mail/network/retriever_methods/pop3_spec.rb +180 -0
- data/vendor/mail/spec/mail/network_spec.rb +359 -0
- data/vendor/mail/spec/mail/parsers/address_lists_parser_spec.rb +15 -0
- data/vendor/mail/spec/mail/parsers/content_transfer_encoding_parser_spec.rb +72 -0
- data/vendor/mail/spec/mail/part_spec.rb +129 -0
- data/vendor/mail/spec/mail/parts_list_spec.rb +12 -0
- data/vendor/mail/spec/mail/round_tripping_spec.rb +44 -0
- data/vendor/mail/spec/mail/utilities_spec.rb +327 -0
- data/vendor/mail/spec/mail/version_specific/escape_paren_1_8_spec.rb +32 -0
- data/vendor/mail/spec/matchers/break_down_to.rb +35 -0
- data/vendor/mail/spec/spec_helper.rb +163 -0
- metadata +442 -0
@@ -0,0 +1,3083 @@
|
|
1
|
+
Updated by: 1101, 1183, 1348, 1876, 1982, 1995, STANDARD
|
2
|
+
1996, 2065, 2136, 2137, 2181, 2308,
|
3
|
+
2535, 2845, 3425, 3658, 4033, 4034,
|
4
|
+
4035, 4343 Errata
|
5
|
+
Network Working Group P. Mockapetris
|
6
|
+
Request for Comments: 1035 ISI
|
7
|
+
November 1987
|
8
|
+
Obsoletes: RFCs 882, 883, 973
|
9
|
+
|
10
|
+
DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION
|
11
|
+
|
12
|
+
|
13
|
+
1. STATUS OF THIS MEMO
|
14
|
+
|
15
|
+
This RFC describes the details of the domain system and protocol, and
|
16
|
+
assumes that the reader is familiar with the concepts discussed in a
|
17
|
+
companion RFC, "Domain Names - Concepts and Facilities" [RFC-1034].
|
18
|
+
|
19
|
+
The domain system is a mixture of functions and data types which are an
|
20
|
+
official protocol and functions and data types which are still
|
21
|
+
experimental. Since the domain system is intentionally extensible, new
|
22
|
+
data types and experimental behavior should always be expected in parts
|
23
|
+
of the system beyond the official protocol. The official protocol parts
|
24
|
+
include standard queries, responses and the Internet class RR data
|
25
|
+
formats (e.g., host addresses). Since the previous RFC set, several
|
26
|
+
definitions have changed, so some previous definitions are obsolete.
|
27
|
+
|
28
|
+
Experimental or obsolete features are clearly marked in these RFCs, and
|
29
|
+
such information should be used with caution.
|
30
|
+
|
31
|
+
The reader is especially cautioned not to depend on the values which
|
32
|
+
appear in examples to be current or complete, since their purpose is
|
33
|
+
primarily pedagogical. Distribution of this memo is unlimited.
|
34
|
+
|
35
|
+
Table of Contents
|
36
|
+
|
37
|
+
1. STATUS OF THIS MEMO 1
|
38
|
+
2. INTRODUCTION 3
|
39
|
+
2.1. Overview 3
|
40
|
+
2.2. Common configurations 4
|
41
|
+
2.3. Conventions 7
|
42
|
+
2.3.1. Preferred name syntax 7
|
43
|
+
2.3.2. Data Transmission Order 8
|
44
|
+
2.3.3. Character Case 9
|
45
|
+
2.3.4. Size limits 10
|
46
|
+
3. DOMAIN NAME SPACE AND RR DEFINITIONS 10
|
47
|
+
3.1. Name space definitions 10
|
48
|
+
3.2. RR definitions 11
|
49
|
+
3.2.1. Format 11
|
50
|
+
3.2.2. TYPE values 12
|
51
|
+
3.2.3. QTYPE values 12
|
52
|
+
3.2.4. CLASS values 13
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
Mockapetris [Page 1]
|
57
|
+
|
58
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
59
|
+
|
60
|
+
|
61
|
+
3.2.5. QCLASS values 13
|
62
|
+
3.3. Standard RRs 13
|
63
|
+
3.3.1. CNAME RDATA format 14
|
64
|
+
3.3.2. HINFO RDATA format 14
|
65
|
+
3.3.3. MB RDATA format (EXPERIMENTAL) 14
|
66
|
+
3.3.4. MD RDATA format (Obsolete) 15
|
67
|
+
3.3.5. MF RDATA format (Obsolete) 15
|
68
|
+
3.3.6. MG RDATA format (EXPERIMENTAL) 16
|
69
|
+
3.3.7. MINFO RDATA format (EXPERIMENTAL) 16
|
70
|
+
3.3.8. MR RDATA format (EXPERIMENTAL) 17
|
71
|
+
3.3.9. MX RDATA format 17
|
72
|
+
3.3.10. NULL RDATA format (EXPERIMENTAL) 17
|
73
|
+
3.3.11. NS RDATA format 18
|
74
|
+
3.3.12. PTR RDATA format 18
|
75
|
+
3.3.13. SOA RDATA format 19
|
76
|
+
3.3.14. TXT RDATA format 20
|
77
|
+
3.4. ARPA Internet specific RRs 20
|
78
|
+
3.4.1. A RDATA format 20
|
79
|
+
3.4.2. WKS RDATA format 21
|
80
|
+
3.5. IN-ADDR.ARPA domain 22
|
81
|
+
3.6. Defining new types, classes, and special namespaces 24
|
82
|
+
4. MESSAGES 25
|
83
|
+
4.1. Format 25
|
84
|
+
4.1.1. Header section format 26
|
85
|
+
4.1.2. Question section format 28
|
86
|
+
4.1.3. Resource record format 29
|
87
|
+
4.1.4. Message compression 30
|
88
|
+
4.2. Transport 32
|
89
|
+
4.2.1. UDP usage 32
|
90
|
+
4.2.2. TCP usage 32
|
91
|
+
5. MASTER FILES 33
|
92
|
+
5.1. Format 33
|
93
|
+
5.2. Use of master files to define zones 35
|
94
|
+
5.3. Master file example 36
|
95
|
+
6. NAME SERVER IMPLEMENTATION 37
|
96
|
+
6.1. Architecture 37
|
97
|
+
6.1.1. Control 37
|
98
|
+
6.1.2. Database 37
|
99
|
+
6.1.3. Time 39
|
100
|
+
6.2. Standard query processing 39
|
101
|
+
6.3. Zone refresh and reload processing 39
|
102
|
+
6.4. Inverse queries (Optional) 40
|
103
|
+
6.4.1. The contents of inverse queries and responses 40
|
104
|
+
6.4.2. Inverse query and response example 41
|
105
|
+
6.4.3. Inverse query processing 42
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
Mockapetris [Page 2]
|
113
|
+
|
114
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
115
|
+
|
116
|
+
|
117
|
+
6.5. Completion queries and responses 42
|
118
|
+
7. RESOLVER IMPLEMENTATION 43
|
119
|
+
7.1. Transforming a user request into a query 43
|
120
|
+
7.2. Sending the queries 44
|
121
|
+
7.3. Processing responses 46
|
122
|
+
7.4. Using the cache 47
|
123
|
+
8. MAIL SUPPORT 47
|
124
|
+
8.1. Mail exchange binding 48
|
125
|
+
8.2. Mailbox binding (Experimental) 48
|
126
|
+
9. REFERENCES and BIBLIOGRAPHY 50
|
127
|
+
Index 54
|
128
|
+
|
129
|
+
2. INTRODUCTION
|
130
|
+
|
131
|
+
2.1. Overview
|
132
|
+
|
133
|
+
The goal of domain names is to provide a mechanism for naming resources
|
134
|
+
in such a way that the names are usable in different hosts, networks,
|
135
|
+
protocol families, internets, and administrative organizations.
|
136
|
+
|
137
|
+
From the user's point of view, domain names are useful as arguments to a
|
138
|
+
local agent, called a resolver, which retrieves information associated
|
139
|
+
with the domain name. Thus a user might ask for the host address or
|
140
|
+
mail information associated with a particular domain name. To enable
|
141
|
+
the user to request a particular type of information, an appropriate
|
142
|
+
query type is passed to the resolver with the domain name. To the user,
|
143
|
+
the domain tree is a single information space; the resolver is
|
144
|
+
responsible for hiding the distribution of data among name servers from
|
145
|
+
the user.
|
146
|
+
|
147
|
+
From the resolver's point of view, the database that makes up the domain
|
148
|
+
space is distributed among various name servers. Different parts of the
|
149
|
+
domain space are stored in different name servers, although a particular
|
150
|
+
data item will be stored redundantly in two or more name servers. The
|
151
|
+
resolver starts with knowledge of at least one name server. When the
|
152
|
+
resolver processes a user query it asks a known name server for the
|
153
|
+
information; in return, the resolver either receives the desired
|
154
|
+
information or a referral to another name server. Using these
|
155
|
+
referrals, resolvers learn the identities and contents of other name
|
156
|
+
servers. Resolvers are responsible for dealing with the distribution of
|
157
|
+
the domain space and dealing with the effects of name server failure by
|
158
|
+
consulting redundant databases in other servers.
|
159
|
+
|
160
|
+
Name servers manage two kinds of data. The first kind of data held in
|
161
|
+
sets called zones; each zone is the complete database for a particular
|
162
|
+
"pruned" subtree of the domain space. This data is called
|
163
|
+
authoritative. A name server periodically checks to make sure that its
|
164
|
+
zones are up to date, and if not, obtains a new copy of updated zones
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
Mockapetris [Page 3]
|
169
|
+
|
170
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
171
|
+
|
172
|
+
|
173
|
+
from master files stored locally or in another name server. The second
|
174
|
+
kind of data is cached data which was acquired by a local resolver.
|
175
|
+
This data may be incomplete, but improves the performance of the
|
176
|
+
retrieval process when non-local data is repeatedly accessed. Cached
|
177
|
+
data is eventually discarded by a timeout mechanism.
|
178
|
+
|
179
|
+
This functional structure isolates the problems of user interface,
|
180
|
+
failure recovery, and distribution in the resolvers and isolates the
|
181
|
+
database update and refresh problems in the name servers.
|
182
|
+
|
183
|
+
2.2. Common configurations
|
184
|
+
|
185
|
+
A host can participate in the domain name system in a number of ways,
|
186
|
+
depending on whether the host runs programs that retrieve information
|
187
|
+
from the domain system, name servers that answer queries from other
|
188
|
+
hosts, or various combinations of both functions. The simplest, and
|
189
|
+
perhaps most typical, configuration is shown below:
|
190
|
+
|
191
|
+
Local Host | Foreign
|
192
|
+
|
|
193
|
+
+---------+ +----------+ | +--------+
|
194
|
+
| | user queries | |queries | | |
|
195
|
+
| User |-------------->| |---------|->|Foreign |
|
196
|
+
| Program | | Resolver | | | Name |
|
197
|
+
| |<--------------| |<--------|--| Server |
|
198
|
+
| | user responses| |responses| | |
|
199
|
+
+---------+ +----------+ | +--------+
|
200
|
+
| A |
|
201
|
+
cache additions | | references |
|
202
|
+
V | |
|
203
|
+
+----------+ |
|
204
|
+
| cache | |
|
205
|
+
+----------+ |
|
206
|
+
|
207
|
+
User programs interact with the domain name space through resolvers; the
|
208
|
+
format of user queries and user responses is specific to the host and
|
209
|
+
its operating system. User queries will typically be operating system
|
210
|
+
calls, and the resolver and its cache will be part of the host operating
|
211
|
+
system. Less capable hosts may choose to implement the resolver as a
|
212
|
+
subroutine to be linked in with every program that needs its services.
|
213
|
+
Resolvers answer user queries with information they acquire via queries
|
214
|
+
to foreign name servers and the local cache.
|
215
|
+
|
216
|
+
Note that the resolver may have to make several queries to several
|
217
|
+
different foreign name servers to answer a particular user query, and
|
218
|
+
hence the resolution of a user query may involve several network
|
219
|
+
accesses and an arbitrary amount of time. The queries to foreign name
|
220
|
+
servers and the corresponding responses have a standard format described
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
Mockapetris [Page 4]
|
225
|
+
|
226
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
227
|
+
|
228
|
+
|
229
|
+
in this memo, and may be datagrams.
|
230
|
+
|
231
|
+
Depending on its capabilities, a name server could be a stand alone
|
232
|
+
program on a dedicated machine or a process or processes on a large
|
233
|
+
timeshared host. A simple configuration might be:
|
234
|
+
|
235
|
+
Local Host | Foreign
|
236
|
+
|
|
237
|
+
+---------+ |
|
238
|
+
/ /| |
|
239
|
+
+---------+ | +----------+ | +--------+
|
240
|
+
| | | | |responses| | |
|
241
|
+
| | | | Name |---------|->|Foreign |
|
242
|
+
| Master |-------------->| Server | | |Resolver|
|
243
|
+
| files | | | |<--------|--| |
|
244
|
+
| |/ | | queries | +--------+
|
245
|
+
+---------+ +----------+ |
|
246
|
+
|
247
|
+
Here a primary name server acquires information about one or more zones
|
248
|
+
by reading master files from its local file system, and answers queries
|
249
|
+
about those zones that arrive from foreign resolvers.
|
250
|
+
|
251
|
+
The DNS requires that all zones be redundantly supported by more than
|
252
|
+
one name server. Designated secondary servers can acquire zones and
|
253
|
+
check for updates from the primary server using the zone transfer
|
254
|
+
protocol of the DNS. This configuration is shown below:
|
255
|
+
|
256
|
+
Local Host | Foreign
|
257
|
+
|
|
258
|
+
+---------+ |
|
259
|
+
/ /| |
|
260
|
+
+---------+ | +----------+ | +--------+
|
261
|
+
| | | | |responses| | |
|
262
|
+
| | | | Name |---------|->|Foreign |
|
263
|
+
| Master |-------------->| Server | | |Resolver|
|
264
|
+
| files | | | |<--------|--| |
|
265
|
+
| |/ | | queries | +--------+
|
266
|
+
+---------+ +----------+ |
|
267
|
+
A |maintenance | +--------+
|
268
|
+
| +------------|->| |
|
269
|
+
| queries | |Foreign |
|
270
|
+
| | | Name |
|
271
|
+
+------------------|--| Server |
|
272
|
+
maintenance responses | +--------+
|
273
|
+
|
274
|
+
In this configuration, the name server periodically establishes a
|
275
|
+
virtual circuit to a foreign name server to acquire a copy of a zone or
|
276
|
+
to check that an existing copy has not changed. The messages sent for
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
Mockapetris [Page 5]
|
281
|
+
|
282
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
283
|
+
|
284
|
+
|
285
|
+
these maintenance activities follow the same form as queries and
|
286
|
+
responses, but the message sequences are somewhat different.
|
287
|
+
|
288
|
+
The information flow in a host that supports all aspects of the domain
|
289
|
+
name system is shown below:
|
290
|
+
|
291
|
+
Local Host | Foreign
|
292
|
+
|
|
293
|
+
+---------+ +----------+ | +--------+
|
294
|
+
| | user queries | |queries | | |
|
295
|
+
| User |-------------->| |---------|->|Foreign |
|
296
|
+
| Program | | Resolver | | | Name |
|
297
|
+
| |<--------------| |<--------|--| Server |
|
298
|
+
| | user responses| |responses| | |
|
299
|
+
+---------+ +----------+ | +--------+
|
300
|
+
| A |
|
301
|
+
cache additions | | references |
|
302
|
+
V | |
|
303
|
+
+----------+ |
|
304
|
+
| Shared | |
|
305
|
+
| database | |
|
306
|
+
+----------+ |
|
307
|
+
A | |
|
308
|
+
+---------+ refreshes | | references |
|
309
|
+
/ /| | V |
|
310
|
+
+---------+ | +----------+ | +--------+
|
311
|
+
| | | | |responses| | |
|
312
|
+
| | | | Name |---------|->|Foreign |
|
313
|
+
| Master |-------------->| Server | | |Resolver|
|
314
|
+
| files | | | |<--------|--| |
|
315
|
+
| |/ | | queries | +--------+
|
316
|
+
+---------+ +----------+ |
|
317
|
+
A |maintenance | +--------+
|
318
|
+
| +------------|->| |
|
319
|
+
| queries | |Foreign |
|
320
|
+
| | | Name |
|
321
|
+
+------------------|--| Server |
|
322
|
+
maintenance responses | +--------+
|
323
|
+
|
324
|
+
The shared database holds domain space data for the local name server
|
325
|
+
and resolver. The contents of the shared database will typically be a
|
326
|
+
mixture of authoritative data maintained by the periodic refresh
|
327
|
+
operations of the name server and cached data from previous resolver
|
328
|
+
requests. The structure of the domain data and the necessity for
|
329
|
+
synchronization between name servers and resolvers imply the general
|
330
|
+
characteristics of this database, but the actual format is up to the
|
331
|
+
local implementor.
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
Mockapetris [Page 6]
|
337
|
+
|
338
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
339
|
+
|
340
|
+
|
341
|
+
Information flow can also be tailored so that a group of hosts act
|
342
|
+
together to optimize activities. Sometimes this is done to offload less
|
343
|
+
capable hosts so that they do not have to implement a full resolver.
|
344
|
+
This can be appropriate for PCs or hosts which want to minimize the
|
345
|
+
amount of new network code which is required. This scheme can also
|
346
|
+
allow a group of hosts can share a small number of caches rather than
|
347
|
+
maintaining a large number of separate caches, on the premise that the
|
348
|
+
centralized caches will have a higher hit ratio. In either case,
|
349
|
+
resolvers are replaced with stub resolvers which act as front ends to
|
350
|
+
resolvers located in a recursive server in one or more name servers
|
351
|
+
known to perform that service:
|
352
|
+
|
353
|
+
Local Hosts | Foreign
|
354
|
+
|
|
355
|
+
+---------+ |
|
356
|
+
| | responses |
|
357
|
+
| Stub |<--------------------+ |
|
358
|
+
| Resolver| | |
|
359
|
+
| |----------------+ | |
|
360
|
+
+---------+ recursive | | |
|
361
|
+
queries | | |
|
362
|
+
V | |
|
363
|
+
+---------+ recursive +----------+ | +--------+
|
364
|
+
| | queries | |queries | | |
|
365
|
+
| Stub |-------------->| Recursive|---------|->|Foreign |
|
366
|
+
| Resolver| | Server | | | Name |
|
367
|
+
| |<--------------| |<--------|--| Server |
|
368
|
+
+---------+ responses | |responses| | |
|
369
|
+
+----------+ | +--------+
|
370
|
+
| Central | |
|
371
|
+
| cache | |
|
372
|
+
+----------+ |
|
373
|
+
|
374
|
+
In any case, note that domain components are always replicated for
|
375
|
+
reliability whenever possible.
|
376
|
+
|
377
|
+
2.3. Conventions
|
378
|
+
|
379
|
+
The domain system has several conventions dealing with low-level, but
|
380
|
+
fundamental, issues. While the implementor is free to violate these
|
381
|
+
conventions WITHIN HIS OWN SYSTEM, he must observe these conventions in
|
382
|
+
ALL behavior observed from other hosts.
|
383
|
+
|
384
|
+
2.3.1. Preferred name syntax
|
385
|
+
|
386
|
+
The DNS specifications attempt to be as general as possible in the rules
|
387
|
+
for constructing domain names. The idea is that the name of any
|
388
|
+
existing object can be expressed as a domain name with minimal changes.
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
Mockapetris [Page 7]
|
393
|
+
|
394
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
395
|
+
|
396
|
+
|
397
|
+
However, when assigning a domain name for an object, the prudent user
|
398
|
+
will select a name which satisfies both the rules of the domain system
|
399
|
+
and any existing rules for the object, whether these rules are published
|
400
|
+
or implied by existing programs.
|
401
|
+
|
402
|
+
For example, when naming a mail domain, the user should satisfy both the
|
403
|
+
rules of this memo and those in RFC-822. When creating a new host name,
|
404
|
+
the old rules for HOSTS.TXT should be followed. This avoids problems
|
405
|
+
when old software is converted to use domain names.
|
406
|
+
|
407
|
+
The following syntax will result in fewer problems with many
|
408
|
+
|
409
|
+
applications that use domain names (e.g., mail, TELNET).
|
410
|
+
|
411
|
+
<domain> ::= <subdomain> | " "
|
412
|
+
|
413
|
+
<subdomain> ::= <label> | <subdomain> "." <label>
|
414
|
+
|
415
|
+
<label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]
|
416
|
+
|
417
|
+
<ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
|
418
|
+
|
419
|
+
<let-dig-hyp> ::= <let-dig> | "-"
|
420
|
+
|
421
|
+
<let-dig> ::= <letter> | <digit>
|
422
|
+
|
423
|
+
<letter> ::= any one of the 52 alphabetic characters A through Z in
|
424
|
+
upper case and a through z in lower case
|
425
|
+
|
426
|
+
<digit> ::= any one of the ten digits 0 through 9
|
427
|
+
|
428
|
+
Note that while upper and lower case letters are allowed in domain
|
429
|
+
names, no significance is attached to the case. That is, two names with
|
430
|
+
the same spelling but different case are to be treated as if identical.
|
431
|
+
|
432
|
+
The labels must follow the rules for ARPANET host names. They must
|
433
|
+
start with a letter, end with a letter or digit, and have as interior
|
434
|
+
characters only letters, digits, and hyphen. There are also some
|
435
|
+
restrictions on the length. Labels must be 63 characters or less.
|
436
|
+
|
437
|
+
For example, the following strings identify hosts in the Internet:
|
438
|
+
|
439
|
+
A.ISI.EDU XX.LCS.MIT.EDU SRI-NIC.ARPA
|
440
|
+
|
441
|
+
2.3.2. Data Transmission Order
|
442
|
+
|
443
|
+
The order of transmission of the header and data described in this
|
444
|
+
document is resolved to the octet level. Whenever a diagram shows a
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
Mockapetris [Page 8]
|
449
|
+
|
450
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
451
|
+
|
452
|
+
|
453
|
+
group of octets, the order of transmission of those octets is the normal
|
454
|
+
order in which they are read in English. For example, in the following
|
455
|
+
diagram, the octets are transmitted in the order they are numbered.
|
456
|
+
|
457
|
+
0 1
|
458
|
+
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
|
459
|
+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
460
|
+
| 1 | 2 |
|
461
|
+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
462
|
+
| 3 | 4 |
|
463
|
+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
464
|
+
| 5 | 6 |
|
465
|
+
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|
466
|
+
|
467
|
+
Whenever an octet represents a numeric quantity, the left most bit in
|
468
|
+
the diagram is the high order or most significant bit. That is, the bit
|
469
|
+
labeled 0 is the most significant bit. For example, the following
|
470
|
+
diagram represents the value 170 (decimal).
|
471
|
+
|
472
|
+
0 1 2 3 4 5 6 7
|
473
|
+
+-+-+-+-+-+-+-+-+
|
474
|
+
|1 0 1 0 1 0 1 0|
|
475
|
+
+-+-+-+-+-+-+-+-+
|
476
|
+
|
477
|
+
Similarly, whenever a multi-octet field represents a numeric quantity
|
478
|
+
the left most bit of the whole field is the most significant bit. When
|
479
|
+
a multi-octet quantity is transmitted the most significant octet is
|
480
|
+
transmitted first.
|
481
|
+
|
482
|
+
2.3.3. Character Case
|
483
|
+
|
484
|
+
For all parts of the DNS that are part of the official protocol, all
|
485
|
+
comparisons between character strings (e.g., labels, domain names, etc.)
|
486
|
+
are done in a case-insensitive manner. At present, this rule is in
|
487
|
+
force throughout the domain system without exception. However, future
|
488
|
+
additions beyond current usage may need to use the full binary octet
|
489
|
+
capabilities in names, so attempts to store domain names in 7-bit ASCII
|
490
|
+
or use of special bytes to terminate labels, etc., should be avoided.
|
491
|
+
|
492
|
+
When data enters the domain system, its original case should be
|
493
|
+
preserved whenever possible. In certain circumstances this cannot be
|
494
|
+
done. For example, if two RRs are stored in a database, one at x.y and
|
495
|
+
one at X.Y, they are actually stored at the same place in the database,
|
496
|
+
and hence only one casing would be preserved. The basic rule is that
|
497
|
+
case can be discarded only when data is used to define structure in a
|
498
|
+
database, and two names are identical when compared in a case
|
499
|
+
insensitive manner.
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
Mockapetris [Page 9]
|
505
|
+
|
506
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
507
|
+
|
508
|
+
|
509
|
+
Loss of case sensitive data must be minimized. Thus while data for x.y
|
510
|
+
and X.Y may both be stored under a single location x.y or X.Y, data for
|
511
|
+
a.x and B.X would never be stored under A.x, A.X, b.x, or b.X. In
|
512
|
+
general, this preserves the case of the first label of a domain name,
|
513
|
+
but forces standardization of interior node labels.
|
514
|
+
|
515
|
+
Systems administrators who enter data into the domain database should
|
516
|
+
take care to represent the data they supply to the domain system in a
|
517
|
+
case-consistent manner if their system is case-sensitive. The data
|
518
|
+
distribution system in the domain system will ensure that consistent
|
519
|
+
representations are preserved.
|
520
|
+
|
521
|
+
2.3.4. Size limits
|
522
|
+
|
523
|
+
Various objects and parameters in the DNS have size limits. They are
|
524
|
+
listed below. Some could be easily changed, others are more
|
525
|
+
fundamental.
|
526
|
+
|
527
|
+
labels 63 octets or less
|
528
|
+
|
529
|
+
names 255 octets or less
|
530
|
+
|
531
|
+
TTL positive values of a signed 32 bit number.
|
532
|
+
|
533
|
+
UDP messages 512 octets or less
|
534
|
+
|
535
|
+
3. DOMAIN NAME SPACE AND RR DEFINITIONS
|
536
|
+
|
537
|
+
3.1. Name space definitions
|
538
|
+
|
539
|
+
Domain names in messages are expressed in terms of a sequence of labels.
|
540
|
+
Each label is represented as a one octet length field followed by that
|
541
|
+
number of octets. Since every domain name ends with the null label of
|
542
|
+
the root, a domain name is terminated by a length byte of zero. The
|
543
|
+
high order two bits of every length octet must be zero, and the
|
544
|
+
remaining six bits of the length field limit the label to 63 octets or
|
545
|
+
less.
|
546
|
+
|
547
|
+
To simplify implementations, the total length of a domain name (i.e.,
|
548
|
+
label octets and label length octets) is restricted to 255 octets or
|
549
|
+
less.
|
550
|
+
|
551
|
+
Although labels can contain any 8 bit values in octets that make up a
|
552
|
+
label, it is strongly recommended that labels follow the preferred
|
553
|
+
syntax described elsewhere in this memo, which is compatible with
|
554
|
+
existing host naming conventions. Name servers and resolvers must
|
555
|
+
compare labels in a case-insensitive manner (i.e., A=a), assuming ASCII
|
556
|
+
with zero parity. Non-alphabetic codes must match exactly.
|
557
|
+
|
558
|
+
|
559
|
+
|
560
|
+
Mockapetris [Page 10]
|
561
|
+
|
562
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
563
|
+
|
564
|
+
|
565
|
+
3.2. RR definitions
|
566
|
+
|
567
|
+
3.2.1. Format
|
568
|
+
|
569
|
+
All RRs have the same top level format shown below:
|
570
|
+
|
571
|
+
1 1 1 1 1 1
|
572
|
+
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
|
573
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
574
|
+
| |
|
575
|
+
/ /
|
576
|
+
/ NAME /
|
577
|
+
| |
|
578
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
579
|
+
| TYPE |
|
580
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
581
|
+
| CLASS |
|
582
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
583
|
+
| TTL |
|
584
|
+
| |
|
585
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
586
|
+
| RDLENGTH |
|
587
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|
|
588
|
+
/ RDATA /
|
589
|
+
/ /
|
590
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
591
|
+
|
592
|
+
|
593
|
+
where:
|
594
|
+
|
595
|
+
NAME an owner name, i.e., the name of the node to which this
|
596
|
+
resource record pertains.
|
597
|
+
|
598
|
+
TYPE two octets containing one of the RR TYPE codes.
|
599
|
+
|
600
|
+
CLASS two octets containing one of the RR CLASS codes.
|
601
|
+
|
602
|
+
TTL a 32 bit signed integer that specifies the time interval
|
603
|
+
that the resource record may be cached before the source
|
604
|
+
of the information should again be consulted. Zero
|
605
|
+
values are interpreted to mean that the RR can only be
|
606
|
+
used for the transaction in progress, and should not be
|
607
|
+
cached. For example, SOA records are always distributed
|
608
|
+
with a zero TTL to prohibit caching. Zero values can
|
609
|
+
also be used for extremely volatile data.
|
610
|
+
|
611
|
+
RDLENGTH an unsigned 16 bit integer that specifies the length in
|
612
|
+
octets of the RDATA field.
|
613
|
+
|
614
|
+
|
615
|
+
|
616
|
+
Mockapetris [Page 11]
|
617
|
+
|
618
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
619
|
+
|
620
|
+
|
621
|
+
RDATA a variable length string of octets that describes the
|
622
|
+
resource. The format of this information varies
|
623
|
+
according to the TYPE and CLASS of the resource record.
|
624
|
+
|
625
|
+
3.2.2. TYPE values
|
626
|
+
|
627
|
+
TYPE fields are used in resource records. Note that these types are a
|
628
|
+
subset of QTYPEs.
|
629
|
+
|
630
|
+
TYPE value and meaning
|
631
|
+
|
632
|
+
A 1 a host address
|
633
|
+
|
634
|
+
NS 2 an authoritative name server
|
635
|
+
|
636
|
+
MD 3 a mail destination (Obsolete - use MX)
|
637
|
+
|
638
|
+
MF 4 a mail forwarder (Obsolete - use MX)
|
639
|
+
|
640
|
+
CNAME 5 the canonical name for an alias
|
641
|
+
|
642
|
+
SOA 6 marks the start of a zone of authority
|
643
|
+
|
644
|
+
MB 7 a mailbox domain name (EXPERIMENTAL)
|
645
|
+
|
646
|
+
MG 8 a mail group member (EXPERIMENTAL)
|
647
|
+
|
648
|
+
MR 9 a mail rename domain name (EXPERIMENTAL)
|
649
|
+
|
650
|
+
NULL 10 a null RR (EXPERIMENTAL)
|
651
|
+
|
652
|
+
WKS 11 a well known service description
|
653
|
+
|
654
|
+
PTR 12 a domain name pointer
|
655
|
+
|
656
|
+
HINFO 13 host information
|
657
|
+
|
658
|
+
MINFO 14 mailbox or mail list information
|
659
|
+
|
660
|
+
MX 15 mail exchange
|
661
|
+
|
662
|
+
TXT 16 text strings
|
663
|
+
|
664
|
+
3.2.3. QTYPE values
|
665
|
+
|
666
|
+
QTYPE fields appear in the question part of a query. QTYPES are a
|
667
|
+
superset of TYPEs, hence all TYPEs are valid QTYPEs. In addition, the
|
668
|
+
following QTYPEs are defined:
|
669
|
+
|
670
|
+
|
671
|
+
|
672
|
+
Mockapetris [Page 12]
|
673
|
+
|
674
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
675
|
+
|
676
|
+
|
677
|
+
AXFR 252 A request for a transfer of an entire zone
|
678
|
+
|
679
|
+
MAILB 253 A request for mailbox-related records (MB, MG or MR)
|
680
|
+
|
681
|
+
MAILA 254 A request for mail agent RRs (Obsolete - see MX)
|
682
|
+
|
683
|
+
* 255 A request for all records
|
684
|
+
|
685
|
+
3.2.4. CLASS values
|
686
|
+
|
687
|
+
CLASS fields appear in resource records. The following CLASS mnemonics
|
688
|
+
and values are defined:
|
689
|
+
|
690
|
+
IN 1 the Internet
|
691
|
+
|
692
|
+
CS 2 the CSNET class (Obsolete - used only for examples in
|
693
|
+
some obsolete RFCs)
|
694
|
+
|
695
|
+
CH 3 the CHAOS class
|
696
|
+
|
697
|
+
HS 4 Hesiod [Dyer 87]
|
698
|
+
|
699
|
+
3.2.5. QCLASS values
|
700
|
+
|
701
|
+
QCLASS fields appear in the question section of a query. QCLASS values
|
702
|
+
are a superset of CLASS values; every CLASS is a valid QCLASS. In
|
703
|
+
addition to CLASS values, the following QCLASSes are defined:
|
704
|
+
|
705
|
+
* 255 any class
|
706
|
+
|
707
|
+
3.3. Standard RRs
|
708
|
+
|
709
|
+
The following RR definitions are expected to occur, at least
|
710
|
+
potentially, in all classes. In particular, NS, SOA, CNAME, and PTR
|
711
|
+
will be used in all classes, and have the same format in all classes.
|
712
|
+
Because their RDATA format is known, all domain names in the RDATA
|
713
|
+
section of these RRs may be compressed.
|
714
|
+
|
715
|
+
<domain-name> is a domain name represented as a series of labels, and
|
716
|
+
terminated by a label with zero length. <character-string> is a single
|
717
|
+
length octet followed by that number of characters. <character-string>
|
718
|
+
is treated as binary information, and can be up to 256 characters in
|
719
|
+
length (including the length octet).
|
720
|
+
|
721
|
+
|
722
|
+
|
723
|
+
|
724
|
+
|
725
|
+
|
726
|
+
|
727
|
+
|
728
|
+
Mockapetris [Page 13]
|
729
|
+
|
730
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
731
|
+
|
732
|
+
|
733
|
+
3.3.1. CNAME RDATA format
|
734
|
+
|
735
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
736
|
+
/ CNAME /
|
737
|
+
/ /
|
738
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
739
|
+
|
740
|
+
where:
|
741
|
+
|
742
|
+
CNAME A <domain-name> which specifies the canonical or primary
|
743
|
+
name for the owner. The owner name is an alias.
|
744
|
+
|
745
|
+
CNAME RRs cause no additional section processing, but name servers may
|
746
|
+
choose to restart the query at the canonical name in certain cases. See
|
747
|
+
the description of name server logic in [RFC-1034] for details.
|
748
|
+
|
749
|
+
3.3.2. HINFO RDATA format
|
750
|
+
|
751
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
752
|
+
/ CPU /
|
753
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
754
|
+
/ OS /
|
755
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
756
|
+
|
757
|
+
where:
|
758
|
+
|
759
|
+
CPU A <character-string> which specifies the CPU type.
|
760
|
+
|
761
|
+
OS A <character-string> which specifies the operating
|
762
|
+
system type.
|
763
|
+
|
764
|
+
Standard values for CPU and OS can be found in [RFC-1010].
|
765
|
+
|
766
|
+
HINFO records are used to acquire general information about a host. The
|
767
|
+
main use is for protocols such as FTP that can use special procedures
|
768
|
+
when talking between machines or operating systems of the same type.
|
769
|
+
|
770
|
+
3.3.3. MB RDATA format (EXPERIMENTAL)
|
771
|
+
|
772
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
773
|
+
/ MADNAME /
|
774
|
+
/ /
|
775
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
776
|
+
|
777
|
+
where:
|
778
|
+
|
779
|
+
MADNAME A <domain-name> which specifies a host which has the
|
780
|
+
specified mailbox.
|
781
|
+
|
782
|
+
|
783
|
+
|
784
|
+
Mockapetris [Page 14]
|
785
|
+
|
786
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
787
|
+
|
788
|
+
|
789
|
+
MB records cause additional section processing which looks up an A type
|
790
|
+
RRs corresponding to MADNAME.
|
791
|
+
|
792
|
+
3.3.4. MD RDATA format (Obsolete)
|
793
|
+
|
794
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
795
|
+
/ MADNAME /
|
796
|
+
/ /
|
797
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
798
|
+
|
799
|
+
where:
|
800
|
+
|
801
|
+
MADNAME A <domain-name> which specifies a host which has a mail
|
802
|
+
agent for the domain which should be able to deliver
|
803
|
+
mail for the domain.
|
804
|
+
|
805
|
+
MD records cause additional section processing which looks up an A type
|
806
|
+
record corresponding to MADNAME.
|
807
|
+
|
808
|
+
MD is obsolete. See the definition of MX and [RFC-974] for details of
|
809
|
+
the new scheme. The recommended policy for dealing with MD RRs found in
|
810
|
+
a master file is to reject them, or to convert them to MX RRs with a
|
811
|
+
preference of 0.
|
812
|
+
|
813
|
+
3.3.5. MF RDATA format (Obsolete)
|
814
|
+
|
815
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
816
|
+
/ MADNAME /
|
817
|
+
/ /
|
818
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
819
|
+
|
820
|
+
where:
|
821
|
+
|
822
|
+
MADNAME A <domain-name> which specifies a host which has a mail
|
823
|
+
agent for the domain which will accept mail for
|
824
|
+
forwarding to the domain.
|
825
|
+
|
826
|
+
MF records cause additional section processing which looks up an A type
|
827
|
+
record corresponding to MADNAME.
|
828
|
+
|
829
|
+
MF is obsolete. See the definition of MX and [RFC-974] for details ofw
|
830
|
+
the new scheme. The recommended policy for dealing with MD RRs found in
|
831
|
+
a master file is to reject them, or to convert them to MX RRs with a
|
832
|
+
preference of 10.
|
833
|
+
|
834
|
+
|
835
|
+
|
836
|
+
|
837
|
+
|
838
|
+
|
839
|
+
|
840
|
+
Mockapetris [Page 15]
|
841
|
+
|
842
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
843
|
+
|
844
|
+
|
845
|
+
3.3.6. MG RDATA format (EXPERIMENTAL)
|
846
|
+
|
847
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
848
|
+
/ MGMNAME /
|
849
|
+
/ /
|
850
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
851
|
+
|
852
|
+
where:
|
853
|
+
|
854
|
+
MGMNAME A <domain-name> which specifies a mailbox which is a
|
855
|
+
member of the mail group specified by the domain name.
|
856
|
+
|
857
|
+
MG records cause no additional section processing.
|
858
|
+
|
859
|
+
3.3.7. MINFO RDATA format (EXPERIMENTAL)
|
860
|
+
|
861
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
862
|
+
/ RMAILBX /
|
863
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
864
|
+
/ EMAILBX /
|
865
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
866
|
+
|
867
|
+
where:
|
868
|
+
|
869
|
+
RMAILBX A <domain-name> which specifies a mailbox which is
|
870
|
+
responsible for the mailing list or mailbox. If this
|
871
|
+
domain name names the root, the owner of the MINFO RR is
|
872
|
+
responsible for itself. Note that many existing mailing
|
873
|
+
lists use a mailbox X-request for the RMAILBX field of
|
874
|
+
mailing list X, e.g., Msgroup-request for Msgroup. This
|
875
|
+
field provides a more general mechanism.
|
876
|
+
|
877
|
+
|
878
|
+
EMAILBX A <domain-name> which specifies a mailbox which is to
|
879
|
+
receive error messages related to the mailing list or
|
880
|
+
mailbox specified by the owner of the MINFO RR (similar
|
881
|
+
to the ERRORS-TO: field which has been proposed). If
|
882
|
+
this domain name names the root, errors should be
|
883
|
+
returned to the sender of the message.
|
884
|
+
|
885
|
+
MINFO records cause no additional section processing. Although these
|
886
|
+
records can be associated with a simple mailbox, they are usually used
|
887
|
+
with a mailing list.
|
888
|
+
|
889
|
+
|
890
|
+
|
891
|
+
|
892
|
+
|
893
|
+
|
894
|
+
|
895
|
+
|
896
|
+
Mockapetris [Page 16]
|
897
|
+
|
898
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
899
|
+
|
900
|
+
|
901
|
+
3.3.8. MR RDATA format (EXPERIMENTAL)
|
902
|
+
|
903
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
904
|
+
/ NEWNAME /
|
905
|
+
/ /
|
906
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
907
|
+
|
908
|
+
where:
|
909
|
+
|
910
|
+
NEWNAME A <domain-name> which specifies a mailbox which is the
|
911
|
+
proper rename of the specified mailbox.
|
912
|
+
|
913
|
+
MR records cause no additional section processing. The main use for MR
|
914
|
+
is as a forwarding entry for a user who has moved to a different
|
915
|
+
mailbox.
|
916
|
+
|
917
|
+
3.3.9. MX RDATA format
|
918
|
+
|
919
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
920
|
+
| PREFERENCE |
|
921
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
922
|
+
/ EXCHANGE /
|
923
|
+
/ /
|
924
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
925
|
+
|
926
|
+
where:
|
927
|
+
|
928
|
+
PREFERENCE A 16 bit integer which specifies the preference given to
|
929
|
+
this RR among others at the same owner. Lower values
|
930
|
+
are preferred.
|
931
|
+
|
932
|
+
EXCHANGE A <domain-name> which specifies a host willing to act as
|
933
|
+
a mail exchange for the owner name.
|
934
|
+
|
935
|
+
MX records cause type A additional section processing for the host
|
936
|
+
specified by EXCHANGE. The use of MX RRs is explained in detail in
|
937
|
+
[RFC-974].
|
938
|
+
|
939
|
+
3.3.10. NULL RDATA format (EXPERIMENTAL)
|
940
|
+
|
941
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
942
|
+
/ <anything> /
|
943
|
+
/ /
|
944
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
945
|
+
|
946
|
+
Anything at all may be in the RDATA field so long as it is 65535 octets
|
947
|
+
or less.
|
948
|
+
|
949
|
+
|
950
|
+
|
951
|
+
|
952
|
+
Mockapetris [Page 17]
|
953
|
+
|
954
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
955
|
+
|
956
|
+
|
957
|
+
NULL records cause no additional section processing. NULL RRs are not
|
958
|
+
allowed in master files. NULLs are used as placeholders in some
|
959
|
+
experimental extensions of the DNS.
|
960
|
+
|
961
|
+
3.3.11. NS RDATA format
|
962
|
+
|
963
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
964
|
+
/ NSDNAME /
|
965
|
+
/ /
|
966
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
967
|
+
|
968
|
+
where:
|
969
|
+
|
970
|
+
NSDNAME A <domain-name> which specifies a host which should be
|
971
|
+
authoritative for the specified class and domain.
|
972
|
+
|
973
|
+
NS records cause both the usual additional section processing to locate
|
974
|
+
a type A record, and, when used in a referral, a special search of the
|
975
|
+
zone in which they reside for glue information.
|
976
|
+
|
977
|
+
The NS RR states that the named host should be expected to have a zone
|
978
|
+
starting at owner name of the specified class. Note that the class may
|
979
|
+
not indicate the protocol family which should be used to communicate
|
980
|
+
with the host, although it is typically a strong hint. For example,
|
981
|
+
hosts which are name servers for either Internet (IN) or Hesiod (HS)
|
982
|
+
class information are normally queried using IN class protocols.
|
983
|
+
|
984
|
+
3.3.12. PTR RDATA format
|
985
|
+
|
986
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
987
|
+
/ PTRDNAME /
|
988
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
989
|
+
|
990
|
+
where:
|
991
|
+
|
992
|
+
PTRDNAME A <domain-name> which points to some location in the
|
993
|
+
domain name space.
|
994
|
+
|
995
|
+
PTR records cause no additional section processing. These RRs are used
|
996
|
+
in special domains to point to some other location in the domain space.
|
997
|
+
These records are simple data, and don't imply any special processing
|
998
|
+
similar to that performed by CNAME, which identifies aliases. See the
|
999
|
+
description of the IN-ADDR.ARPA domain for an example.
|
1000
|
+
|
1001
|
+
|
1002
|
+
|
1003
|
+
|
1004
|
+
|
1005
|
+
|
1006
|
+
|
1007
|
+
|
1008
|
+
Mockapetris [Page 18]
|
1009
|
+
|
1010
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1011
|
+
|
1012
|
+
|
1013
|
+
3.3.13. SOA RDATA format
|
1014
|
+
|
1015
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1016
|
+
/ MNAME /
|
1017
|
+
/ /
|
1018
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1019
|
+
/ RNAME /
|
1020
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1021
|
+
| SERIAL |
|
1022
|
+
| |
|
1023
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1024
|
+
| REFRESH |
|
1025
|
+
| |
|
1026
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1027
|
+
| RETRY |
|
1028
|
+
| |
|
1029
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1030
|
+
| EXPIRE |
|
1031
|
+
| |
|
1032
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1033
|
+
| MINIMUM |
|
1034
|
+
| |
|
1035
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1036
|
+
|
1037
|
+
where:
|
1038
|
+
|
1039
|
+
MNAME The <domain-name> of the name server that was the
|
1040
|
+
original or primary source of data for this zone.
|
1041
|
+
|
1042
|
+
RNAME A <domain-name> which specifies the mailbox of the
|
1043
|
+
person responsible for this zone.
|
1044
|
+
|
1045
|
+
SERIAL The unsigned 32 bit version number of the original copy
|
1046
|
+
of the zone. Zone transfers preserve this value. This
|
1047
|
+
value wraps and should be compared using sequence space
|
1048
|
+
arithmetic.
|
1049
|
+
|
1050
|
+
REFRESH A 32 bit time interval before the zone should be
|
1051
|
+
refreshed.
|
1052
|
+
|
1053
|
+
RETRY A 32 bit time interval that should elapse before a
|
1054
|
+
failed refresh should be retried.
|
1055
|
+
|
1056
|
+
EXPIRE A 32 bit time value that specifies the upper limit on
|
1057
|
+
the time interval that can elapse before the zone is no
|
1058
|
+
longer authoritative.
|
1059
|
+
|
1060
|
+
|
1061
|
+
|
1062
|
+
|
1063
|
+
|
1064
|
+
Mockapetris [Page 19]
|
1065
|
+
|
1066
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1067
|
+
|
1068
|
+
|
1069
|
+
MINIMUM The unsigned 32 bit minimum TTL field that should be
|
1070
|
+
exported with any RR from this zone.
|
1071
|
+
|
1072
|
+
SOA records cause no additional section processing.
|
1073
|
+
|
1074
|
+
All times are in units of seconds.
|
1075
|
+
|
1076
|
+
Most of these fields are pertinent only for name server maintenance
|
1077
|
+
operations. However, MINIMUM is used in all query operations that
|
1078
|
+
retrieve RRs from a zone. Whenever a RR is sent in a response to a
|
1079
|
+
query, the TTL field is set to the maximum of the TTL field from the RR
|
1080
|
+
and the MINIMUM field in the appropriate SOA. Thus MINIMUM is a lower
|
1081
|
+
bound on the TTL field for all RRs in a zone. Note that this use of
|
1082
|
+
MINIMUM should occur when the RRs are copied into the response and not
|
1083
|
+
when the zone is loaded from a master file or via a zone transfer. The
|
1084
|
+
reason for this provison is to allow future dynamic update facilities to
|
1085
|
+
change the SOA RR with known semantics.
|
1086
|
+
|
1087
|
+
|
1088
|
+
3.3.14. TXT RDATA format
|
1089
|
+
|
1090
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1091
|
+
/ TXT-DATA /
|
1092
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1093
|
+
|
1094
|
+
where:
|
1095
|
+
|
1096
|
+
TXT-DATA One or more <character-string>s.
|
1097
|
+
|
1098
|
+
TXT RRs are used to hold descriptive text. The semantics of the text
|
1099
|
+
depends on the domain where it is found.
|
1100
|
+
|
1101
|
+
3.4. Internet specific RRs
|
1102
|
+
|
1103
|
+
3.4.1. A RDATA format
|
1104
|
+
|
1105
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1106
|
+
| ADDRESS |
|
1107
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1108
|
+
|
1109
|
+
where:
|
1110
|
+
|
1111
|
+
ADDRESS A 32 bit Internet address.
|
1112
|
+
|
1113
|
+
Hosts that have multiple Internet addresses will have multiple A
|
1114
|
+
records.
|
1115
|
+
|
1116
|
+
|
1117
|
+
|
1118
|
+
|
1119
|
+
|
1120
|
+
Mockapetris [Page 20]
|
1121
|
+
|
1122
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1123
|
+
|
1124
|
+
|
1125
|
+
A records cause no additional section processing. The RDATA section of
|
1126
|
+
an A line in a master file is an Internet address expressed as four
|
1127
|
+
decimal numbers separated by dots without any imbedded spaces (e.g.,
|
1128
|
+
"10.2.0.52" or "192.0.5.6").
|
1129
|
+
|
1130
|
+
3.4.2. WKS RDATA format
|
1131
|
+
|
1132
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1133
|
+
| ADDRESS |
|
1134
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1135
|
+
| PROTOCOL | |
|
1136
|
+
+--+--+--+--+--+--+--+--+ |
|
1137
|
+
| |
|
1138
|
+
/ <BIT MAP> /
|
1139
|
+
/ /
|
1140
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1141
|
+
|
1142
|
+
where:
|
1143
|
+
|
1144
|
+
ADDRESS An 32 bit Internet address
|
1145
|
+
|
1146
|
+
PROTOCOL An 8 bit IP protocol number
|
1147
|
+
|
1148
|
+
<BIT MAP> A variable length bit map. The bit map must be a
|
1149
|
+
multiple of 8 bits long.
|
1150
|
+
|
1151
|
+
The WKS record is used to describe the well known services supported by
|
1152
|
+
a particular protocol on a particular internet address. The PROTOCOL
|
1153
|
+
field specifies an IP protocol number, and the bit map has one bit per
|
1154
|
+
port of the specified protocol. The first bit corresponds to port 0,
|
1155
|
+
the second to port 1, etc. If the bit map does not include a bit for a
|
1156
|
+
protocol of interest, that bit is assumed zero. The appropriate values
|
1157
|
+
and mnemonics for ports and protocols are specified in [RFC-1010].
|
1158
|
+
|
1159
|
+
For example, if PROTOCOL=TCP (6), the 26th bit corresponds to TCP port
|
1160
|
+
25 (SMTP). If this bit is set, a SMTP server should be listening on TCP
|
1161
|
+
port 25; if zero, SMTP service is not supported on the specified
|
1162
|
+
address.
|
1163
|
+
|
1164
|
+
The purpose of WKS RRs is to provide availability information for
|
1165
|
+
servers for TCP and UDP. If a server supports both TCP and UDP, or has
|
1166
|
+
multiple Internet addresses, then multiple WKS RRs are used.
|
1167
|
+
|
1168
|
+
WKS RRs cause no additional section processing.
|
1169
|
+
|
1170
|
+
In master files, both ports and protocols are expressed using mnemonics
|
1171
|
+
or decimal numbers.
|
1172
|
+
|
1173
|
+
|
1174
|
+
|
1175
|
+
|
1176
|
+
Mockapetris [Page 21]
|
1177
|
+
|
1178
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1179
|
+
|
1180
|
+
|
1181
|
+
3.5. IN-ADDR.ARPA domain
|
1182
|
+
|
1183
|
+
The Internet uses a special domain to support gateway location and
|
1184
|
+
Internet address to host mapping. Other classes may employ a similar
|
1185
|
+
strategy in other domains. The intent of this domain is to provide a
|
1186
|
+
guaranteed method to perform host address to host name mapping, and to
|
1187
|
+
facilitate queries to locate all gateways on a particular network in the
|
1188
|
+
Internet.
|
1189
|
+
|
1190
|
+
Note that both of these services are similar to functions that could be
|
1191
|
+
performed by inverse queries; the difference is that this part of the
|
1192
|
+
domain name space is structured according to address, and hence can
|
1193
|
+
guarantee that the appropriate data can be located without an exhaustive
|
1194
|
+
search of the domain space.
|
1195
|
+
|
1196
|
+
The domain begins at IN-ADDR.ARPA and has a substructure which follows
|
1197
|
+
the Internet addressing structure.
|
1198
|
+
|
1199
|
+
Domain names in the IN-ADDR.ARPA domain are defined to have up to four
|
1200
|
+
labels in addition to the IN-ADDR.ARPA suffix. Each label represents
|
1201
|
+
one octet of an Internet address, and is expressed as a character string
|
1202
|
+
for a decimal value in the range 0-255 (with leading zeros omitted
|
1203
|
+
except in the case of a zero octet which is represented by a single
|
1204
|
+
zero).
|
1205
|
+
|
1206
|
+
Host addresses are represented by domain names that have all four labels
|
1207
|
+
specified. Thus data for Internet address 10.2.0.52 is located at
|
1208
|
+
domain name 52.0.2.10.IN-ADDR.ARPA. The reversal, though awkward to
|
1209
|
+
read, allows zones to be delegated which are exactly one network of
|
1210
|
+
address space. For example, 10.IN-ADDR.ARPA can be a zone containing
|
1211
|
+
data for the ARPANET, while 26.IN-ADDR.ARPA can be a separate zone for
|
1212
|
+
MILNET. Address nodes are used to hold pointers to primary host names
|
1213
|
+
in the normal domain space.
|
1214
|
+
|
1215
|
+
Network numbers correspond to some non-terminal nodes at various depths
|
1216
|
+
in the IN-ADDR.ARPA domain, since Internet network numbers are either 1,
|
1217
|
+
2, or 3 octets. Network nodes are used to hold pointers to the primary
|
1218
|
+
host names of gateways attached to that network. Since a gateway is, by
|
1219
|
+
definition, on more than one network, it will typically have two or more
|
1220
|
+
network nodes which point at it. Gateways will also have host level
|
1221
|
+
pointers at their fully qualified addresses.
|
1222
|
+
|
1223
|
+
Both the gateway pointers at network nodes and the normal host pointers
|
1224
|
+
at full address nodes use the PTR RR to point back to the primary domain
|
1225
|
+
names of the corresponding hosts.
|
1226
|
+
|
1227
|
+
For example, the IN-ADDR.ARPA domain will contain information about the
|
1228
|
+
ISI gateway between net 10 and 26, an MIT gateway from net 10 to MIT's
|
1229
|
+
|
1230
|
+
|
1231
|
+
|
1232
|
+
Mockapetris [Page 22]
|
1233
|
+
|
1234
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1235
|
+
|
1236
|
+
|
1237
|
+
net 18, and hosts A.ISI.EDU and MULTICS.MIT.EDU. Assuming that ISI
|
1238
|
+
gateway has addresses 10.2.0.22 and 26.0.0.103, and a name MILNET-
|
1239
|
+
GW.ISI.EDU, and the MIT gateway has addresses 10.0.0.77 and 18.10.0.4
|
1240
|
+
and a name GW.LCS.MIT.EDU, the domain database would contain:
|
1241
|
+
|
1242
|
+
10.IN-ADDR.ARPA. PTR MILNET-GW.ISI.EDU.
|
1243
|
+
10.IN-ADDR.ARPA. PTR GW.LCS.MIT.EDU.
|
1244
|
+
18.IN-ADDR.ARPA. PTR GW.LCS.MIT.EDU.
|
1245
|
+
26.IN-ADDR.ARPA. PTR MILNET-GW.ISI.EDU.
|
1246
|
+
22.0.2.10.IN-ADDR.ARPA. PTR MILNET-GW.ISI.EDU.
|
1247
|
+
103.0.0.26.IN-ADDR.ARPA. PTR MILNET-GW.ISI.EDU.
|
1248
|
+
77.0.0.10.IN-ADDR.ARPA. PTR GW.LCS.MIT.EDU.
|
1249
|
+
4.0.10.18.IN-ADDR.ARPA. PTR GW.LCS.MIT.EDU.
|
1250
|
+
103.0.3.26.IN-ADDR.ARPA. PTR A.ISI.EDU.
|
1251
|
+
6.0.0.10.IN-ADDR.ARPA. PTR MULTICS.MIT.EDU.
|
1252
|
+
|
1253
|
+
Thus a program which wanted to locate gateways on net 10 would originate
|
1254
|
+
a query of the form QTYPE=PTR, QCLASS=IN, QNAME=10.IN-ADDR.ARPA. It
|
1255
|
+
would receive two RRs in response:
|
1256
|
+
|
1257
|
+
10.IN-ADDR.ARPA. PTR MILNET-GW.ISI.EDU.
|
1258
|
+
10.IN-ADDR.ARPA. PTR GW.LCS.MIT.EDU.
|
1259
|
+
|
1260
|
+
The program could then originate QTYPE=A, QCLASS=IN queries for MILNET-
|
1261
|
+
GW.ISI.EDU. and GW.LCS.MIT.EDU. to discover the Internet addresses of
|
1262
|
+
these gateways.
|
1263
|
+
|
1264
|
+
A resolver which wanted to find the host name corresponding to Internet
|
1265
|
+
host address 10.0.0.6 would pursue a query of the form QTYPE=PTR,
|
1266
|
+
QCLASS=IN, QNAME=6.0.0.10.IN-ADDR.ARPA, and would receive:
|
1267
|
+
|
1268
|
+
6.0.0.10.IN-ADDR.ARPA. PTR MULTICS.MIT.EDU.
|
1269
|
+
|
1270
|
+
Several cautions apply to the use of these services:
|
1271
|
+
- Since the IN-ADDR.ARPA special domain and the normal domain
|
1272
|
+
for a particular host or gateway will be in different zones,
|
1273
|
+
the possibility exists that that the data may be inconsistent.
|
1274
|
+
|
1275
|
+
- Gateways will often have two names in separate domains, only
|
1276
|
+
one of which can be primary.
|
1277
|
+
|
1278
|
+
- Systems that use the domain database to initialize their
|
1279
|
+
routing tables must start with enough gateway information to
|
1280
|
+
guarantee that they can access the appropriate name server.
|
1281
|
+
|
1282
|
+
- The gateway data only reflects the existence of a gateway in a
|
1283
|
+
manner equivalent to the current HOSTS.TXT file. It doesn't
|
1284
|
+
replace the dynamic availability information from GGP or EGP.
|
1285
|
+
|
1286
|
+
|
1287
|
+
|
1288
|
+
Mockapetris [Page 23]
|
1289
|
+
|
1290
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1291
|
+
|
1292
|
+
|
1293
|
+
3.6. Defining new types, classes, and special namespaces
|
1294
|
+
|
1295
|
+
The previously defined types and classes are the ones in use as of the
|
1296
|
+
date of this memo. New definitions should be expected. This section
|
1297
|
+
makes some recommendations to designers considering additions to the
|
1298
|
+
existing facilities. The mailing list NAMEDROPPERS@SRI-NIC.ARPA is the
|
1299
|
+
forum where general discussion of design issues takes place.
|
1300
|
+
|
1301
|
+
In general, a new type is appropriate when new information is to be
|
1302
|
+
added to the database about an existing object, or we need new data
|
1303
|
+
formats for some totally new object. Designers should accept to define
|
1304
|
+
types and their RDATA formats that are generally applicable to all
|
1305
|
+
classes, and which avoid duplication of information. New classes are
|
1306
|
+
appropriate when the DNS is to be used for a new protocol, etc which
|
1307
|
+
requires new class-specific data formats, or when a copy of the existing
|
1308
|
+
name space is desired, but a separate management domain is necessary.
|
1309
|
+
|
1310
|
+
New types and classes need mnemonics for master files; the format of the
|
1311
|
+
master files requires that the mnemonics for type and class be disjoint.
|
1312
|
+
|
1313
|
+
TYPE and CLASS values must be a proper subset of QTYPEs and QCLASSes
|
1314
|
+
respectively.
|
1315
|
+
|
1316
|
+
The present system uses multiple RRs to represent multiple values of a
|
1317
|
+
type rather than storing multiple values in the RDATA section of a
|
1318
|
+
single RR. This is less efficient for most applications, but does keep
|
1319
|
+
RRs shorter. The multiple RRs assumption is incorporated in some
|
1320
|
+
experimental work on dynamic update methods.
|
1321
|
+
|
1322
|
+
The present system attempts to minimize the duplication of data in the
|
1323
|
+
database in order to insure consistency. Thus, in order to find the
|
1324
|
+
address of the host for a mail exchange, you map the mail domain name to
|
1325
|
+
a host name, then the host name to addresses, rather than a direct
|
1326
|
+
mapping to host address. This approach is preferred because it avoids
|
1327
|
+
the opportunity for inconsistency.
|
1328
|
+
|
1329
|
+
In defining a new type of data, multiple RR types should not be used to
|
1330
|
+
create an ordering between entries or express different formats for
|
1331
|
+
equivalent bindings, instead this information should be carried in the
|
1332
|
+
body of the RR and a single type used. This policy avoids problems with
|
1333
|
+
caching multiple types and defining QTYPEs to match multiple types.
|
1334
|
+
|
1335
|
+
For example, the original form of mail exchange binding used two RR
|
1336
|
+
types one to represent a "closer" exchange (MD) and one to represent a
|
1337
|
+
"less close" exchange (MF). The difficulty is that the presence of one
|
1338
|
+
RR type in a cache doesn't convey any information about the other
|
1339
|
+
because the query which acquired the cached information might have used
|
1340
|
+
a QTYPE of MF, MD, or MAILA (which matched both). The redesigned
|
1341
|
+
|
1342
|
+
|
1343
|
+
|
1344
|
+
Mockapetris [Page 24]
|
1345
|
+
|
1346
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1347
|
+
|
1348
|
+
|
1349
|
+
service used a single type (MX) with a "preference" value in the RDATA
|
1350
|
+
section which can order different RRs. However, if any MX RRs are found
|
1351
|
+
in the cache, then all should be there.
|
1352
|
+
|
1353
|
+
4. MESSAGES
|
1354
|
+
|
1355
|
+
4.1. Format
|
1356
|
+
|
1357
|
+
All communications inside of the domain protocol are carried in a single
|
1358
|
+
format called a message. The top level format of message is divided
|
1359
|
+
into 5 sections (some of which are empty in certain cases) shown below:
|
1360
|
+
|
1361
|
+
+---------------------+
|
1362
|
+
| Header |
|
1363
|
+
+---------------------+
|
1364
|
+
| Question | the question for the name server
|
1365
|
+
+---------------------+
|
1366
|
+
| Answer | RRs answering the question
|
1367
|
+
+---------------------+
|
1368
|
+
| Authority | RRs pointing toward an authority
|
1369
|
+
+---------------------+
|
1370
|
+
| Additional | RRs holding additional information
|
1371
|
+
+---------------------+
|
1372
|
+
|
1373
|
+
The header section is always present. The header includes fields that
|
1374
|
+
specify which of the remaining sections are present, and also specify
|
1375
|
+
whether the message is a query or a response, a standard query or some
|
1376
|
+
other opcode, etc.
|
1377
|
+
|
1378
|
+
The names of the sections after the header are derived from their use in
|
1379
|
+
standard queries. The question section contains fields that describe a
|
1380
|
+
question to a name server. These fields are a query type (QTYPE), a
|
1381
|
+
query class (QCLASS), and a query domain name (QNAME). The last three
|
1382
|
+
sections have the same format: a possibly empty list of concatenated
|
1383
|
+
resource records (RRs). The answer section contains RRs that answer the
|
1384
|
+
question; the authority section contains RRs that point toward an
|
1385
|
+
authoritative name server; the additional records section contains RRs
|
1386
|
+
which relate to the query, but are not strictly answers for the
|
1387
|
+
question.
|
1388
|
+
|
1389
|
+
|
1390
|
+
|
1391
|
+
|
1392
|
+
|
1393
|
+
|
1394
|
+
|
1395
|
+
|
1396
|
+
|
1397
|
+
|
1398
|
+
|
1399
|
+
|
1400
|
+
Mockapetris [Page 25]
|
1401
|
+
|
1402
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1403
|
+
|
1404
|
+
|
1405
|
+
4.1.1. Header section format
|
1406
|
+
|
1407
|
+
The header contains the following fields:
|
1408
|
+
|
1409
|
+
1 1 1 1 1 1
|
1410
|
+
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
|
1411
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1412
|
+
| ID |
|
1413
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1414
|
+
|QR| Opcode |AA|TC|RD|RA| Z | RCODE |
|
1415
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1416
|
+
| QDCOUNT |
|
1417
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1418
|
+
| ANCOUNT |
|
1419
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1420
|
+
| NSCOUNT |
|
1421
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1422
|
+
| ARCOUNT |
|
1423
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1424
|
+
|
1425
|
+
where:
|
1426
|
+
|
1427
|
+
ID A 16 bit identifier assigned by the program that
|
1428
|
+
generates any kind of query. This identifier is copied
|
1429
|
+
the corresponding reply and can be used by the requester
|
1430
|
+
to match up replies to outstanding queries.
|
1431
|
+
|
1432
|
+
QR A one bit field that specifies whether this message is a
|
1433
|
+
query (0), or a response (1).
|
1434
|
+
|
1435
|
+
OPCODE A four bit field that specifies kind of query in this
|
1436
|
+
message. This value is set by the originator of a query
|
1437
|
+
and copied into the response. The values are:
|
1438
|
+
|
1439
|
+
0 a standard query (QUERY)
|
1440
|
+
|
1441
|
+
1 an inverse query (IQUERY)
|
1442
|
+
|
1443
|
+
2 a server status request (STATUS)
|
1444
|
+
|
1445
|
+
3-15 reserved for future use
|
1446
|
+
|
1447
|
+
AA Authoritative Answer - this bit is valid in responses,
|
1448
|
+
and specifies that the responding name server is an
|
1449
|
+
authority for the domain name in question section.
|
1450
|
+
|
1451
|
+
Note that the contents of the answer section may have
|
1452
|
+
multiple owner names because of aliases. The AA bit
|
1453
|
+
|
1454
|
+
|
1455
|
+
|
1456
|
+
Mockapetris [Page 26]
|
1457
|
+
|
1458
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1459
|
+
|
1460
|
+
|
1461
|
+
corresponds to the name which matches the query name, or
|
1462
|
+
the first owner name in the answer section.
|
1463
|
+
|
1464
|
+
TC TrunCation - specifies that this message was truncated
|
1465
|
+
due to length greater than that permitted on the
|
1466
|
+
transmission channel.
|
1467
|
+
|
1468
|
+
RD Recursion Desired - this bit may be set in a query and
|
1469
|
+
is copied into the response. If RD is set, it directs
|
1470
|
+
the name server to pursue the query recursively.
|
1471
|
+
Recursive query support is optional.
|
1472
|
+
|
1473
|
+
RA Recursion Available - this be is set or cleared in a
|
1474
|
+
response, and denotes whether recursive query support is
|
1475
|
+
available in the name server.
|
1476
|
+
|
1477
|
+
Z Reserved for future use. Must be zero in all queries
|
1478
|
+
and responses.
|
1479
|
+
|
1480
|
+
RCODE Response code - this 4 bit field is set as part of
|
1481
|
+
responses. The values have the following
|
1482
|
+
interpretation:
|
1483
|
+
|
1484
|
+
0 No error condition
|
1485
|
+
|
1486
|
+
1 Format error - The name server was
|
1487
|
+
unable to interpret the query.
|
1488
|
+
|
1489
|
+
2 Server failure - The name server was
|
1490
|
+
unable to process this query due to a
|
1491
|
+
problem with the name server.
|
1492
|
+
|
1493
|
+
3 Name Error - Meaningful only for
|
1494
|
+
responses from an authoritative name
|
1495
|
+
server, this code signifies that the
|
1496
|
+
domain name referenced in the query does
|
1497
|
+
not exist.
|
1498
|
+
|
1499
|
+
4 Not Implemented - The name server does
|
1500
|
+
not support the requested kind of query.
|
1501
|
+
|
1502
|
+
5 Refused - The name server refuses to
|
1503
|
+
perform the specified operation for
|
1504
|
+
policy reasons. For example, a name
|
1505
|
+
server may not wish to provide the
|
1506
|
+
information to the particular requester,
|
1507
|
+
or a name server may not wish to perform
|
1508
|
+
a particular operation (e.g., zone
|
1509
|
+
|
1510
|
+
|
1511
|
+
|
1512
|
+
Mockapetris [Page 27]
|
1513
|
+
|
1514
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1515
|
+
|
1516
|
+
|
1517
|
+
transfer) for particular data.
|
1518
|
+
|
1519
|
+
6-15 Reserved for future use.
|
1520
|
+
|
1521
|
+
QDCOUNT an unsigned 16 bit integer specifying the number of
|
1522
|
+
entries in the question section.
|
1523
|
+
|
1524
|
+
ANCOUNT an unsigned 16 bit integer specifying the number of
|
1525
|
+
resource records in the answer section.
|
1526
|
+
|
1527
|
+
NSCOUNT an unsigned 16 bit integer specifying the number of name
|
1528
|
+
server resource records in the authority records
|
1529
|
+
section.
|
1530
|
+
|
1531
|
+
ARCOUNT an unsigned 16 bit integer specifying the number of
|
1532
|
+
resource records in the additional records section.
|
1533
|
+
|
1534
|
+
4.1.2. Question section format
|
1535
|
+
|
1536
|
+
The question section is used to carry the "question" in most queries,
|
1537
|
+
i.e., the parameters that define what is being asked. The section
|
1538
|
+
contains QDCOUNT (usually 1) entries, each of the following format:
|
1539
|
+
|
1540
|
+
1 1 1 1 1 1
|
1541
|
+
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
|
1542
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1543
|
+
| |
|
1544
|
+
/ QNAME /
|
1545
|
+
/ /
|
1546
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1547
|
+
| QTYPE |
|
1548
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1549
|
+
| QCLASS |
|
1550
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1551
|
+
|
1552
|
+
where:
|
1553
|
+
|
1554
|
+
QNAME a domain name represented as a sequence of labels, where
|
1555
|
+
each label consists of a length octet followed by that
|
1556
|
+
number of octets. The domain name terminates with the
|
1557
|
+
zero length octet for the null label of the root. Note
|
1558
|
+
that this field may be an odd number of octets; no
|
1559
|
+
padding is used.
|
1560
|
+
|
1561
|
+
QTYPE a two octet code which specifies the type of the query.
|
1562
|
+
The values for this field include all codes valid for a
|
1563
|
+
TYPE field, together with some more general codes which
|
1564
|
+
can match more than one type of RR.
|
1565
|
+
|
1566
|
+
|
1567
|
+
|
1568
|
+
Mockapetris [Page 28]
|
1569
|
+
|
1570
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1571
|
+
|
1572
|
+
|
1573
|
+
QCLASS a two octet code that specifies the class of the query.
|
1574
|
+
For example, the QCLASS field is IN for the Internet.
|
1575
|
+
|
1576
|
+
4.1.3. Resource record format
|
1577
|
+
|
1578
|
+
The answer, authority, and additional sections all share the same
|
1579
|
+
format: a variable number of resource records, where the number of
|
1580
|
+
records is specified in the corresponding count field in the header.
|
1581
|
+
Each resource record has the following format:
|
1582
|
+
1 1 1 1 1 1
|
1583
|
+
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
|
1584
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1585
|
+
| |
|
1586
|
+
/ /
|
1587
|
+
/ NAME /
|
1588
|
+
| |
|
1589
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1590
|
+
| TYPE |
|
1591
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1592
|
+
| CLASS |
|
1593
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1594
|
+
| TTL |
|
1595
|
+
| |
|
1596
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1597
|
+
| RDLENGTH |
|
1598
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|
|
1599
|
+
/ RDATA /
|
1600
|
+
/ /
|
1601
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1602
|
+
|
1603
|
+
where:
|
1604
|
+
|
1605
|
+
NAME a domain name to which this resource record pertains.
|
1606
|
+
|
1607
|
+
TYPE two octets containing one of the RR type codes. This
|
1608
|
+
field specifies the meaning of the data in the RDATA
|
1609
|
+
field.
|
1610
|
+
|
1611
|
+
CLASS two octets which specify the class of the data in the
|
1612
|
+
RDATA field.
|
1613
|
+
|
1614
|
+
TTL a 32 bit unsigned integer that specifies the time
|
1615
|
+
interval (in seconds) that the resource record may be
|
1616
|
+
cached before it should be discarded. Zero values are
|
1617
|
+
interpreted to mean that the RR can only be used for the
|
1618
|
+
transaction in progress, and should not be cached.
|
1619
|
+
|
1620
|
+
|
1621
|
+
|
1622
|
+
|
1623
|
+
|
1624
|
+
Mockapetris [Page 29]
|
1625
|
+
|
1626
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1627
|
+
|
1628
|
+
|
1629
|
+
RDLENGTH an unsigned 16 bit integer that specifies the length in
|
1630
|
+
octets of the RDATA field.
|
1631
|
+
|
1632
|
+
RDATA a variable length string of octets that describes the
|
1633
|
+
resource. The format of this information varies
|
1634
|
+
according to the TYPE and CLASS of the resource record.
|
1635
|
+
For example, the if the TYPE is A and the CLASS is IN,
|
1636
|
+
the RDATA field is a 4 octet ARPA Internet address.
|
1637
|
+
|
1638
|
+
4.1.4. Message compression
|
1639
|
+
|
1640
|
+
In order to reduce the size of messages, the domain system utilizes a
|
1641
|
+
compression scheme which eliminates the repetition of domain names in a
|
1642
|
+
message. In this scheme, an entire domain name or a list of labels at
|
1643
|
+
the end of a domain name is replaced with a pointer to a prior occurance
|
1644
|
+
of the same name.
|
1645
|
+
|
1646
|
+
The pointer takes the form of a two octet sequence:
|
1647
|
+
|
1648
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1649
|
+
| 1 1| OFFSET |
|
1650
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1651
|
+
|
1652
|
+
The first two bits are ones. This allows a pointer to be distinguished
|
1653
|
+
from a label, since the label must begin with two zero bits because
|
1654
|
+
labels are restricted to 63 octets or less. (The 10 and 01 combinations
|
1655
|
+
are reserved for future use.) The OFFSET field specifies an offset from
|
1656
|
+
the start of the message (i.e., the first octet of the ID field in the
|
1657
|
+
domain header). A zero offset specifies the first byte of the ID field,
|
1658
|
+
etc.
|
1659
|
+
|
1660
|
+
The compression scheme allows a domain name in a message to be
|
1661
|
+
represented as either:
|
1662
|
+
|
1663
|
+
- a sequence of labels ending in a zero octet
|
1664
|
+
|
1665
|
+
- a pointer
|
1666
|
+
|
1667
|
+
- a sequence of labels ending with a pointer
|
1668
|
+
|
1669
|
+
Pointers can only be used for occurances of a domain name where the
|
1670
|
+
format is not class specific. If this were not the case, a name server
|
1671
|
+
or resolver would be required to know the format of all RRs it handled.
|
1672
|
+
As yet, there are no such cases, but they may occur in future RDATA
|
1673
|
+
formats.
|
1674
|
+
|
1675
|
+
If a domain name is contained in a part of the message subject to a
|
1676
|
+
length field (such as the RDATA section of an RR), and compression is
|
1677
|
+
|
1678
|
+
|
1679
|
+
|
1680
|
+
Mockapetris [Page 30]
|
1681
|
+
|
1682
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1683
|
+
|
1684
|
+
|
1685
|
+
used, the length of the compressed name is used in the length
|
1686
|
+
calculation, rather than the length of the expanded name.
|
1687
|
+
|
1688
|
+
Programs are free to avoid using pointers in messages they generate,
|
1689
|
+
although this will reduce datagram capacity, and may cause truncation.
|
1690
|
+
However all programs are required to understand arriving messages that
|
1691
|
+
contain pointers.
|
1692
|
+
|
1693
|
+
For example, a datagram might need to use the domain names F.ISI.ARPA,
|
1694
|
+
FOO.F.ISI.ARPA, ARPA, and the root. Ignoring the other fields of the
|
1695
|
+
message, these domain names might be represented as:
|
1696
|
+
|
1697
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1698
|
+
20 | 1 | F |
|
1699
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1700
|
+
22 | 3 | I |
|
1701
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1702
|
+
24 | S | I |
|
1703
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1704
|
+
26 | 4 | A |
|
1705
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1706
|
+
28 | R | P |
|
1707
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1708
|
+
30 | A | 0 |
|
1709
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1710
|
+
|
1711
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1712
|
+
40 | 3 | F |
|
1713
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1714
|
+
42 | O | O |
|
1715
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1716
|
+
44 | 1 1| 20 |
|
1717
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1718
|
+
|
1719
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1720
|
+
64 | 1 1| 26 |
|
1721
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1722
|
+
|
1723
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1724
|
+
92 | 0 | |
|
1725
|
+
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
|
1726
|
+
|
1727
|
+
The domain name for F.ISI.ARPA is shown at offset 20. The domain name
|
1728
|
+
FOO.F.ISI.ARPA is shown at offset 40; this definition uses a pointer to
|
1729
|
+
concatenate a label for FOO to the previously defined F.ISI.ARPA. The
|
1730
|
+
domain name ARPA is defined at offset 64 using a pointer to the ARPA
|
1731
|
+
component of the name F.ISI.ARPA at 20; note that this pointer relies on
|
1732
|
+
ARPA being the last label in the string at 20. The root domain name is
|
1733
|
+
|
1734
|
+
|
1735
|
+
|
1736
|
+
Mockapetris [Page 31]
|
1737
|
+
|
1738
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1739
|
+
|
1740
|
+
|
1741
|
+
defined by a single octet of zeros at 92; the root domain name has no
|
1742
|
+
labels.
|
1743
|
+
|
1744
|
+
4.2. Transport
|
1745
|
+
|
1746
|
+
The DNS assumes that messages will be transmitted as datagrams or in a
|
1747
|
+
byte stream carried by a virtual circuit. While virtual circuits can be
|
1748
|
+
used for any DNS activity, datagrams are preferred for queries due to
|
1749
|
+
their lower overhead and better performance. Zone refresh activities
|
1750
|
+
must use virtual circuits because of the need for reliable transfer.
|
1751
|
+
|
1752
|
+
The Internet supports name server access using TCP [RFC-793] on server
|
1753
|
+
port 53 (decimal) as well as datagram access using UDP [RFC-768] on UDP
|
1754
|
+
port 53 (decimal).
|
1755
|
+
|
1756
|
+
4.2.1. UDP usage
|
1757
|
+
|
1758
|
+
Messages sent using UDP user server port 53 (decimal).
|
1759
|
+
|
1760
|
+
Messages carried by UDP are restricted to 512 bytes (not counting the IP
|
1761
|
+
or UDP headers). Longer messages are truncated and the TC bit is set in
|
1762
|
+
the header.
|
1763
|
+
|
1764
|
+
UDP is not acceptable for zone transfers, but is the recommended method
|
1765
|
+
for standard queries in the Internet. Queries sent using UDP may be
|
1766
|
+
lost, and hence a retransmission strategy is required. Queries or their
|
1767
|
+
responses may be reordered by the network, or by processing in name
|
1768
|
+
servers, so resolvers should not depend on them being returned in order.
|
1769
|
+
|
1770
|
+
The optimal UDP retransmission policy will vary with performance of the
|
1771
|
+
Internet and the needs of the client, but the following are recommended:
|
1772
|
+
|
1773
|
+
- The client should try other servers and server addresses
|
1774
|
+
before repeating a query to a specific address of a server.
|
1775
|
+
|
1776
|
+
- The retransmission interval should be based on prior
|
1777
|
+
statistics if possible. Too aggressive retransmission can
|
1778
|
+
easily slow responses for the community at large. Depending
|
1779
|
+
on how well connected the client is to its expected servers,
|
1780
|
+
the minimum retransmission interval should be 2-5 seconds.
|
1781
|
+
|
1782
|
+
More suggestions on server selection and retransmission policy can be
|
1783
|
+
found in the resolver section of this memo.
|
1784
|
+
|
1785
|
+
4.2.2. TCP usage
|
1786
|
+
|
1787
|
+
Messages sent over TCP connections use server port 53 (decimal). The
|
1788
|
+
message is prefixed with a two byte length field which gives the message
|
1789
|
+
|
1790
|
+
|
1791
|
+
|
1792
|
+
Mockapetris [Page 32]
|
1793
|
+
|
1794
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1795
|
+
|
1796
|
+
|
1797
|
+
length, excluding the two byte length field. This length field allows
|
1798
|
+
the low-level processing to assemble a complete message before beginning
|
1799
|
+
to parse it.
|
1800
|
+
|
1801
|
+
Several connection management policies are recommended:
|
1802
|
+
|
1803
|
+
- The server should not block other activities waiting for TCP
|
1804
|
+
data.
|
1805
|
+
|
1806
|
+
- The server should support multiple connections.
|
1807
|
+
|
1808
|
+
- The server should assume that the client will initiate
|
1809
|
+
connection closing, and should delay closing its end of the
|
1810
|
+
connection until all outstanding client requests have been
|
1811
|
+
satisfied.
|
1812
|
+
|
1813
|
+
- If the server needs to close a dormant connection to reclaim
|
1814
|
+
resources, it should wait until the connection has been idle
|
1815
|
+
for a period on the order of two minutes. In particular, the
|
1816
|
+
server should allow the SOA and AXFR request sequence (which
|
1817
|
+
begins a refresh operation) to be made on a single connection.
|
1818
|
+
Since the server would be unable to answer queries anyway, a
|
1819
|
+
unilateral close or reset may be used instead of a graceful
|
1820
|
+
close.
|
1821
|
+
|
1822
|
+
5. MASTER FILES
|
1823
|
+
|
1824
|
+
Master files are text files that contain RRs in text form. Since the
|
1825
|
+
contents of a zone can be expressed in the form of a list of RRs a
|
1826
|
+
master file is most often used to define a zone, though it can be used
|
1827
|
+
to list a cache's contents. Hence, this section first discusses the
|
1828
|
+
format of RRs in a master file, and then the special considerations when
|
1829
|
+
a master file is used to create a zone in some name server.
|
1830
|
+
|
1831
|
+
5.1. Format
|
1832
|
+
|
1833
|
+
The format of these files is a sequence of entries. Entries are
|
1834
|
+
predominantly line-oriented, though parentheses can be used to continue
|
1835
|
+
a list of items across a line boundary, and text literals can contain
|
1836
|
+
CRLF within the text. Any combination of tabs and spaces act as a
|
1837
|
+
delimiter between the separate items that make up an entry. The end of
|
1838
|
+
any line in the master file can end with a comment. The comment starts
|
1839
|
+
with a ";" (semicolon).
|
1840
|
+
|
1841
|
+
The following entries are defined:
|
1842
|
+
|
1843
|
+
<blank>[<comment>]
|
1844
|
+
|
1845
|
+
|
1846
|
+
|
1847
|
+
|
1848
|
+
Mockapetris [Page 33]
|
1849
|
+
|
1850
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1851
|
+
|
1852
|
+
|
1853
|
+
$ORIGIN <domain-name> [<comment>]
|
1854
|
+
|
1855
|
+
$INCLUDE <file-name> [<domain-name>] [<comment>]
|
1856
|
+
|
1857
|
+
<domain-name><rr> [<comment>]
|
1858
|
+
|
1859
|
+
<blank><rr> [<comment>]
|
1860
|
+
|
1861
|
+
Blank lines, with or without comments, are allowed anywhere in the file.
|
1862
|
+
|
1863
|
+
Two control entries are defined: $ORIGIN and $INCLUDE. $ORIGIN is
|
1864
|
+
followed by a domain name, and resets the current origin for relative
|
1865
|
+
domain names to the stated name. $INCLUDE inserts the named file into
|
1866
|
+
the current file, and may optionally specify a domain name that sets the
|
1867
|
+
relative domain name origin for the included file. $INCLUDE may also
|
1868
|
+
have a comment. Note that a $INCLUDE entry never changes the relative
|
1869
|
+
origin of the parent file, regardless of changes to the relative origin
|
1870
|
+
made within the included file.
|
1871
|
+
|
1872
|
+
The last two forms represent RRs. If an entry for an RR begins with a
|
1873
|
+
blank, then the RR is assumed to be owned by the last stated owner. If
|
1874
|
+
an RR entry begins with a <domain-name>, then the owner name is reset.
|
1875
|
+
|
1876
|
+
<rr> contents take one of the following forms:
|
1877
|
+
|
1878
|
+
[<TTL>] [<class>] <type> <RDATA>
|
1879
|
+
|
1880
|
+
[<class>] [<TTL>] <type> <RDATA>
|
1881
|
+
|
1882
|
+
The RR begins with optional TTL and class fields, followed by a type and
|
1883
|
+
RDATA field appropriate to the type and class. Class and type use the
|
1884
|
+
standard mnemonics, TTL is a decimal integer. Omitted class and TTL
|
1885
|
+
values are default to the last explicitly stated values. Since type and
|
1886
|
+
class mnemonics are disjoint, the parse is unique. (Note that this
|
1887
|
+
order is different from the order used in examples and the order used in
|
1888
|
+
the actual RRs; the given order allows easier parsing and defaulting.)
|
1889
|
+
|
1890
|
+
<domain-name>s make up a large share of the data in the master file.
|
1891
|
+
The labels in the domain name are expressed as character strings and
|
1892
|
+
separated by dots. Quoting conventions allow arbitrary characters to be
|
1893
|
+
stored in domain names. Domain names that end in a dot are called
|
1894
|
+
absolute, and are taken as complete. Domain names which do not end in a
|
1895
|
+
dot are called relative; the actual domain name is the concatenation of
|
1896
|
+
the relative part with an origin specified in a $ORIGIN, $INCLUDE, or as
|
1897
|
+
an argument to the master file loading routine. A relative name is an
|
1898
|
+
error when no origin is available.
|
1899
|
+
|
1900
|
+
|
1901
|
+
|
1902
|
+
|
1903
|
+
|
1904
|
+
Mockapetris [Page 34]
|
1905
|
+
|
1906
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1907
|
+
|
1908
|
+
|
1909
|
+
<character-string> is expressed in one or two ways: as a contiguous set
|
1910
|
+
of characters without interior spaces, or as a string beginning with a "
|
1911
|
+
and ending with a ". Inside a " delimited string any character can
|
1912
|
+
occur, except for a " itself, which must be quoted using \ (back slash).
|
1913
|
+
|
1914
|
+
Because these files are text files several special encodings are
|
1915
|
+
necessary to allow arbitrary data to be loaded. In particular:
|
1916
|
+
|
1917
|
+
of the root.
|
1918
|
+
|
1919
|
+
@ A free standing @ is used to denote the current origin.
|
1920
|
+
|
1921
|
+
\X where X is any character other than a digit (0-9), is
|
1922
|
+
used to quote that character so that its special meaning
|
1923
|
+
does not apply. For example, "\." can be used to place
|
1924
|
+
a dot character in a label.
|
1925
|
+
|
1926
|
+
\DDD where each D is a digit is the octet corresponding to
|
1927
|
+
the decimal number described by DDD. The resulting
|
1928
|
+
octet is assumed to be text and is not checked for
|
1929
|
+
special meaning.
|
1930
|
+
|
1931
|
+
( ) Parentheses are used to group data that crosses a line
|
1932
|
+
boundary. In effect, line terminations are not
|
1933
|
+
recognized within parentheses.
|
1934
|
+
|
1935
|
+
; Semicolon is used to start a comment; the remainder of
|
1936
|
+
the line is ignored.
|
1937
|
+
|
1938
|
+
5.2. Use of master files to define zones
|
1939
|
+
|
1940
|
+
When a master file is used to load a zone, the operation should be
|
1941
|
+
suppressed if any errors are encountered in the master file. The
|
1942
|
+
rationale for this is that a single error can have widespread
|
1943
|
+
consequences. For example, suppose that the RRs defining a delegation
|
1944
|
+
have syntax errors; then the server will return authoritative name
|
1945
|
+
errors for all names in the subzone (except in the case where the
|
1946
|
+
subzone is also present on the server).
|
1947
|
+
|
1948
|
+
Several other validity checks that should be performed in addition to
|
1949
|
+
insuring that the file is syntactically correct:
|
1950
|
+
|
1951
|
+
1. All RRs in the file should have the same class.
|
1952
|
+
|
1953
|
+
2. Exactly one SOA RR should be present at the top of the zone.
|
1954
|
+
|
1955
|
+
3. If delegations are present and glue information is required,
|
1956
|
+
it should be present.
|
1957
|
+
|
1958
|
+
|
1959
|
+
|
1960
|
+
Mockapetris [Page 35]
|
1961
|
+
|
1962
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
1963
|
+
|
1964
|
+
|
1965
|
+
4. Information present outside of the authoritative nodes in the
|
1966
|
+
zone should be glue information, rather than the result of an
|
1967
|
+
origin or similar error.
|
1968
|
+
|
1969
|
+
5.3. Master file example
|
1970
|
+
|
1971
|
+
The following is an example file which might be used to define the
|
1972
|
+
ISI.EDU zone.and is loaded with an origin of ISI.EDU:
|
1973
|
+
|
1974
|
+
@ IN SOA VENERA Action\.domains (
|
1975
|
+
20 ; SERIAL
|
1976
|
+
7200 ; REFRESH
|
1977
|
+
600 ; RETRY
|
1978
|
+
3600000; EXPIRE
|
1979
|
+
60) ; MINIMUM
|
1980
|
+
|
1981
|
+
NS A.ISI.EDU.
|
1982
|
+
NS VENERA
|
1983
|
+
NS VAXA
|
1984
|
+
MX 10 VENERA
|
1985
|
+
MX 20 VAXA
|
1986
|
+
|
1987
|
+
A A 26.3.0.103
|
1988
|
+
|
1989
|
+
VENERA A 10.1.0.52
|
1990
|
+
A 128.9.0.32
|
1991
|
+
|
1992
|
+
VAXA A 10.2.0.27
|
1993
|
+
A 128.9.0.33
|
1994
|
+
|
1995
|
+
|
1996
|
+
$INCLUDE <SUBSYS>ISI-MAILBOXES.TXT
|
1997
|
+
|
1998
|
+
Where the file <SUBSYS>ISI-MAILBOXES.TXT is:
|
1999
|
+
|
2000
|
+
MOE MB A.ISI.EDU.
|
2001
|
+
LARRY MB A.ISI.EDU.
|
2002
|
+
CURLEY MB A.ISI.EDU.
|
2003
|
+
STOOGES MG MOE
|
2004
|
+
MG LARRY
|
2005
|
+
MG CURLEY
|
2006
|
+
|
2007
|
+
Note the use of the \ character in the SOA RR to specify the responsible
|
2008
|
+
person mailbox "Action.domains@E.ISI.EDU".
|
2009
|
+
|
2010
|
+
|
2011
|
+
|
2012
|
+
|
2013
|
+
|
2014
|
+
|
2015
|
+
|
2016
|
+
Mockapetris [Page 36]
|
2017
|
+
|
2018
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2019
|
+
|
2020
|
+
|
2021
|
+
6. NAME SERVER IMPLEMENTATION
|
2022
|
+
|
2023
|
+
6.1. Architecture
|
2024
|
+
|
2025
|
+
The optimal structure for the name server will depend on the host
|
2026
|
+
operating system and whether the name server is integrated with resolver
|
2027
|
+
operations, either by supporting recursive service, or by sharing its
|
2028
|
+
database with a resolver. This section discusses implementation
|
2029
|
+
considerations for a name server which shares a database with a
|
2030
|
+
resolver, but most of these concerns are present in any name server.
|
2031
|
+
|
2032
|
+
6.1.1. Control
|
2033
|
+
|
2034
|
+
A name server must employ multiple concurrent activities, whether they
|
2035
|
+
are implemented as separate tasks in the host's OS or multiplexing
|
2036
|
+
inside a single name server program. It is simply not acceptable for a
|
2037
|
+
name server to block the service of UDP requests while it waits for TCP
|
2038
|
+
data for refreshing or query activities. Similarly, a name server
|
2039
|
+
should not attempt to provide recursive service without processing such
|
2040
|
+
requests in parallel, though it may choose to serialize requests from a
|
2041
|
+
single client, or to regard identical requests from the same client as
|
2042
|
+
duplicates. A name server should not substantially delay requests while
|
2043
|
+
it reloads a zone from master files or while it incorporates a newly
|
2044
|
+
refreshed zone into its database.
|
2045
|
+
|
2046
|
+
6.1.2. Database
|
2047
|
+
|
2048
|
+
While name server implementations are free to use any internal data
|
2049
|
+
structures they choose, the suggested structure consists of three major
|
2050
|
+
parts:
|
2051
|
+
|
2052
|
+
- A "catalog" data structure which lists the zones available to
|
2053
|
+
this server, and a "pointer" to the zone data structure. The
|
2054
|
+
main purpose of this structure is to find the nearest ancestor
|
2055
|
+
zone, if any, for arriving standard queries.
|
2056
|
+
|
2057
|
+
- Separate data structures for each of the zones held by the
|
2058
|
+
name server.
|
2059
|
+
|
2060
|
+
- A data structure for cached data. (or perhaps separate caches
|
2061
|
+
for different classes)
|
2062
|
+
|
2063
|
+
All of these data structures can be implemented an identical tree
|
2064
|
+
structure format, with different data chained off the nodes in different
|
2065
|
+
parts: in the catalog the data is pointers to zones, while in the zone
|
2066
|
+
and cache data structures, the data will be RRs. In designing the tree
|
2067
|
+
framework the designer should recognize that query processing will need
|
2068
|
+
to traverse the tree using case-insensitive label comparisons; and that
|
2069
|
+
|
2070
|
+
|
2071
|
+
|
2072
|
+
Mockapetris [Page 37]
|
2073
|
+
|
2074
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2075
|
+
|
2076
|
+
|
2077
|
+
in real data, a few nodes have a very high branching factor (100-1000 or
|
2078
|
+
more), but the vast majority have a very low branching factor (0-1).
|
2079
|
+
|
2080
|
+
One way to solve the case problem is to store the labels for each node
|
2081
|
+
in two pieces: a standardized-case representation of the label where all
|
2082
|
+
ASCII characters are in a single case, together with a bit mask that
|
2083
|
+
denotes which characters are actually of a different case. The
|
2084
|
+
branching factor diversity can be handled using a simple linked list for
|
2085
|
+
a node until the branching factor exceeds some threshold, and
|
2086
|
+
transitioning to a hash structure after the threshold is exceeded. In
|
2087
|
+
any case, hash structures used to store tree sections must insure that
|
2088
|
+
hash functions and procedures preserve the casing conventions of the
|
2089
|
+
DNS.
|
2090
|
+
|
2091
|
+
The use of separate structures for the different parts of the database
|
2092
|
+
is motivated by several factors:
|
2093
|
+
|
2094
|
+
- The catalog structure can be an almost static structure that
|
2095
|
+
need change only when the system administrator changes the
|
2096
|
+
zones supported by the server. This structure can also be
|
2097
|
+
used to store parameters used to control refreshing
|
2098
|
+
activities.
|
2099
|
+
|
2100
|
+
- The individual data structures for zones allow a zone to be
|
2101
|
+
replaced simply by changing a pointer in the catalog. Zone
|
2102
|
+
refresh operations can build a new structure and, when
|
2103
|
+
complete, splice it into the database via a simple pointer
|
2104
|
+
replacement. It is very important that when a zone is
|
2105
|
+
refreshed, queries should not use old and new data
|
2106
|
+
simultaneously.
|
2107
|
+
|
2108
|
+
- With the proper search procedures, authoritative data in zones
|
2109
|
+
will always "hide", and hence take precedence over, cached
|
2110
|
+
data.
|
2111
|
+
|
2112
|
+
- Errors in zone definitions that cause overlapping zones, etc.,
|
2113
|
+
may cause erroneous responses to queries, but problem
|
2114
|
+
determination is simplified, and the contents of one "bad"
|
2115
|
+
zone can't corrupt another.
|
2116
|
+
|
2117
|
+
- Since the cache is most frequently updated, it is most
|
2118
|
+
vulnerable to corruption during system restarts. It can also
|
2119
|
+
become full of expired RR data. In either case, it can easily
|
2120
|
+
be discarded without disturbing zone data.
|
2121
|
+
|
2122
|
+
A major aspect of database design is selecting a structure which allows
|
2123
|
+
the name server to deal with crashes of the name server's host. State
|
2124
|
+
information which a name server should save across system crashes
|
2125
|
+
|
2126
|
+
|
2127
|
+
|
2128
|
+
Mockapetris [Page 38]
|
2129
|
+
|
2130
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2131
|
+
|
2132
|
+
|
2133
|
+
includes the catalog structure (including the state of refreshing for
|
2134
|
+
each zone) and the zone data itself.
|
2135
|
+
|
2136
|
+
6.1.3. Time
|
2137
|
+
|
2138
|
+
Both the TTL data for RRs and the timing data for refreshing activities
|
2139
|
+
depends on 32 bit timers in units of seconds. Inside the database,
|
2140
|
+
refresh timers and TTLs for cached data conceptually "count down", while
|
2141
|
+
data in the zone stays with constant TTLs.
|
2142
|
+
|
2143
|
+
A recommended implementation strategy is to store time in two ways: as
|
2144
|
+
a relative increment and as an absolute time. One way to do this is to
|
2145
|
+
use positive 32 bit numbers for one type and negative numbers for the
|
2146
|
+
other. The RRs in zones use relative times; the refresh timers and
|
2147
|
+
cache data use absolute times. Absolute numbers are taken with respect
|
2148
|
+
to some known origin and converted to relative values when placed in the
|
2149
|
+
response to a query. When an absolute TTL is negative after conversion
|
2150
|
+
to relative, then the data is expired and should be ignored.
|
2151
|
+
|
2152
|
+
6.2. Standard query processing
|
2153
|
+
|
2154
|
+
The major algorithm for standard query processing is presented in
|
2155
|
+
[RFC-1034].
|
2156
|
+
|
2157
|
+
When processing queries with QCLASS=*, or some other QCLASS which
|
2158
|
+
matches multiple classes, the response should never be authoritative
|
2159
|
+
unless the server can guarantee that the response covers all classes.
|
2160
|
+
|
2161
|
+
When composing a response, RRs which are to be inserted in the
|
2162
|
+
additional section, but duplicate RRs in the answer or authority
|
2163
|
+
sections, may be omitted from the additional section.
|
2164
|
+
|
2165
|
+
When a response is so long that truncation is required, the truncation
|
2166
|
+
should start at the end of the response and work forward in the
|
2167
|
+
datagram. Thus if there is any data for the authority section, the
|
2168
|
+
answer section is guaranteed to be unique.
|
2169
|
+
|
2170
|
+
The MINIMUM value in the SOA should be used to set a floor on the TTL of
|
2171
|
+
data distributed from a zone. This floor function should be done when
|
2172
|
+
the data is copied into a response. This will allow future dynamic
|
2173
|
+
update protocols to change the SOA MINIMUM field without ambiguous
|
2174
|
+
semantics.
|
2175
|
+
|
2176
|
+
6.3. Zone refresh and reload processing
|
2177
|
+
|
2178
|
+
In spite of a server's best efforts, it may be unable to load zone data
|
2179
|
+
from a master file due to syntax errors, etc., or be unable to refresh a
|
2180
|
+
zone within the its expiration parameter. In this case, the name server
|
2181
|
+
|
2182
|
+
|
2183
|
+
|
2184
|
+
Mockapetris [Page 39]
|
2185
|
+
|
2186
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2187
|
+
|
2188
|
+
|
2189
|
+
should answer queries as if it were not supposed to possess the zone.
|
2190
|
+
|
2191
|
+
If a master is sending a zone out via AXFR, and a new version is created
|
2192
|
+
during the transfer, the master should continue to send the old version
|
2193
|
+
if possible. In any case, it should never send part of one version and
|
2194
|
+
part of another. If completion is not possible, the master should reset
|
2195
|
+
the connection on which the zone transfer is taking place.
|
2196
|
+
|
2197
|
+
6.4. Inverse queries (Optional)
|
2198
|
+
|
2199
|
+
Inverse queries are an optional part of the DNS. Name servers are not
|
2200
|
+
required to support any form of inverse queries. If a name server
|
2201
|
+
receives an inverse query that it does not support, it returns an error
|
2202
|
+
response with the "Not Implemented" error set in the header. While
|
2203
|
+
inverse query support is optional, all name servers must be at least
|
2204
|
+
able to return the error response.
|
2205
|
+
|
2206
|
+
6.4.1. The contents of inverse queries and responses Inverse
|
2207
|
+
queries reverse the mappings performed by standard query operations;
|
2208
|
+
while a standard query maps a domain name to a resource, an inverse
|
2209
|
+
query maps a resource to a domain name. For example, a standard query
|
2210
|
+
might bind a domain name to a host address; the corresponding inverse
|
2211
|
+
query binds the host address to a domain name.
|
2212
|
+
|
2213
|
+
Inverse queries take the form of a single RR in the answer section of
|
2214
|
+
the message, with an empty question section. The owner name of the
|
2215
|
+
query RR and its TTL are not significant. The response carries
|
2216
|
+
questions in the question section which identify all names possessing
|
2217
|
+
the query RR WHICH THE NAME SERVER KNOWS. Since no name server knows
|
2218
|
+
about all of the domain name space, the response can never be assumed to
|
2219
|
+
be complete. Thus inverse queries are primarily useful for database
|
2220
|
+
management and debugging activities. Inverse queries are NOT an
|
2221
|
+
acceptable method of mapping host addresses to host names; use the IN-
|
2222
|
+
ADDR.ARPA domain instead.
|
2223
|
+
|
2224
|
+
Where possible, name servers should provide case-insensitive comparisons
|
2225
|
+
for inverse queries. Thus an inverse query asking for an MX RR of
|
2226
|
+
"Venera.isi.edu" should get the same response as a query for
|
2227
|
+
"VENERA.ISI.EDU"; an inverse query for HINFO RR "IBM-PC UNIX" should
|
2228
|
+
produce the same result as an inverse query for "IBM-pc unix". However,
|
2229
|
+
this cannot be guaranteed because name servers may possess RRs that
|
2230
|
+
contain character strings but the name server does not know that the
|
2231
|
+
data is character.
|
2232
|
+
|
2233
|
+
When a name server processes an inverse query, it either returns:
|
2234
|
+
|
2235
|
+
1. zero, one, or multiple domain names for the specified
|
2236
|
+
resource as QNAMEs in the question section
|
2237
|
+
|
2238
|
+
|
2239
|
+
|
2240
|
+
Mockapetris [Page 40]
|
2241
|
+
|
2242
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2243
|
+
|
2244
|
+
|
2245
|
+
2. an error code indicating that the name server doesn't support
|
2246
|
+
inverse mapping of the specified resource type.
|
2247
|
+
|
2248
|
+
When the response to an inverse query contains one or more QNAMEs, the
|
2249
|
+
owner name and TTL of the RR in the answer section which defines the
|
2250
|
+
inverse query is modified to exactly match an RR found at the first
|
2251
|
+
QNAME.
|
2252
|
+
|
2253
|
+
RRs returned in the inverse queries cannot be cached using the same
|
2254
|
+
mechanism as is used for the replies to standard queries. One reason
|
2255
|
+
for this is that a name might have multiple RRs of the same type, and
|
2256
|
+
only one would appear. For example, an inverse query for a single
|
2257
|
+
address of a multiply homed host might create the impression that only
|
2258
|
+
one address existed.
|
2259
|
+
|
2260
|
+
6.4.2. Inverse query and response example The overall structure
|
2261
|
+
of an inverse query for retrieving the domain name that corresponds to
|
2262
|
+
Internet address 10.1.0.52 is shown below:
|
2263
|
+
|
2264
|
+
+-----------------------------------------+
|
2265
|
+
Header | OPCODE=IQUERY, ID=997 |
|
2266
|
+
+-----------------------------------------+
|
2267
|
+
Question | <empty> |
|
2268
|
+
+-----------------------------------------+
|
2269
|
+
Answer | <anyname> A IN 10.1.0.52 |
|
2270
|
+
+-----------------------------------------+
|
2271
|
+
Authority | <empty> |
|
2272
|
+
+-----------------------------------------+
|
2273
|
+
Additional | <empty> |
|
2274
|
+
+-----------------------------------------+
|
2275
|
+
|
2276
|
+
This query asks for a question whose answer is the Internet style
|
2277
|
+
address 10.1.0.52. Since the owner name is not known, any domain name
|
2278
|
+
can be used as a placeholder (and is ignored). A single octet of zero,
|
2279
|
+
signifying the root, is usually used because it minimizes the length of
|
2280
|
+
the message. The TTL of the RR is not significant. The response to
|
2281
|
+
this query might be:
|
2282
|
+
|
2283
|
+
|
2284
|
+
|
2285
|
+
|
2286
|
+
|
2287
|
+
|
2288
|
+
|
2289
|
+
|
2290
|
+
|
2291
|
+
|
2292
|
+
|
2293
|
+
|
2294
|
+
|
2295
|
+
|
2296
|
+
Mockapetris [Page 41]
|
2297
|
+
|
2298
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2299
|
+
|
2300
|
+
|
2301
|
+
+-----------------------------------------+
|
2302
|
+
Header | OPCODE=RESPONSE, ID=997 |
|
2303
|
+
+-----------------------------------------+
|
2304
|
+
Question |QTYPE=A, QCLASS=IN, QNAME=VENERA.ISI.EDU |
|
2305
|
+
+-----------------------------------------+
|
2306
|
+
Answer | VENERA.ISI.EDU A IN 10.1.0.52 |
|
2307
|
+
+-----------------------------------------+
|
2308
|
+
Authority | <empty> |
|
2309
|
+
+-----------------------------------------+
|
2310
|
+
Additional | <empty> |
|
2311
|
+
+-----------------------------------------+
|
2312
|
+
|
2313
|
+
Note that the QTYPE in a response to an inverse query is the same as the
|
2314
|
+
TYPE field in the answer section of the inverse query. Responses to
|
2315
|
+
inverse queries may contain multiple questions when the inverse is not
|
2316
|
+
unique. If the question section in the response is not empty, then the
|
2317
|
+
RR in the answer section is modified to correspond to be an exact copy
|
2318
|
+
of an RR at the first QNAME.
|
2319
|
+
|
2320
|
+
6.4.3. Inverse query processing
|
2321
|
+
|
2322
|
+
Name servers that support inverse queries can support these operations
|
2323
|
+
through exhaustive searches of their databases, but this becomes
|
2324
|
+
impractical as the size of the database increases. An alternative
|
2325
|
+
approach is to invert the database according to the search key.
|
2326
|
+
|
2327
|
+
For name servers that support multiple zones and a large amount of data,
|
2328
|
+
the recommended approach is separate inversions for each zone. When a
|
2329
|
+
particular zone is changed during a refresh, only its inversions need to
|
2330
|
+
be redone.
|
2331
|
+
|
2332
|
+
Support for transfer of this type of inversion may be included in future
|
2333
|
+
versions of the domain system, but is not supported in this version.
|
2334
|
+
|
2335
|
+
6.5. Completion queries and responses
|
2336
|
+
|
2337
|
+
The optional completion services described in RFC-882 and RFC-883 have
|
2338
|
+
been deleted. Redesigned services may become available in the future.
|
2339
|
+
|
2340
|
+
|
2341
|
+
|
2342
|
+
|
2343
|
+
|
2344
|
+
|
2345
|
+
|
2346
|
+
|
2347
|
+
|
2348
|
+
|
2349
|
+
|
2350
|
+
|
2351
|
+
|
2352
|
+
Mockapetris [Page 42]
|
2353
|
+
|
2354
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2355
|
+
|
2356
|
+
|
2357
|
+
7. RESOLVER IMPLEMENTATION
|
2358
|
+
|
2359
|
+
The top levels of the recommended resolver algorithm are discussed in
|
2360
|
+
[RFC-1034]. This section discusses implementation details assuming the
|
2361
|
+
database structure suggested in the name server implementation section
|
2362
|
+
of this memo.
|
2363
|
+
|
2364
|
+
7.1. Transforming a user request into a query
|
2365
|
+
|
2366
|
+
The first step a resolver takes is to transform the client's request,
|
2367
|
+
stated in a format suitable to the local OS, into a search specification
|
2368
|
+
for RRs at a specific name which match a specific QTYPE and QCLASS.
|
2369
|
+
Where possible, the QTYPE and QCLASS should correspond to a single type
|
2370
|
+
and a single class, because this makes the use of cached data much
|
2371
|
+
simpler. The reason for this is that the presence of data of one type
|
2372
|
+
in a cache doesn't confirm the existence or non-existence of data of
|
2373
|
+
other types, hence the only way to be sure is to consult an
|
2374
|
+
authoritative source. If QCLASS=* is used, then authoritative answers
|
2375
|
+
won't be available.
|
2376
|
+
|
2377
|
+
Since a resolver must be able to multiplex multiple requests if it is to
|
2378
|
+
perform its function efficiently, each pending request is usually
|
2379
|
+
represented in some block of state information. This state block will
|
2380
|
+
typically contain:
|
2381
|
+
|
2382
|
+
- A timestamp indicating the time the request began.
|
2383
|
+
The timestamp is used to decide whether RRs in the database
|
2384
|
+
can be used or are out of date. This timestamp uses the
|
2385
|
+
absolute time format previously discussed for RR storage in
|
2386
|
+
zones and caches. Note that when an RRs TTL indicates a
|
2387
|
+
relative time, the RR must be timely, since it is part of a
|
2388
|
+
zone. When the RR has an absolute time, it is part of a
|
2389
|
+
cache, and the TTL of the RR is compared against the timestamp
|
2390
|
+
for the start of the request.
|
2391
|
+
|
2392
|
+
Note that using the timestamp is superior to using a current
|
2393
|
+
time, since it allows RRs with TTLs of zero to be entered in
|
2394
|
+
the cache in the usual manner, but still used by the current
|
2395
|
+
request, even after intervals of many seconds due to system
|
2396
|
+
load, query retransmission timeouts, etc.
|
2397
|
+
|
2398
|
+
- Some sort of parameters to limit the amount of work which will
|
2399
|
+
be performed for this request.
|
2400
|
+
|
2401
|
+
The amount of work which a resolver will do in response to a
|
2402
|
+
client request must be limited to guard against errors in the
|
2403
|
+
database, such as circular CNAME references, and operational
|
2404
|
+
problems, such as network partition which prevents the
|
2405
|
+
|
2406
|
+
|
2407
|
+
|
2408
|
+
Mockapetris [Page 43]
|
2409
|
+
|
2410
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2411
|
+
|
2412
|
+
|
2413
|
+
resolver from accessing the name servers it needs. While
|
2414
|
+
local limits on the number of times a resolver will retransmit
|
2415
|
+
a particular query to a particular name server address are
|
2416
|
+
essential, the resolver should have a global per-request
|
2417
|
+
counter to limit work on a single request. The counter should
|
2418
|
+
be set to some initial value and decremented whenever the
|
2419
|
+
resolver performs any action (retransmission timeout,
|
2420
|
+
retransmission, etc.) If the counter passes zero, the request
|
2421
|
+
is terminated with a temporary error.
|
2422
|
+
|
2423
|
+
Note that if the resolver structure allows one request to
|
2424
|
+
start others in parallel, such as when the need to access a
|
2425
|
+
name server for one request causes a parallel resolve for the
|
2426
|
+
name server's addresses, the spawned request should be started
|
2427
|
+
with a lower counter. This prevents circular references in
|
2428
|
+
the database from starting a chain reaction of resolver
|
2429
|
+
activity.
|
2430
|
+
|
2431
|
+
- The SLIST data structure discussed in [RFC-1034].
|
2432
|
+
|
2433
|
+
This structure keeps track of the state of a request if it
|
2434
|
+
must wait for answers from foreign name servers.
|
2435
|
+
|
2436
|
+
7.2. Sending the queries
|
2437
|
+
|
2438
|
+
As described in [RFC-1034], the basic task of the resolver is to
|
2439
|
+
formulate a query which will answer the client's request and direct that
|
2440
|
+
query to name servers which can provide the information. The resolver
|
2441
|
+
will usually only have very strong hints about which servers to ask, in
|
2442
|
+
the form of NS RRs, and may have to revise the query, in response to
|
2443
|
+
CNAMEs, or revise the set of name servers the resolver is asking, in
|
2444
|
+
response to delegation responses which point the resolver to name
|
2445
|
+
servers closer to the desired information. In addition to the
|
2446
|
+
information requested by the client, the resolver may have to call upon
|
2447
|
+
its own services to determine the address of name servers it wishes to
|
2448
|
+
contact.
|
2449
|
+
|
2450
|
+
In any case, the model used in this memo assumes that the resolver is
|
2451
|
+
multiplexing attention between multiple requests, some from the client,
|
2452
|
+
and some internally generated. Each request is represented by some
|
2453
|
+
state information, and the desired behavior is that the resolver
|
2454
|
+
transmit queries to name servers in a way that maximizes the probability
|
2455
|
+
that the request is answered, minimizes the time that the request takes,
|
2456
|
+
and avoids excessive transmissions. The key algorithm uses the state
|
2457
|
+
information of the request to select the next name server address to
|
2458
|
+
query, and also computes a timeout which will cause the next action
|
2459
|
+
should a response not arrive. The next action will usually be a
|
2460
|
+
transmission to some other server, but may be a temporary error to the
|
2461
|
+
|
2462
|
+
|
2463
|
+
|
2464
|
+
Mockapetris [Page 44]
|
2465
|
+
|
2466
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2467
|
+
|
2468
|
+
|
2469
|
+
client.
|
2470
|
+
|
2471
|
+
The resolver always starts with a list of server names to query (SLIST).
|
2472
|
+
This list will be all NS RRs which correspond to the nearest ancestor
|
2473
|
+
zone that the resolver knows about. To avoid startup problems, the
|
2474
|
+
resolver should have a set of default servers which it will ask should
|
2475
|
+
it have no current NS RRs which are appropriate. The resolver then adds
|
2476
|
+
to SLIST all of the known addresses for the name servers, and may start
|
2477
|
+
parallel requests to acquire the addresses of the servers when the
|
2478
|
+
resolver has the name, but no addresses, for the name servers.
|
2479
|
+
|
2480
|
+
To complete initialization of SLIST, the resolver attaches whatever
|
2481
|
+
history information it has to the each address in SLIST. This will
|
2482
|
+
usually consist of some sort of weighted averages for the response time
|
2483
|
+
of the address, and the batting average of the address (i.e., how often
|
2484
|
+
the address responded at all to the request). Note that this
|
2485
|
+
information should be kept on a per address basis, rather than on a per
|
2486
|
+
name server basis, because the response time and batting average of a
|
2487
|
+
particular server may vary considerably from address to address. Note
|
2488
|
+
also that this information is actually specific to a resolver address /
|
2489
|
+
server address pair, so a resolver with multiple addresses may wish to
|
2490
|
+
keep separate histories for each of its addresses. Part of this step
|
2491
|
+
must deal with addresses which have no such history; in this case an
|
2492
|
+
expected round trip time of 5-10 seconds should be the worst case, with
|
2493
|
+
lower estimates for the same local network, etc.
|
2494
|
+
|
2495
|
+
Note that whenever a delegation is followed, the resolver algorithm
|
2496
|
+
reinitializes SLIST.
|
2497
|
+
|
2498
|
+
The information establishes a partial ranking of the available name
|
2499
|
+
server addresses. Each time an address is chosen and the state should
|
2500
|
+
be altered to prevent its selection again until all other addresses have
|
2501
|
+
been tried. The timeout for each transmission should be 50-100% greater
|
2502
|
+
than the average predicted value to allow for variance in response.
|
2503
|
+
|
2504
|
+
Some fine points:
|
2505
|
+
|
2506
|
+
- The resolver may encounter a situation where no addresses are
|
2507
|
+
available for any of the name servers named in SLIST, and
|
2508
|
+
where the servers in the list are precisely those which would
|
2509
|
+
normally be used to look up their own addresses. This
|
2510
|
+
situation typically occurs when the glue address RRs have a
|
2511
|
+
smaller TTL than the NS RRs marking delegation, or when the
|
2512
|
+
resolver caches the result of a NS search. The resolver
|
2513
|
+
should detect this condition and restart the search at the
|
2514
|
+
next ancestor zone, or alternatively at the root.
|
2515
|
+
|
2516
|
+
|
2517
|
+
|
2518
|
+
|
2519
|
+
|
2520
|
+
Mockapetris [Page 45]
|
2521
|
+
|
2522
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2523
|
+
|
2524
|
+
|
2525
|
+
- If a resolver gets a server error or other bizarre response
|
2526
|
+
from a name server, it should remove it from SLIST, and may
|
2527
|
+
wish to schedule an immediate transmission to the next
|
2528
|
+
candidate server address.
|
2529
|
+
|
2530
|
+
7.3. Processing responses
|
2531
|
+
|
2532
|
+
The first step in processing arriving response datagrams is to parse the
|
2533
|
+
response. This procedure should include:
|
2534
|
+
|
2535
|
+
- Check the header for reasonableness. Discard datagrams which
|
2536
|
+
are queries when responses are expected.
|
2537
|
+
|
2538
|
+
- Parse the sections of the message, and insure that all RRs are
|
2539
|
+
correctly formatted.
|
2540
|
+
|
2541
|
+
- As an optional step, check the TTLs of arriving data looking
|
2542
|
+
for RRs with excessively long TTLs. If a RR has an
|
2543
|
+
excessively long TTL, say greater than 1 week, either discard
|
2544
|
+
the whole response, or limit all TTLs in the response to 1
|
2545
|
+
week.
|
2546
|
+
|
2547
|
+
The next step is to match the response to a current resolver request.
|
2548
|
+
The recommended strategy is to do a preliminary matching using the ID
|
2549
|
+
field in the domain header, and then to verify that the question section
|
2550
|
+
corresponds to the information currently desired. This requires that
|
2551
|
+
the transmission algorithm devote several bits of the domain ID field to
|
2552
|
+
a request identifier of some sort. This step has several fine points:
|
2553
|
+
|
2554
|
+
- Some name servers send their responses from different
|
2555
|
+
addresses than the one used to receive the query. That is, a
|
2556
|
+
resolver cannot rely that a response will come from the same
|
2557
|
+
address which it sent the corresponding query to. This name
|
2558
|
+
server bug is typically encountered in UNIX systems.
|
2559
|
+
|
2560
|
+
- If the resolver retransmits a particular request to a name
|
2561
|
+
server it should be able to use a response from any of the
|
2562
|
+
transmissions. However, if it is using the response to sample
|
2563
|
+
the round trip time to access the name server, it must be able
|
2564
|
+
to determine which transmission matches the response (and keep
|
2565
|
+
transmission times for each outgoing message), or only
|
2566
|
+
calculate round trip times based on initial transmissions.
|
2567
|
+
|
2568
|
+
- A name server will occasionally not have a current copy of a
|
2569
|
+
zone which it should have according to some NS RRs. The
|
2570
|
+
resolver should simply remove the name server from the current
|
2571
|
+
SLIST, and continue.
|
2572
|
+
|
2573
|
+
|
2574
|
+
|
2575
|
+
|
2576
|
+
Mockapetris [Page 46]
|
2577
|
+
|
2578
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2579
|
+
|
2580
|
+
|
2581
|
+
7.4. Using the cache
|
2582
|
+
|
2583
|
+
In general, we expect a resolver to cache all data which it receives in
|
2584
|
+
responses since it may be useful in answering future client requests.
|
2585
|
+
However, there are several types of data which should not be cached:
|
2586
|
+
|
2587
|
+
- When several RRs of the same type are available for a
|
2588
|
+
particular owner name, the resolver should either cache them
|
2589
|
+
all or none at all. When a response is truncated, and a
|
2590
|
+
resolver doesn't know whether it has a complete set, it should
|
2591
|
+
not cache a possibly partial set of RRs.
|
2592
|
+
|
2593
|
+
- Cached data should never be used in preference to
|
2594
|
+
authoritative data, so if caching would cause this to happen
|
2595
|
+
the data should not be cached.
|
2596
|
+
|
2597
|
+
- The results of an inverse query should not be cached.
|
2598
|
+
|
2599
|
+
- The results of standard queries where the QNAME contains "*"
|
2600
|
+
labels if the data might be used to construct wildcards. The
|
2601
|
+
reason is that the cache does not necessarily contain existing
|
2602
|
+
RRs or zone boundary information which is necessary to
|
2603
|
+
restrict the application of the wildcard RRs.
|
2604
|
+
|
2605
|
+
- RR data in responses of dubious reliability. When a resolver
|
2606
|
+
receives unsolicited responses or RR data other than that
|
2607
|
+
requested, it should discard it without caching it. The basic
|
2608
|
+
implication is that all sanity checks on a packet should be
|
2609
|
+
performed before any of it is cached.
|
2610
|
+
|
2611
|
+
In a similar vein, when a resolver has a set of RRs for some name in a
|
2612
|
+
response, and wants to cache the RRs, it should check its cache for
|
2613
|
+
already existing RRs. Depending on the circumstances, either the data
|
2614
|
+
in the response or the cache is preferred, but the two should never be
|
2615
|
+
combined. If the data in the response is from authoritative data in the
|
2616
|
+
answer section, it is always preferred.
|
2617
|
+
|
2618
|
+
8. MAIL SUPPORT
|
2619
|
+
|
2620
|
+
The domain system defines a standard for mapping mailboxes into domain
|
2621
|
+
names, and two methods for using the mailbox information to derive mail
|
2622
|
+
routing information. The first method is called mail exchange binding
|
2623
|
+
and the other method is mailbox binding. The mailbox encoding standard
|
2624
|
+
and mail exchange binding are part of the DNS official protocol, and are
|
2625
|
+
the recommended method for mail routing in the Internet. Mailbox
|
2626
|
+
binding is an experimental feature which is still under development and
|
2627
|
+
subject to change.
|
2628
|
+
|
2629
|
+
|
2630
|
+
|
2631
|
+
|
2632
|
+
Mockapetris [Page 47]
|
2633
|
+
|
2634
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2635
|
+
|
2636
|
+
|
2637
|
+
The mailbox encoding standard assumes a mailbox name of the form
|
2638
|
+
"<local-part>@<mail-domain>". While the syntax allowed in each of these
|
2639
|
+
sections varies substantially between the various mail internets, the
|
2640
|
+
preferred syntax for the ARPA Internet is given in [RFC-822].
|
2641
|
+
|
2642
|
+
The DNS encodes the <local-part> as a single label, and encodes the
|
2643
|
+
<mail-domain> as a domain name. The single label from the <local-part>
|
2644
|
+
is prefaced to the domain name from <mail-domain> to form the domain
|
2645
|
+
name corresponding to the mailbox. Thus the mailbox HOSTMASTER@SRI-
|
2646
|
+
NIC.ARPA is mapped into the domain name HOSTMASTER.SRI-NIC.ARPA. If the
|
2647
|
+
<local-part> contains dots or other special characters, its
|
2648
|
+
representation in a master file will require the use of backslash
|
2649
|
+
quoting to ensure that the domain name is properly encoded. For
|
2650
|
+
example, the mailbox Action.domains@ISI.EDU would be represented as
|
2651
|
+
Action\.domains.ISI.EDU.
|
2652
|
+
|
2653
|
+
8.1. Mail exchange binding
|
2654
|
+
|
2655
|
+
Mail exchange binding uses the <mail-domain> part of a mailbox
|
2656
|
+
specification to determine where mail should be sent. The <local-part>
|
2657
|
+
is not even consulted. [RFC-974] specifies this method in detail, and
|
2658
|
+
should be consulted before attempting to use mail exchange support.
|
2659
|
+
|
2660
|
+
One of the advantages of this method is that it decouples mail
|
2661
|
+
destination naming from the hosts used to support mail service, at the
|
2662
|
+
cost of another layer of indirection in the lookup function. However,
|
2663
|
+
the addition layer should eliminate the need for complicated "%", "!",
|
2664
|
+
etc encodings in <local-part>.
|
2665
|
+
|
2666
|
+
The essence of the method is that the <mail-domain> is used as a domain
|
2667
|
+
name to locate type MX RRs which list hosts willing to accept mail for
|
2668
|
+
<mail-domain>, together with preference values which rank the hosts
|
2669
|
+
according to an order specified by the administrators for <mail-domain>.
|
2670
|
+
|
2671
|
+
In this memo, the <mail-domain> ISI.EDU is used in examples, together
|
2672
|
+
with the hosts VENERA.ISI.EDU and VAXA.ISI.EDU as mail exchanges for
|
2673
|
+
ISI.EDU. If a mailer had a message for Mockapetris@ISI.EDU, it would
|
2674
|
+
route it by looking up MX RRs for ISI.EDU. The MX RRs at ISI.EDU name
|
2675
|
+
VENERA.ISI.EDU and VAXA.ISI.EDU, and type A queries can find the host
|
2676
|
+
addresses.
|
2677
|
+
|
2678
|
+
8.2. Mailbox binding (Experimental)
|
2679
|
+
|
2680
|
+
In mailbox binding, the mailer uses the entire mail destination
|
2681
|
+
specification to construct a domain name. The encoded domain name for
|
2682
|
+
the mailbox is used as the QNAME field in a QTYPE=MAILB query.
|
2683
|
+
|
2684
|
+
Several outcomes are possible for this query:
|
2685
|
+
|
2686
|
+
|
2687
|
+
|
2688
|
+
Mockapetris [Page 48]
|
2689
|
+
|
2690
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2691
|
+
|
2692
|
+
|
2693
|
+
1. The query can return a name error indicating that the mailbox
|
2694
|
+
does not exist as a domain name.
|
2695
|
+
|
2696
|
+
In the long term, this would indicate that the specified
|
2697
|
+
mailbox doesn't exist. However, until the use of mailbox
|
2698
|
+
binding is universal, this error condition should be
|
2699
|
+
interpreted to mean that the organization identified by the
|
2700
|
+
global part does not support mailbox binding. The
|
2701
|
+
appropriate procedure is to revert to exchange binding at
|
2702
|
+
this point.
|
2703
|
+
|
2704
|
+
2. The query can return a Mail Rename (MR) RR.
|
2705
|
+
|
2706
|
+
The MR RR carries new mailbox specification in its RDATA
|
2707
|
+
field. The mailer should replace the old mailbox with the
|
2708
|
+
new one and retry the operation.
|
2709
|
+
|
2710
|
+
3. The query can return a MB RR.
|
2711
|
+
|
2712
|
+
The MB RR carries a domain name for a host in its RDATA
|
2713
|
+
field. The mailer should deliver the message to that host
|
2714
|
+
via whatever protocol is applicable, e.g., b,SMTP.
|
2715
|
+
|
2716
|
+
4. The query can return one or more Mail Group (MG) RRs.
|
2717
|
+
|
2718
|
+
This condition means that the mailbox was actually a mailing
|
2719
|
+
list or mail group, rather than a single mailbox. Each MG RR
|
2720
|
+
has a RDATA field that identifies a mailbox that is a member
|
2721
|
+
of the group. The mailer should deliver a copy of the
|
2722
|
+
message to each member.
|
2723
|
+
|
2724
|
+
5. The query can return a MB RR as well as one or more MG RRs.
|
2725
|
+
|
2726
|
+
This condition means the the mailbox was actually a mailing
|
2727
|
+
list. The mailer can either deliver the message to the host
|
2728
|
+
specified by the MB RR, which will in turn do the delivery to
|
2729
|
+
all members, or the mailer can use the MG RRs to do the
|
2730
|
+
expansion itself.
|
2731
|
+
|
2732
|
+
In any of these cases, the response may include a Mail Information
|
2733
|
+
(MINFO) RR. This RR is usually associated with a mail group, but is
|
2734
|
+
legal with a MB. The MINFO RR identifies two mailboxes. One of these
|
2735
|
+
identifies a responsible person for the original mailbox name. This
|
2736
|
+
mailbox should be used for requests to be added to a mail group, etc.
|
2737
|
+
The second mailbox name in the MINFO RR identifies a mailbox that should
|
2738
|
+
receive error messages for mail failures. This is particularly
|
2739
|
+
appropriate for mailing lists when errors in member names should be
|
2740
|
+
reported to a person other than the one who sends a message to the list.
|
2741
|
+
|
2742
|
+
|
2743
|
+
|
2744
|
+
Mockapetris [Page 49]
|
2745
|
+
|
2746
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2747
|
+
|
2748
|
+
|
2749
|
+
New fields may be added to this RR in the future.
|
2750
|
+
|
2751
|
+
|
2752
|
+
9. REFERENCES and BIBLIOGRAPHY
|
2753
|
+
|
2754
|
+
[Dyer 87] S. Dyer, F. Hsu, "Hesiod", Project Athena
|
2755
|
+
Technical Plan - Name Service, April 1987, version 1.9.
|
2756
|
+
|
2757
|
+
Describes the fundamentals of the Hesiod name service.
|
2758
|
+
|
2759
|
+
[IEN-116] J. Postel, "Internet Name Server", IEN-116,
|
2760
|
+
USC/Information Sciences Institute, August 1979.
|
2761
|
+
|
2762
|
+
A name service obsoleted by the Domain Name System, but
|
2763
|
+
still in use.
|
2764
|
+
|
2765
|
+
[Quarterman 86] J. Quarterman, and J. Hoskins, "Notable Computer Networks",
|
2766
|
+
Communications of the ACM, October 1986, volume 29, number
|
2767
|
+
10.
|
2768
|
+
|
2769
|
+
[RFC-742] K. Harrenstien, "NAME/FINGER", RFC-742, Network
|
2770
|
+
Information Center, SRI International, December 1977.
|
2771
|
+
|
2772
|
+
[RFC-768] J. Postel, "User Datagram Protocol", RFC-768,
|
2773
|
+
USC/Information Sciences Institute, August 1980.
|
2774
|
+
|
2775
|
+
[RFC-793] J. Postel, "Transmission Control Protocol", RFC-793,
|
2776
|
+
USC/Information Sciences Institute, September 1981.
|
2777
|
+
|
2778
|
+
[RFC-799] D. Mills, "Internet Name Domains", RFC-799, COMSAT,
|
2779
|
+
September 1981.
|
2780
|
+
|
2781
|
+
Suggests introduction of a hierarchy in place of a flat
|
2782
|
+
name space for the Internet.
|
2783
|
+
|
2784
|
+
[RFC-805] J. Postel, "Computer Mail Meeting Notes", RFC-805,
|
2785
|
+
USC/Information Sciences Institute, February 1982.
|
2786
|
+
|
2787
|
+
[RFC-810] E. Feinler, K. Harrenstien, Z. Su, and V. White, "DOD
|
2788
|
+
Internet Host Table Specification", RFC-810, Network
|
2789
|
+
Information Center, SRI International, March 1982.
|
2790
|
+
|
2791
|
+
Obsolete. See RFC-952.
|
2792
|
+
|
2793
|
+
[RFC-811] K. Harrenstien, V. White, and E. Feinler, "Hostnames
|
2794
|
+
Server", RFC-811, Network Information Center, SRI
|
2795
|
+
International, March 1982.
|
2796
|
+
|
2797
|
+
|
2798
|
+
|
2799
|
+
|
2800
|
+
Mockapetris [Page 50]
|
2801
|
+
|
2802
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2803
|
+
|
2804
|
+
|
2805
|
+
Obsolete. See RFC-953.
|
2806
|
+
|
2807
|
+
[RFC-812] K. Harrenstien, and V. White, "NICNAME/WHOIS", RFC-812,
|
2808
|
+
Network Information Center, SRI International, March
|
2809
|
+
1982.
|
2810
|
+
|
2811
|
+
[RFC-819] Z. Su, and J. Postel, "The Domain Naming Convention for
|
2812
|
+
Internet User Applications", RFC-819, Network
|
2813
|
+
Information Center, SRI International, August 1982.
|
2814
|
+
|
2815
|
+
Early thoughts on the design of the domain system.
|
2816
|
+
Current implementation is completely different.
|
2817
|
+
|
2818
|
+
[RFC-821] J. Postel, "Simple Mail Transfer Protocol", RFC-821,
|
2819
|
+
USC/Information Sciences Institute, August 1980.
|
2820
|
+
|
2821
|
+
[RFC-830] Z. Su, "A Distributed System for Internet Name Service",
|
2822
|
+
RFC-830, Network Information Center, SRI International,
|
2823
|
+
October 1982.
|
2824
|
+
|
2825
|
+
Early thoughts on the design of the domain system.
|
2826
|
+
Current implementation is completely different.
|
2827
|
+
|
2828
|
+
[RFC-882] P. Mockapetris, "Domain names - Concepts and
|
2829
|
+
Facilities," RFC-882, USC/Information Sciences
|
2830
|
+
Institute, November 1983.
|
2831
|
+
|
2832
|
+
Superceeded by this memo.
|
2833
|
+
|
2834
|
+
[RFC-883] P. Mockapetris, "Domain names - Implementation and
|
2835
|
+
Specification," RFC-883, USC/Information Sciences
|
2836
|
+
Institute, November 1983.
|
2837
|
+
|
2838
|
+
Superceeded by this memo.
|
2839
|
+
|
2840
|
+
[RFC-920] J. Postel and J. Reynolds, "Domain Requirements",
|
2841
|
+
RFC-920, USC/Information Sciences Institute,
|
2842
|
+
October 1984.
|
2843
|
+
|
2844
|
+
Explains the naming scheme for top level domains.
|
2845
|
+
|
2846
|
+
[RFC-952] K. Harrenstien, M. Stahl, E. Feinler, "DoD Internet Host
|
2847
|
+
Table Specification", RFC-952, SRI, October 1985.
|
2848
|
+
|
2849
|
+
Specifies the format of HOSTS.TXT, the host/address
|
2850
|
+
table replaced by the DNS.
|
2851
|
+
|
2852
|
+
|
2853
|
+
|
2854
|
+
|
2855
|
+
|
2856
|
+
Mockapetris [Page 51]
|
2857
|
+
|
2858
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2859
|
+
|
2860
|
+
|
2861
|
+
[RFC-953] K. Harrenstien, M. Stahl, E. Feinler, "HOSTNAME Server",
|
2862
|
+
RFC-953, SRI, October 1985.
|
2863
|
+
|
2864
|
+
This RFC contains the official specification of the
|
2865
|
+
hostname server protocol, which is obsoleted by the DNS.
|
2866
|
+
This TCP based protocol accesses information stored in
|
2867
|
+
the RFC-952 format, and is used to obtain copies of the
|
2868
|
+
host table.
|
2869
|
+
|
2870
|
+
[RFC-973] P. Mockapetris, "Domain System Changes and
|
2871
|
+
Observations", RFC-973, USC/Information Sciences
|
2872
|
+
Institute, January 1986.
|
2873
|
+
|
2874
|
+
Describes changes to RFC-882 and RFC-883 and reasons for
|
2875
|
+
them.
|
2876
|
+
|
2877
|
+
[RFC-974] C. Partridge, "Mail routing and the domain system",
|
2878
|
+
RFC-974, CSNET CIC BBN Labs, January 1986.
|
2879
|
+
|
2880
|
+
Describes the transition from HOSTS.TXT based mail
|
2881
|
+
addressing to the more powerful MX system used with the
|
2882
|
+
domain system.
|
2883
|
+
|
2884
|
+
[RFC-1001] NetBIOS Working Group, "Protocol standard for a NetBIOS
|
2885
|
+
service on a TCP/UDP transport: Concepts and Methods",
|
2886
|
+
RFC-1001, March 1987.
|
2887
|
+
|
2888
|
+
This RFC and RFC-1002 are a preliminary design for
|
2889
|
+
NETBIOS on top of TCP/IP which proposes to base NetBIOS
|
2890
|
+
name service on top of the DNS.
|
2891
|
+
|
2892
|
+
[RFC-1002] NetBIOS Working Group, "Protocol standard for a NetBIOS
|
2893
|
+
service on a TCP/UDP transport: Detailed
|
2894
|
+
Specifications", RFC-1002, March 1987.
|
2895
|
+
|
2896
|
+
[RFC-1010] J. Reynolds, and J. Postel, "Assigned Numbers", RFC-1010,
|
2897
|
+
USC/Information Sciences Institute, May 1987.
|
2898
|
+
|
2899
|
+
Contains socket numbers and mnemonics for host names,
|
2900
|
+
operating systems, etc.
|
2901
|
+
|
2902
|
+
[RFC-1031] W. Lazear, "MILNET Name Domain Transition", RFC-1031,
|
2903
|
+
November 1987.
|
2904
|
+
|
2905
|
+
Describes a plan for converting the MILNET to the DNS.
|
2906
|
+
|
2907
|
+
[RFC-1032] M. Stahl, "Establishing a Domain - Guidelines for
|
2908
|
+
Administrators", RFC-1032, November 1987.
|
2909
|
+
|
2910
|
+
|
2911
|
+
|
2912
|
+
Mockapetris [Page 52]
|
2913
|
+
|
2914
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2915
|
+
|
2916
|
+
|
2917
|
+
Describes the registration policies used by the NIC to
|
2918
|
+
administer the top level domains and delegate subzones.
|
2919
|
+
|
2920
|
+
[RFC-1033] M. Lottor, "Domain Administrators Operations Guide",
|
2921
|
+
RFC-1033, November 1987.
|
2922
|
+
|
2923
|
+
A cookbook for domain administrators.
|
2924
|
+
|
2925
|
+
[Solomon 82] M. Solomon, L. Landweber, and D. Neuhengen, "The CSNET
|
2926
|
+
Name Server", Computer Networks, vol 6, nr 3, July 1982.
|
2927
|
+
|
2928
|
+
Describes a name service for CSNET which is independent
|
2929
|
+
from the DNS and DNS use in the CSNET.
|
2930
|
+
|
2931
|
+
|
2932
|
+
|
2933
|
+
|
2934
|
+
|
2935
|
+
|
2936
|
+
|
2937
|
+
|
2938
|
+
|
2939
|
+
|
2940
|
+
|
2941
|
+
|
2942
|
+
|
2943
|
+
|
2944
|
+
|
2945
|
+
|
2946
|
+
|
2947
|
+
|
2948
|
+
|
2949
|
+
|
2950
|
+
|
2951
|
+
|
2952
|
+
|
2953
|
+
|
2954
|
+
|
2955
|
+
|
2956
|
+
|
2957
|
+
|
2958
|
+
|
2959
|
+
|
2960
|
+
|
2961
|
+
|
2962
|
+
|
2963
|
+
|
2964
|
+
|
2965
|
+
|
2966
|
+
|
2967
|
+
|
2968
|
+
Mockapetris [Page 53]
|
2969
|
+
|
2970
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
2971
|
+
|
2972
|
+
|
2973
|
+
Index
|
2974
|
+
|
2975
|
+
* 13
|
2976
|
+
|
2977
|
+
; 33, 35
|
2978
|
+
|
2979
|
+
<character-string> 35
|
2980
|
+
<domain-name> 34
|
2981
|
+
|
2982
|
+
@ 35
|
2983
|
+
|
2984
|
+
\ 35
|
2985
|
+
|
2986
|
+
A 12
|
2987
|
+
|
2988
|
+
Byte order 8
|
2989
|
+
|
2990
|
+
CH 13
|
2991
|
+
Character case 9
|
2992
|
+
CLASS 11
|
2993
|
+
CNAME 12
|
2994
|
+
Completion 42
|
2995
|
+
CS 13
|
2996
|
+
|
2997
|
+
Hesiod 13
|
2998
|
+
HINFO 12
|
2999
|
+
HS 13
|
3000
|
+
|
3001
|
+
IN 13
|
3002
|
+
IN-ADDR.ARPA domain 22
|
3003
|
+
Inverse queries 40
|
3004
|
+
|
3005
|
+
Mailbox names 47
|
3006
|
+
MB 12
|
3007
|
+
MD 12
|
3008
|
+
MF 12
|
3009
|
+
MG 12
|
3010
|
+
MINFO 12
|
3011
|
+
MINIMUM 20
|
3012
|
+
MR 12
|
3013
|
+
MX 12
|
3014
|
+
|
3015
|
+
NS 12
|
3016
|
+
NULL 12
|
3017
|
+
|
3018
|
+
Port numbers 32
|
3019
|
+
Primary server 5
|
3020
|
+
PTR 12, 18
|
3021
|
+
|
3022
|
+
|
3023
|
+
|
3024
|
+
Mockapetris [Page 54]
|
3025
|
+
|
3026
|
+
RFC 1035 Domain Implementation and Specification November 1987
|
3027
|
+
|
3028
|
+
|
3029
|
+
QCLASS 13
|
3030
|
+
QTYPE 12
|
3031
|
+
|
3032
|
+
RDATA 12
|
3033
|
+
RDLENGTH 11
|
3034
|
+
|
3035
|
+
Secondary server 5
|
3036
|
+
SOA 12
|
3037
|
+
Stub resolvers 7
|
3038
|
+
|
3039
|
+
TCP 32
|
3040
|
+
TXT 12
|
3041
|
+
TYPE 11
|
3042
|
+
|
3043
|
+
UDP 32
|
3044
|
+
|
3045
|
+
WKS 12
|
3046
|
+
|
3047
|
+
|
3048
|
+
|
3049
|
+
|
3050
|
+
|
3051
|
+
|
3052
|
+
|
3053
|
+
|
3054
|
+
|
3055
|
+
|
3056
|
+
|
3057
|
+
|
3058
|
+
|
3059
|
+
|
3060
|
+
|
3061
|
+
|
3062
|
+
|
3063
|
+
|
3064
|
+
|
3065
|
+
|
3066
|
+
|
3067
|
+
|
3068
|
+
|
3069
|
+
|
3070
|
+
|
3071
|
+
|
3072
|
+
|
3073
|
+
|
3074
|
+
|
3075
|
+
|
3076
|
+
|
3077
|
+
|
3078
|
+
|
3079
|
+
|
3080
|
+
Mockapetris [Page 55]
|
3081
|
+
|
3082
|
+
|
3083
|
+
Html markup produced by rfcmarkup 1.77, available from http://tools.ietf.org/tools/rfcmarkup/
|