Sie sind auf Seite 1von 3

Outline

[Comer] - ch. 24 [Stevens] - ch. 14

Introduction Naming

Internetworking with TCP/IP (ETC003) Lecture 8: Domain Name System

Domains, Zones and Authority DNS Design Goals DNS Elements Domain Names Name Servers Resolvers Inverse Mappings
Adrian Popescu, 2003, 2004

Dept of Telecommunications & Signal Processing


Internetworking with TCP/IP - ETC003 - Lecture 8

1/17

Dept of Telecommunications & Signal Processing


Internetworking with TCP/IP - ETC003 - Lecture 8

2/17

Introduction
Domain Name System (DNS)
Service intended to make Internet user-friendly Distributed database that maps between host names and IP addresses A name-to-address mapping is needed to easy for humans It is easier to memory names than IP addresses

Introduction (cont.)
History
In early ARPANET, every host maintained a le called hosts.txt, which contained a list of all hosts (including the IP address, host name & alias(es)) Obs: local copies of hosts.txt are available in /etc/hosts This le had to be regularly updated from the le hosts.txt (available on the Network Information Center NIC server - Domain Name Registration Service) by using FTP Innecient: the updating process was used by all computers connected to the Internet Solution: to move data management away from the center to organizations that operate parts of the Internet, that is, DNS solution DNS represents in fact the Internet directory service Another directory service: Network Information Service (NIS), which is a directory service supported on UNIX machines Main RFCs: RFC1034 & RFC1035: concepts & protocols of the Internet DNS RFC1032: procedure for participating in the world-wide DNS Also, the Berkeley Internet Name Domain (BIND) incorporated in 4.3BSD is a complete implementation of the DNS for UNIX systems
3/17

Main characteristics of DNS


DNS is an application (like SMTP, HTTP, etc) Hierarchical system with the system top "root" Actually, there is a number of "root" servers on the Internet The "root" servers know where the servers for top-level domains are Actual top-level domains are: com, edu, gov, mil, net, int, org, aero, biz, coop, museum, pro, info, name Uses UDP (for primary query) as well as TCP (for zone transfers & large record query) It considers both translation high-level machine name to IP address and inversely Also, plays an important role in Internet mail delivery
Dept of Telecommunications & Signal Processing
Internetworking with TCP/IP - ETC003 - Lecture 8

Dept of Telecommunications & Signal Processing


Internetworking with TCP/IP - ETC003 - Lecture 8

4/17

Naming
Types of names existing in Internet today
Domain Names Alphanumeric strings used by users to identify Internet hosts Example: www.freesoft.org IP Addresses 32-bit numbers used to identify Internet hosts by the IP protocol Example: 205.216.34.7 Service Names Short strings used to identify particular services on an Internet host Examples: telnet, smtp, ftp, http Port Numbers 16-bit numbers (usually written in decimal) used to identify particular services on an Internet host to the TCP & UDP protocols Examples: 25/tcp (smtp), 23/tcp (telnet), 21/tcp (ftp), 80/tcp (http), 53/udp (domain), 69/udp (tftp) Universal Resource Locators (URLs) Used by WWW to locate & identify Web documents & other resources Example: http://www.freesoft.org/xx.html
Dept of Telecommunications & Signal Processing
Internetworking with TCP/IP - ETC003 - Lecture 8 5/17

Domains, Zones and Authority


DNS uses a distributed database to maintain a worldwide tree of names
A distributed database protocol is used to delegate control of domain name hierarchies among zones, each managed by a group of name servers Zone of Authority: any domain name handled by an organization; takes the name from the "highest point", e.g., cnn.com; CNN registrers their zone with InterNIC; InterNIC loads CNN name server IP addresses into the root name servers, to make this info available to the global Internet Name servers contain pointers to other name servers, to be used to traverse the entire domain naming hierarchy There are three major ways for Internet hosts to enter DNS: 1. By precongureing addresses of the root name servers; typically used by ISPs on their name servers, in the UNIX le /etc/namedb/named.root 2. By preloading the address of a name server that supports recursive queries, and send any name server lookups to it; commonly used by dialup Internet subscribers 3. By automatically congureing the address of a recursive name server Once a host is congured with initial domain name addresses, it can use the DNS protocols to locate the name servers responsible for any part of the DNS naming hierarchy, and also retrieve the Resource Records (RRs) that match DNS names to IP addresses and control Internet mail delivery
Dept of Telecommunications & Signal Processing
Internetworking with TCP/IP - ETC003 - Lecture 8 6/17

DNS Design Goals


Document RFC1034 (Introduction)
Design goals of DNS inuence the structure; these are: Consistent name space used for referring to resources System maintainance in a distributed manner, with local caching to improve performance Not restricted to a single application, e.g., the system must be able to use names to retrieve host addresses, to use addresses to retrieve names, mailbox data, and also other (undetermined) information Name server transactions must be independent of the communication system that carries them The system must be useful accross a wide spectrum of host capabilities & protocols, or protocol families or management

DNS Elements
DNS elements
Domain Name Space & Resource Records Name Servers Resolvers

Domain Name Space & Resource Records


Specications for a tree structured name space & data associated with the names Conceptually, each node & leaf of the domain name space tree names a set of information Query operations are attempts to extract specic types of info from a particular set and Resource Records are used for that A query names the domain name of interest & describes the type of resource information that is desired Queries for address resources return Internet host addresses

Dept of Telecommunications & Signal Processing


Internetworking with TCP/IP - ETC003 - Lecture 8

7/17

Dept of Telecommunications & Signal Processing


Internetworking with TCP/IP - ETC003 - Lecture 8

8/17

DNS Elements (cont.)


Name Servers
Server programs that hold info about the domain trees structure & set of information A name server may cache structure or set info about any part of the domain tree, but generally a particular name server has complete info about a subset of the domain space, and pointers to other name servers that can be used to lead to info from any part of the domain tree Name servers know the parts of the domain tree for which they have complete info; a name server is said to be an AUTHORITY for these parts of the name space Authoritative info is organized into units called ZONES; they can be automatically distributed to the name servers which provide redundant service for the data in a zone

DNS Elements (cont.)


Resolvers
Client programs that extract info from name servers in response to client requests Must be able to access at least one name server & use that name servers info to answer a query directly, or pursue the query using referrals to other name servers May use one or more name servers when translating a name Typically a system routine directly accessible to user programs; hence, no protocol is needed between resolver & user program

Dept of Telecommunications & Signal Processing


Internetworking with TCP/IP - ETC003 - Lecture 8

9/17

Dept of Telecommunications & Signal Processing


Internetworking with TCP/IP - ETC003 - Lecture 8

10/17

DNS Elements (cont.)


Three views on DNS
Users point of view (user) DNS accessed through a simple procedure or OS call to a local resolver Domain space consists of a single tree User can request info from any section of the tree Resolvers point of view (client) DNS is composed of an unknown number of name servers, with responsability for own domains Each name server has one or more pieces of whole domain trees data The resolver views each of these databases as essentially static Name servers point of view (server) DNS consists of separate sets of local info called zones The name server has local copies of some of the zones Name server must periodically refresh its zones from master copies in local les or foreign name servers The name server must concurrently process queries that arrive from resolvers

Domain Names
Internet domains form the basis of Internet naming scheme
Examples: www.cnn.com is a domain name and cnn.com is a domain Domains are structured in the form of an inverted tree Each branch is labeled with an simple alphanumeric string, and a complete domain name is written by stringing all the labels together, separated by periods; ex: www.cnn.com is third-level domain name; top-level domain is com; second-level label is cnn; third level is www RFC1591: top level domain names take one of two forms Generic domain (predominately American domains): com, edu, org, net, mil, gov, int Country domain (non-American domains): se, uk, fr, de, nl, us, au DNS is used to convert domain names into IP addresses Domain name registrations are handled by: InterNIC (North America); RIPE (Europe); APNIC (Asia) Domain name assignment is completely distinct from IP address assignment IP address assignment is handled by: IANA (Internet Assigned Numbers Authority), and ICANN (Internet Cooperation for Assigned Names and Numbers)- to allocate IP addresses to ISPs and to manage DNS root servers
11/17

