64
GVHD: Sinh viên thực hiện: Phạm Trần Vũ 1- Nguyễn Thị Vân Anh 2- Lê Thị Hồng Hà 3- Vũ Thị Lộc Phương 4- Tăng Thu Hương 5- Huỳnh Thị Kim Trâm 6- Hồ Thị Kim Oanh 1

GVHD: Sinh viên thực hiện : Phạm Trần Vũ 1- Nguyễn Thị Vân Anh 2- Lê Thị Hồng Hà

  • Upload
    alda

  • View
    71

  • Download
    0

Embed Size (px)

DESCRIPTION

GVHD: Sinh viên thực hiện : Phạm Trần Vũ 1- Nguyễn Thị Vân Anh 2- Lê Thị Hồng Hà 3- Vũ Thị Lộc Phương 4- Tăng Thu Hương 5- Huỳnh Thị Kim Trâm 6- Hồ Thị Kim Oanh. Outline. General concepts Domain Name System (DNS) - PowerPoint PPT Presentation

Citation preview

Page 1: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

GVHD: Sinh viên thực hiện:

Phạm Trần Vũ 1- Nguyễn Thị Vân Anh2- Lê Thị Hồng Hà3- Vũ Thị Lộc Phương4- Tăng Thu Hương5- Huỳnh Thị Kim

Trâm6- Hồ Thị Kim Oanh

1

Page 2: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Outline General concepts Domain Name System (DNS) Directory and Discovery Services

Introduction Jini

Other name services Global Name Service (GNS) X500 Directory Service

2

Page 3: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Introduction• In a distributed system names are used to refer to a

wide variety of resources such as computers, services, remote objects, and files as well as users.

•Names are used for identification as well as for describing attributes.

• 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

3

Page 4: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

4

Page 5: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

URIs, URLs and URNs•Uniform Resource Identifiers (URI): identify or

name a resource on the Internet. They come in two kinds:• Uniform Resource Locator (URL): locates resource

- typed by the scheme field (http, ftp, nfs, etc.)- resources cannot be moved between domains

• Uniform Resource Name (URN): names resource- Format: urn: <nameSpace>:<name-within namespace>- Examples:

a) urn:ISBN:021-61918-0b) urn:inf.unibz.it:TR2007-5

5

Page 6: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

6

Page 7: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

7

Page 8: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Examples of Name Services• File system

– maps file name to file• RMI registry

– binds remote objects to symbolic names• DNS (=Domain Name Service)

– maps domain names to IP addresses– scalable, can handle change

•X.500/LDAP directory service– maps person’s name to email address, phone number

8

Page 9: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Design Issues•Name spaces•Name Resolution•The domain name system

9

Page 10: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Name Spaces•A name space is a collection of all valid names

recognized by a particular service•Allow simple but meaningful names to be used•Potentially infinite number of names•Structured ▫to allow similar subnames without clashes▫to group related names

10

Page 11: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Hierarchic Name Spaces•Sequence of name tokens resolved in different

context– syntax: name token (text string) + delimiter– DNS: inf.unibz.it– Unix: /usr/bin

•Name structure reflects organisational structure•Examples

– domain names, Window file system

11

Page 12: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Hierarchic Name Spaces (ctd)

12

Page 13: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Flat Name Spaces•Single global context and naming authority for

all names– computer serial number– Ethernet address– remote object reference(IP address, port, time, object number, interface id)

• Names not meaningful– difficult to resolve (no tree hierarchy)– easy to create

13

Page 14: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Example Of Flat Name Spaces

14

Page 15: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

OutlineGeneral conceptsDomain Name System (DNS)Directory and Discovery Services ▫Introduction▫JiniOther name services▫Global Name Service (GNS)▫X500 Directory Service

15

Page 16: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

DNS Hierarchy and the Internet

Domain Purpose

com Commercial organizations

edu Educational institutions

gov Government institutions

mil Military groups

net Major network support centers

org Nonprofit organizations and others

int International organizations

16

Page 17: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Namespace Hierarchy Ex: Retal.Sales.Ajax.com.

17

Page 18: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

What is DNS ?Domain Name System (DNS) is:

an application-layer protocol that is part of the standard TCP/IP protocol suite.

This protocol implements the DNS name service, which is the name service used on the Internet.

DNS is a distributed naming database

18

Page 19: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

What DNS used for?The basic function of DNS:

Providing name-to-address resolution for TCP/IP-based networks. (mapping)

