You are on page 1of 35

Campus Area Network

Server Configuration
Understand
Chapter 2 Domain Name
Objectives:
Service (DNS) in
Linux Server.
2.2 DNS in Linux
Server

Domain Name Service (DNS) assists in assigning an IP


address to one or more names, fully qualified domain
names (FQDN) and assigning a name, FQDN to an IP
address.
In Linux, this conversion is usually carried out by a
special type of software known as bind.
The machine that takes care of this conversion is
called a name server. It is used to resolve an IP
address to a hostname or vice versa.
2.2 DNS in Linux
Server

The names make up a hierarchical system in which


each name component is separated by a period.
DNS eases the need to remember IP addresses.
A full name, referred to as a fully qualified domain
name (FQDN), consists of a hostname and a domain
name (example.com).
2.2 DNS in Linux
Server

BIND (Berkley Internet Naming Daemon), is the most


common program used for maintaining a name server
on Linux.
The part of the system sending the queries is called
the resolver and is the client side of the configuration.
The name server answers the queries.
2.2 DNS in Linux
Server

On Linux, as on many other Unixish systems, name


service is provided through a program called named.
At startup, it loads a set of master files into its
internal cache and waits for queries from remote or
local user processes.
There are different ways to set up BIND, and not all
require you to run a name server on every host.
There are four most common
domain namespaces in DNS:

Most a. root domain.

common b. top level domain.


domain in
DNS c. second level domain.

d. third level domain.


Most common Root Domain
domain in DNS.
Root Domain
DNS is a hierarchical, tree
structured system, called the
domain namespace.
The top is written “.” and
Most common pronounced `root', as is usual for
tree data-structures.
domain in DNS Root Domain is the top of the
tree, representing an unnamed
level; it is sometimes shown as
two empty quotation marks (""),
indicating a null value.
When used in a DNS domain
name, it is stated by a trailing
period (.) to designate that the
name is located at the root or
highest level of the domain
hierarchy.
Most common domain in
DNS.

Root Domain
In this instance, the DNS domain
name is considered to be complete
and points to an exact location in the
tree of names.
Names stated this way are called
fully qualified domain names
(FQDNs).
Example : A single period (.) or a
period used at the end of a name,
such as “example.microsoft.com.”
Top Level Domain
• A name used to indicate
2.2 Most a country/region or the
common type of organization
using a name.
domain in • Example : “.com”, “.org”,
DNS which indicates a name
registered to a business
for commercial use on
the Internet.
Top Level Domain
• .biz - businesses
2.2 Most • .info - anyone can register
common • .name - must register first
and last name
domain in • .pro - for professionals
DNS only - must provide proof
• .aero, .museum, .coop are
controlled by
organizations
2.2 Most
common
domain in
DNS.
Third Level Domain
A third-level domain is the next
highest level in the domain
name hierarchy below the
second level domain and the
segment that appears directly to
the left of the second level
domain.
Most common The third level domain is
domain in DNS typically used to refer to a
specific server within an
organization.
In larger organizations each
division or department might
have its own third level domain,
which can serve as an effective
means for identifying it.
Third Level Domain
www is the default third-level
domain name and the most
common by far.
Example : For example, the
www in www.bellevuelinux.org
is a third-level domain. .org is a
Most common top level domain and
bellevuelinux is a second-level
domain in DNS domain. The www would still be
the third-level domain even if it
were the fourth segment of the
domain name because of the
addition of a ccTLD (country
code Top Level Domain), for
example
www.bellevuelinux.org.us.
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.
How DNS
works
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
• Each zone typically has a separate DNS
Zones

• Zones must be contiguous


• 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
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 names
Common DNS Records

DNS record Function


Address (A) Associates a host to an IP address.
Canonical name Creates an alias for a specified host.
(CNAME)
Internet (IN) Identifies Internet records; precedes most DNS record
entries.
Mail Exchanger Identifies a server used for processing and delivering e-
(MX) 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 Identifies the DNS server with the most current
(SOA) information for the DNS domain.
DNS Configuration in Linux

• /etc/named.conf describes the files that


configure the zones
• There are two primary files that it describes
• Forward lookup is described by
named.technowidgets.com
• 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 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

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 network


$TTL 86400
@ IN SOA web1.technowidgets.com.
admn.technowidgets.com. (
2002072100 ; Serial
/var/named.techno 28800 ; Refresh
widgets.com 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 IN PTR web1.technowidgets.com.


150 IN PTR research.technowidgets.com.
200 IN PTR mail.technowidgets.com.
To start DNS

• /etc/rc.d/init.d/named start

Starting To restart DNS

• /etc/rc.d/init.d/named restart

DNS in To stop DNS

Linux • /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.local
Modify /etc/resolv.config

The following line directs the


Configuring client to use the DNS server at
Client DNS 192.168.0.100

in Linux • nameserver 192.168.0.100

The following line associates


this computer with the
technowidgets.com domain
• domain technowidgets.com
• Configure a Windows PC to use the DNS
server
• Start->Settings->Network and Dial-up
Connections
• Right-click on Local Area Connection
Test the DNS and select Properties
• Select Internet Protocol (TCP/IP) and
click on Properties
• Change DNS to 192.168.0.10
• Reboot and ping
www.technowidgets.com
NetBios (computer) names are broadcast to
the local network

Name Starting with Windows NT, WINS database


has computer name to IP address resolution
Resolution
Windows 2000 introduces Dynamic DNS
in
• DNS is required for Active Directory Services
Windows DNS as described for Linux can also be
configured
• Wizards guide you through the configuration
Finished DNS Configuration in
Windows
Troubleshooting DNS ping
ping displays name resolution even if the computer cannot be contacted
• nslookup can display information from the
Troubleshooting DNS DNS server
nslookup
Troubleshooting DNS dig – available on Linux
DNS is an application that translates names to IP
addresses and IP addresses to names

Organized in a hierarchical structure

Summary Servers come in many forms: primary, secondary,


caching, forwarding

To configure DNS, set up a forward and reverse zone

Use ping, nslookup, and dig to troubleshoot DNS

You might also like