![]() |
mail us | mail this
page products | company | support | downloads | isp services | contact us |
|
DNS records have a binary representation which is used internally in a DNS application e.g. BIND and when transferred between DNS servers. They also also have a text format which is used in a zone files.
Zone File Format
DNS Generic
Record Formats
List of Record
Types
A - IPv4 Address
Record
A6 - IPv6 Address
Record
CNAME - Host Alias
Record
DNAME - Delegate Reverse
Name Record
HINFO - System Information
Record
KEY - DNSSEC Public Key
Record
MX - Mail Exchanger
Record
NS - Name Server
Record
NXT - DNSSEC Content
Record
PTR - Pointer
Record
SIG - DNSSEC Signature
Record
SOA - Start of Authority
Record
SRV - Services
Record
TXT - Text
Record
The SPF record is defined using a TXT record but is not (July 2004) an IETF RFC.
The DNS system defines a number of Resource Records (RRs). The text representation of these records are stored in zone files.
; zone file for mydomain.com $TTL 12h ; default TTL for zone @ IN SOA ns1.mydomain.com. root.mydomain.com. ( 2003080800 ; se = serial number 3h ; ref = refresh 15m ; ret = update retry 3w ; ex = expiry 3h ; min = minimum ) IN NS ns1.mydomain.com. IN MX 10 mail.anotherdomain.com. joe IN A 192.168.254.3 www IN CNAME joe
The above example shows a very simple but fairly normal zone file. The following notes apply to zone files:
name ttl class rr parameterThe value of 'parameter' is defined by the record and is described for each Resource Record type in the sections below.
Resource records are always represented by textual records. The generic representation of each Resource Record is shown below:
Note: The record format shown below is as defined in the RFCs and is used internally or when transferring information across a network e.g. during a DNS XFER. Do not confuse this with the format you use to define an entry in a zone source file.
NAME | TYPE | CLASS | TTL | RDLENGTH | RDATA |
Where:
NAME | The name of the node to which this record belongs |
TYPE | The resource record type which determines the value(s) of the RDATA field. Type takes one of the values below. |
CLASS | A 16 bit value which defines the protocol family or an instance of the protocol. The normal value is IN = Internet protocol (other values are HS and CH both historic MIT protocols). |
TTL | 32 bit value. The time to Live in seconds (range is 1 to x). The value zero indicates the data should not be cached. |
RDLENGTH | The total length of the RDATA records. |
RDATA | Data content of each record is defined by the TYPE and CLASS values. |
The current DNS RFCs define the following Resource Record Types:
Note: There are a number of other record types which were defined over the years and are no longer actively supported these include MD, MF, MG, MINFO, MR, NULL. A full list of DNS Record Types may be obtained from IANA DNS Parameters.
RR Type | Value | Description |
A | 1 | IPv4 Address record. An IP address for a host within the zone. RFC 1035. |
AAAA | 28 | Obsolete IPv6 Address record. An IP address for a host within the zone. |
A6 | 38 | IPv6 Address record. An IP address for a host within the zone. RFC2874. |
AFSDB | 18 | Location of AFS servers. Experimental - special apps only. RFC 1183. |
CNAME | 5 | Canonical Name. An alias name for a host. RFC 1035. |
DNAME | 39 | Delegation of reverse addresses. RFC2672. |
HINFO | 13 | Host Information - optional text data about a host. RFC 1035. |
ISDN | 20 | ISDN address. Experimental = special applications only. RFC 1183. |
KEY | 25 | DNSSEC. Public key associated with a DNS name. RFC 2535. |
LOC | 29 | Stores GPS data. Experimental - special apps only. RFC 1876. |
MX | 15 | Mail Exchanger. A preference value and the host name for a mail server/exchanger that will service this zone. RFC 974 and 1035. |
NS | 2 | Name Server. Defines the authoritative name server for the domain defined in the SOA record. May be more than 1 NS record. RFC 1035. |
NXT | 30 | DNSSEC Next Domain record type. RFC 2535. |
PTR | 12 | A pointer to a sub domain. RFC 1035. |
RP | 17 | Information about responsible person. Experimental - special apps only. RFC 1183. |
RT | 21 | Through-route binding. Experimental - special apps only. RFC 1183. |
SOA | 6 | Start of Authority. Defines the zone name, an e-mail contact and various time and refresh values applicable to the zone. RFC 1035. |
SRV | 33 | Information about well known network services. RFC 2782. |
SIG | 24 | DNSSEC. Signature - contains data authenticated in a secure DNS. RFC 2535. |
TXT | 16 | Text information associated with a name. RFC 1035. |
WKS | 11 | Well Known Services. Experimental - special apps only (replaced with SRV). RFC 1035. |
X25 | 19 | X.25 address. Experimental - special apps only. RFC 1183. |
Directives start with '$' and are standardized (defined in RFC 1035) - $TTL, $ORIGIN and $INCLUDE. BIND additionally provides the non-standard $GENERATE directive.
Directive | Description |
$INCLUDE | Includes the defined file in-line. |
$ORIGIN | Defines the base name (aka label) to be used for 'unqualified' name substitution. |
$TTL | Defines global Time-to-Live (TTL) values. |
Copyright © 1994 - 2004 ZyTrax, Inc. All rights reserved. Legal and Privacy |
site by zytrax |
web-master
at zytrax Page modified: September 14 2004. |
tech info
guides home
intro
contents
1 objectives
big
picture
2
concepts
3 reverse
map
4 dns
types
quickstart
5 bind
6
samples
reference
7 named.conf
8 dns
records
operations
9 howtos
10 trouble
11
errors
programming
12 bind
api's
security
13 dns security
bits &
bytes
15
messages
resources
notes & tips
registration FAQ
dns resources
dns rfc's
This
work is licensed under a Creative Commons
License.
If you are happy it's OK - but your browser is giving a less than optimal experience on our site. You could, at no charge, upgrade to a W3C STANDARDS COMPLIANT browser such as Mozilla
FreeBSD
NetBSD
OpenBSD
DragonFlyBSD
Linux
OpenOffice
Mozilla
SourceForge
GNU-Free SW Foundation
Open Source Initiative
Creative
Commons
English |
French |