TCP/UDP-based application : Domain Name System
Motivation
machine IP addresses difficult for humans to remember
machine names easy for humans for humans to remember
machine IP addresses can be handled efficiently by computers
machine names cannot be handled efficiently by computers
therefore, name -> IP translation necessary
Domain Name System
DNS is naming scheme. Some facts about domain names:
- sequence of alphanumeric segments, separated by dots
- name represents path through domain tree, with rightmost segment a child of nameless root
- each segment has different meaning.
- top-level (rightmost) describes nature of organization in which machine exists: com, edu, gov, country, etc. called domain.
Domains are classified as:
- country (2 letter country code, ISO 3166)
- generic (com,edu,gov,mil,net,..)
- next lower level identifies organization name (registered to be unique within domain). Name plus comain called suffix.
- hierarchical name structure within organization is entirely under organization control.
- Different groups within organization may have different number of additional segments, depending on organization complexity.
- organization can change configuration of internal names without central registry’s knowlege
DNS Client-Server Model
Originally, one machine kept all name->IP translations, acting as server for all others!
Name->IP translation handled by distributed database
database coordinated by distributed system of domain name servers.
Client sends message with name and requests IP address.
Resolved one segment at a time.
Root server handles a domain (e.g. edu or com).
Has table of organization names and associated organization domain server.
Does lookup and returns address of organization domain server.
Organization can have one or more name servers. It can only have one name server for its suffix (the one that root server knows)
If more than one name server, organization can partition its name hierarchy into zones.
Suffix must know all its subordinate name servers
The root of each zone subtree is called authority.
Every DNS name server must know address of a root server (a link up to top of hierarchy).
Name Resolution
- Software that handles name->IP resolution is resolver.
- Resolver supplied as library function, e.g. gethostbyname().
- Resolver sends local name server DNS request message containing name.
- Name server (authority) does database lookup.
- If name found (e.g., within its authority), it returns IP address as structure in DNS reply message.
- If name NOT found, server becomes client in request to root server.
- Root server returns address of suffix (organization) name server.
- Authority then becomes client in request to suffix server.
- Suffix server returns name of the subordinate name server.
- This is repeated until name server containing address is contacted and responds.
- Finally, original name server returns IP address to your program.
- Think of all the internet traffic generated by name requests! And the load on root servers!
- Solutions: replicate root servers, implement caching in all name servers.
Related Home Pages:
notes | CSC 465 | Peter Sanderson | Computer Science | SMSU
Last reviewed: 22 April 1998
Peter Sanderson ( pete@csc.smsu.edu )