Operating System - Linux
1761627 Members
2683 Online
108905 Solutions
New Discussion юеВ

Re: how to provide master and slave server in /etc/yp.conf ?

 
SOLVED
Go to solution
Maaz
Valued Contributor

how to provide master and slave server in /etc/yp.conf ?

i have a master and two slave nis servers
is it right to configure nis clients as:

#vi /etc/yp.conf

domain domainname server 10.0.0.1 # master nis
domain domainname server 10.0.0.2 # slave nis
domain domainname server 10.0.0.3 # slave nis

Thanks n Regards
Maaz
5 REPLIES 5
Alexander Chuzhoy
Honored Contributor

Re: how to provide master and slave server in /etc/yp.conf ?

the best way to configure nis client is with the "authconfig" utility.
check the "use nis" option and give an address of nis server...
Maaz
Valued Contributor

Re: how to provide master and slave server in /etc/yp.conf ?

Thanks Dear Alexander

Yes i know abt authconfig utility.. but dear there in "use nis" option it just ask abt the Domain:------ and Server:----- i.e it just ask abt a "single" server(and i think that must be a master nis).

I wana know that what should i do to configure the clients, so that if master is offline then the clients will automatically contact for slave server(s) without doing BROADCAST.
Especially if anyone of u write me the syntax of /etc/yp.conf to configure the client.

Regards
Maaz
Ermin Borovac
Honored Contributor
Solution

Re: how to provide master and slave server in /etc/yp.conf ?

Your yp.conf looks good. I think you can also use the following lines for your local domain.

ypserver 10.0.0.1
ypserver 10.0.0.2
ypserver 10.0.0.3

ypbind man page (ypbind(8)) on FC3 says

---
After a binding has been established, ypbind will send YPPROC_DOMAIN requests to the current NIS server at 20 seconds intervals. If it doesn├в t get an response or the NIS server tells that he doesn├в t has this domain any longer, ypbind will search a new NIS server.

You could tell ypbind to use network broadcasts to find a new server, what is insecure, or you could give it a list of known, secure servers.
---

From this it looks like it won't do broadcast unless you tell it to via /etc/yp.conf or ypbind command line option.

If your NIS servers are not in production yet, you can test this out by running ypbind with -debug option on the client and disabling network interface on NIS master server. ypbind on the client should re-bind to the second server on the list in /etc/yp
Srikanth A_1
Occasional Advisor

Re: how to provide master and slave server in /etc/yp.conf ?

/etc/yp.conf entries are fine if you have defined NIS servers/slaves.
Other option would be running ypbind with broadcast option. In that case /etc/yp.conf file will be ignored and will pickup the available server.
Maaz
Valued Contributor

Re: how to provide master and slave server in /etc/yp.conf ?

Ok I tested both method/syntax of /etc/yp.conf, and both work quite fine/smooth ;).

First syntax/method of /etc/yp.conf:
domain domainname server 10.0.0.1# master nis
domain domainname server 10.0.0.2 # slave nis
domain domainname server 10.0.0.3 # slave nis


Second syntax/method of /etc/yp.conf:
ypserver 10.0.0.1
ypserver 10.0.0.2
ypserver 10.0.0.3

Thanks Dear Alexander, Ermin Borovac, and Srikanth A.

Regards
Maaz