Domain Name System
(DNS)
Presented By:
Konkona Basu
The DNS is…

The “Domain Name System”
Created in 1983 by Paul Mockapetris (RFCs 1034 and
1035), modified, updated, and enhanced by a myriad of
subsequent RFCs

What Internet users use to reference anything by name
on the Internet

The mechanism by which Internet software translates
names to addresses and vice versa
The Resolution Process
Let’s look at the resolution process step-by-step:
Annie
The Resolution Process
The workstation Annie asks its configured name server,
NS, for www.skyfall.com’s address
NS
Annie
What’s the IP address
of www.skyfall.com?
The Resolution Process
The name server NS asks a root name server, m, for
www.skyfall.com’s address
NS
Annie
m.root-servers.net
What’s the IP address
of www.skyfall.com?
The Resolution Process

The root server m refers NS to the com name servers

This type of response is called a “referral”
NS
Annie
m.root-servers.net
Here’s a list of the
com name servers.
Ask one of them.
The Resolution Process
The name server NS asks a com name server, f, for
www.skyfall.com’s address
NS
Annie
m.root-servers.net
f.gtld-servers.net
What’s the IP address
of www.skyfall.com?
The Resolution Process
The com name server f refers NS to the skyfall.com
name servers
NS
Annie
m.root-servers.net
f.gtld-servers.net
Here’s a list of
the skyfall.com
name servers.
Ask one of them.
The Resolution Process
The name server NS asks an skyfall.com name server, ns1, for
www.skyfall.com’s address
NS
Annie
m.root-servers.net
f.gtld-servers.net
ns1.mydomain.net
What’s the IP address
of www.skyfall.com?
The Resolution Process
The skyfall.com name server ns1 responds with
www.skyfall.com’s address
NS
Annie
m.root-servers.net
f.gtld-servers.net
ns1.mydomain.net
Here’s the IP
address for
www.skyfall.com
The Resolution Process
The name server NS responds to Annie with
www.skyfall.com’s address
NS
Annie
m.root-servers.net
f.gtld-servers.net
ns1.nominum.net
Here’s the IP
address for
www.skyfall.com
Resolution Process (Caching)

After the previous query, the name server NS now knows:

The names and IP addresses of the com name servers

The names and IP addresses of the skyfall.com name
servers

The IP address of www.skyfall.com

Let’s look at the resolution process again
Annie
Resolution Process (Caching)
The workstation Annie asks its configured name server,
NS, for www.skyfall.com’s address
NS
Annie
m.root-servers.net
f.gtld-servers.net
ns1.mydomain.net
What’s the IP
address of
www.skyfall.com?
Resolution Process (Caching)
NS has cached a name server record indicating ns1 is an
skyfall.com name server, so it asks it for www.skyfall.com’s
address
NS
Annie
m.root-servers.net
f.gtld-servers.net
ns1.mydomain.net
What’s the IP address
of www.skyfall.com?
Resolution Process (Caching)
The name server NS responds to Annie with
www.skyfall.com’s address
NS
Annie
m.root-servers.net
f.gtld-servers.net
ns1.mydomain.net
Here’s the IP
address for
www.skyfall.com
Files it goes through
/etc/nsswitch.conf
/etc/hosts
/etc/resolv.conf
/etc/named.conf
Zone file
Common Issues...
Mail Delivery Failure: host lookup did not
complete
Error Message:
=========
2012-11-14 21:08:10 1TYhN3-0000n4-2S ==
bradg@granbygroup.com R=lookuphost
defer (-1): host lookup did not complete
=========
Solution
Add below content in /etc/resolv.conf
=========
root@server [/]# cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
root@server [/]#
=========
Hostname – IP mismatch warning
Mail:
IMPORTANT: Do not ignore this email. The hostname
(hostname.server.com) resolves to xx.xx.xx.xx. It should
resolve to xx.xx.xx.xx. Please be sure to correct
/etc/hosts as well as the ‘A’ entry in zone file for the
domain. Some are all of these problems can be caused
by /etc/resolv.conf being setup incorrectly. Please check
this file if you believe everything else is correct. You may
be able to automatically correct this problem by using the
‘Add an A entry for your hostname’ under ‘Dns Functions’
in your Web Host Manager
Solution

Check if the domain is using external nameserver. If so then the
hostname should be missing an A record there.

If its using our name servers then check for the A record entry in
our name servers.

If a record is correct then execute the following command in
backend:
root@myserver [~]# /scripts/ipcheck

If there are errors, we should go ahead and edit /etc/hosts file
root@myserver [~]# cat /etc/hosts
127.0.0.1 localhost
xx.xx.xx.xx myserver.mydomain.com myserver

Then execute the command /scripts/ipcheck again. If there are no
errors then it will not return any message.
A VPS Customer wants to have an addon
domain. He wants to register the domain with
us.

Move to sales.

If the domain is registered check the name servers.

If its our central name server check if the DNS entries
are there in our name servers.

If its his custom name server in VPS, check if the A
record is set correctly in the zone file.

Check if the addon domain is resolving properly or not.
DNS and Troubleshooting DNS issues in Linux

