Chapter 4 - Ellen M. Zimmer

advertisement
Chapter 4 – Name Resolution
At a Glance
CHAPTER OBJECTIVES




Understand the domain name service (DNS)
Identify the components of DNS
Install and configure DNS
Troubleshoot DNS
What is DNS?
It is used to map host names to IP addresses on the Internet. It is 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.
Name resolution is used in Windows LAN to achieve the same thing. DNS in Windows
is designed to be dynamic - as computers are added to the network, DNS automatically
changes. It is called DDNS or Dynamic DNS.
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 to translate the host, such as www.technowidgets.com, to an IP address.
Domain Namespaces
The root level domain is "." (a dot) which is significant in creating DNS files.
Top level domains include com, org, fr. More top level domains were added in 2000.
Second-level domains are often owned by companies and individuals. They include
microsoft.com, devry.edu, and redhat.com. A subdomain is a further division of a
second-level domain. For example, devry.edu is divided into phx.devry.edu,
nj.devry.edu, and many others. The organizations who own second-level domains, such
as devry.edu, have control over naming within their domain. For example, they can
create hosts such as www.devry.edu, ftp.devry.edu, and bb.devry.edu.
A name such as www.devry.edu is a Fully Qualified Domain Name (FQDN)
New top-level domains
.biz - businesses
.info - anyone can register
.name - must register first and last name
.pro - for professionals only - must provide proof
.aero, .museum, .coop are controlled by organizations
more add in 2015
Host Names
The first portion of a URL is typically a host name and is typically different from the
name of the computer. Many hosts can be associated with the same Web server. For
example, web hosting company may have hundreds of Web sites on the same computer
with each one belonging to a different domain.
How DNS Works
The Name Server (DNS server) supports name-to-address and address-to-name
resolution. The name resolver (DNS client) can contact DNS server to lookup a host
name in order to get the associated IP address.
DNS is used by browsers, email clients, and client utilities such as ping and tracert
There are two categories of DNS Servers.
The first category is responsible for creating the Internet "database". The primary and
secondary servers store the host names used on the Internet.
The second category of DNS servers resolve host names to determine IP addresses. The
caching and forwarding servers search the Internet for host names.
The primary server defines the hosts for the domain and maintains the database for the
domain. The secondary server gets data from primary server. It provides fault tolerance
and load distribution. The secondary server is required for Internet domains. Your ISP
often has both the primary and secondary DNS server. However, you can maintain them
if you want.
The caching server resolves host names. It caches (saves) the result. It is automatically
installed when DNS is installed.
A forwarding server is a caching server that has access to Internet and forwards traffic
from other caching servers.
When you configure DNS, you configure a zone. A zone is a part of the domain
namespace. For a domain as small as techowidgets.com, the domain name represents a
single zone. For large organizations (such as IBM), subdomains can be divided into
separately maintained zones. Each zone typically has a separate DNS.
There must be one primary DNS server in each zone (plus a secondary server). Each
zone can have multiple secondary DNS servers.
Forward lookup zone - map name to IP address
Reverse Lookup zone - map IP address to name
DNS configuration in Linux
/etc/named.conf describes the files that configure the zones
There are two primary files that it describes. The forward lookup is described by
named.technowidgets.com. It has our host names and how to handle e-mail. The reverse
lookup is described by named.0.168.192
In /etc/named.conf, to create a DNS for the technowidgets.com domain 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
Also, we can add the following line to reference the reverse lookup file:
zone “0.168.192.in-addr.arpa” IN {
type master;
file “named.0.168.192”;
};
It uses all or part of the 192.168.0.0 network
The following is the named.technowidgets.com file:
/var/named.technowidgets.com
$TTL 86400
@
IN
SOA
web1
IN
www
IN
research
mail
IN
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.
A
192.168.0.100
CNAME web1
IN A
192.168.0.150
IN MX 10 mail
A
192.168.0.200
The following named.0.168.192:
$TTL 86400
@
IN
SOA
IN
100
150
200
IN
IN
IN
web1.technowidgets.com. admn.technowidgets.com. (
2002072100 ; Serial
28800
; Refresh
14400
; Retry
3600000
; Expire
86400 )
; Minimum
NS
web1
PTR
PTR
PTR
web1.technowidgets.com.
research.technowidgets.com.
mail.technowidgets.com.
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
To make DNS start when you boot Linux, add the command to start DNS to
/etc/rc.d/rc.local.
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 technowidgets.com domain
domain technowidgets.com
Test the DNS
First, configure the Windows PC to use the DNS server:
Start->settings->Network and Dialup Connections
Right-click on Local Area Connection and select Properties
Select Internet Protocol (TCP/IP) and click on Properties
Change DNS to 192.168.0.10
Reboot, login, and go to a command prompt. Then type:
ping www.technowidgits.com
Key Terms
address resolution — The process of converting a computer name to a numeric IP
address.
alias — An alternate name, as for a computer or mailbox.
Berkeley Internet Name Domain (BIND) — The software used for DNS in Linux and
other non-Windows servers.
caching server — A server that is not authoritative for any zone. Instead, it handles
queries by asking other servers for information.
canonical name — A host’s official name, the first hostname listed for the computer’s IP
address in the hostname database.
Dynamic Domain Name Service (DDNS) — A service that allows DNS to be
automatically updated when the IP address of a workstation changes or a new
workstation is added to the network. Only Windows 2000, Windows XP, and Windows
2003 support DDNS.
forward lookup — A zone that contains entries that map names to IP addresses.
forwarding servers — Servers that process requests that DNS servers cannot resolve
locally. A forwarding server is not really a separate type of server, but a caching server
used in a particular way. Also called a forwarder.
host — An individual computer on a network.
host name — A name that refers to a computer; more specifically, a service running on a
computer. For example, ftp.technowidgets.com, www.technowidgets.com, and
www.productswithpizazz.com are all host names that could exist on the same computer.
name resolution — Taking a common name of a network resource—a Web server, for
instance—and converting it into a corresponding IP address. The name can be in the form
of a DNS host name, such as www.technowidgets.com, or, in Windows, a computer name
such as Web1.
name resolver — A DNS client. Technically, a name resolver is the client software
component that uses the services of one or more name servers.
name server — An application that supports name-to-address and address-to-name
translation. Also known as a DNS server.
namespace — A common grouping of related names such as hosts within a LAN.
reverse lookup — A zone that contains entries that map IP addresses to names.
reverse (or reversing) proxy server — A server designed to isolate your Web server
environment from the Internet. Instead of your DNS pointing to your Web server’s IP
address, it points to the IP address of your proxy server. When an Internet user requests a
Web page, the proxy server retrieves the page from an internal server, and then sends it
back to the user.
root server — A special type of server that identifies the top-level domains on the
Internet.
secondary server — A server that receives its authority and database from the primary
server. The secondary server provides fault tolerance, load distribution, and easier remote
name resolution for the primary DNS server.
second-level domain — A level that identifies a particular entity within a top-level
domain. The second-level domain name includes the top-level domain.
Start of Authority (SOA) — A type of resource record used by DNS where every
domain name has an SOA record in its database that indicates basic properties of the
domain and its zone.
subdomain — Second-level domains that are divided into further domain levels, as in the
URL www.arda.jones.name. In this case, jones.name is the second-level domain
controlled by the .name TLD, and arda.jones.name represents the subdomain that a
person can register.
top-level domain (TLD) — Identifies the most general portion of the domain name. It is
the “end” portion of the domain name, as in com, edu, and org.
Download