Network Information Service , as the name
suggests this is a nameservice, information to the system is provided from
a centralized database, which is a source domain wide. Ypservers run "ypserv"
and clients run "ypbind" and bind to the ypservers.
Instead of managing databases of information
on each client, data is consolidated on specific database files (dbm),
for easier lookup. These databases or dbm files are accessible to each
client from its ypserver to which it binds to. And data can be retrieved
through a set of " yp" commands.
You can run "ypwhich" to find out the binding
ypserver. And "ypwhich -m", would tell us of all the yp files available
to us. They usually include;
passwd,
ypmatch froomin passwd ; would return
froomin:r3gxIjLU0.ZI.:3093:105:Marty Froomin
:/home/t/froomin:/bin/tcsh
hosts,
ypmatch rattler hosts ; would return
130.65.88.71 rattler
hosts.byaddr,
ypmatch 130.65.88.71 hosts.byaddr ; would
return
130.65.88.71
rattler #Marty Froomin
aliases,
ypmatch froomin aliases ; would return
marty.froomin
and ypmatch marty.froomin aliases ; Would
return
froomin@mailhost
By having ypservers available to a group
of buildings, and placing ypslaves (ypslaves are replicas of ypmasters,
ypmasters have access to ascii data. And they convert it to data files,
and feed them to ypslaves) in strategic locations information can be shared
uniformly across the NIS domain.
The below picture helps in understanding
the scheme. Herein is shown a ypslave with 4 interfaces servicing the 37,
61, 67, and the 37 subnets. All clients run ypbind in broadcast mode, and
bind to the ypslave available.
The power of NIS is understood by analyzing some basic data. Say there are about 8000 users in a domain, and about nearly 25,000 machines which they should be able to log in. The friendly neighborhood "System Administrator" should duplicate the huge password files in all these machines. And update them with changes.
That would be...
8000 x 25,000 = 200,000 lines of passwd information
to maintain.
With NIS, we can have one copy of the data
available to all the clients when and where they need, through transparent
"yp" calls. And they can be administered from one place. The same scenario
is duplicated for different yp maps, as shown above.
Note: Now is a good time to familarize yourself with the yp commands. Read man pages for ypmatch, ypcat, ypwhich, ypbind, and nsswitch.conf.
Marty Froomin 6/19/03