The Network Information System - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

The Network Information System

Description:

Only the master maps can be modified, whereas slave servers provide read-only access. Each domain can have only one master server. ... – PowerPoint PPT presentation

Number of Views:77
Avg rating:3.0/5.0
Slides: 20
Provided by: ruimi
Category:

less

Transcript and Presenter's Notes

Title: The Network Information System


1
The Network Information System
  • To insert your company logo on this slide
  • From the Insert Menu
  • Select Picture
  • Locate your logo file
  • Click OK
  • To resize the logo
  • Click anywhere inside the logo. The boxes that
    appear outside the logo are known as resize
    handles.
  • Use these to resize the object.
  • If you hold down the shift key before using the
    resize handles, you will maintain the proportions
    of the object you wish to resize.
  • Chunqing Yuan Weiwei Huang
  • For CpE473

Local Area Network
2
Introduction
  • What is NIS?
  • Sun introduced Network Information System (NIS),
    formerly called Yellow Pages, or YP
  • provides a mechanism for keeping important files
    synchronized between hosts on a network
  • What does NIS do?
  • allows networked machines to have a common
    interface regardless of the workstation that you
    log into
  • allows you to coordinate the distribution of
    database information throughout your networked
    environment
  • focused on making network administration more
    manageable by providing centralized control over
    a variety of network information

3
Systems support for NIS
  • --------------------------------------------------
    -------------------------
  • System Supports NIS?
  • --------------------------------------------------
    -------------------------
  • Solaris Partially
  • HP-UX Yes
  • IRIX Yes
  • SunOS Yes
  • OSF/1 Yes
  • BSDI No
  • --------------------------------------------------
    -------------------------

4
Advantages and Disadvantages of NIS
  • Advantage
  • unnecessary for administrators to be aware of
    NISs internal data formats
  • Disadvantages
  • not suitable for managing a large network of
    machines
  • consume a fair amount of network bandwidth
  • If a slave server is down or inaccessible when a
    map is changed, the slaves copy will not be
    updated
  • not secure

5
The NIS Environment
  • NIS uses a client-server arrangement.
  • Systems can have the following roles
  • Master server -- A system that stores the master
    copy of the NIS database files, or maps. Only the
    master maps can be modified, whereas slave
    servers provide read-only access. Each domain can
    have only one master server.
  • Slave server -- A system that obtains and stores
    copies of the master server's NIS maps. Each
    domain can have multiple slave servers
    distributed throughout the network.
  • Client -- Any system that
  • queries NIS servers for NIS
  • database information. Clients
  • do not store and maintain
  • copies of the NIS maps for
  • their domain locally.

6
NIS Maps
  • Information distributed by NIS is stored in
    database files called maps
  • Most of the NIS maps represent files that were
    traditionally stored in the /etc directory,
    include the following
  • aliases passwd
  • group protocols
  • hosts rpc
  • netgroups services
  • networks
  • Each NIS map contains a set of keys and
    associated values. Each NIS map has a map name,
    used by programs to access data in the map.

7
NIS Domains
  • A named set of NIS maps is called a domain.
  • A domain name is required for retrieving data
    from an NIS database. It is set at the time the
    system is booted
  • An NIS domain is an administrative entity
  • that consists of a master server, one or more
  • slave servers, and numerous clients
  • All systems in a domain share the same set of
  • NIS database files
  • NIS uses domains to arrange the workstations,
    users, and networks in its namespace.

8
NIS Data Storage
  • The data in NIS maps is stored as databases in
    dbm/ndbm, btree, or hash format
  • Each NIS map is stored as a pair of ndbm files,
    one called map.dir and the other called map.pag,
    in a subdirectory of the NIS directory named for
    the NIS domain
  • For example, the NIS map for the /etc/hosts file
    in the domain market might be stored in these
    dbm/ndbm files
  • /var/yp/market/hosts.byaddr.dir
  • /var/yp/market/hosts.byaddr.pag
  • /var/yp/market/hosts.byname.dir
  • /var/yp/market/hosts.byname.pag

9
Selected NIS commands and daemons
  • --------------------------------------------------
    --------------------------------------------------
    --------------------------------
  • Program Description
  • --------------------------------------------------
    --------------------------------------------------
    --------------------------------
  • ypserv NIS server daemon, started at boot time
  • ypbind NIS client daemon, started at boot time
  • domainname Sets the NIS domain a machine is in
    (run at boot time)
  • ypxfrd Serves requests from ypxfr (runs on
    master server)
  • makedbm Builds an ndbm map from a flat file
  • ypmake Rebuilds ndbm maps from flat files that
    have changed
  • ypinit Configures a host as a master or slave
    server
  • ypset Makes ypbind connect to a particular
    server
  • ypwhich Finds out which server the current host
    is using
  • ypmatch Prints map entries for a specified key
  • yppasswd Changes a password on the NIS master
    server
  • ypupdate Server for updating NIS maps (managed
    by inetd)
  • -------------------------------------------------
    --------------------------------------------------
    ------------------------------------