Dept of Telecommunications & Signal Processing


Internetworking with TCP/IP - ETC003 - Lecture 8

Dept of Telecommunications & Signal Processing


Internetworking with TCP/IP - ETC003 - Lecture 8

12/17

Name Servers
Name servers (NS)
Hosts running software capable of processing DNS protocol queries A popular free software name server is BIND (UNIX hosts) DNS name servers manage zones A zone begins at a node in DNS tree & contains all underlying branches A NS may delegate authority over a subzone to another NS and thus control the sources of info in a subdomain DNS consists of a large number of nested zones, where NS operate Each of these NS recognize neighbor servers in the zones immediately above & below For reliability/backup purposes, each zone has at least two active NS (primary & secondary), with same information

Name Servers (cont.)


Resource Records (RRs)
Info about addressable objects is stored in RRs, which are managed by NS User programs generate RR queries via the Resolver RRs consist of following elds (RFC1035): Owner of the information Type Class (e.g., IN for Internet; ISO for ISO) Period of validity Data (coded in ASCII) Syntax of RR is fully specied in RFC1035

Dept of Telecommunications & Signal Processing


Internetworking with TCP/IP - ETC003 - Lecture 8

13/17

Dept of Telecommunications & Signal Processing


Internetworking with TCP/IP - ETC003 - Lecture 8

14/17

Name Servers (cont.)


NS databases include the following available RR types
Start of Authority (SOA): denition of a zone Address (A): Internet address of a host Name Server (NS): name of a NS for a domain Host Information (HINFO): entries related to the OS, hardware, etc. Canonical Name (CNAME): alias for a computer Well-Known Services (WKS): list of services provided (smtp, ftp, http, etc.) Mail Exchanger (MX): mail manager for a domain Gateway Pointer (PTR): pointer record (gateway addresses)

Resolver
Resolver
Takes over NS queries on behalf of the application program & user Required to store the info obtained locally (caching), so further queries can be solved locally instead Storage depends on the period of validity specied in the Resource Records, which determines the length of time the resolver should temporarily hold the info in the absence of a renewed request for it A resolver should also be able to settle iterative queries, i.e., to forward queries not successfully solved by a NS; this is done by using the info in the authority eld & contacting other NSs When a query, the client begins by trying to resolve names locally (caching and then the local server). If the local server cannot resolve the name, the client must then work through the tree of name servers either iteratively or by requesting the local name server to do it recursively. After the name is solved, the new info is then added in the cache. The resolver may use TCP or UDP for queries When using UDP, the standard query protocol has own error protection (query repetition)

Queries & replies consist of four variable-length elds


Query eld to specify the info required (always Name, Type, Class tuples) Answer eld containing the required info (RRs matching Name, Type, Class tuple) Authority eld, which is used when NS is unable to supply the requested info, and which contains names of authorized NSs that do have the info Additional eld for further (optional) info for the initiator of query, e.g., NS address given in the authority eld
Dept of Telecommunications & Signal Processing
Internetworking with TCP/IP - ETC003 - Lecture 8 15/17

Dept of Telecommunications & Signal Processing


Internetworking with TCP/IP - ETC003 - Lecture 8

16/17

Inverse Mappings
Inverse queries
Allow a client to ask a server to map backwards by taking an answer & generating a query that would produce the specic answer However, difculties in implementation Inverse queries are generally not used because there is often no way to nd the server that can resolve the query without searching the entire set of servers

Special cases
DNS has a few special cases Most important is the in-addr.arpa domain, used to convert IP addresses back into domain names Used by Web servers

Dept of Telecommunications & Signal Processing


Internetworking with TCP/IP - ETC003 - Lecture 8

17/17

Das könnte Ihnen auch gefallen