DNS Seminar
DNS Seminar
November 20,2011
In the beginning
Host names were administered by a central authority
A new host would be added to the hosts.txt file located
at the Network Information Center (NIC) The entire hosts.txt file would be propagated to every site in the Internet using FTP
Problems included...
A high probability of naming conflicts
Central name administration was a problem with the
community in general Distribution Problems increased dramatically Maintaining Consistency was impossible
DNS is...
A database which maps names to addresses
The database is distributed across the entire internet It is independent of network topology
DNS Goals
Hosts need not download huge hosts.txt files
You do not need to notify a central agency if you add a
The domain name space defines the overall naming structure of the Internet. The name space is consists of a tree structure of domain names, with a root domain at the top. Immediately below the root domain are the major domains such as .com, .net, and .org. From these domains, the name space can branch into multiple paths, with each intersection point called a node and labeled with a simple name.
Each node in hierarchy stores a list of names that end with same suffix Suffix = path up tree E.g., given this tree, where would following be stored: Fred.com Fred.edu Fred.cmu.edu Fred.cmcl.cs.cmu.edu Fred.cs.mit.edu
DNS processes a domain name from right to left, with the highest-level node represented at the far right, and the lowest level node at the far left.
The node labels are separated by dots. Examples include incognito.com, verisign.com, and dnscommander.com. The domain name of any node in the tree is the sequence of node labels leading from that node all the way up to the root domain. The top-level node (appearing farthest to the right) identifies the geography or purpose (for example, the nation covered by the domain, such as .uk, or a company category, such as .com). The second-level node (appearing second from the right) identifies a unique place within the top-level domain. Domain names can contain up to 255 characters consisting of: characters A to Z, 0 to 9, and/or -; 63 characters per node; and up to 127 node levels. To ensure that each node is uniquely identified, DNS requires that sibling nodes - nodes that are children of the same parents - be uniquely named.
Zones
As shown in the following diagram, the name space tree is
authoritative DNS name server (the final authority in providing information about a set of domains).
A zone contains domain names starting at a particular
point in the tree (Start Of Authority) to the end node or to a point in the tree where another host has authority for the names.
ca
Zone = contiguous section of name space E.g., Complete tree, single node or subtree A zone has an associated set of name servers Must store list of names and tree links
11
Resource Records
Each node in the tree has one or more resource records,
which hold information about the domain name (for instance, the IP address of www.incognito.com).
RRs can store a large variety of information about a
domain: IP address, name server, mail exchanger, alias, hostname, geo-location, service discovery, certificates, and arbitrary text.
Resource Records
All data is stored in a standard format called a Resource Record (RR) which consists of four parts Domain, Class, Type, Information
CLASS NAME TYPE
RR (Resource record) fields Field Description Name of the node to which this record pertains Type of RR in numeric form (e.g. 15 for MX RRs) Class code Count of seconds that the RR stays valid (The maximum is 231-1, which is about 68 years.) Length of RDATA field Additional RRspecific data Length (octets) (variable)
2 2
TTL
RDLENGTH RDATA
2 (variable)
Resource Record
Domain - Name of the Domain
Class - class of record (IN for Internet) Type - type of record, what it is used for
When a zone file indicates to a querying server that this the Start-of-Authority says to the query,isYou Have authoritative record for this domain, it (SOA) Record Arrived. The SOA contains the following data fields: number increases as the file is updated.
Serial Number: indicates number of changes to the zone file. The Refresh: tells the name server how often to check to update its data Retry: tells server when to return if it is unable to refresh the data Expire: tells how long the data can sit before it is too old to be valid Time to Live: tells other servers how long to cache the data they have
downloaded
2000021222 ; serial 216000 ; refresh 1800 ; retry 4w ; expire 1h ; negative cache TTL
statement senecac.on.ca = host name of the master server for this zone admin.senenca.on.ca = email of person responsible for this domain
transferred refresh is length of refresh cycle retry is length or retry cycle if master is busy expire is time the slave should continue caching data when primary is no longer responding neg cache - time remember drops
domain name. This record allows email addressed to a specific domain to be delivered to the mail server that is responsible for it. The mail server is a host address. There can be a number of mail servers associated with a MX record. Each server has a priority set for mail receipt.
10 titanic.senecac.on.ca. IN MX 20 mail.senecac.on.ca. First record says that titanic is the mail server for the senecac.on.ca domain second entry says that if titanic is unavailable than send mail to mail.senecac.on.ca
Name Servers
Name servers generally store complete information about a zone. There are two types of name servers: primary and secondary. Every zone MUST have its data stored on both a primary and a secondary name server.
Primary Nameservers
Sometimes called master servers
Master files are updated by local system
administrators Zone changes are made at the primary server Secondary servers maintains a copy of the data for a zone and periodically updates its data from the primary
Dynamic Updates
Update request message is sent form a client to its
local server Message is forwarded to the Primary Master Server Primary master checks prerequisites and the requestor is validated Data is written to storage in client Server can send DNS notify messages to slave servers RFC 1996
Resolvers
Clients processs entry into the database
extracts information in response to the clients request
(entered during configuration on the local machine) Local nameserver checks its own information (hosts.txt) If failed, request is sent to the root server
...continued
If failed returns a referral to a server closer to the
domain of interest I.e. the .com dns server. If failed returns a referral to the server for the domain root I.e. .senecac.on.ca If failed returns a domain not found otherwise returns the address to the requested domain
Caching
Improves performance by maintaining a copy of recent
request in memory Data may be out of date if changes have occurred since last cache Cached data is termed nonauthoritative Primary and secondary nameservers return authoritative answers only since they are originators for the zone Cached data is eventually discarded by a timeout (TTL) field
Conclusion
A DNS system is a fundamental piece of the Internet framework. The hierarchical structure of the DNS name space, worldwide network of name servers, and efficient local caches allow broadband operators to provide high-speed, user-friendly Internet communications.