10
Setting Up an NIS Domain 1
  • NIS must be initialized on the master server, on
    the slave servers, and on each client.
  • It can be done in two steps.
  • First, run ypinit on each server.
  • Second, on every machine in the domain, set the
    domain name from one of the system startup files
    and configure /etc/passwd and /etc/group to
    import NIS data.

11
Setting Up an NIS Domain 2
  • Configuring NIS servers
  • ypinit is used to initialize both the master and
    slave servers for a domain.
  • On the master, the following commands are used
  • cd/var/yp / The NIS directory, wherever it is.
    /
  • domainname foo / Name the new domain. /
  • ypinit m / Initialize as master server. /
  • /usr/etc/ypserv / Start the NIS server. /
  • Once the master is up and running, each slave
    server should be primed by running ypinit with
    the s (slave) flag
  • cd/var/yp
  • ypinit s master / Argument is masters
    hostname. /
  • /usr/etc/ypserv
  • On each slave, you should set up crontab
    entries that pull fresh copies
  • of all maps from the master. ypxfr
    map, where map is the mane such
  • as passwd.byuid, will transfer the
    specified map from the master
  • server. You must run the command
    once for each map

12
Setting Up an NIS Domain 3
  • Configuring NIS Clients
  • The second step is to inform each machine that it
    is a
  • member of the new domain, and to configure it so
    that
  • it pays attention to the network versions of
    /etc/passwd
  • and /etc/group. The servers of a domain are
    generally
  • clients as well. The /etc/passwd and /etc/group
    files
  • on the master server are the files from which the
    NIS
  • maps are built

13
Managing an NIS Server 1
  • Managing an NIS server includes the
  • following NIS server tasks
  • Add an NIS slave server to a domain
  • Adding a slave server to a domain enables the
    slave server to receive updated NIS maps from the
    master server and serve them to NIS clients in a
    domain.
  • Remove an NIS slave server from a domain
  • Removing a slave server from a domain means that
    the system will no longer receive updated NIS
    maps from the master server and serve them to NIS
    clients in a domain.
  • Add a user to an NIS domain
  • Adding a new user to an NIS domain includes the
    user in the passwd map and allows the user to
    participate in the NIS environment. A user has
    only one password on all systems that use NIS for
    their passwd map.

14
Managing an NIS Server 2
  • Update an NIS map
  • Updating an NIS map involves making changes to
    an NIS map's master file, updating the Makefile
    file (if the map is not listed), and building and
    distributing the new map.
  • Add an NIS map to a domain
  • Adding an NIS map to a domain allows the
    database information to be distributed throughout
    an NIS domain. You can create and distribute maps
    for any information you want to distribute.
  • Remove an NIS map from a domain
  • Removing an NIS map from a domain prevents the
    database information from being distributed
    throughout an NIS domain.

15
Managing an NIS Server 3
  • Modify the /var/yp/Makefile file
  • Adding an Entry
  • Deleting an Entry
  • Makefile Editing Guidelines
  • Restrict access to NIS data
  • By default, the ypserv and ypxfrd daemons provide
    NIS information to
  • anyone with network access to an NIS server that
    makes a reqest. However,
  • you can restrict NIS database access to only
    those hosts in subnets you
  • specify

16
Managing an NIS client
  • Managing an NIS client includes the
  • following NIS client tasks
  • Change in NIS password
  • To change a user's password that is stored in
    the NIS passwd map, use the yppasswd command.
  • Obtain map information
  • Obtaining NIS map information enables you to see
    the following information
  • Map names
  • Map values
  • Map keys
  • Map master server

17
NIS
  • NIS is a network name service similar to NIS but
    with more features. NIS is not an extension of
    NIS. It is a new software program
  • NIS has some major advantages over NIS in
  • Secure data access
  • Hierarchical and decentralized network
    administration
  • Very large namespace administration
  • Access to resources across domains
  • Incremental updates

18
Differences Between NIS and NIS
19
Reference
  • UNIX System Administration Handbook, Second
    Editon, by Evi Nemeth et al, Prentice Hall PTR,
    Englewood Cliffs, New Jesey 07632
  • http//www.media.mit.edu/captkirk/Dudoc/
  • http//www.sun.com/smcc/
  • http//www.microsoft.com/technet/win2000/win2ksrv/
    technote
Write a Comment
User Comments (0)
About PowerShow.com