DNS Basic

Structure of a DNS

DNS uses a hierarchical tree based name structure.

  • Generic TLD(gTLD)
  • Country Code TLD(ccTLD)

Authority, Delegation and Zone

The authority for the root domain and gTLD lies with Internet Corporation for Assigned Number and Names(ICANN).

ccTLD's are delegated to individual countries for administration purpose. Each level in the hierarchy may delegate the authoritative control to the next lower level.

A zone is is simply a portion of a domain.

Resource Records

A DNS zone database is made up of collection of resource records.

  • A Record: The 'A' record specifies the IP address of a host.
  • PTR Record: A PTR record maps the IP Address to specific host.
  • NS Record: A NS record or name server record maps a domain name to a list of DNS
  • servers authoritative for that domain. Delegations depend on NS records.
  • MX Record: An MX record or mail exchange record maps a domain name to a list of mail exchange servers for that domain.

DNS Queries

Types of DNS queries:

  • Recursive query
  • Iterative query
  • Inverse query

Process of a DNS query:

  1. Host sends query 'What is the IP address of a.example.com' to locally configured DNS server.
  2. DNS server looks up a.example.com in local tables - not found.
  3. DNS sends query to a root-server for the IP of a.example.com
  4. The root-server replies with a referral to the TLD servers for .com.
  5. The DNS server sends query 'What is the IP address a.example.com' to one of the .com TLS servers.
  6. The TLD server replies with a referral to the name servers for the example.com
  7. The DNS server sends query 'What is the IP address a.example.com' to name server for exampe.com
  8. Zone file defines a A record which shows 'a"s IP address is XXX'
  9. DNS returns the A record for 'a'

Setting up a DNS Server

A DNS server, or name server, is used to resolve an IP address to a hostname or vice versa.

  • A master DNS server for your domain(s), which stores authoritative records for your domain
  • A slave DNS server, which relies on a master DNS server for data
  • A caching-only DNS server, which store recent all requests like proxy server. It otherwise refer to other DNS servers.
  • A forwarding-only DNS server, which refers to all request to other DNS servers.

Provide a central way to manage your internal hostnames and private IP addresses, which is indispensable when your environment expands to more than a few hosts.

Error occur:

ERR_ADDRESS_INVALID

sudo route delete example.com

sudo ifconfig en0 down # take the networking interface down
sudo route flush # flush the route table
sudo ifconfig en0 up # take the interface back online

results matching ""

    No results matching ""