How to configure the DNS in Unix and Linux servers?
A) Steps:
First Create the file called /etc/resolv.conf - which includes the primary and secondary DNS server IP address for UNIX system, its your own DNS server.
# touch /etc/resolv.conf
# vi /etc/resolv.conf (Add the following lines to it)
domain test-um.com
nameserver ipaddress
nameserver ipaddress
Where, nameserver IP: It is IP of first DNS server and secondary DNS server of test-um.com.
Search test-um.com: Default domain name to search.
For example, if you type command nslookup www, it will search it as www.test-um.com
For AIX Enable the name resolving using DNS as follows:
Edit the file /etc/netsvc.conf so that the “host =” will be pointing to local and dns as in the following
hosts=local,bind
For Solaris and Linux, Enable the name resolving using DNS as follows:
Edit the file /etc/nsswitch.conf so that the “host:” will be pointing to local and dns as in the following
hosts: files dns
B)VALIDATION REQUIREMENTS
Check with nslookup it should be able to resolve the host to IP and IP to host as in the following example# nslookup
Default Server: change.test-um.com
Address: 10.6.55.16
> doddy
Server: change.test-um.com
Address: 10.6.55.16
Name: doddy.test-um.com
Address: 10.121.12.6
Resolve from IP to host:
nslookup 10.121.12.6
Server: change.test-um.com
Address: 10.6.55.16
Name: doddy.test-um.com
Address: 10.121.12.6
C). ROLL BACK
AIX:Remove the entries you have added in the /etc/netsvc.conf , so that the server will point to local host configuration file ( /etc/hosts ) only.
LINUX & SOLARIS:
Remove the entries you have added in the /etc/nsswitch.conf so that the server will point to local host configuration file ( /etc/hosts ) only.
0 blogger-disqus:
Post a Comment