This article provides basic DNS configuration steps necessary to configure static IP through DNS for a test environment. This guide will use the traditional method of manually assigning static IP address through DNS server.
This article assumes that, you do not have access to a DNS server and DNS Server will be configured on a Oracle Linux machine (hostname - racdnsserver / IP - 192.168.0.150) for localdomain.
Install DNS Packages:
To configure DNS on Oracle Linux Server. You will require bind , bind-libs , bind-utils packages to be installed on the server.
To install the packages, use rpm or yum utility as shown below:
Edit /etc/named.conf File:
The /etc/named.conf configuration file used in this example will only contain necessary configuration required to run a minimal DNS. In this article, the network used is localdomain as the domain and IP range is 192.168.0.*.
The DNS configuration file described below is configured to resolve the names of the servers described in this guide. This includes two Oracle RAC Nodes, one Openfiler Storage Server.
This DNS server is only resolving the names of the servers on localdomain network, so to make sure that servers on external networks are resolved properly, we need to
add a "forwarder" entry to the end of the "options" section.
directory specifies where named will look for zone definition files.
In this article, localdomain is the domain for DNS, so, we need to add forward and reverse zones for localdomain.
Create /var/named/ Files for forward and reverse zone:
Create /var/named/localdomain.zone file (file name will be associated with your zone) for the forward lookup of the IPs. as shown below:
Similarly, create /var/named/0.168.192.in-addr.arpa zone definition file for public network reverse lookups.
Start DNS Service:
start the DNS server and enable it to auto start after system reboot.
# service named start
# chkconfig named on
Update /etc/resolv.conf File:
With DNS server configured, the next step is to configure each server to use it for name resolution. Edit the /etc/resolv.conf file on each server and give the following entries as shown below:
After modifying the /etc/resolv.conf file on every server, perform nslookup to verify:
With this, we have configured a basic DNS Server for assigning static IP through DNS.
Post a Comment