1 chapter 6: name services. 2 introduction name services and dns discovery services summary

37
1 Chapter 6: Name Services

Upload: anissa-west

Post on 25-Dec-2015

228 views

Category:

Documents


2 download

TRANSCRIPT

1

Chapter 6: Name

Services

2

Name Services

Introduction

Name services and DNS

Discovery services

Summary

3

Objectives To understand the need for naming systems in DS

To study the design requirements for distributed name services

To understand the operation of the Internet naming service – DNS

To be familiar with the role of discovery services in mobile and ubiquitous computer systems

4

The Role Of Names And Name Services

Resources - accessed using identifier or reference– An identifier can be stored in variables and

retrieved from tables quickly– Identifier includes or can be transformed to an

address for an objectE.g. NFS file handle, Corba remote object

reference– A name is human-readable value (usually a

string) that can be resolved to an identifier or address Internet domain name, file pathname,

process numberE.g ./etc/passwd, http://www.cdk3.net/

5

The Role Of Names And Name Services (Cont.)

For many purposes, names are preferable to identifiers – because the binding of the named resource

to a physical location is deferred and can be changed

– because they are more meaningful to users

Resource names are resolved by name services– to give identifiers and other useful

attributes

6

Requirements For Name Spaces

Allow simple but meaningful names to be used

Potentially infinite number of names

Structured - to allow similar subnames without clashes- to group related names

Allow re-structuring of name trees- for some types of change, old programs

should continue to work

7

file

Web serverSocket

Composed Naming Domains Used To Access A Resource From A URL

http://www.cdk3.net:8888/WebExamples/earth.html

URL

Resource ID (IP number, port number, pathname)

138.37.88.61 WebExamples/earth.html8888

DNS lookup

Figure 9.1

(Ethernet) Network address

2:60:8c:2:b0:5a

ARP lookup

8

Names And Resources

Currently, different name systems are used for each type of resource:resource name identifiesfile pathname file within a given file systemprocessprocess id process on a given computerport port number IP port on a given computer

Uniform Resource Identifiers (URI) offer a general solution for any type of resource. 2 main classes:

9

Names And Resources (Cont.)

There are two main classes (Cont.):URL Uniform Resource Locator

• typed by protocol field (http, ftp, nfs, etc.)

• part of the name is service-specific• resources cannot be moved between

domainsURN Uniform Resource Name

• requires a universal resource name lookup service

• DNS-like system for all resources

10

Names And Resources (Cont.)

More on URNsformat:urn:<nameSpace>:<name-within-namespace>examples:a) urn:ISBN:021-61918-0b) urn:dcs.qmul.ac.uk:TR2000-56resolution:a) send a request to nearest ISBN-lookup service

- it would return whatever attributes of a book are required by the requester

b) send a request to the urn lookup service at dcs.qmul.ac.uk - it would return a url for the relevant document

11

Name Resolution in an Iterative navigation

A client iteratively contacts name servers NS1–NS3 in order to resolve a nameClient 1

2

3

NS2

NS1

NS3

Nameservers

Figure 9.2

Used in:

DNS: Client presents entire name to servers, starting at a local server, NS1. If NS1 has the requested name, it is resolved, else NS1 suggests contacting NS2 (a server for a domain that includes the requested name).

NFS: Resolves file name iteratively on a component by component basis.

13

Non-recursive And Recursive Server-controlled Navigation

A name server NS1 communicates with other name servers on behalf of a client

Recursiveserver-controlled

1

23

5

4

client

NS2

NS1

NS3

12

34client

NS2

NS1

NS3

Non-recursiveserver-controlled

Figure 9.3

DNS offers recursive navigation as an option, but iterative is the standard technique. Recursive navigation must be used in domains that limit client access to their DNS information for security reasons.

14

DNS - The Internet Domain Name System

Def : a distributed hierarchical naming system for computers, services, or any resource

connected to the Internet or a private network

To replace original scheme - host name ad adds were kept in single master file and downloaded by ftp.

Did not scale to a large number of computer.

Local organization wished to administer themselves

A general name service was needed

Name structure reflects administrative structure of Internet

Rapidly resolves domain names to IP addresses

– exploits caching heavily

– typical query time ~100 milliseconds

Scales to millions of computers

– partitioned database, caching

Resilient to failure of a server

– replication

15

DNS Server Functions And Configuration

Main function is to resolve domain names for computers, i.e. to get their IP addresses– caches the results of previous searches until they pass their 'time to

live'

Other functions:– get mail host for a domain – reverse resolution - get domain name from IP address– Host information - type of hardware and OS– Well-known services - a list of well-known services offered by a host

16

DNS - The Internet Domain Name System (Cont.)

Is designed for use in multiple implementation – have its own space nameCom – commercial organization

Edu - educational institutions

Gov - goverment agencies

DNS naming data are divided into zones that contains following data :Attribute data for names in a domain and less any sub domains

