Lab 4
Lab 4
Statement Purpose:
To take a closer look at the client side of DNS. While execution of a DNS query, much can go
communicate with each other to either recursively or iteratively resolve the clie
query.
Activity outcomes:
Students will be able to better understand the working of DNS
Instructor Note:
observations on them.
1) StageJ(Journey)
Introduction
nslookup
nslookup tool, which is available in most
Linux/Unix and Microsoft platforms today. To run nslookup in Linux/Unix, you just type the
nslookup command on the command line. To run it in Windows, open the Command Prompt
and run nslookup on the command line.
In it is most basic operation, nslookup tool allows the host running the tool to query any
specified DNS server for a DNS record. The queried DNS server can be a root DNS server, a
top-level-domain DNS server, an authoritative DNS server, or an intermediate DNS server
(see the textbook for definitions of these terms). To accomplish this task, nslookup sends a
DNS query to the specified DNS server, receives a DNS reply from that same DNS server, and
displays the result.
nslookup www.mit.edu
shown in the screenshot, the response from this command provides two pieces of information: (1)
the name and IP address of the DNS server that provides the answer; and (2) the answer itself, which
is the host name and IP address of www.mit.edu. Although the response came from the local DNS
server at Polytechnic University, it is quite possible that this local DNS server iteratively contacted
several other DNS servers to get the answer, as described in Section 2.5 of the textbook.
Now consider the second command:
-
nslookup to send a query for a type-NS record to the default local DNS server. In words, the query is
type
option is not used, nslookup uses the default, which is to query for type A records.) The answer,
displayed in the above screenshot, first indicates the DNS server that is providing the answer (which
is the default local DNS server) along with three MIT nameservers. Each of these servers is indeed an
authoritative DNS server for the hosts on the MIT campus. However, nslookup also indicates that the
-
than from an authoritative MIT DNS server. Finally, the answer also includes the IP addresses of the
authoritative DNS servers at MIT. (Even though the type-NS query generated by nslookup did not
nslookup
displays the result.)
Now finally consider the third command:
In this example, we indicate that we want to the query sent to the DNS server bitsy.mit.edu rather
than to the default DNS server (dns-prime.poly.edu). Thus, the query and reply transaction takes
place directly between our querying host and bitsy.mit.edu. In this example, the DNS server
bitsy.mit.edu provides the IP address of the host www.aiit.or.kr, which is a web server at the
Advanced Institute of Information Technology (in Korea).
Now that we have gone through a few illustrative examples, you are perhaps wondering about the
general syntax of nslookup commands. The syntax is:
In general, nslookup can be run with zero, one, two or more options. And as we have seen in the
above examples, the dns-server is optional as well; if it is not supplied, the query is sent to the
default local DNS server.
Solution:
ipconfig
ipconfig (for Windows) and ifconfig (for Linux/Unix) are among the most useful little utilities in
your
ipconfig, although the
Linu
Activity 2:
Now that we are familiar with nslookup and ipconfig
-surfing activity.
Use ipconfig to empty the DNS cache in your host.
Open your browser and empty your browser cache. (With Internet Explorer, go to Tools
menu and select Internet Options; then in the General tab select Delete Files.)
obtain your_IP_address with ipconfig. This filter removes all packets that neither
originate nor are destined to your host.
Start packet capture in Wireshark.
With your browser, visit the Web page: http://www.ietf.org
Stop packet capture.
If you are unable to run Wireshark on a live network connection, you can download a packet trace
3
. Answer
the following questions. Whenever possible, when answering a question below, you should hand in a
printout of the packet(s) within the trace that you used to answer the question asked. Annotate the
printout4 to explain your answer. To print a packet, use File->Print, choose Selected packet only,
choose Packet summary line, and select the minimum amount of packet detail that you need to
answer the question.
1. Locate the DNS query and response messages. Are then sent over UDP or TCP?
2. What is the destination port for the DNS query message? What is the source port of DNS
response message?
3. To what IP address is the DNS query message sent? Use ipconfig to determine the IP address
of your local DNS server. Are these two IP addresses the same?
4.
5.
these answers contain?
6. Consider the subsequent TCP SYN packet sent by your host. Does the destination IP address
of the SYN packet correspond to any of the IP addresses provided in the DNS response
message?
7. This web page contains images. Before retrieving each image, does your host issue new DNS
queries?
We see from the above screenshot that nslookup actually sent three DNS queries and received three
DNS responses. For the purpose of this assignment, in answering the following questions, ignore the
first two sets of queries/responses, as they are specific to nslookup and are not normally generated
by standard Internet applications. You should instead focus on the last query and response
messages.
1. What is the destination port for the DNS query message? What is the source port of DNS
response message?
2. To what IP address is the DNS query message sent? Is this the IP address of your default local
DNS server?
3.
4.
these answers contain?
5. Provide a screenshot.
Solution:
Activity 4:
Now repeat the previous experiment, but instead issue the command:
nslookup type=NS mit.edu
Answer the following questions6 :
1. To what IP address is the DNS query message sent? Is this the IP address of your default local
DNS server?
2.
3. Examine the DNS response message. What MIT nameservers does the response message
provide? Does this response message also provide the IP addresses of the MIT namesers?
4. Provide a screenshot.
4) Stage a2 (assess)
Submit the home activity before next lab