Others:Mail Delivery Get mail host for a domain Reverse resolutionGet domain name from IP addressHost information Type of hardware and OSWell-known services A list of well-known services offered by a host.

19

Page 20: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Get Address.when a program is running on your local

machine needs to contact a remote computer, mapping occur.

how to locate address?requests assistance from the DNS software running on

your local machine, which is considered a DNS client ( is call resolver).

sends a request to a DNS name server, which maintains the distributed DNS database: the host names, IP addresses, and other information about a particular group of computers

20

Page 21: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Domain Names•Fully-Qualified Domain Names

21

Page 22: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

ZONESThe data in a name server's database are called zone files. One type of zone file stores IP addresses and host names

22

Page 23: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

DNS Administrative Domains:

Is a group of machines or resources that are administered as a unit.

Is maintained by at least two name servers. Name servers have the graphical relations like

business…

23

Page 24: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

DNS Servers• in.named and DNS Name Servers : Name servers in an administrative domain

maintain the DNS database. They run in.name( can be called BIND- University of California at Berkeley).• Primary server.• Secondary.• Cache-only.

24

Page 25: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

DNS Resolver•Name Resolution Services o Standard Name Resolution.oReverse Name Resolution.o Electronic Mail Resolution.

……

25

Page 26: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

DNS Resolver Functions

oProviding The User Interface.oForming and Sending Queries.oProcessing Responses.

26

Page 27: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

DNS Resolver Functions

•Other Functions: o Caching.o In fact, it is possible to set up a network so that the

resolvers on each of the client machines do nothing more than hand resolution requests to a local DNS server and let the server take care of it. The client resolver becomes a stub resolver. Advantage of centralizing name resolution for the

network. Disadvantage of performance reduction.

27

Page 28: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

DNS Basic Name Resolution Techniques:

DNS Name Resolution Techniques:o Iterative Resolution oRecursive Resolution

28

Page 29: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Iterative Resolution

29

Page 30: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Recursive Resolution

30

Page 31: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

DNS Name Resolution Efficiency Improvements:

Caching Local Resolution

31

Page 32: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

CACHING•The Motivation for Caching: Locality of

Reference▫spatial locality of reference: resource is more

likely to be referenced if it is near another resource that was recently referenced.

▫temporal locality of reference: resource is more likely to be accessed if it was recently accessed.

•Name Resolver Caching▫once a particular name is resolved, it is cached

and remains ready for the next time▫this eliminates traffic and load on DNS servers.

32

Page 33: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Local Resolution

•DNS servers will perform this check to see if they have the information needed for a request before commencing the “formal” top-down resolution process

33

Page 34: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

DNS Name Resolution Process

34

Page 35: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

DNS Reverse Name Resolution Using the IN-ADDR.ARPA Domain

35

Page 36: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

DNS Message Header and Question Section Format • ID•QR•Opcode• AA• TC• RD• RA• Z• RCODE•QDCount• ANCount•NSCount• ARCount

36

Page 37: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

DNS Message Resource Record Field Formats

•DNS Common Resource Record Format•RData Field Formats For Common Resource

Records•A / Address Resource Record (Type Value 1)•NS / Name Server Resource Record (Type Value

2) In this record, the data field carries the domain Carries the domain name of a name server

•CName / Canonical Name Resource Record (Type Value 5)

•SOA / Start Of Authority Resource Record (Type Value 6)

•PTR / Pointer Resource Record (Type Value 12)

37

Page 38: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

HOW ???

•DNS FREE•DNS SERVER ON UNIX

38

Page 39: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

DNS FREE•EDITZONE

39

Page 40: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

DNS SERVER ON UNIX

• Installation▫At a terminal prompt, enter the following

command to install dns: ▫sudo apt-get install bind9 A very useful package

for testing and troubleshooting DNS issues is the dnsutils package. To install dnsutils enter the following:

▫sudo apt-get install dnsutils

40

Page 41: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

DNS configuration Declare zones Forward zone Reverse zone Describe zone’s database Declare DNS client

41

Page 42: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Outline General concepts Domain Name System (DNS) Directory and Discovery Services

Introduction Jini

Other name services Global Name Service (GNS) X500 Directory Service

42

Page 43: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Directory and Discovery Services

• Directory services• Discovery services• Jini case study

43

Page 44: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Directory servicesA special kind of naming service

– Searching attributes Entries

– Each entry is concerned with a set of <attribute, value> pairs

Query– Lookup by known attributes– Return interested attributes– E.g. query one’s telephone No. by his name

