Samstag, 7. Mai 2011

CS6223 Distributed Systems

CS6223 Distributed Systems

Solution to Tutorial on Naming Services

1. What data-files and what command files are involved, when you configure a domain:
a) a name service client host;
b) the primary name server;
c) the secondary name server;

a) the client host needs to have a file /etc/resolv.conf, which contains IP addresses of the primary and the secondary name servers of the local domain. An example of a file is:
; file name: /etc/resolv.conf
domain cs.cityu.edu.hk
nameserver 144.214.120.97

b) the host of the primary server should have a file /etc/named.boot. At boot-up time, the OS reads this file and configure this host as a primary name server. The file contains the database files for name resolution. An example of the file format:

; file name: named.boot
directory /etc
primary cs.cityu.edu.hk db.cs.cityu.edu.hk
primary 120.214.144.IN-ADDR.ARPA db.120.214.144
cache . db.cache

c) the host of the primary server should have a file /etc/named.boot. In this file, is specifies itself as secondary name server. The file contains the IP address of the primary name server. The file format is like:
; file name: named.boot
directory /etc
secondary cs.cityu.edu.hk 144.214.120.97 db.snd
………
cache . db.cache


2. Give the steps of reverse resolving IP addr 144.214.120.1 (mars.cs.cityu.edu.hk) from a machine in HKU.
Answer:
1) the host first contact HKU name-server;
2) If HKU name-server cannot find 144.214.120.1 in its local cache, it send a request to any root name server (a-m.root-servers.net) to resolve “1.120.214.144.in-addr.arpa”;
3) The root name-server will send the request to the name-server that is responsible for zone “144.in-addr.arpa”;
4) This name-server will further request the name-server that is responsible for zone “214.144.in-addr.arpa”;
5) This’s most probably in an organization (like CityU) if it’s a class B address. If this name-server doesn’t have cached information about “1.120.214.144”, it further requests the name-server of a subnet (say CS dpet);
6) The CS dept name server will reply the host name of requested IP address, and the reply is sent all the way back to the host at HKU, following the same route as the requests.

3. Suppose you’re the administrator of cs.cityu.edu.hk domain. What operations are required when:
a) add a new host named “pluto” into the dept’l network.
b) create a new sub-domain named “ds” in the CS domain and a host “ds0” is assigned to be the name server for domain “ds.cs.cityu.edu.hk”.
c) change the dept’l www server to host “homer”.

Answer:

a) suppose the dept domain is “cs.cityu.edu.hk” and the name server for this domain is mars.cs.cityu.edu.hk. You need to add an item in the database file “db.cs.cityu.edu.hk”:
pluto IN A 144.214.120.2

b) you need to add the following line in db.cs.cityu.edu.hk:
IN NS ds0.ds.cs.cityu.edu.hk
c) you need to add the following line in db.cs.cityu.edu.hk:
www.cs.cityu.edu.hk IN CNAME homer.cs.cityu.edu.hk
OR
www IN A 144.214.120.97

Keine Kommentare: