Chapter 4 Name Resolution Overview Understand the domain name service DNS Identify the components of DNS Configure zone files Install and configure DNS in Linux Understand name resolution in Windows ID: 569004
Download Presentation The PPT/PDF document "Web Server Administration" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Web Server Administration
Chapter 4
Name ResolutionSlide2
Overview
Understand the domain name service (DNS)
Identify the components of DNS
Configure zone files
Install and configure DNS in Linux
Understand name resolution in Windows
Install and configure DNS in Windows 2000 and 2003
Troubleshoot DNS
Use WINS to resolve computer names in WindowsSlide3
Name Resolution
Converting a URL to the IP address
Also called Address Resolution
DNS – Domain Name Server
Converts URL to IP address
Converts IP address to URLSlide4
Understanding the DNS
DNS
is most known as an Internet wide service
Goal is to decentralize administration
Local DNS servers keep track of local IP addresses
Unknown addresses use a forwarder – a public DNS server to find IP address
IP addresses are cashed locally based on Time To Live (TTL)Slide5
Understanding DNS
Local DNS servers manage local domain namespace
Root DNS servers – control top level domains
DNS database is an inverted treeSlide6
DNS Namespace
DNS hierarchy naming system
Root level
Top level (TLD)
Second level (SLD)
Subdomains/hostsSlide7
Domain Namespaces
The root level domain is "."
Significant in creating DNS files
Top-level domains include com, org,
fr
Second-level
domains are often owned by companies and individuals
microsoft.com,
edinboro.edu
A subdomain is a further division of a second-level domain
For
edinboro.edu
, there is
cs.edinboro.edu Slide8
Top-Level
Domains
First seven:
com,
edu
,
gov
, mil, net, org, in-
addr.arpa
Others added over the years
TOP Level DomainsSlide9
Second Level Domains
Second-level domains, such as
spidermonkey.com have
control over naming within their
domain.
SLD is a registered domain name with Top level domain registry.Slide10
Sub-domains
Create hosts such as www, ftp, bb
We could create subdomains such as csci325
csci325.cs.edinboro.edu
Fully qualified domain name (FQDN) – name that absolutely identifies a computer.
Ends in a period to indicate absolute vs relative.
csci325.cs.edinboro.edu.Slide11
Host Names
The first portion of a URL is typically a host name
Not the same as the “name” of the computer
Many hosts can be associated with the same Web serverSlide12
How DNS WorksSlide13
DNS
System Components
Name server
– also known as DNS server
supports name-to-address and address-to-name
resolution
Name resolver
– also called DNS client
Can contact DNS server to lookup name
Used by browsers, e-mail clients, and client utilities such as
pingSlide14
DNS
System Components
Two categories of DNS servers –
Primary
and secondary servers store the host names
for a specific domain
Caching and forwarding servers search the Internet for host
names
Root server (for TLD) contacted by the caching and forwarding server
Root ServersSlide15
Primary and Secondary Servers
Primary
Server – master server
Defines the hosts for the domain
Maintains the database for the
domain (DNS Zone)
It has authority for the domain
Secondary
Server – slave server
Retrieves data
from primary
server at regular intervals
Provides fault tolerance and load distribution
Required for Internet domainsSlide16
Primary and Secondary Servers
If you use DNS, you will often work with your ISP
simplest environment: the
ISP will have
both the
primary and secondary DNS servers
You contact them for changes
You can also split the servers
ISP has primary, you have secondary
You have primary, ISP has secondarySlide17
Resolve Host Names
Caching Server
Resolves host names
Caches (saves) the results
Automatically installed when DNS is installed
No
more configuration
necessary
Forwarding Server
Caching server that has access to the Internet and forwards traffic from other caching serversSlide18
Caching and Forwarding ServersSlide19
DNS server summary
Primary and secondary servers are accessed
by users on the Internet
to determine IP addresses of
your domain
Caching and forwarding are accessed
by your users
to determine IP addresses of hosts on the InternetSlide20
Zone Files for Primary and S
econdary DNS Server
Records that specify the hostnames in your domain and their IP addresses
When you register a domain name you must provide primary and secondary DNS server.
ISP could control this and would provide a way to edit the zone files
You could control it and then configure files yourself.Slide21
Zone Files for Primary and Secondary DNS Server
All systems in your network must have TCP/IP configuration with IP address of primary DNS server
Can also have IP address of secondary DNS server (could be ISP)Slide22
Zones
Domain is divided into zones
Data for each zone is stored in a zone file
Small domains are divided into one zone
Large organizations
(such as IBM
) with many
subdomains can be divided into separately maintained zones
Each zone typically has a
separate DNSSlide23
Zones
There
must be one primary DNS server in each zone (plus a secondary server)
Each zone can have multiple secondary DNS serversSlide24
Zone File Configuration
Forward Lookup
These zones contain entries that map names to IP addresses
Reverse Lookup
These zones contain entries that map IP addresses to namesSlide25
Common DNS Records
DNS record
Function
Address (A)
Associates a host to an IP address.
Canonical name (CNAME)
Creates an alias for a specified host.
Internet (IN)
Identifies Internet records; precedes most DNS record entries.
Mail Exchanger (MX)
Identifies a server used for processing and delivering e-mail for the domain.
Name server (NS)
Identifies DNS servers for the DNS domain.
Pointer (PTR)
Performs reverse DNS lookups. Resolves an IP address to a host name.
Start of Authority (SOA)
Identifies the DNS server with the most current information for the DNS domain. Slide26
BIND
BIND - Berkley Internet Name Daemon
Carries out the DNS translation
Bind documentation files
Need to install BIND
Connect to the internet
y
um –y install bind bind-
utilsSlide27
DNS Configuration in Linux
/
etc
/
named.conf
describes the files that configure the zones
There are two primary files that it
describes
(saved in /
var
/named/)
Forward lookup is described by
named.zimmer.edu
It has the host names and how to handle e-mail
Reverse lookup is described by named.0.168.192
Can be necessary for e-mail (SMTP) and security programsSlide28
/
etc
/
named.conf
Creating a DNS for the
zimmer.edu
domain
Default setup is for localhost 127.0.0.1
In
named.conf
add the following line
zone
“zimmer.edu"
{
type
master;
file
“
named.zimmer.edu”;
};
This allows
zimmer.edu
to be resolved by /
var/named/name.zimmer.edu
There can be multiple domains in a single
named.conf
fileSlide29
/etc/named.conf
Also, we can add the following line
zone “0.168.192.in-addr.arpa” IN {
type
master;
file
“named.0.168.192”;
};
This allows for reverse lookup for the domain
It uses all or part of the 192.168.0.0 networkSlide30
/etc
/
named.conf
options {
directory “/
var
/named
”;
recursion yes;
allow-recursion { 192.168.0.0/24; };
allow-query {“localhost”; 192.168.0.0/24; };
};
zone "zimmer.edu" IN {
type master;
file "named.zimmer.edu";
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "named.0.168.192";
};Slide31
/
var/named.zimmer.edu
$TTL 2d
@ IN SOA ns.zimmer.edu. admin.zimmer.edu. (
2015010900 ; Serial
3h ; Refresh
1h ; Retry
1w ; Expire
1d ) ; Minimum
zimmer.edu. IN NS ns.zimmer.edu.
zimmer.edu. IN A 192.168.0.101
zimmer.edu. IN MX 10 mailserver1.zimmer.edu.
ns.zimmer.edu. IN A 192.168.0.101
www IN CNAME ns.zimmer.edu.
www.support IN CNAME ns.zimmer.edu.
mailserver1.zimmer.edu. IN A 192.168.0.201Slide32
named.0.168.192
$TTL 2d
@ IN SOA ns.zimmer.edu. admin.zimmer.edu. (
2015010912 ; Serial
3d ; Refresh
1h ; Retry
1w ; Expire
1d ) ; Minimum
@ IN NS ns.zimmer.edu.
101.0.168.192.in-addr.arpa. IN PTR ns.zimmer.edu.
201.0.168.192.in-addr.arpa. IN PTR mailserver1.zimmer.edu.Slide33
Starting DNS in Linux
To start DNS
/
etc
/
rc.d
/
init.d
/named start
To restart DNS
/
etc
/
rc.d
/
init.d
/named restart
To stop DNS
/
etc
/
rc.d
/
init.d
/named stop
Make DNS start when you boot Linux
Add the command to start DNS to /
etc
/
rc.d
/
rc.localSlide34
Configuring Client DNS in Linux
Modify /
etc
/
resolv.config
The following line directs the client to use the DNS server at 192.168.0.100
nameserver
192.168.0.100
The following line associates this computer with the
zimmer.edu
domain
domain
zimmer.eduSlide35
Troubleshooting
DNS - ping
ping displays name resolution even if the computer cannot be contactedSlide36
Troubleshooting DNS
nslookup
nslookup can display information from the DNS serverSlide37
Troubleshooting DNS
dig – available on LinuxSlide38
Summary
DNS is an application that translates names to IP addresses and IP addresses to names
Organized in a hierarchical structure
Servers come in many forms: primary, secondary, caching, forwarding
To configure DNS, set up a forward and reverse
zone lookup file
Use ping,
nslookup
, and dig to troubleshoot DNS