DNS Record Format and Types

http://en.wikipedia.org/wiki/List_of_DNS_record_types

http://www.zytrax.com/books/dns/ch8/

工作中需要理解DNS Resource Record的相关信息,目前把使用的11种record整理一下,供开发和测试更好的理解产品,不至于感觉在云里雾里,从而有助于开发高质量的产品。

      RR Type     Value      RFC      Description

  • SOA      6      RFC 1035      Start of Authority. Defines the zone name, an e-mail contact and various time and refresh values applicable to the zone.(marks the start of a zone of authority)
  • A     1     RFC 1035     IPv4 Address record. An IPv4 address for a host.(a host address)
  • CNAME      5      RFC 1035      Canonical Name. An alias name for a host.(the canonical name for an alias)
  • HINFO      13      RFC 1035      Host Information - optional text data about a host.(host information:CPU type and OS type)
  • MX      15      RFC 1035      Mail Exchanger. A preference value and the host name for a mail server/exchanger that will service this zone. RFC 974 defines valid names.(mail exchange)
  • NS      2      RFC 1035      Name Server. Defines the authoritative name server(s) for the domain (defined by the SOA record) or the subdomain.(an authoritative name server)
  • PTR      12      RFC 1035      IP address (IPv4 or IPv6) to host. Used in reverse maps.(a domain name pointer)
  • TXT      16      RFC 1035      Text information associated with a name. The SPF record should be defined using a TXT record and may (as of April 2006) be defined using an SPF RR. DKIM (RFC 4871 also makes use of the TXT RR for authenticaing email. How to define DKIM/ADSP RRs.(text strings)
  • SRV      33      RFC 2872      Defines services available in the zone, for example, ldap, http etc..
  • RP      17      RFC 1183      Information about responsible person. Experimental - special apps only.
  • AAAA     28     RFC 3596     IPv6 Address record. An IPv6 address for a host. Current IETF recommendation for IPv6 forward-mapped zones.

All RRs have the same top level format shown below:                                  
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                                               |
    /                                               /
    /                      NAME                     /
    |                                               |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                      TYPE                     |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                     CLASS                     |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                      TTL                      |
    |                                               |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
    |                   RDLENGTH                    |
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--|
    /                     RDATA                     /
    /                                               /
    +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+


where:

NAME            an owner name, i.e., the name of the node to which this resource record pertains.

TYPE            two octets containing one of the RR TYPE codes.

CLASS           two octets containing one of the RR CLASS codes.

TTL             a 32 bit signed integer that specifies the time interval that the resource record may be cached before the source of the information should again be consulted.  Zero values are interpreted to mean that the RR can only be used for the transaction in progress, and should not be cached.  For example, SOA records are always distributed with a zero TTL to prohibit caching.  Zero values canalso be used for extremely volatile data.(0-2147483647)

RDLENGTH        an unsigned 16 bit integer that specifies the length in octets of the RDATA field.
RDATA           a variable length string of octets that describes the resource.  The format of this information varies according to the TYPE and CLASS of the resource record.


posted on 2011-04-08 15:26  -Anny-  阅读(593)  评论(0编辑  收藏  举报