names and adds of at least 2 names servers that provided authoritative data for zone

names of server that hold authoritative data for sub-domains

Zone management parameter – governing the caching and replication

2 types of server that provide authoritative dataPrimary/master – reads zone data directly from local master file

Secondary – download zone data from primary server

17

DNS - The Internet Domain Name System (Cont.)

Basic DNS algorithm for name resolution(domain name -> IP number)

• Look for the name in the local cache• Try a superior DNS server, which responds with:

– another recommended DNS server– IP address (which may not entirely up to date)

18

DNS Name Servers

Note: Name server names are in italics, and the corresponding domains are in parentheses.Arrows denote name server entries

a.root-servers.net(root)

ns0.ja.net(ac.uk)

dns0.dcs.qmw.ac.uk(dcs.qmw.ac.uk)

alpha.qmw.ac.uk(qmw.ac.uk)

dns0-doc.ic.ac.uk(ic.ac.uk)

ns.purdue.edu(purdue.edu)

ukpurdue.edu

ic.ac.uk

qmw.ac.uk...

dcs.qmw.ac.uk*.qmw.ac.uk

*.ic.ac.uk*.dcs.qmw.ac.uk

* .purdue.edu

ns1.nic.uk(uk)

ac.uk...

co.uk

yahoo.com ....

Figure 9.4

authoritative path to lookup:

jeans-pc.dcs.qmw.ac.uk

19

Values for the most significant segment of a domain name. DNS does not distinguish between

names in upper or lower case.

20

Graphical illustrates one way DNS hierarchy might be structured in corporation. Name for

individual computers can be added to the diagram.

DNS Hierarchy

21

2 examples of ways the domain name hierarchy can be divided among three servers. Each organization chooses how to divide names among its servers.

22

DNS In Typical Operation

a.root-servers.net(root)

ns0.ja.net(ac.uk)

dns0.dcs.qmw.ac.uk(dcs.qmw.ac.uk)

alpha.qmw.ac.uk(qmw.ac.uk)

dns0-doc.ic.ac.uk(ic.ac.uk)

ns.purdue.edu(purdue.edu)

ukpurdue.edu

ic.ac.uk

qmw.ac.uk...

dcs.qmw.ac.uk*.qmw.ac.uk

*.ic.ac.uk*.dcs.qmw.ac.uk

* .purdue.edu

ns1.nic.uk(uk)

ac.uk...

co.uk

yahoo.com ....

client.ic.ac.uk

IP: alpha.qmw.ac.uk

2

3IP:dns0.dcs.qmw.ac.uk

jeans-pc.dcs.qmw.ac.uk ?

IP:ns0.ja.net

1

IP:jeans-pc.dcs.qmw.ac.uk

4

Without caching

23

DNS Resource Records

Record type Meaning Main contentsA A computer address IP numberNS An authoritative name server Domain name for serverCNAME The canonical name for an alias Domain name for aliasSOA Marks the start of data for a zone Parameters governing the zoneWKS A well-known service description List of service names and protocolsPTR Domain name pointer (reverse

lookups)Domain name

HINFO Host information Machine architecture and operatingsystem

MX Mail exchange List of <preference, host> pairsTXT Text string Arbitrary text

- A Resource Record (RR) is the basic data element in the domain name system.- Zone data are stored by name servers in files based on resource records.- Each records refer to domain name.

24

DNS zone data records

domain name time to live class type value

1D IN NS dns01D IN NS dns1

1D IN NS cancer.ucs.ed.ac.uk

1D IN MX 1 mail1.qmul.ac.uk1D IN MX 2 mail2.qmul.ac.uk

domain name time to l ive class type value

www 1D IN CNAME apricot

apricot 1D IN A 138.37.88.248

dcs 1D IN NS dns0.dcsdns0.dc s 1D IN A 138.37.88.249dcs 1D IN NS dns1.dcs

dns1.dc s 1D IN A 138.37.94.248dcs 1D IN NS cancer.ucs.ed.ac.uk

25

DNS Issues

Name tables change infrequently, but when they do, caching can result in the delivery of stale data.– Clients are responsible for detecting this and recovering

