How to configure dns slave server in Linux

A DNS server, or name server, is used to resolve an IP address to a hostname or vice versa. You can set up four different ...

A DNS server, or name server, is used to resolve an IP address to a hostname or vice versa.
You can set up four different types of DNS servers:
  • A master DNS server for your domain(s), which stores authoritative records for your domain.
  • A slave DNS server, which relies on a master DNS server for data.
  • A caching-only DNS server, which stores recent requests like a proxy server. It otherwise refers to other DNS servers.
  • A forwarding-only DNS server, which refers all requests to other DNS servers.
In our pervious article we have configured Master dns server. In this tutorial we will extended pervious article and configure salve dns server. This article is the second part of How to configure dns server step by step guide. We suggest you to review pervious article before starting it.

Configure dns slave server

For this example we are using three systems one linux server one linux clients and one window clients.
We have configured master DNS server with ip address of 192.168.0.254 and hostname server.example.com on linux server. Now we will configure slave DNS server on linux clients
To configure slave DNS server go on client1 system.
First test connectivity from dns server by ping commands and check necessary rpm. bind and caching-nameserver rpm is required to configure dns. check them for install if not found install them.
rpm
set hostname to client1 and ip address to 192.168.0.1 And create a new named.conf file
named.conf
We are using bind's chroot features so all our necessary files will be located in chroot directory. Set directory location to /var/named. As we are configuring slave server so we need not to define the location of zone database files. Zone database file can be created and modified only on master server. A slave server only copied it's from master server.
Do editing exactly as shown here in image in named.conf
named.conf
save this file with :wq and exit
If you cannot create this file manually then download this pre configured file and copy to /var/named/chroot/etc/named.conf
To download do right click here and choose save link As..
named.conf

Now restart the named service. It should be start without any error.
service named restart
Congratulation you have configured both Master and client DNS server. Now we will configure dns client and test it with dns server.

Configure Window DNS Client

Now go on windows xp system and test connectivity from DNS server. And set DNS ip address in LAN card properties.
ip address on window system
Now go on commands prompt and ping from other client by name to test dns.
ping from dns server
Alternately You can also verify DNS server by nslookup command
nslookup
Test also by pinging server from name
ping server

Configure Linux DNS clients

RHCE Exam question
Dig Server.example.com, Resolve to successfully through DNS Where DNS server is 192.168.0.254.

RHCE Exam question2
Your System is configured in 192.168.0.0/24 Network and your nameserver is 192.168.0.254. Make successfully resolve to server.example.com.
On command line interface you don't have any options to set DNS ip in network configuration window. IP of DNS server can be set from /etc/resolv.conf file. Each nameserver line represents a DNS server, and the search line specifies domain names to try if only the first part of a hostname is used. For example, if just the name client1 is used as a hostname, client1. example.com will also be tried if the /etc/resolv.conf file is configured as shown in image below on the system.
To set DNS ip open /etc/resolv.conf file
vi resolv.conf
set nameserver ip to 192.168.0.254 and search option to example.com
resolv.conf
After saving /etc/resolv.conf file restart the network service

dig server.example.com to test dns server
dig server.example.com
now verify by pinging to other client from name

COMMENTS

Random Elites

Name

Common Linux Common Redhat Ip Address Redhat RHEL6 Ubuntu
false
ltr
item
Linux Elites: How to configure dns slave server in Linux
How to configure dns slave server in Linux
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjani7k77NqKEAS3Lgz1cV5Rksefsn__1rSQsdpn_BOlDCOAyNiwKf56E7vkB-1qIczSw63BQBJXA6-WhNAGuT7KT8kLOmpS8xV-Y6N4ANovFgjth1VAskh0CazvIlhitRJRnOPloDuKsA/s640/519470675_c_570_411.jpg
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjani7k77NqKEAS3Lgz1cV5Rksefsn__1rSQsdpn_BOlDCOAyNiwKf56E7vkB-1qIczSw63BQBJXA6-WhNAGuT7KT8kLOmpS8xV-Y6N4ANovFgjth1VAskh0CazvIlhitRJRnOPloDuKsA/s72-c/519470675_c_570_411.jpg
Linux Elites
https://linuxelites.blogspot.com/2016/03/how-to-configure-dns-slave-server-in.html
https://linuxelites.blogspot.com/
http://linuxelites.blogspot.com/
http://linuxelites.blogspot.com/2016/03/how-to-configure-dns-slave-server-in.html
true
7442208655518515278
UTF-8
Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy