dns Type,Host,Value
Type: A, AAAA, CNAME, TXT, MX, ALIAS
Host: @ or www
Value: ip or domain or ...
dig @dnsserver dns
dig ns xx.com
dig +short xx
dig -x ip
dig +trace dns
a record ipv4
aaaa record ipv6
cname for internal redirect
SOA auth
PTR ip -> domain name
NS name server
TTL time to live(cache for how long)
Name Server
A DNS name server is a server that stores the DNS records, such as address (A,AAAA) records, name server (NS) records, and mail exchanger (MX) records for a domain name.
CNAME
The ‘canonical name’ (CNAME) record is used in lieu of an A record, when a domain or subdomain is an alias of another domain. All CNAME records must point to a domain, never to an IP address.
For example, suppose blog.example.com has a CNAME record with a value of ‘example.com’ (without the ‘blog’). This means when a DNS server hits the DNS records for blog.example.com, it actually triggers another DNS lookup to example.com, returning example.com’s IP address via its A record.
This way if the IP address of the host changes, only the DNS A record for the root domain needs to be updated and all the CNAME records will follow along with whatever changes are made to the root.
SOA
The DNS ‘start of authority’ (SOA) record stores important information about a domain or zone such as the email address of the administrator, when the domain was last updated, and how long the server should wait between refreshes.All DNS zones need an SOA record in order to conform to IETF standards. SOA records are also important for zone transfers.
name example.com
record type SOA
MNAME ns.primaryserver.com
RNAME admin.example.com
SERIAL 1111111111
REFRESH 86400
RETRY 7200
EXPIRE 4000000
TTL 11200
MNAME: This is the name of the primary nameserver for the zone.
The ‘RNAME’ value here represents the administrator’s email address
SERIAL: When the serial number changes in a zone file, this alerts secondary nameservers that they should update their copies of the zone file via a zone transfer.
REFRESH: The length of time (in seconds) secondary servers should wait before asking primary servers for the SOA record to see if it has been updated.
RETRY: The length of time a server should wait for asking an unresponsive primary nameserver for an update again.
EXPIRE: If a secondary server does not get a response from the primary server for this amount of time, it should stop responding to queries for the zone.
DNS zone
A DNS zone is a distinct part of the domain name space, delegated to a specific legal entity which is responsible for managing it.
For example, a root domain such as “acme.com” is a DNS zone, which can be delegated to a company, Acme Corporation Inc. Acme Corporation then assumes responsibility for setting up a primary DNS server, called an Authoritative Name Server, which holds correct DNS records for that domain.
DNS zones exist at higher and lower levels of the DNS hierarchy. For example, the Top Level Domain “.com” is also a DNS zone, which has an Authoritative Name Server providing DNS records for all the domains in the “.com” namespace. A subdomain, such as “support.acme.com” is also a DNS zone, which can be managed by Acme Corporation, or delegated to another entity.
Primary and Secondary DNS
Primary (Master) DNS zone for control and Secondary (Slave) DNS zone for redundancy and better performance.
Primary DNS zone contains all the original DNS records and controll zone file. This file contains the authoritative DNS information for the domain or subdomain. “Authoritative” means it is the trusted source for information like the IP address of the domain, administrator contact information, and settings like Time to Live. And the second gets them from the Primary DNS zone. The process is called DNS zone transfer. The Primary DNS server could push it, or the secondary can get the changes when its cache expires.
The Secondary DNS zone is a read-only copy of the zone data.
(°0°)
(°0°)
DNS Zone VS .Domain
In the domain namespace, the biggest difference between the domains and zones is that domains provide logical structure, and the zones provide an administrative structure.
A domain is a subtree of the domain namespace. It shares its name with that of the top-most node, like yoursite.eu (eu domain). It could be divided into various zones that can be controlled separately.
DNS Resolvers
A DNS resolver is a local server that stores a central database of DNS nameservers and manages DNS requests for all the clients on your network.