1 / 24

COMP2322 Lab 3 DNS

COMP2322 Lab 3 DNS. Steven Lee Feb. 22, 2017. Domain Name System (DNS). People prefer to use easy-to-remember names instead of IP addresses Domain names are alphanumeric names for IP addresses e.g., www.polyu.edu.hk

pomona
Télécharger la présentation

COMP2322 Lab 3 DNS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COMP2322 Lab 3DNS Steven Lee Feb. 22, 2017

  2. Domain Name System (DNS) • People prefer to use easy-to-remember names instead of IP addresses • Domain names are alphanumeric names for IP addresses e.g., www.polyu.edu.hk • Domain Name System (DNS) maintains an Internet-wide distributed database and provides translation services between domain name and the IP address

  3. IP address • A unique address that computing devices use to identify itself and communicate with other devices in the Internet Protocol network • Any device connected to the IP network must have an unique IP address • IPv4 uses a 32-bit number to represent an IP address, while IPv6 uses 128-bit number • IPv4 address is always written in “dotted decimal” notation, which is 4 sets of numbers separated by period each set representing 8-bit number ranging from (0-255), e.g., 192.168.0.1

  4. DNS: structure • DNS is a hierarchical distributed database = DNS servers root com org edu caltech.edu mit.edu wikipedia.org facebook.com google.com

  5. DNS: root name servers • DNS is a hierarchical distributed database • 13 logical root name servers worldwide root com org edu caltech.edu mit.edu wikipedia.org facebook.com google.com

  6. DNS: root name servers • DNS is a hierarchical distributed database • 500+ physical root name servers worldwide

  7. DNS: top-level domain (TLD) servers • Responsible for… • com, org, edu, … • All top-level country domains: hk, uk, jp, … root com org edu caltech.edu mit.edu wikipedia.org facebook.com google.com

  8. DNS: authoritative DNS servers • Organization’s DNS servers, provides authoritative hostname to IP mappings for organization’s servers(e.g. web, mail) • Can be maintained by organization or service provider root com org edu caltech.edu mit.edu wikipedia.org facebook.com google.com

  9. DNS: local name server • Does not strictly belong to hierarchy • Each ISP (e.g. residential ISP, company, university) has one • Usually also is the default DNS server • When host makes DNS query, query is sent to its local DNS server • Acts as proxy, forwards query into hierarchy

  10. DNS resolution • Two approaches • Iterative query • Recursive query

  11. DNS resolution (iterative query) TLD DNS server com DNS server authoritative DNS server ns4.google.com root DNS server mail.google.com 2 local DNS server hkpu03.polyu.edu.hk 3 4 5 6 1 8 7 requesting host PolyU computer

  12. DNS resolution (recursive query) authoritative DNS server ns4.google.com TLD DNS server com DNS server root DNS server mail.google.com 2 local DNS server hkpu03.polyu.edu.hk 7 6 3 1 5 8 4 requesting host PolyU computer

  13. DNS cache • Name server caches a mapping it learns about • Cache entries expire and are flushed after some time specified by time to live (TTL) • TLD DNS servers are typically cached in local DNS server, reducing workloads of root DNS servers

  14. ipconfig • Open Command Prompt:Win+R → Type “cmd’ → Press OK • To check your default DNS server(s) • Input command “ipconfig /all” • Check the DNS Servers field • To display cached DNS records • Input command “ipconfig /displaydns” • To clear DNS cache • Input command “ipconfig /flushdns”

  15. nslookup • A tool for querying any specified DNS server for a DNS record • To run nslookup: • Open Command Prompt • Input command “nslookup”

  16. nslookup • Input command “nslookup polyu.edu.hk” • Server: (Name of the default DNS server)Address: (IP address of the default DNS server)Name: polyu.edu.hkAddress: (IP address of polyu.edu.hk) • “Non-authoritative answer” means that the answer came from the cache of some server rather than an authoritative DNS server

  17. Practice 1 • Y:\Win32\WiresharkPortable_1.4 • Input command “nslookup polyu.edu.hk” • Examine the DNS query and response messages for type A record • Question 1 • What is the destination port for the DNS query message? What is the source port for the DNS response message? • What IP address is the DNS query message sent to? Is it the same as that of your default DNS server? • How many answers are provided in the DNS response? What does each answer contain?

  18. nslookup • Input command“nslookup –type=NS polyu.edu.hk” • Server: (Name of the default DNS server)Address: (IP address of the default DNS server)(Authoritative nameservers)

  19. Practice 2 • Input command“nslookup –type=NS polyu.edu.hk” • Examine the DNS query and response messages for type NS record • Question 2 • What IP address is the DNS query message sent to? Is it the same as that of your default DNS server? • What nameservers does the response message provide? Does this response message also provide the IP addresses of the nameservers?

  20. nslookup • Input command“nslookup polyu.edu.hk 8.8.8.8” • Server: (Name of Google’s DNS server)Address: 8.8.8.8Name: polyu.edu.hkAddress: (IP address of polyu.edu.hk)

  21. Practice 3 • Input command“nslookup polyu.edu.hk 8.8.8.8” • Examine the DNS query and response messages for type NS record • Question 3 • What IP address is the DNS query message sent to? Is it the same as that of your default DNS server? If not, what does the IP address correspond to?How many answers are provided in the DNS response? What does each answer contain?

  22. Practice 4 • Clear DNS and web cache • Visit http://www.ietf.org • Question 4 • Are the DNS query and response messages sent over TCP or UDP? • What is the destination port for the DNS query message? What is the source port for the DNS response message? • What IP address is the DNS query message sent to? Is it the same as that of your default DNS server? • What is the type of the DNS query? • How many answers are provided in the DNS response? • This web page contains images. Before retrieving each image, does your host issue any new DNS query?

  23. Practice 5 • Visit http://viewdns.info/chinesefirewall/ • Click on “facebook.com” • Question 5 • What is the expected IP address of Facebook? • Does any of the IP addresses received within China match the expected value? • Select one of the received IP addresses, does the domain exist? How can you tell? (Failed to access the IP address via browser cannot prove a domain’s nonexistence)

  24. Reference • J.F Kurose and K.W. Ross, Computer Networking: A Top Down Approach, 5th edition. Addison-Wesley, 2009.

More Related