You can set global server preferences for a local or remote domain. Preferences may be set for individual machines and all the machines on a subnet.
The procedures in this section describe how to specify server preferences in a global client_info table residing on the NIS+ domain's master server. Once the table exists on the master server, NIS+ replicates it on to any existing replica servers for the domain.
See Specifying Local Server Preference for information on how to create a local client_info file on an individual machine.
See Global Table or Local File for an explanation of the difference between a global client_info table and a local client_info file.
To assign server preference numbers, run nisprefadm with either the:
-a option to add new or additional preferred servers.
-u option to delete existing server preferences and create new ones.
To assign server preferences in the global table for all the machines on a subnet:
Run nisprefadm with the -G and -C subnet options.
#nisprefadm -G -a -C subnet servers (preferences) |
Where:
-C subnet identifies the IP number of the subnet the preferences will apply to.
servers(preferences) are one or more servers with optional preference ranking numbers.
For example, to specify that the subnet 123.123.123.123 use the nismaster and replica3 servers with default preference number s of zero and the manf.replica6 server with a preference number of 1:
polaris# nisprefadm -a -G -C 123.123.123.123 nismaster1 \ replica3 "manf.replica6(1)" |
#nisprefadm -G -a -C machine servers (preferences) |
Where:
-C machine identifies the machine the preferences will apply to. (Depending on the shell you are using, you may need to enclose machine in quotes.)
servers(preferences) are one or more servers with optional preference ranking numbers.
For example, to replace the current preferences for the machine cygnus with replica7 and replica9 both with a default preference number of zero:
polaris# nisprefadm -u -G -C cygnus replica7 replica9 |
To assign server preferences for an individual machine in a remote domain or all the machines on a subnet in a remote domain:
Run nisprefadm with the -C, -G, and -d options.
#nisprefadm -a -G -C name \ -d domain servers(preferences) |
Where:
name is the IP number of a subnet or the name of a machine. The modifications you make with this command apply to the subnet or machine that you name.
domainname is the name of the remote domain.
servers(preferences) are one or more servers with optional preference ranking numbers.
For example, to add the nismaster2 server with a default preference number of zero to the preferred server list of the 111.11.111.11 subnet in the remote sales.doc.com domain:
polaris# nisprefadm -a -G -C 111.11.111.11 -d sales.doc.com. nismaster2 |