Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Name Resolution
Overview
Understand the domain name service (DNS) Identify the components of DNS Configure zone files Install and configure DNS in Linux Troubleshoot DNS
Also called name resolution or address resolution Whenever a host is added, a configuration file has to be manually changed A host represents a service on a server such as FTP or a Web server There can be many hosts on a single computer
Clients
On your PC, the TCP/IP configuration contains the address(es) of your DNS server(s) Whenever you use a URL, whether in a browser, or a utility such as ping, DNS servers are used
Domain Namespaces
microsoft.com, devry.edu
Domain Namespaces
Second-level domains, such as devry.edu have control over naming within their domain Create hosts such as www, ftp, bb A name such as www.devry.edu is a fully qualified domain name (FQDN) We could create subdomains such as phx
www.phx.devry.edu
.biz - businesses .info - anyone can register .name - must register first and last name .pro - for professionals only
Host Names
The first portion of a URL is typically a host name Typically different from the name of the computer Many hosts can be associated with the same Web server
DNS Components
supports name-to-address and address-toname resolution Can contact DNS server to lookup name Used by browsers, e-mail clients, and client utilities such as ping and tracert
Primary and secondary servers store the host names used on the Internet Caching and forwarding servers search the Internet for host names
Primary Server
It has authority for the domain Gets data from primary server Provides fault tolerance and load distribution Required for Internet domains
Secondary Server
If you use DNS, you will often work with your ISP In a simple environment, the ISP will have the primary and secondary DNS servers
ISP maintains DNS You have to send changes to ISP You have the secondary server which gets updates from the primary server Your users reference your secondary server which is faster
You have complete control over DNS You can make changes whenever you want If your primary DNS goes down, the secondary will continue to function (but not indefinitely)
Caching Server
Resolves host names Caches (saves) the results Automatically installed when DNS is installed No configuration necessary Caching server that has access to the Internet and forwards traffic from other caching servers
Forwarding Server
Zones
A zone is a part of the domain namespace For a domain as small as technowidgets.com, the domain name represents a single zone For large organizations (such as IBM), subdomains can be divided into separately maintained zones
Zones
admin.devry.edu can be combined with devry.edu admin.devry.edu cannot be combined with student.devry.edu
There must be one primary DNS server in each zone (plus a secondary server) Each zone can have multiple secondary DNS servers
Forward Lookup
These zones contain entries that map names to IP addresses These zones contain entries that map IP addresses to names
Reverse Lookup
Function
Associates a host to an IP address.
Creates an alias for a specified host. Identifies Internet records; precedes most DNS record entries. Identifies a server used for processing and delivering e-mail for the domain. Identifies DNS servers for the DNS domain. Performs reverse DNS lookups. Resolves an IP address to a host name. Identifies the DNS server with the most current information for the DNS domain.
/etc/named.conf describes the files that configure the zones There are two primary files that it describes
It has the host names and how to handle e-mail Can be necessary for e-mail (SMTP) and security programs
/etc/named.conf
Creating a DNS for the technowidgets.com domain Default setup is for localhost 127.0.0.1 In named.conf add the following line
zone "technowidgets.com" { type master; file named.technowidgets.com; };
This allows technowidgets.com to be resolved by /var/named/named.technowidgets.com There can be multiple domains in a single named.conf file
/etc/named.conf
This allows for reverse lookup for the domain It uses all or part of the 192.168.0.0 network
/var/named.technowidgets.com
$TTL 86400 @ IN SOA web1.technowidgets.com. admn.technowidgets.com. ( 2002072100 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS web1 IN A 192.168.0.100 IN MX 10 mail.technowidgets.com. web1 IN A 192.168.0.100 www IN CNAME web1 research IN A 192.168.0.150 IN MX 10 mail mail IN A 192.168.0.200
named.0.168.192
$TTL 86400 @ IN SOA web1.technowidgets.com. admn.technowidgets.com. ( 2002072100 ; Serial 28800 ; Refresh 14400 ; Retry 3600000 ; Expire 86400 ) ; Minimum IN NS web1 100 150 200 IN IN IN PTR PTR PTR web1.technowidgets.com. research.technowidgets.com. mail.technowidgets.com.
To start DNS
To restart DNS
To stop DNS
insserv named
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 technowidgets.com domain
domain technowidgets.com
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 Use host, ping, nslookup, and dig to troubleshoot DNS