Domain Name System (DNS)
LESSON 13
(October 18, 1995)
Daniel Z. Tabor Jr.
New Jersey Institute of Technology
Outline:
Domain Name System (DNS)
Providing Readable Names:
- Goal: Assign meaningful high-level names to a large set of machines and handle the mapping of those
names to a machine’s IP address(es).
- To do this, we need to use a large number of geographically distributed servers to map names to addresses.
- Mapping is needed in both directions:
- IP Address to Name.
- Readable Name to IP Address.
- Also, another level of mapping is still needed:
- IP Address to low-level name (usually hardware address).
- The form of high-level names determines:
- How those names are translated to lower-level names (IP addresses) or bound to objects.
- How name assignments are authorized.
Flat Namespace:
- The original set of machines on the Internet used flat namespaces.
- These namespaces consisted of sequence of characters with no further structure.
- Advantage:
- Names were convenient and short.
- Disadvantage:
- Flat namespaces cannot generalize to large sets of machines because:
- Single set of identifiers => conflict potential increases.
- Single central name authority was overloaded.
- Frequent name-address binding changes were costly and cumbersome.
Hierarchical Names:
- The partitioning of a namespace must be defined in such a way that it:
- Supports efficient name mapping.
- Guarantees autonomous control of name assignment.
- Hierarchical namespaces provides a simple yet flexible naming structure.
- The namespace is partitioned at the top level.
- Authority for names in each partition are passed to each designated agent.
- LOCAL.SITE
- SITE => Central naming authority.
- LOCAL => Local namespace agent.
Subset Authority:
- Further division of authority is available in the namespace hierarchy:
- LOCAL.GROUP.SITE
- GROUP => provides flexible naming control for the local agent (grouping).
- Hertz.njit.edu
- U.S. telephone numbers are also hierarchical:
- 3 (area code) - 3 (local exchange) - 4 (subscriber number)
- In a TCP/IP internet, hierarchical machine names are assigned according to the structure of organizations
that obtain authority for parts of the namespace, not according to the structure of the physical network
interconnections.
TCP/IP Internet Domain Names:
- DNS (domain name system) - mechanisms that implement a machine name hierarchy for TCP/IP
internets (uses hierarchical naming - Domain Names).
- It specifies the name syntax and rules for delegating authority over names.
- Specifies the implementation of a distributed computing system that efficiently maps names to addresses.
- 3 labels: (Hertz.njit.edu)
- * Any suffix of a label in a domain name is a domain. *
- Lowest level => hertz.njit.edu
(Host at NJIT)
- Second level => njit.edu
(Domain name of NJIT)
- Top level => edu
(Domain name for educational sites)
(Un)Official Internet Domain Names:
- Most users follow the labeling conventions used by official DNS for two reasons:
- The scheme is comprehensive and flexible. It can accommodate many hierarchical names for
organizations (geographical or organizational naming)
- Easier naming method when attached to the Internet (no name changing is needed).
- Top-level names provide geographical naming schemes.
- Geographical - country codes:
- ugwww.ucs.ed.ac.uk (United Kingdom)
- Standard two letter identifiers are used as top-level domain names.
Geographical Domain Names:
- AU
| Australia | - IT
| Italy |
- BR
| Brazil | - JP
| Japan |
- CA
| Canada | - MX
| Mexico |
- DE
| Germany | - NL
| Netherlands |
- ES
| Spain | - NO
| Norway |
- FI
| Finland | - NZ
| New Zealand |
- FR
| France | - SE
| Sweden |
- GR
| Greece | - TR
| Turkey |
- HU
| Hungary | - UK
| United Kingdom |
- IN
| India | - US
| United States |
- The U.S. further divides the geographical naming scheme into two levels:
- (State.Country)
- va.us (Virginia, US)
- nj.us (New Jersey, US)
- ca.us (California, US)
- Most universities and companies choose organizational names because:
- Easier to type (shorter names)
- Geographical names are more difficult to ‘guess’
- Companies can be recognized as such by having .com as a part of their domain name.
Organizational Domain Names:
- COM
| US Commercial | - NET
| Network |
- EDU
| US Educational | - ORG
| Non-Profit Organization |
- GOV
| US Government | - ARPA
| Old style Arpanet |
- INT
| International | - NATO
| Nato field |
- MIL
| US Military | | |
- Department names can be extended to name machines:
- cs.purdue.edu (subdomain name) =>
xinu.cs.purdue.edu
- Machine names are added (xinu) to further subdivide the domain names used.
Named Items:
- To allow clients to distinguish among multiple kinds of entries, each named item (stored in the system) is
assigned a type which specifies if it is an:
- Address of a machine
- Mailbox
- User
- Name resolving must also include the type of answer desired (specifying the protocol family is optional).
- The DNS partitions the entire set of names by class (for mapping to multiple protocol suites).
- Naming items is required since one cannot distinguish the names of subdomains from the names of
individual objects or their types.
Mapping Domain Names to Addresses:
- The DNS also includes an efficient, reliable, general purpose, distributed system for mapping names to
addresses using an independent cooperative system called name servers.
- Names Servers - are server programs that translate names-to-addresses (maps DN => IP addresses) and
usually executes on a dedicated processor.
- Name Resolvers - client software that uses one or more name servers in getting a mapped name.
- Domain name servers are arranged in a conceptual tree structure that corresponds to the naming hierarchy
- Each node may actually contain several hierarchical levels for mapping.
- Example:
- xinu.cs.purdue.edu
(uses two name servers for mapping)
Domain Name Resolution:
- Conceptually, name resolution proceeds in a top-down fashion.
- Name resolution can occur in one of two different ways:
- Recursive Resolution:
- A client requests complete translation.
- The name server itself contacts further name servers for resolution (if need be).
- Iterative Resolution:
- Only a single resolution is made and returned (not recursive).
- Clients must now explicitly contact different name servers if further resolution is needed.
- Name servers use name caching to optimize search costs (efficient, but may not always be accurate).
- Time to Live (TTL) is used to determine a guaranteed name binding during it’s time interval. When time
expires, the cache name binding is no longer valid, so the client must make a direct name resolution
request once again.
Domain Server Message Format:
- Messages are sent between domain clients and domain servers with a specific format.
- All messages of this format are used for name resolution and naming queries.
- Question sent by the client and answers provided by the server are included within different fields of the same
message.
- If a server cannot answer a request, it will include information of which server can.
| IDENTIFICATION | PARAMETER |
| NUMBER OF QUESTIONS | NUMBER OF ANSWER |
| NUMBER OF AUTHORITY | NUMBER OF ADDITIONAL |
QUESTION SECTION ... |
ANSWER SECTION ... |
AUTHORITY SECTION ... |
ADDITIONAL INFORMATION SECTION ... |
- IDENTIFICATION (16-bits):
- Unique value used by the client to match responses to queries.
- PARAMETER (16-bits):
- Specifies the operation requested and a response code.
- NUMBER OF (16-bits each):
- Each give a count of entries in the corresponding sections that occur later in the message.
- Example:
- NUMBER OF QUESTIONS - gives the count of entries that appear in the QUESTION SECTION of the
message.
| IDENTIFICATION | PARAMETER |
| NUMBER OF QUESTIONS | NUMBER OF ANSWER |
| NUMBER OF AUTHORITY | NUMBER OF ADDITIONAL |
QUESTION SECTION ... |
ANSWER SECTION ... |
AUTHORITY SECTION ... |
ADDITIONAL INFORMATION SECTION ... |
- QUERY SECTION (variable length):
- Contains queries for which answers are desired.
- The client only fills in the question section while the server returns those questions and the answers in its response
- Each question consists of the subfields:
- QUERY DOMAIN NAME - variable length subfield containing the domain name.
- QUERY TYPE - 16-bits which encode the type of question (machine name, e-mail addr., etc.)
- QUERY CLASS - 16-bits allows domain names to be used for arbitrary objects because official Internet
names are only one possible class.
- ANSWER, AUTHORITY, and ADDITIONAL INFORMATION SECTION (all variable length):
- Consist of a set of resource records that describe domain names and mappings for each specific area.
- Each resource record describes one domain name.
Resource Record:
RESOURCE DOMAIN NAME ... |
| TYPE | CLASS |
| TIME TO LIVE | RESOURCE DATA LENGTH |
RESOURCE DATA ... |
Resource Record Format:
- RESOURCE DOMAIN NAME (variable length):
- Contains the domain name to which this resource record refers.
- TYPE (16-bits):
- Specifies the type of the data included in the resource record.
- CLASS (16-bits):
- Specifies the data’s class.
- TIME TO LIVE (16-bits):
- Contains an integer that specifies the number of seconds information in this resource record can be cached.
- RESOURCE DATA LENGTH (16-bits):
- Length in octets of the name binding.
- RESOURCE DATA (variable length):
- Contains the result of the binding.
Shortened Message Formats:
- Compressed Name Format:
- To conserve space in the name binding reply packet, the name servers compress names by storing only
one copy of each domain name in the message.
- This is done by pointing to similar name domains within the same compressed message.
- Abbreviation:
- Provides a method of shortening names when the resolving process can supply part of the name automatically.
- Local network administrators configure a list of possible suffixes to be appended to these names during lookup.
- Ex: dzt8474@hertz => hertz.njit.edu
Inverse Mappings:
- Inverse Queries - allow the client to ask a server to perform a domain name mapping ‘backwards’.
- The answer is provided to the server and if an appropriate question can be generated, it is returned.
- They are not generally used since there is no way to resolve the question without having a server search
all the other servers (inefficient).
Pointer Query:
- Pointer Queries are the inverse mapping technique that is used instead of the former method.
- Pointer Query - is a special question which requests the name server to return the correct domain name for
the machine with the specified IP address.
- The (in-addr.arpa) extension is used within DNS to request reverse name mappings.
- The initial IP address is represented in dotted-decimal notation:
- The client forms a query by rearranging the notation into a string of the form:
- ddd.ccc.bbb.aaa.in-addr.arpa
- DNS servers then contact the appropriate servers which can efficiently resolve this mapping.
Object Types:
- The domain naming system is quite general in that it can be used for arbitrary hierarchical names.
- DNS can be used for translating a domain name to a mail exchanger address.
- Type: MX - mail exchanger is used with DNS to denote the correct type of name resolution. (user@domain-part)
- Mail systems use the DNS to resolve the domain-part of an e-mail address using MX.
- Most data queried in DNS is type A, which consists of a host name and it’s IP address.
- Other types include:
- HINFO: Name of CPU and Operating Sys.
- MINFO: Mailbox or mail list information.
- NS: Name of authoritative server for domain
- PTR: Domain name of symbolic link.
- TXT: Uninterpreted string of ASCII text.
Last Modification: (Sunday, August 25, 1996)
All work was written, produced, and is copyrighted by Daniel Z. Tabor Jr.
Page created by Daniel Z. Tabor Jr.
Copyright ©1996 Illusion Industries Inc.
