Personal tools
You are here: Home Classes Fall 2004 - Spring 2005 CS 342 The Application Layer
Navigation
Log in


Forgot your password?
« July 2008 »
Su Mo Tu We Th Fr Sa
12345
6789101112
13141516171819
20212223242526
2728293031
 
Document Actions

The Application Layer

by admin last modified 2005-05-12 17:53

The Application Layer; DNS


Study of the application layer involves study of support areas (security, DNS, network management) and actual applications (email, USENET, WWW and HTTP, instant messaging, IP telephony, streaming video)

Application architecture
  • client-server
  • peer-to-peer
  • hybrid (get peer address from server, then communicate directly with peer)
Application-layer protocol
  • transport type (TCP or UDP)
  • port number to be used
  • message types, syntax (format), semantics
  • message sequencing
A well-defined set of protocols allows client side and server side code to be written independently.

DNS  Domain Name System

DNS is an application which maps symbolic host names to IP addresses.  For example, occs.cs.oberlin.edu is mapped to 132.162.30.128.  Symbolic names are:
  • mnemonic
  • logically independent:  a service can be moved from one machine to another without changing its symbolic name.
The naming scheme is hierarchical.  Similar to UNIX hierarchical directory structure, only backwards:  The leftmost component of a DNS name is least significant, the rightmost component is most significant.



Names need not correspond to physical networks or the IP address hierarchy.

Names normally correspond to the logical structure of an organization, rather than its physical structure.

example

occs.cs.oberlin.edu
  • edu, oberlin.edu, and cs.oberlin.edu are domains
  • occs is the machine name
  • edu is a "top-level domain"

Top-level domains

.com
.edu
.gov
.org

.uk
.fr
.ul
.ca

ac.uk = academic in uk
co.uk = commercial in uk
edu.au = edu in australia

Each TLD has some governing authority or organization.

Organizations apply for a "domain name" (like oberlin.edu) within a TLD.

The authority for creating subdomains is delegated to the owner of the domain's name.  Oberlin can create a subdomain (like cs.oberlin.edu) without telling anyone.

Translating names to IP addresses

That's what DNS does.  It is a large, distributed lookup table mapping host names to IP addresses.

Characteristics:
  • Distributed -- (name, address) information is scattered throughout the Internet.
  • Hierarchical -- Server structure is organized like the domain hierarchy.
  • Client-server -- Clients call on "name servers" to perform translations.

DNS resource records

The DNS database is comprised of "resource records"

Each record contains (name, time to live, class, record type, value)

Record types:
  • A  (the most common record type)
    • For example, cs.oberlin.edu  A  132.162.30.128
  • HINFO  for host information
  • CNAME:  defines an alias (like a symbolic link in the UNIX file system)
    • example:   www CNAME occs.cs.oberlin.edu
    • This allows an organization to change the machine which handles some service (like the Web)
  • MX:  Used by email programs
  • SOA:  start of authority (for a zone)
    • zone-name SOA  server-name
  • NS:  Gives the name of a name server for a given zone
    • zone-name NS  server-name
    • Identifies an authoritative server for the zone.  If the zone is a subzone of this and server is different, it marks an end to this zone.
DNS responds only to fully qualified names.  Simple names are handled by the resolver.  It has some endings to try in its configuration file, /etc/resolv.conf.  On occs, the configuration file contains:

domain cs.oberlin.edu
nameserver 132.162.32.243
nameserver 132.162.32.244
search cs.oberlin.edu oberlin.edu cc.oberlin.edu

There is a root server with authority for top-level domains.

Zones

The DNS namespace is divided into nonoverlapping "zones"



Each zone has one primary server, and may have additional secondary servers.

Each server is the authority for a certain part of the tree.

Each name server knows about the next level servers.

A small organization may have a single name server.

Large ones may use multiple servers for redundancy or to split the hierarchy.

Name resolution

Application sends a request message to a DNS server.

DNS request contains a name to be resolved.  Client software is called the "resolver" (e.g., gethostbyname)

DNS reply contains IP address for the name (may use TCP or UDP but most use UDP).

If the server is an authority for the name it responds directly.

Otherwise, it makes a request to a root server, which then moves down the tree until a server is found with the name.

Two approaches:
  • Iterative query.
    • The server makes repeated requests, starting at the root, working down the tree.  Each reply indicates the next-level server to try.
  • Recursive query:
    • The server's request is forwarded along a path in the tree until it can be resolved.  The result is passed along the same path back to the server.

How to speed up queries?

1.  Replication

especially the root servers.  There are many copies of the root server.

2.  Caching

works well due to locality of reference.
(include a TTL - time to live - in each cache entry)

3.  Use nonauthoritative results

Don't always go to the root.  The result may be a "nonauthoritative result" which may be out of date.


nslookup is a UNIX command to perform DNS lookups.
host is a similar command on linux.


 

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: