DNS - Record
Table of Contents
About
A DNS record is a row in a DNS database.
Articles Related
Syntax
A record is a text line.
<name> <ttl> <class> <type> <rdata>
- name is the name or IP address for a ptr record
- ttl is the the time to live in the cache
- class is the network class being used. No more used only for compatiblity
- IN for Internet (The default and only)
- HS for Hesiod (deprecated)
- CH for Chaosnet (deprecated)
- type is the type of record
- rdata is output of the lookup
Example
Example of a A record.
api IN A 164.132.99.202
where:
- api is a relative name
- IN is the INTERNET class (An other value is ANY)
- A is the A record
- 164.132.99.202 is the Ip address
If the apex domain is example.com, this entry will point the qualified domain name api.example.com to the ip 164.132.99.202
Type
Pointer
Pointer record match a name to a destination
- An A record maps a domain name to an IP address Version 4
- An AAAA'' record maps a domain name to an IP address Version 6.
- The NS record determines your DNS server - nameserver,
- CNAME - name to name alias
- ALIAS - name to ip alias
- PTR - reverse
Extended
- CAA
- NAPTR
- LOC
- SSHFP
- TLAS
- DNS - MX record (Mail Exchanger Record) - point to the mail server,
- SRV Record (Service AutoDiscovery) for email autodicovery
There is also a TXT record for each of the following mail authentication mechanism.
Others
- ANY,
- SOA,
Query
Nslookup
With nslookup if we want to see the TXT record
nslookup -type=TXT bytle.net
Server: amplifi.lan
Address: 192.168.135.1
Non-authoritative answer:
bytle.net text =
"v=spf1 a include:vps748761.ovh.net -all"
Dig
dig -t TXT DOMAIN
Time To Live (TTL)
The Time To Live (TTL) of a DNS record is generally of 5 minutes.
If clients cache the results of host name lookups in order to achieve a performance improvement, they MUST observe the TTL information reported by DNS. Ref - DNS Spoofing