Operating System - HP-UX
1822896 Members
3461 Online
109645 Solutions
New Discussion юеВ

NIS question - NIS server in different subnet

 

NIS question - NIS server in different subnet


We have a setup where the NIS server is located outside the subnet having HP-UX servers. I was trying to configure NIS using SAM.

I set the domain name.
I could not go any further even after setting NIS server/Net mask. I got a messgage,

" No server for the default domain is running on the local network, so NIS client capability cannot be enabled. Check the default domain
name you configured to make sure it is correct, or configure and start a master or slave server on the same network segment as the client."
Is there any workaround other than setting a master/slave NIS serve rin the subnet?

Regards,

James
7 REPLIES 7
Robert-Jan Goossens
Honored Contributor

Re: NIS question - NIS server in different subnet

Hi James,

Document description: nis client can not bind to server, ypset works ok
Document id: KBRC00004981

http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000063208189

Hope this helps,
Robert-Jan
Dave Olker
Neighborhood Moderator

Re: NIS question - NIS server in different subnet

Hi James,

By default, NIS uses UDP broadcast packets to locate NIS servers on local subnets. If you want to use a server on a non-local subnet you have two options: ypset or create a list of NIS servers on the client.

The ypset solution has been around for ever, and it allows the client to bind to the remote server once. However, if communication with that server is lost the client goes back to using UDP broadcasts.

The better solution is to configure the available NIS servers on the client. This is done via the ypinit -c command. According to the ypinit man page:


-c Configures the local host as a NIS client, so that the NIS client will attempt to bind to a particular NIS server. Invocation of ypinit with a -c option prompts the user to construct a list of NIS servers, in the order of preference, to which the client will try to bind. This list of NIS servers is stored in the file /var/yp/binding//ypservers. In order for ypbind to use this list of NIS servers, ypbind should not be invoked with -broadcast option. (see ypbind(1M) in ypserv(1M)). If it is so desired that it is not necessary for a NIS client to bind to a NIS server in a particular list, the ypinit -c installation mechanism could be ignored.


I recommend using the "ypinit -c" feature to establish a list of available NIS servers.

Hope this helps,

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo

Re: NIS question - NIS server in different subnet

Hi dave,

Thanks. I carefully followed your answer and reffered the docs.sun.com relevent book too

After configuring ypbind with ypset,

I am getting

/sbin/init.d/nis.client start
starting NIS CLIENT networking
starting up the rpcbind
rpcbind already started, using pid: 2940
domainname bangnis1
starting up the Network Information Service
starting up the ypbind daemon
FAILURE CODE: 1
calling ypset with 172.22.40.8
Sorry, I can't set up a udp connection to ypbind on host tcshp25.
Checking NIS binding.
Bound to NIS server using domain bangnis1.
starting up the keyserv daemon
/usr/sbin/keyserv
I tried running withoutr broadcast option..that too not helping

James

Re: NIS question - NIS server in different subnet

Hi dave,
Sorry, I missed the error.

# ypwhich
ypwhich: is not running ypbind
# ypwhich -m
ypwhich: can't bind to an NIS server for domain bangnis1.
Reason: internal NIS server or client error

James
Dave Olker
Neighborhood Moderator

Re: NIS question - NIS server in different subnet

Hi James,

Sounds like something is messed up in your /etc/rc.config.d/namesvrs file. Can you post the contents of that file here? Also, have you given any consideration to the other idea of using ypinit -c instead of the whole ypset method?

Regards,

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo

Re: NIS question - NIS server in different subnet

Hi Dave,

the contents of the /etc/rc.config.d/namesvrs file is posted.

I tried ypinit -c also and that too did did not work for me.

Regards,

James
Dave Olker
Neighborhood Moderator

Re: NIS question - NIS server in different subnet

Hi James,

If you did use the ypinit -c option to create a valid list of NIS servers, then the syntax you have in your namesvrs file will stop the system from using that information.

According to the ypbind man page:
___________________________________

If ypbind is invoked with option -ypset or -ypsetme the NIS servers list in the file /var/yp/binding/domain_name/ypservers is ignored.
___________________________________


My recommendation is to remove the "ypset" option from your YPBIND_OPTIONS line and remove the IP address from your YPSET_ADDR line and just let ypbind use the information stored in the /var/yp/binding/domain_name/ypservers file. Assuming you entered the addresses of your NIS servers correctly when you issued the "ypinit -c" command, the only modifications you should need to your namesvrs file are the NIS_CLIENT=1 and NIS_DOMAIN="bangnis1" lines.

I recommend you do the following:

# /sbin/init.d/nis.client stop

Modify namesvrs file to remove the information in YPBIND_OPTIONS and YPSET_ADDR lines. You might even want to re-issue the ypinit -c command and verify that the servers you input are correct (i.e. accurate IP address and are currently running as NIS servers).

Then try:

# /sbin/init.d/nis.client start

and see if the client can successfully start ypbind and bind to the first NIS server you entered with the ypinit -c command.

Good luck,

Dave



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo