Describe domain name concepts and terminology
List the types of name servers
Configure a name server and a client
Identify files used with DNS
Use the nslookup command to query domain name servers
Internet Address <---Name Resolution---> Hostname
Flat Network – Use /etc/hosts
Domain Name – Use Name Server
NIS Environment – Use NIS Server
LDAP Environment – Use LDAP Server
Review Flat Network
Problem: As network grows so does the /etc/hosts file. One person has to manage a master copy of the /etc/hosts file and then distribute it to all of the other machines.
Therefore, there was a need for a better way to handle name resolution.
Domain Name Space Concept
Delegates responsibility for name resolution to Zones of Authority each with its own Name Server.
Note: You do not have to have a correlation between the network you belong to and the Name server.
Domain Name System
Created due to growth of the Internet
Designed for large networks
– Standard resource records (Server)
– Resolver routines (Client) – What name server to access to resolve names.
– A standard backup system for a name server
Secondary Server (Backup of Primary Server)
Cache Server (Balance the load)
Internet Domain Name Structure
Top-Level Domains (Central Administration)
Sub-Level Domains (Local Administration)
com – commercial (Sub-Level Domain – ex. ibm –> cd, vnet, austin)
edu – educational (Sub-Level Domain – ex. ucb, mit)
arpa – in-addr
Every machine as a default domain name. The system automatically appends the default domain name to your system name.
Note: If you append a dot . to the end of the full name then it will not try appending other domain names to the end. (Ex. vnet.ibm.com.)
Types of Name Servers
Primary Name Server
Secondary Name Server
Caching-only Name Server
Forwarder Name Server
Domain or Flat Network?
/etc/resolv.conf exist? (Contains the IP Address of the Domain Server)
No – Flat Network (Use /etc/hosts file)
Yes – Domain Network
Default Name Resolution Hierarchy
1. Is DNS running? Yes – Check nameserver for resolution. Found (Resolved)
2. Is NIS running? Yes – Check NIS server for resolution. Found (Resolved) No (Failed)
Overriding the Default Name Resolution Hierarchy
– Options include “bind, ldap, nis, local”
– Example host=bind,local
Note: bind means dns, local refers to /etc/hosts
Set NSORDER evnironment variable
Note: nis is authoritative, only if you can not get to nis will it go to the name server and local.
Planning a Domain Network
Determine systems in domain
Determine domain name
Choose primary name server
Choose secondary name servers
Remaining systems will be clients
Note: It is recommended that the Primary and Secondary domain servers be on separate networks so that if one network goes down the second can still operate.
Setting Up the Primary Name Server
Create “named” control file (identifies all of the other files below)
Create name zone file (translate a Host name to an IP Address)
Create IP zone files (translate an IP Address to a Host name)
Create local IP zone file (translate for local loopback)
Create cache file (how to find the higher level of authority)
Create /etc/resolv.conf (name server is a client and points back to itself for resolution)
Start “named” daemon
– BIND4 uses /etc/named.boot
– BIND8 uses /etc/named.config
Primary “named” Control File
# pg /etc/named.boot
Type Domain Filename
———— —————————– —————————————-
directory /etc (where the zone files are located)
primary dc.ibm.com named.dc (name zone file)
primary 98.19.9.in-addr.arpa named.revip98 (IP zone file)
primary 99.19.9.in-addr.arpa named.revip99 (IP zone file)
primary 0.0.127.in-addr.arpa named.local (local IP zone file)
cache . named.ca (cache file)
Note: Since the /etc directory is crowded, you may want to put these files in another subdirectory /etc/dns.
Scripts to Build Zone Files
IBM provides awk scripts
– /usr/samples/tcpip/hosts.awk (name zone)
– /usr/samples/tcpip/addrs.awk (reverse IP zone)
Run on /etc/hosts file
Produce name and IP zone files
Use to create initial zone files
Note: If you have IP addresses in the /etc/hosts file for multiple subnets then the script will put them all in the same zone file. You will need a separate zone file for each subnet. Therefore, run the addrs.awk script once for each subnet you have and then delete out those IP addresses that don’t belong to that subnet.
Once the zone files are created, any additions or changes should be made to the zone files and not to the /etc/hosts file.
Name Zone File
# pg /etc/named.dc
; name server data file
; also see /etc/named.boot
; NAME TTL CLASS TYPE RDATA
; setting default domain to “dc.ibm.com”
@ IN SOA sys1.dc.ibm.com. root.sys1.dc.ibm.com.(
1.1 ; Serial
3600 ; Refresh
300 ; Retry
3600000 ; Expire
86400 ) ; Minimum TTL
IN NS sys1
IN NS sys6
sys1 dc.ibm.com IN A 126.96.36.199
sys2 IN A 188.8.131.52
localhost IN A 127.0.0.1
loopback IN CNAME localhost
SOA – Start of Authority
NS – Name Server Resource Records
A – Address Resource Records
CNAME – Alias
Note: Make sure that you update the Serial number. Otherwise, the Secondary Servers will not know that they are out of sync with the Primary Server.
Refresh – How often should the Secondary Server check for changes in seconds.
Retry – How often should the Secondary Server try to connect to the Primary if it can’t get to it.
Expire – How long the secondary information is good for until stops acting as a name server.
Minimum TTL – How long do you keep it in cache before removing it.
IP Zone File
# pg /etc/named.revip98
@ is substituted for 98.19.9.addr.arpa
Note: Closely matches previous.
Local IP Zone File
# pg /etc/named.local
@ IN NS sys1.dc.ibm.com.
1 IN PTR localhost. (make sure to end with the period)
Note: the @ maps back to 0.0.127.naddr.arpa in the Name Zone File.
# pg /etc/named.ca
. 9999999 IN NS sys99.ibm.com.
sys99.ibm.com. 9999999 IN A 184.108.40.206
Final Primary Name Server Setup Steps
1. Change the host name to the fully qualified domain name
– # smit hostname
2. Create /etc/resolv.conf
3. # vi /etc/rc.tcpip
– Uncomment line to start named
4. # startsrc -s named
Primary Name Server Files
/etc/named.boot (main configuration file with names of all other files)
/etc/named.revip99 (reverse IP name resolution file)
/etc/named.revip98 (reverse IP name resolution file)
/etc/named.dc (forward IP name resolution file)
/etc/named.ca (cache file – where do I go if there is no local cache file)
/etc/resolv.conf (to be able to act as a client also)
/etc/named.local (local loopback file)