Difference between revisions of "OPS535-L2"

From CDOT Wiki
Jump to: navigation, search
(Reference)
Line 15: Line 15:
 
* Test the correctness of your DNS server operation.
 
* Test the correctness of your DNS server operation.
 
* Study the DNS traffic and the DNS query and response packets.
 
* Study the DNS traffic and the DNS query and response packets.
 +
 +
= Setup an Authoritative Primary DNS server=
 +
* Use the "rpm" command to check the version of the the following packages installed on your system. If any of the following packages is not installed, install it now:
 +
** bind-libs-lite
 +
** bind-chroot
 +
** bind
 +
** bind-utils
 +
** bind-license
 +
** bind-libs
 +
* Locate the file called "named.conf", it should either be in /etc or /var/named/chroot/etc directory. If you don't have this file, copy and modify the sample file provided with the bind package (for bind version 9.9.4, the full path of the sample file is at /usr/share/doc/bind-9.9.4/sample/etc/named.conf).
 +
* Check out your assigned DNS domain name and assigned network number in Blackboard.
 +
* Create two zone files: forward lookup zone file (for your assigned domain) and reverse lookup zone file (for your assigned network).
 +
== Forward lookup zone file ==
 +
* File name: my-zone.txt
 +
* Directory: /var/named (or /var/named/chroot/var/named with CHROOT)
 +
* Sample contents:
 +
<pre>
 +
$TTL 86400
 +
@ IN SOA vm1.mydomain.net. root.mydomain.com. (42 3H 15M 1W 1D)
 +
@ IN NS vm1.mydomain.net.
 +
vm1.mydomain.net.  IN  A  192.168.99.2
 +
vm2.mydomain.net.  IN  A  192.168.99.3
 +
vm3.mydomain.net.  IN  A  192.168.99.4
 +
...
 +
</pre>
 +
 +
 +
 +
== Reverse lookup zone file ==

Revision as of 02:40, 19 September 2016

Overview

In this lab, you are going to build a primary name server for your assigned DNS domain using the BIND package on your VM1 running CentOS 7,x. Primary name server does not depend upon having access to other name servers in order to function.

Once you have your primary name server running, use command line DNS client tool(s) to test the correctness of your Primary DNS server.

Please check the variable $ROOTDIR in /etc/sysconfig/named file. It sets the "root" directory for the running BIND process. Make sure that you have the bind-chroot package installed. Once you have the bind-chroot package installed, the variable $ROOTDIR will be set to /var/named/chroot after activation. If the variable $ROOTDIR is set to /var/named/chroot, the manin configuration for BIND "named.conf" should be in the "/var/named/chroot/etc" directory and all the other zone files should be in the "/var/named/chroot/var/named" directory.

Reference

Tasks

  • Set up an authoritative primary DNS server for your assigned domain and assigned virtual network (i.e. forward lookup zone and reverse lookup zone).
  • Test the correctness of your DNS server operation.
  • Study the DNS traffic and the DNS query and response packets.

Setup an Authoritative Primary DNS server

  • Use the "rpm" command to check the version of the the following packages installed on your system. If any of the following packages is not installed, install it now:
    • bind-libs-lite
    • bind-chroot
    • bind
    • bind-utils
    • bind-license
    • bind-libs
  • Locate the file called "named.conf", it should either be in /etc or /var/named/chroot/etc directory. If you don't have this file, copy and modify the sample file provided with the bind package (for bind version 9.9.4, the full path of the sample file is at /usr/share/doc/bind-9.9.4/sample/etc/named.conf).
  • Check out your assigned DNS domain name and assigned network number in Blackboard.
  • Create two zone files: forward lookup zone file (for your assigned domain) and reverse lookup zone file (for your assigned network).

Forward lookup zone file

  • File name: my-zone.txt
  • Directory: /var/named (or /var/named/chroot/var/named with CHROOT)
  • Sample contents:
 $TTL 86400
 @ IN SOA vm1.mydomain.net. root.mydomain.com. (42 3H 15M 1W 1D)
 @ IN NS vm1.mydomain.net.
 vm1.mydomain.net.  IN  A  192.168.99.2
 vm2.mydomain.net.  IN  A  192.168.99.3
 vm3.mydomain.net.  IN  A  192.168.99.4
 ...


Reverse lookup zone file