DNS and Troubleshooting DNS issues in Linux

  • 1.
  • 2.
    The DNS is…  The“Domain Name System” Created in 1983 by Paul Mockapetris (RFCs 1034 and 1035), modified, updated, and enhanced by a myriad of subsequent RFCs  What Internet users use to reference anything by name on the Internet  The mechanism by which Internet software translates names to addresses and vice versa
  • 3.
    The Resolution Process Let’slook at the resolution process step-by-step: Annie
  • 4.
    The Resolution Process Theworkstation Annie asks its configured name server, NS, for www.skyfall.com’s address NS Annie What’s the IP address of www.skyfall.com?
  • 5.
    The Resolution Process Thename server NS asks a root name server, m, for www.skyfall.com’s address NS Annie m.root-servers.net What’s the IP address of www.skyfall.com?
  • 6.
    The Resolution Process  Theroot server m refers NS to the com name servers  This type of response is called a “referral” NS Annie m.root-servers.net Here’s a list of the com name servers. Ask one of them.
  • 7.
    The Resolution Process Thename server NS asks a com name server, f, for www.skyfall.com’s address NS Annie m.root-servers.net f.gtld-servers.net What’s the IP address of www.skyfall.com?
  • 8.
    The Resolution Process Thecom name server f refers NS to the skyfall.com name servers NS Annie m.root-servers.net f.gtld-servers.net Here’s a list of the skyfall.com name servers. Ask one of them.
  • 9.
    The Resolution Process Thename server NS asks an skyfall.com name server, ns1, for www.skyfall.com’s address NS Annie m.root-servers.net f.gtld-servers.net ns1.mydomain.net What’s the IP address of www.skyfall.com?
  • 10.
    The Resolution Process Theskyfall.com name server ns1 responds with www.skyfall.com’s address NS Annie m.root-servers.net f.gtld-servers.net ns1.mydomain.net Here’s the IP address for www.skyfall.com
  • 11.
    The Resolution Process Thename server NS responds to Annie with www.skyfall.com’s address NS Annie m.root-servers.net f.gtld-servers.net ns1.nominum.net Here’s the IP address for www.skyfall.com
  • 12.
    Resolution Process (Caching)  Afterthe previous query, the name server NS now knows:  The names and IP addresses of the com name servers  The names and IP addresses of the skyfall.com name servers  The IP address of www.skyfall.com  Let’s look at the resolution process again Annie
  • 13.
    Resolution Process (Caching) Theworkstation Annie asks its configured name server, NS, for www.skyfall.com’s address NS Annie m.root-servers.net f.gtld-servers.net ns1.mydomain.net What’s the IP address of www.skyfall.com?
  • 14.
    Resolution Process (Caching) NShas cached a name server record indicating ns1 is an skyfall.com name server, so it asks it for www.skyfall.com’s address NS Annie m.root-servers.net f.gtld-servers.net ns1.mydomain.net What’s the IP address of www.skyfall.com?
  • 15.
    Resolution Process (Caching) Thename server NS responds to Annie with www.skyfall.com’s address NS Annie m.root-servers.net f.gtld-servers.net ns1.mydomain.net Here’s the IP address for www.skyfall.com
  • 16.
    Files it goesthrough /etc/nsswitch.conf /etc/hosts /etc/resolv.conf /etc/named.conf Zone file
  • 17.
    Common Issues... Mail DeliveryFailure: host lookup did not complete Error Message: ========= 2012-11-14 21:08:10 1TYhN3-0000n4-2S == bradg@granbygroup.com R=lookuphost defer (-1): host lookup did not complete =========
  • 18.
    Solution Add below contentin /etc/resolv.conf ========= root@server [/]# cat /etc/resolv.conf nameserver 8.8.8.8 nameserver 8.8.4.4 root@server [/]# =========
  • 19.
    Hostname – IPmismatch warning Mail: IMPORTANT: Do not ignore this email. The hostname (hostname.server.com) resolves to xx.xx.xx.xx. It should resolve to xx.xx.xx.xx. Please be sure to correct /etc/hosts as well as the ‘A’ entry in zone file for the domain. Some are all of these problems can be caused by /etc/resolv.conf being setup incorrectly. Please check this file if you believe everything else is correct. You may be able to automatically correct this problem by using the ‘Add an A entry for your hostname’ under ‘Dns Functions’ in your Web Host Manager
  • 20.
    Solution  Check if thedomain is using external nameserver. If so then the hostname should be missing an A record there.  If its using our name servers then check for the A record entry in our name servers.  If a record is correct then execute the following command in backend: root@myserver [~]# /scripts/ipcheck  If there are errors, we should go ahead and edit /etc/hosts file root@myserver [~]# cat /etc/hosts 127.0.0.1 localhost xx.xx.xx.xx myserver.mydomain.com myserver  Then execute the command /scripts/ipcheck again. If there are no errors then it will not return any message.
  • 21.
    A VPS Customerwants to have an addon domain. He wants to register the domain with us.  Move to sales.  If the domain is registered check the name servers.  If its our central name server check if the DNS entries are there in our name servers.  If its his custom name server in VPS, check if the A record is set correctly in the zone file.  Check if the addon domain is resolving properly or not.