Changes

Jump to: navigation, search

OPS335 Lab 3

2 bytes removed, 11:03, 4 May 2017
m
Moving student domain to .ops instead of .org to minimize interference from actual .org domains.
== OBJECTIVE & PREPARATION==
In this lab, you will configure a Linux machine to be a DNS server for the rest of the machines in your Intranet. You will '''use <u>your</u> MySeneca ID as your domain'''. The server will handle all queries for names in the '''yoursenecaid.orgops''' domain. The server will also pass DNS queries for other names and addresses out to the Internet (i.e. to Seneca's DNS server).
=== Online Resources===
After you have completed this lab, your '''vm1''' will be running a full-featured DNS server (which is how you're going to get the '''yoursenecaid.orgops''' domain without paying for it). Unfortunately, you will be the only one using your DNS server so no-one else will be able to resolve hosts under '''yoursenecaid.orgops'''
=== How DNS resolution works ===
First, ensure that the '''host''' and '''vms''' are running, and (on your host only) set the '''domain name''' of each of your four machines via '''/etc/hosts''':
* '''host.yoursenecaid.orgops'''* '''vm1.yoursenecaid.orgops'''* '''vm2.yoursenecaid.orgops'''* '''vm3.yoursenecaid.orgops'''
You should notice that these host and domain names are settings that are <u>local</u> to each machine. What you did on the host does not affect the VMs and you will still not be able to contact '''vm1.yoursenecaid.orgops''' from '''vm3'''. That occurs since you are currently using the '''Seneca''' and other public DNS servers which know nothing about domain name: ''yoursenecaid.orgops''
This preparation step is actually unnecessary for this lab's purpose (do you know why it is unnecessary?). On the other hand, by performing the above operations, it will make things appear more consistent, and may make your life a little easier.
file "named.localhost";
};
zone "yoursenecaid.orgops" {
type master;
file "mydb-for-yoursenecaid-orgops";
};
</pre>
<pre>
$TTL 3D
@ IN SOA vm1.yoursenecaid.orgops. hostmaster.yoursenecaid.orgops.(
2016010301 ; Serial
8H ; Refresh
1D ; Negative Cache TTL
);
@ IN NS vm1.yoursenecaid.orgops.
vm1 IN A 192.168.X.2
</pre>
<ol><li>Issue the following commands to verify that you set-up your DNS server correctly on all of your VMs and google and your host machine:
<source lang="bash">
host vm1.yoursenecaid.orgopshost vm2.yoursenecaid.orgopshost vm3.yoursenecaid.orgopshost host.yoursenecaid.orgops
host google.ca</source></li>
</source>
{{Admon/important |Host Command Doesn't Work|Your machines do not know what domain to automatically add to the end of hostnames (or believe they are still in the seneca domain). The '''SEARCH''' (or DOMAIN) parameter in the '''ifcfg-eth0''' file is used to specify your own domain (eg. '''yoursenecaid.orgops''' ).<br><br>}}
<li> Add the '''SEARCH''' (or DOMAIN) parameter for your '''ifcfg-eth0''' file as shown above for your '''vm1''' machine.</li>
<li> Issue the host command for all vm names and host name to make certain that is works.</li>
<pre>
$TTL 3D
@ IN SOA vm1.yoursenecaid.orgops. hostmaster.yoursenecaid.orgops.(
2016010301 ; Serial
8H ; Refresh
1D ; Negative Cache TTL
);
@ IN NS vm1.yoursenecaid.orgops.2 IN PTR vm1.yoursenecaid.orgops.
</pre>
'''Arrange evidence (command output) for each of these items on your screen, then ask your instructor to review them and sign off on the lab's completion:'''
::<span style="color:green;font-size:1.5em;">&#x2713;</span>Comment out the hostname resolution (/etc/hosts) files for ALL vms, and use '''host''' command to query from a VM, the IPADDR for:<br>'''vm1.yoursenecaid.orgops''' , '''vm2.yoursenecaid.orgops''' , and '''vm3.yoursenecaid.orgops'''<br>::<span style="color:green;font-size:1.5em;">&#x2713;</span>'''nslookup''' information ('''A''', '''NS''', '''MX''' records) for '''vm1.yoursenecaid.orgops''' , '''vm2.yoursenecaid.orgops''' , '''vm3.yoursenecaid.orgops'''.::<span style="color:green;font-size:1.5em;">&#x2713;</span>'''dig +trace''' for '''vm1.yoursenecaid.orgops''' , '''vm2.yoursenecaid.orgops''' , '''vm3.yoursenecaid.orgops'''.::<span style="color:green;font-size:1.5em;">&#x2713;</span>Download the labcheck3.bash checking bash shell script by issuing the command:<br><br>'''wget http://matrix.senecac.on.ca/~peter.callaghan/files/OPS335/labcheck3.bash'''<br><br>set execute permission and run the shell script on your '''c7hosthost''' machine.
::*For '''Peter's classes''', follow his Online Submission instructions in Moodle.
::*For '''Murray's classes''', run command (piping to the '''more''' command) and show output to instructor.
932
edits

Navigation menu