Each DNS Resource Records has a type (name and number), an Expiration Date (time to live), a class, and type-specific data.
DNS Resource Records of the same type are described as a resource record set (RRset). The order of resource records in a set, which is returned by a DNS resolvers to an application, is undefined, but often servers implement round-robin ordering to achieve load balancing. The Domain Name System Security Extensions (DNSSEC), however, work on the complete set of resource record in canonical order.
Resource record (RR) fields
Field | Description | Length (Octet) |
---|---|---|
NAME | Name of the node to which this record pertains | Variable |
TYPE | DNS record type of RR in numeric form (e.g., 15 for MX RRs) | 2 |
CLASS | Class code | 2 |
TTL | Count of seconds that the RR stays valid (The maximum is 231−1, which is about 68 years) | 4 |
RDLENGTH | Length of RDATA field | 2 |
RDATA | Additional RR-specific data | Variable, as per RDLENGTH |