Its design makes changes to the structure of the name space difficult. For example:– merging previously separate domain trees under a new root– moving subtrees to a different part of the structure (e.g. if

Scotland became a separate country, its domains should all be moved to a new country-level domain.

26

Directory And Discovery Services

A service that stores collection of bindings between names and attributes

Directory service: 'yellow pages' for the resources in a network– Retrieves the set of names that satisfy a

given description – e.g. X.500, LDAP, MS Active Directory

Services(DNS holds some descriptive data, but:

• the data is very incomplete• DNS isn't organised to search it

27

Directory And Discovery Services (Cont.)

Discovery service also:– is automatically updated as the network

configuration changes– meets the needs of clients in spontaneous

networks – discovers services required by a client (who

may be mobile) within the current scope, for example, to find the most suitable printing service for image files after arriving at a hotel.

– Examples of discovery services: Jini discovery service, the 'service location protocol', the 'simple service discovery protocol' (part of UPnP), the 'secure discovery service'.

29

Printing service

serviceLookup

serviceLookup

Printing service

admin

admin

admin, finance

finance

Client

Mobile client

Corporate infoservice

Network

Service Discovery In Jini

2. Here I am: .....4. Use printing

service

1. ‘finance’ lookup service?

Jini services register their interfaces and descriptions with the Jini lookup services in their scope

Clients find the Jini lookup services in their scope by IP multicast

Jini lookup service searches by attribute or by interface type– The designers of Jini argue convincingly that this the only reliable way to do discovery

3. Requestprinting &receive proxy

30

Case Study

GNS case study (Section 9.4)– an early research project (1985) that developed solutions for the problems of:

large name spaces restructuring the name space

X.500 and LDAP (Section 9.5)– a hierarchically-structured standard directory service designed for world-wide use– accommodates resource descriptions in a standard form and their retrieval for any

resource (online or offline)– never fully deployed, but the standard forms the basis for LDAP, the Lightweight

Directory Access Protocol, which is widely used

Trading services (see Section 17.3)– Directories of services with retrieval by attribute searching– Brokers negotiate the contract for the use of a service, including negotiation of

attribute such as quality and quantity of service

31

Fig. 9.7: GNS directory tree &value tree for user Peter.Smith

UK FR

AC

QMWDI: 322

Peter.Smith

passwordmailboxes

DI: 599 (EC)

DI: 574DI: 543

DI: 437

Alpha GammaBeta

32

Fig. 9.8: Merging trees under a new root

EC

UK FR

DI: 599

DI: 574DI: 543

NORTH AMERICA

US

DI: 642

DI: 457DI: 732

#599 = #633/EC#642 = #633/NORTH AMERICA

Well-known directories:

CANADA

DI: 633 (WORLD)

33

Fig. 9.9: Restructuring the directory

EC

UK FR

DI: 599

DI: 574DI: 543

NORTH AMERICA

US

DI: 642

DI: 457DI: 732CANADA

DI: 633 (WORLD)

#633/EC/US

US

#599 = #633/EC#642 = #633/NORTH AMERICA

Well-known directories:

34

Fig. 9.10: X.500

service architectu

re

DSA

DSA

DSA

DSA

DSADSADUA

DUA

DUA

- Organized in tree structure - Namely Directory Information Tree (DIT)- Servers are Directory Service Agents (DSAs) - Clients are Directory User Agents (DUAs)

Case Study: X.500 service

35

Case Study: X.500 service (Cont.)

Advantages- X.500 is designed to be scalable. If this is achieved in

practice, then it should meet the future needs of large-scale networking better than DNS.

- The main advantage of X.500 is that it is an attribute-based directory service.

- Easy to use: users could address messages to people by quoting their real names and their organizational affiliations, instead of the Domain Name based addresses currently used.

- The mail system would make a search request of X.500 to find the corresponding DNS or other network address of the user’s mailbox.

36

Case Study: X.500 service (Cont.)

Disadvantages

- Searching with a wide scope is quite slow - Costly in computing resources- The scope could be limited by the use of the

organizational affiliation. Several alternate mailboxes could be held in the directory server, providing fault tolerant mail delivery.

37

Fig. 9.11: Part of X.500 Directory Information Tree

... France (country) Great Britain (country) Greece (country)...

BT Plc (organization) University of Gormenghast (organization)... ...

Department of Computer Science (organizationalUnit)

Computing Service (organizationalUnit)

Engineering Department (organizationalUnit)

...

...

X.500 Service (root)

Departmental Staff (organizationalUnit)

Research Students (organizationalUnit)

ely (applicationProcess)...

...

Alice Flintstone (person) Pat King (person) James Healey (person) ...... Janet Papworth (person)...

38

Fig. 9.12: An X.500 DIB Entry

infoAlice Flintstone, Departmental Staff, Department of Computer Science,

University of Gormenghast, GB

commonName Alice.L.Flintstone Alice.Flintstone Alice Flintstone A. Flintstone

surname

Flintstone

telephoneNumber +44 986 33 4604

uid

alf

mail

[email protected]

[email protected]

roomNumber

Z42

userClass

Research Fellow

39

Summary

Name services:– defer the binding of resource names to addresses (and other attributes)– Names are resolved to give addresses and other attributes– Goals :

Scalability (size of database, access traffic (hits/second), update traffic) Reliability Trust management (authority of servers)

– Issues exploitation of replication and caching to achieve scalability without compromising the

distribution of updates navigation methods

Directory and discovery services:– 'yellow pages' retrieval by attributes– dynamic resource registration and discovery