1834786 Members
2688 Online
110070 Solutions
New Discussion

Re: NIS Question

 
SOLVED
Go to solution
hpuxrox
Respected Contributor

NIS Question

I have many HPUX machines running 11.i and NIS.
when I run ypwhich all but one state it is using the primary nis server. The on that is not says it is using one of the slave servers.

my question is why is it using the slave and where and how is this set. I looked into the /etc/rc.config.d/namesvrs file but this just sets the domainname.
5 REPLIES 5
Jeff Schussele
Honored Contributor

Re: NIS Question

Hi Yates,

In the namesvrs file is there an entry YPSET_ADDR - if so check the IP - is it the IP of the slave?
If so change to the master & bounce the client.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
A. Clay Stephenson
Acclaimed Contributor

Re: NIS Question

Actually, this is what you want to happen although better load balancing would be preferred. The first server that responds to an NIS client request wins (unless specifically overrideen with the ypset command).
If it ain't broke, I can fix that.
S.K. Chan
Honored Contributor
Solution

Re: NIS Question

By default NIS clients use the broadcast method to bind to NIS servers. This is probably the setup you got, hence it depends on which server that (master or slave) responds to the broadcst first. If the slave respond first that the client will bind to the slave. This behavior is typical if you do not have YPBIND_OPTIONS and YPSET_ADDR defined in namesvrs file.

If I want my NIS client to bind to a specific server, I'll put ..
YPBIND_OPTIONS="ypset"
YPSET_ADDR=""
Jeff Schussele
Honored Contributor

Re: NIS Question

Hi Yates,

That namesrvs option needs to be
YPBIND_OPTIONS="-ypset"
as it'll be a command line option.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Niraj Kumar Verma
Trusted Contributor

Re: NIS Question

Hi,

I have a sugesation.

If you have less than 10 servers and good fast LAN then its always better that

you make all your server as slave and bind it localy. This will increase the performeance drastically.

you need to set the YESET option to
"-ypsetme" and start the NIS server first and then nis.client .

I have the similar setup and it works fine.

-Niraj
Niraj.Verma@philips.com