44

Page 45: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Directory services•Sometimes directory services are called “yellow

pages services”, while name services are called “white pages services”

•Often organized in a hierarchy• Examples of directory services:

1. Microsoft’s Active Directory Services2. X.500

45

Page 46: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Discovery services• A discovery service is a directory service that

registers the services provided in a spontaneous networking environment.

• Is automatically updated as the network configuration changes

• Services notify the discovery service of existence via a registration interface

• Discovery has a scope (the context)

46

Page 47: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Discovery services(tt)•Provide an interface for automatically registering

and de-registering services, as well as an interface for clients to look up the services they require▫Ex: a printer (or the service that manages it) may

register its attributes with the discovery service as follows: ‘resourceClass = printer, type=laser, color=yes,

resolution=600dpi, location=room101, url=http://www.hotelNW.com/services/printer98’

• Example - Jini (a Java-based system for spontaneous networking)

47

Page 48: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Spontaneous network

Internet

gateway

PDA

service

Music service

serviceDiscovery

Alarm

Camera

Guest'sdevices

LaptopTV/PC

Hotel wirelessnetwork

48

Page 49: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Jini Discovery Service•Designed to be used for spontaneous

networking•Entirely java-based •Computers communicate by means of RMI,

and can download code if necessary•Discovery-related components in a Jini

system are look up services•A Jini service (such as printing service) may

be registered with many look up services

49

Page 50: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Jini Discovery Service(tt)• A lookup service– A service registers an object with a set of

attributes– Clients query the lookup service– Clients download service object that matches

query• Leases– A limited period of time during which the service

can be used

50

Page 51: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Jini Discovery Service(tt)•How to locate the look up service ?▫Using a well-known multicast IP address▫Multicast the request using a “time to live” value

•Service instance is configured with one or more group names such as ‘finance’, ‘sales’, ‘admin’, which act as scoping labels.

51

Page 52: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Printing service

serviceLookup

serviceLookup

Printing

service

admin

admin

admin, finance

finance

Client

Client

Corporate infoservice

1. ‘finance’ lookup service?

2. Here I am: .....

3. Request

printing

4. Use printing service

Network

52

Page 53: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

OTHER NAME SERVICES• Global name service (GNS)• X.500 and LDAP• Trading service

53

Page 54: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Global name service was designed and implemented by Lampson and

colleagues at the DEC Systems Research Center to provide facilities for resource location, mail addressing and authentication

an early research project (1985) that developed solutions for the problems of: large name spaces restructuring the name space

54

Page 55: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

X.500 and LDAP•primarily used to satisfy descriptive queries,

designed to discover the names and attributes of other users or system resources

•as a network service intended to meet these requirements

• is specified as an application level service in the Open Systems Interconnection (OSI) set of standards

55

Page 56: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

X.500 and LDAP•X.500 is also the basis for LDAP•The data stored in X.500 servers is organized in

a tree structure with named nodes as in the case of the other name servers

• in X.500 a wide range of attributes are stored at each node in the tree, and access is not just by name but also by searching for entries with any required combination of attributes

56

Page 57: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

X.500 and LDAP•DIT: the directory information tree•DIB: the entire directory structure including the

data associated with the nodes is called the directory information base

•provides the capability to look up information by name (a white-pages service) and to browse and search for information (a yellow-pages service)

57

Page 58: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

X.500 and LDAP•Entries in the DIB are arranged in a tree

structure called DIT•Each entry is a named object and consists of a

set of attributes•Each attribute has a defined attribute type and

one or more values•The directory schema defines the mandatory

and optional attributes for each class of object

58

Page 59: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

X.500 and LDAP•The X.500 namespace is hierarchical•Users of the X.500 directory may (subject to

access control) interrogate and modify the entries and attributes in the DIB.

59

Page 60: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Protocols•The X.500 standard defines a protocol (among

others) for a client application to access the X.500 directory

•Called the Directory Access Protocol (DAP), it is layered on top of the Open Systems Interconnection (OSI) protocol stack.

60

Page 61: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Trading service•CORBA name service•CORBA event service•CORBA Notification Service

61

Page 62: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

SummaryName 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

62

Page 63: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Referrences Distributed system http://www.tcpipguide.com/free/

63

Page 64: GVHD:  Sinh viên thực hiện : Phạm Trần Vũ 1-  Nguyễn Thị Vân Anh 2-  Lê Thị Hồng Hà

Q.A^_^

64