Difference between revisions of "OPS335 Lab 3b"

From CDOT Wiki
Jump to: navigation, search
m (EXPLORATION QUESTIONS)
 
(22 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= Some DNS Review =
+
==DOMAIN NAME SYSTEM RESOURCES==
  
Last week we got an introduction to administering a simple authoritative DNS server. This week we'll review those topics, and learn a few more record types. You'll learn still more about DNS in your first assignment.
+
Online References:
  
Also if you didn't become comfortable using the '''dig''' tool - you'll get more practice with it now.
+
*[https://en.wikipedia.org/wiki/Test_case Test Case Definition] (Wikipedia definition of a Test Case)
  
== MX Record ==
 
  
When someone tries to send email to '''senecacollege.ca''' - they actually want to send email to the Seneca mail server, which is not senecacollege.ca. That is a very typical setup for any business - it simplifies administration and helps a little with load balancing.
+
==OBJECTIVE ==
  
Find the MX record for senecacollege.ca using dig:
+
Last week you were introduced to administering a simple authoritative DNS server. This week we will review that topic, but focus on learning a few more resource record types. This lab will also provide the background and tools (such as a test case) that will be used in your assignment #1.
  
<source lang="bash">dig senecacollege.ca MX</source>
+
You will also be using the '''dig''' tool in more depth in this lab.
  
Notice that the email servers aren't even a subdomain of senecacollege.ca but a completely different company (Microsoft in this case). In other cases (for example check the records for google.com) the email servers are within the company's domain.
 
  
In still other (rare) cases there is no MX record at all (check littlesvr.ca) - in that case the server that's at the IP for that domain is handling the email.
+
==INVESTIGATION 1: STUDYING RESOURCE RECORD TYPES==
  
Notice that the response for your dig commainds for MX records contains domain names and not IP addresses. That means that when you look for a domain's email server - you may need to do a query for MX and another for A.
+
=== The MX Record ===
  
You should be comfortable reading and writing an MX record in the Bind configuration file. See [http://www.zytrax.com/books/dns/ch8/mx.html the reference] for the syntax.
+
When someone tries to send email (for example: '''senecacollege.ca''') the mail message needs to be sent to the Seneca <u>mail</u> server (which, most likely, is '''not''' senecacollege.ca). That is the typical setup for any business since using a different server for mail simplifies administration and helps maintain server load balancing.
  
== CNAME record ==
+
:To Demonstrate the point in the statement above:
  
Sometimes you want multiple domain names to point to the same server. The most common example of this is the www. subdomain. Use dig to find the main web server for Seneca or for CBC.
+
:Find the MX record for senecacollege.ca using the '''dig''' command:<br><source lang="bash">dig senecacollege.ca MX</source>
 +
:Notice that the email servers aren't even a subdomain of senecacollege.ca but a completely different company (Microsoft in this case).<br>In other cases (for example, check the records for ''google.com'') the email servers are within the company's domain.
  
See [http://www.zytrax.com/books/dns/ch8/cname.html the reference] for CNAME to get examples of how to configure such records in Bind.
+
In rare cases, there may be no MX records associated with a domain (For example: try '''dig littlesvr.ca'''). In this latter case, the server called littlesvr.ca, which is supporting a web-server, is also supporting the email server for the same IPADDR.
  
== TXT record ==
+
Notice that the response from commands for '''MX records''' contains <u>domain names</u> and <u>not</u> IP addresses. That means that when you look for a domain's email server, you may be required to also perform a query for MX record as well as for another type A record. Recall that type A records provide the IPADDR information.
  
A TXT record can store pretty much anything, it's typically used for purposes that the desiners of DNS haven't though of themselves. For example a common use of a TXT record is SPF: a record that helps receiving email servers to determine the likelyhood that a message is spam.
+
It is highly recommended that you become comfortable with being able to create an MX records, and be comfortable interpreting (reading) MX record information contained in the '''Bind configuration file''' or by performing domain name queries using '''dig''', '''nslookup''' or the '''host''' command. See [http://www.zytrax.com/books/dns/ch8/mx.html the reference] for the syntax.
  
== Your task ==
+
=== The CNAME record ===
  
Configure at least one of each of the records above for your domain served by the Bind server in your vm1 and verify that your records work.
+
Sometimes you may want to create multiple domain names to point to the same server. The most common example of this is the '''www. subdomain'''.
  
= Test Plans =
+
Use the '''dig''' command to find the <u>main web server</u> for '''Seneca College''' as well as for the '''CBC (Canadian Broadcast Corporation)'''.
  
Every IT company needs to do testing - whether on software they create or systems they set up. Whenever you have a job to do - there has to be a way to show that your job is complete and correct (according to original expectations).
+
See [http://www.zytrax.com/books/dns/ch8/cname.html the reference] for CNAME to view examples of how to configure such records in Bind.
  
How much detail goes into the test plan depends on the resources available for testing, the scale of the changes, and the risk associated with getting things wrong. In your case the worst that's going to happen if you misconfigure a server is you'll lose some marks. In the industry a mistake like that can cost the company you work for a lot of money (perhaps even more than your salary).
+
=== The TXT record ===
  
Whether you have an extremely detailed process or something quick and simple - your test plan must be made with a well organized set of test cases.
+
A '''TXT''' record is used to store any type of data or information. It is generally considered to be a "user-defined" section in order to provide additional information that the DNS system was not designed to handle or accommodate.  For example, a common use of the TXT record is to support '''SPF''': which is a special type of record used to help receiving email servers determine the likelihood that a message is spam.
  
== Test Cases ==
+
=== Update Additional Resource Records for Your VM1 Name Server ===
  
Theoretically you write the test cases before you complete the system. In a way the test suite (all the test cases combined) determine the requirements for your system.
+
Configure your '''VM1''' machine (Bind server) to incorporate each of the records discussed above and verify that your records work by DNS query.
  
Generally speaking each test case typically has at least one expected positive and some number of expected negative results. For example if you're setting up a DNS record for www.yoursenecaid.org your test case might look something like this:
+
'''Record steps, commands, and your observations in INVESTIGATION 1 in your OPS335 lab log-book'''
 +
 
 +
 
 +
==INVESTIGATION 2: GENERATING TEST PLANS==
 +
 
 +
=== Reason for Using Test Plans ===
 +
 
 +
Every IT company needs to perform testing whether on software they create, or for the systems they set up in order to provide quality assurance. Whenever an IT job is performed, it is essential that there is a method or framework to show that your job is complete and correct (according to original expectations). One example would be the use of a '''Test Plan''' in order to <u>demonstrate</u> that the task was completed successfully according to the required specifications (i.e. proof). Another example would include the use of a ''ticketing system'' that tracks issues to be addressed, fixed, closed, and end-user feedback.
 +
 
 +
How much detail goes into the test plan depends on what resources are available for testing, the scale of the changes, and the risk associated with problems that may occur while performing a task. In your case, the worst case scenerio  is that you mis-configure your server, and that you may lose a few marks on an assignment. In the IT industry, a mistake (such as server mis-configuration) can cost the company that you work a lot of money (perhaps even more than your salary).
 +
 
 +
Your test plan that you create should be planned, be well organized (communicated) and contain the appropriate test cases to indicate that the configuration was successful.
 +
 
 +
=== Test Cases Within a Test Plan ===
 +
 
 +
Theoretically, you will create test cases (to be included in your Test Plan) prior to finishing the configuration of your system or task. One way to look at this is that when all of the test cases are created prior to completing your task, they become a benchmark or framework which really determine the requirements for your system.
 +
 
 +
Generally, each test case typically has at least '''one expected positive''' and a '''few expected negative''' results. For example, if you are setting up a DNS record for www.yoursenecaid.org your test case might look something like this:<br><br>
  
 
[[Image:Sample_test_case.png|800px| ]]
 
[[Image:Sample_test_case.png|800px| ]]
  
 +
<br><br>
 
The test above shows a few things: that the DNS server is running, that it's accessible from the internal network, and it is serving the correct record. It also shows that the needed record does not propagate to the public DNS servers - the server 8.8.8.8 doesn't have the same record that your private server does. That's not a wonderful result but it's what you were expecting so it's still a positive result. In fact if 8.8.8.8 returned an A record for your query - you should be concerned that the rest of your test cases may be incorrect.
 
The test above shows a few things: that the DNS server is running, that it's accessible from the internal network, and it is serving the correct record. It also shows that the needed record does not propagate to the public DNS servers - the server 8.8.8.8 doesn't have the same record that your private server does. That's not a wonderful result but it's what you were expecting so it's still a positive result. In fact if 8.8.8.8 returned an A record for your query - you should be concerned that the rest of your test cases may be incorrect.
  
 
You can spend an infinite amount of time running tests and stil not prove anything definitively, so you have to do your best to make sure the tests you run are representative of the requirements - that after a successful run of all the tests the service is almost certainly working correctly.
 
You can spend an infinite amount of time running tests and stil not prove anything definitively, so you have to do your best to make sure the tests you run are representative of the requirements - that after a successful run of all the tests the service is almost certainly working correctly.
  
=== Failures ===
+
=== Identifying Test Case Failures ===
 +
 
 +
Test cases (in a test suite) are not intended to only show that the system is working. On the other hand, it is valuable to view a history of problems or failures that have occurred in the past. For those situations, there may be a bug tracking number or some other means of tracking down what caused the problem in the past and how it was fixed. This can help provide quick identification of problems to lead to quick resolutions in case those similar situation occur in the future.
 +
 
 +
=== Create Test Cases for Your VM1 Machine ===
 +
 
 +
Provide query results for your '''vm1''' name server for each of the resource records discussed in this lab.
 +
 
 +
Pick any section of any of the labs that wish to generate 3 separate test cases. Write the test cases in a test plan template, then save another copy of the test plan, making sure to include:your current testing criteria, and the results from you running that current testing criteria. You will be required to show this test plan upon sign-off of this lab.
 +
 
 +
'''Record steps, commands, and your observations in INVESTIGATION 2 in your OPS335 lab log-book'''
  
Test cases (in a test suite, in a system that keeps track of them) are not intended to only show that the system is working. It's equally valuable to see that at some point in the past there was a problem. In that case there may be a bug number or some other means of tracking down what caused the problem in the past and how it was fixed. So recording failed test results is just as important as recording passes.
 
  
== Your task ==
+
= COMPLETING THE LAB =
  
When I check your lab - I normally ask you to run some commands, and I'll ask you some questions, and that is a sort of made-up-on-the-fly test suite for your lab. Let's formalize that for one section of one lab in a set of test cases.
+
To submit the lab, show the '''newly-created DNS records''' (via nslookup, host, or dig command), and show your '''completed test plan'''.
  
Pick any section of any lab you like that would justify having at least three test cases. Write the test cases in a template, save a copy of that for the current test run, and execute the tests, recording the results.
 
  
= Submit =
+
=EXPLORATION QUESTIONS=
  
To submit the lab - show that the new DNS records you created are served correctly and show your completed test plan.
+
#What is the purpose of the following types resource records?<ul><li>A</li><li>NS</li><li>MX</li><li>TXT</li><li>PTR</li></ul>
 +
#Show the steps for using '''nslookup''' for querying the name name cnn.com for each of the record types discussed in the previous question.
 +
#Show the '''host''' commands for querying the name name cnn.com for each of the record types discussed in Question #1.
 +
#Show the '''dig''' commands for querying the name name cnn.com for each of the record types discussed in Question #1.
 +
#What is the purpose of a Test Plan?
 +
#What are the main components of a Test Plan?

Latest revision as of 16:35, 4 May 2016

DOMAIN NAME SYSTEM RESOURCES

Online References:


OBJECTIVE

Last week you were introduced to administering a simple authoritative DNS server. This week we will review that topic, but focus on learning a few more resource record types. This lab will also provide the background and tools (such as a test case) that will be used in your assignment #1.

You will also be using the dig tool in more depth in this lab.


INVESTIGATION 1: STUDYING RESOURCE RECORD TYPES

The MX Record

When someone tries to send email (for example: senecacollege.ca) the mail message needs to be sent to the Seneca mail server (which, most likely, is not senecacollege.ca). That is the typical setup for any business since using a different server for mail simplifies administration and helps maintain server load balancing.

To Demonstrate the point in the statement above:
Find the MX record for senecacollege.ca using the dig command:
dig senecacollege.ca MX
Notice that the email servers aren't even a subdomain of senecacollege.ca but a completely different company (Microsoft in this case).
In other cases (for example, check the records for google.com) the email servers are within the company's domain.

In rare cases, there may be no MX records associated with a domain (For example: try dig littlesvr.ca). In this latter case, the server called littlesvr.ca, which is supporting a web-server, is also supporting the email server for the same IPADDR.

Notice that the response from commands for MX records contains domain names and not IP addresses. That means that when you look for a domain's email server, you may be required to also perform a query for MX record as well as for another type A record. Recall that type A records provide the IPADDR information.

It is highly recommended that you become comfortable with being able to create an MX records, and be comfortable interpreting (reading) MX record information contained in the Bind configuration file or by performing domain name queries using dig, nslookup or the host command. See the reference for the syntax.

The CNAME record

Sometimes you may want to create multiple domain names to point to the same server. The most common example of this is the www. subdomain.

Use the dig command to find the main web server for Seneca College as well as for the CBC (Canadian Broadcast Corporation).

See the reference for CNAME to view examples of how to configure such records in Bind.

The TXT record

A TXT record is used to store any type of data or information. It is generally considered to be a "user-defined" section in order to provide additional information that the DNS system was not designed to handle or accommodate. For example, a common use of the TXT record is to support SPF: which is a special type of record used to help receiving email servers determine the likelihood that a message is spam.

Update Additional Resource Records for Your VM1 Name Server

Configure your VM1 machine (Bind server) to incorporate each of the records discussed above and verify that your records work by DNS query.

Record steps, commands, and your observations in INVESTIGATION 1 in your OPS335 lab log-book


INVESTIGATION 2: GENERATING TEST PLANS

Reason for Using Test Plans

Every IT company needs to perform testing whether on software they create, or for the systems they set up in order to provide quality assurance. Whenever an IT job is performed, it is essential that there is a method or framework to show that your job is complete and correct (according to original expectations). One example would be the use of a Test Plan in order to demonstrate that the task was completed successfully according to the required specifications (i.e. proof). Another example would include the use of a ticketing system that tracks issues to be addressed, fixed, closed, and end-user feedback.

How much detail goes into the test plan depends on what resources are available for testing, the scale of the changes, and the risk associated with problems that may occur while performing a task. In your case, the worst case scenerio is that you mis-configure your server, and that you may lose a few marks on an assignment. In the IT industry, a mistake (such as server mis-configuration) can cost the company that you work a lot of money (perhaps even more than your salary).

Your test plan that you create should be planned, be well organized (communicated) and contain the appropriate test cases to indicate that the configuration was successful.

Test Cases Within a Test Plan

Theoretically, you will create test cases (to be included in your Test Plan) prior to finishing the configuration of your system or task. One way to look at this is that when all of the test cases are created prior to completing your task, they become a benchmark or framework which really determine the requirements for your system.

Generally, each test case typically has at least one expected positive and a few expected negative results. For example, if you are setting up a DNS record for www.yoursenecaid.org your test case might look something like this:

Sample test case.png



The test above shows a few things: that the DNS server is running, that it's accessible from the internal network, and it is serving the correct record. It also shows that the needed record does not propagate to the public DNS servers - the server 8.8.8.8 doesn't have the same record that your private server does. That's not a wonderful result but it's what you were expecting so it's still a positive result. In fact if 8.8.8.8 returned an A record for your query - you should be concerned that the rest of your test cases may be incorrect.

You can spend an infinite amount of time running tests and stil not prove anything definitively, so you have to do your best to make sure the tests you run are representative of the requirements - that after a successful run of all the tests the service is almost certainly working correctly.

Identifying Test Case Failures

Test cases (in a test suite) are not intended to only show that the system is working. On the other hand, it is valuable to view a history of problems or failures that have occurred in the past. For those situations, there may be a bug tracking number or some other means of tracking down what caused the problem in the past and how it was fixed. This can help provide quick identification of problems to lead to quick resolutions in case those similar situation occur in the future.

Create Test Cases for Your VM1 Machine

Provide query results for your vm1 name server for each of the resource records discussed in this lab.

Pick any section of any of the labs that wish to generate 3 separate test cases. Write the test cases in a test plan template, then save another copy of the test plan, making sure to include:your current testing criteria, and the results from you running that current testing criteria. You will be required to show this test plan upon sign-off of this lab.

Record steps, commands, and your observations in INVESTIGATION 2 in your OPS335 lab log-book


COMPLETING THE LAB

To submit the lab, show the newly-created DNS records (via nslookup, host, or dig command), and show your completed test plan.


EXPLORATION QUESTIONS

  1. What is the purpose of the following types resource records?
    • A
    • NS
    • MX
    • TXT
    • PTR
  2. Show the steps for using nslookup for querying the name name cnn.com for each of the record types discussed in the previous question.
  3. Show the host commands for querying the name name cnn.com for each of the record types discussed in Question #1.
  4. Show the dig commands for querying the name name cnn.com for each of the record types discussed in Question #1.
  5. What is the purpose of a Test Plan?
  6. What are the main components of a Test Plan?