12.2.4 Lab – Observe DNS Name Resolution Answers
- Observe the conversion of a URL to an IP address.
- Observe DNS lookup using the nslookup command.
Background / Scenario
Domain Name System (DNS) is invoked when you type a Uniform Resource Locator (URL), such as http://www.cisco.com, into a web browser. The first part of the URL describes which protocol is being used. Common protocols are HTTP (Hypertext Transfer Protocol), HTTPS (Hypertext Transfer Protocol over Secure Socket Layer), and FTP (File Transfer Protocol).
DNS uses the second part of the URL, which in this example is www.cisco.com. DNS translates the domain name (like www.cisco.com) to an IP address to allow the source host to reach the destination host.
Work in pairs to complete this lab.
- 1 PC (Windows 10)
- Internet connectivity
Part 1: Observe DNS Conversion
Step 1: Observe DNS operation.
1. Open a Command Prompt window.
2. At the prompt, enter ping cisco.com. The computer needs to translate cisco.com into an IP address so it knows where to send the Internet Control Message Protocol (ICMP) packets. Ping is a type of ICMP packet.
3. The first line of the output shows cisco.com converted to an IP address by DNS. You should be able to see the effect of DNS even if your school has a firewall that prevents pinging, or if Cisco has prevented people from pinging their web server.
C:\Users\Student> ping cisco.com Pinging cisco.com [126.96.36.199] with 32 bytes of data: Reply from 188.8.131.52: bytes=32 time=34ms TTL=244 Reply from 184.108.40.206: bytes=32 time=32ms TTL=244 Reply from 220.127.116.11: bytes=32 time=34ms TTL=244 Reply from 18.104.22.168: bytes=32 time=34ms TTL=244 Ping statistics for 22.214.171.124: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 32ms, Maximum = 34ms, Average = 33ms
Which IP address is shown on the screen?
Should cisco.com always resolve to the same IP address? Explain.
List a few applications (besides the ping command) that need DNS to translate a domain name to an IP address. Perform an internet search as necessary.
Step 2: Verify DNS operation using the nslookup command.
1. At the command prompt, enter the
C:\Users\Student> nslookup Default Server: google-public-dns-a.google.com Address: 126.96.36.199 >
The output above shows that the Default DNS Server was configured to use a Google DNS server.
What is your Default Server listed as?
2. After issuing the previous
nslookup command, notice how the prompt changed to a single >. This is the prompt for the
nslookup program. From this prompt, you can enter commands related to DNS.
At the prompt, type ? to see a list of all the available commands that you can use in nslookup mode.
List three commands that you can use with nslookup:
3. At the
nslookup prompt, type cisco.com.
What is the translated IP address?
Is the IP address an IPv4 address or an IPv6 address?
Is it the same as the IP address shown with the ping command?
At the prompt, type the IP address of the Cisco web server that you just found. What is the Name result?
Step 3: Identify mail servers using the nslookup command
1. To identify mail servers using nslookup, enter set type=mx.
> set type=mx
2. At the prompt, enter cisco.com.
> cisco.com Server: google-public-dns-a.google.com Address: 188.8.131.52 Non-authoritative answer: cisco.com MX preference = 20, mail exchanger = rcdn-mx-01.cisco.com cisco.com MX preference = 30, mail exchanger = aer-mx-01.cisco.com cisco.com MX preference = 10, mail exchanger = alln-mx-01.cisco.com >
What are the names of the Cisco mail servers identified in the mail exchanger field?
3. At the prompt, type exit to return to the regular command prompt.
4. At the prompt, type ipconfig /all.
Write the IP addresses of all the DNS servers that your school computer uses.
5. Enter exit to close the Command Prompt window.
1. If your school did not have a DNS server, what effect would this have on your use of the internet?
2. Some companies do not dedicate a single server for DNS. Instead, the DNS server provides other functions as well. Which functions do you think might be included on a DNS server? Use the ipconfig /all command to help you with this.