DNS
description
Transcript of DNS
![Page 1: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/1.jpg)
DNS
![Page 2: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/2.jpg)
Outline Domain Name System DNS Hierarchy Resolution
![Page 3: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/3.jpg)
Readings Tannenbaum and van Steen:4.1 Coulouris: 9.1-9.4
![Page 4: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/4.jpg)
Hostnames IP Addresses are great for computers
IP address includes information used for routing.
IP addresses are difficult for humans to remember.
IP addresses are impossible to guess.
![Page 5: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/5.jpg)
The Domain Name System The domain name system (DNS) is
usually used to translate a host name into an IP address .
Domain names comprise a hierarchy so that names are unique, yet easy to remember.
![Page 6: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/6.jpg)
DNS Hierarchy
ca com org edu
uwo ubc
![Page 7: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/7.jpg)
7
Host name structure Each host name is made up of a
sequence of labels separated by periods. Each label can be up to 63 characters The total name can be at most 255
characters. Examples:
www.cnn.com www.travelocity.com chocolate.syslab.csd.uwo.ca
![Page 8: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/8.jpg)
Domain Name The domain name for a host is the
sequence of labels that lead from the host (leaf node in the naming tree) to the top of the worldwide naming tree.
A domain is a subtree of the worldwide naming tree.
![Page 9: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/9.jpg)
Top level domains edu, gov, com, net, org, mil, ca… Countries each have a top level domain
(2 letter domain name).
![Page 10: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/10.jpg)
DNS Organization Distributed Database
The organization that owns a domain name is responsible for running a DNS server that can provide the mapping between hostnames within the domain to IP addresses.
So - some machine run by UWO is responsible for everything within the uwo.ca domain.
![Page 11: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/11.jpg)
rpi.eduDNS DB
rpi.eduDNS DB
DNS Distributed Database There is one primary server for a
domain, and typically a number of secondary servers containing replicated databases.
uwo.caDNS DB
Authoritative
uwo.caDNS DB
Replicas
uwo.ca DNS server
![Page 12: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/12.jpg)
DNS Clients A DNS client is called a resolver.
A call to gethostbyname()is handled by a resolver (typically part of the client).
Most Unix workstations have the file /etc/resolv.conf that contains the local domain and the addresses of DNS servers for that domain.
![Page 13: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/13.jpg)
DNS Servers Servers handle requests for their
domain directly. Servers handle requests for other
domains by contacting remote DNS server(s).
Servers cache external mappings.
![Page 14: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/14.jpg)
Server - Server Communication If a server is asked to provide the
mapping for a host outside its domain (and the mapping is not in the server cache): The server finds a name server for the
target domain. The server asks the name server to provide
the host name to IP translation. To find the right name server, use DNS!
![Page 15: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/15.jpg)
Domain Name Resolution1. User program issues a
request for the IP address of a hostname
2. Local resolver formulates a DNS query to the name server of the host
3. Name server checks if it is authorized to answer the query. a) If yes, it responds. b) Otherwise, it will
query other name servers, starting at the root tree
4. When the name server has the answer it sends it to the resolver.
HTTP ResolverHostname (neon.tcpip-lab.edu)
IP address (128.143.71.21)
Nameserver
Hostnam
e(neon.tcpip-lab.edu)
IP address (128.143.71.21)
![Page 16: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/16.jpg)
Caching To reduce DNS traffic, name servers
cache information on domain name/IP address mappings
When an entry for a query is in the cache, the server does not contact other servers
![Page 17: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/17.jpg)
Implementation of Name Resolution
Using a URL notation assume that the path name corresponds to ftp://ftp.cs.vu.nl/pub/globe/index.txt
![Page 18: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/18.jpg)
Implementation of Name Resolution
Two approaches to implement name resolution: iterative name resolution and recursive name resolution. Determined by a bit in the DNS query
Iterative name resolution A name resolver hands over the complete
name to the root name server. The root server resolves the path name as far
as it can and returns the result (a name server) to the client.
The client passes the remaining path name to that name process.
The above process repeats until the name is resolved.
![Page 19: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/19.jpg)
Implementation of Name Resolution
The principle of iterative name resolution.
![Page 20: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/20.jpg)
Implementation of Name Resolution
Recursive name resolution Instead of returning each intermediate
result back to the client’s name resolver, a name server passes the result to the next name server it finds.
![Page 21: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/21.jpg)
Implementation of Name Resolution
The principle of recursive name resolution.
![Page 22: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/22.jpg)
Implementation of Name Resolution
The main drawback of recursive name resolution is that it puts a higher performance demand on each name server.
Two advantages of recursive name server: Caching results is more effective compared
to iterative name resolution. Communication costs may be reduced.
![Page 23: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/23.jpg)
Implementation of Name Resolution
The comparison between recursive and iterative name resolution with respect to communication costs.
![Page 24: DNS](https://reader035.fdocuments.net/reader035/viewer/2022062814/5681685f550346895ddea45a/html5/thumbnails/24.jpg)
Summary Names are organized into name spaces. A name space is often distributed.